Skip to content

Commit 8af67d1

Browse files
authored
Fix editable install failure: migrate packaging metadata to PEP 621 (pyproject.toml) (#1538)
1 parent e5118da commit 8af67d1

3 files changed

Lines changed: 164 additions & 165 deletions

File tree

flaml/py.typed

Whitespace-only changes.

pyproject.toml

Lines changed: 163 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,168 @@
11
[build-system]
22
requires = ["setuptools>=64", "wheel"]
3-
build-backend = "setuptools.build_meta:__legacy__"
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "FLAML"
7+
dynamic = ["version"]
8+
description = "A fast library for automated machine learning and tuning"
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
license = {text = "MIT"}
12+
authors = [
13+
{name = "Microsoft Corporation", email = "hpo@microsoft.com"},
14+
]
15+
classifiers = [
16+
"License :: OSI Approved :: MIT License",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
23+
]
24+
dependencies = [
25+
"NumPy>=1.17",
26+
]
27+
28+
[project.urls]
29+
Homepage = "https://github.com/microsoft/FLAML"
30+
31+
[project.optional-dependencies]
32+
automl = [
33+
"lightgbm>=2.3.1",
34+
"xgboost>=0.90,<3.0.0",
35+
"scipy>=1.4.1",
36+
"pandas>=1.1.4",
37+
"scikit-learn>=1.0.0",
38+
]
39+
notebook = [
40+
"jupyter",
41+
]
42+
spark = [
43+
"pyspark>=3.2.0",
44+
"pandas<3",
45+
"joblibspark>=0.5.0",
46+
"joblib<=1.3.2",
47+
]
48+
test = [
49+
"numpy>=1.17,<2.0.0; python_version<'3.13'",
50+
"numpy>=1.17; python_version>='3.13'",
51+
"jupyter",
52+
"lightgbm>=2.3.1",
53+
"xgboost>=0.90,<2.0.0; python_version<'3.11'",
54+
"xgboost>=2.0.0; python_version>='3.11'",
55+
"scipy>=1.4.1",
56+
"pandas>=1.1.4",
57+
"scikit-learn>=1.2.0",
58+
"thop",
59+
"pytest>=6.1.1",
60+
"pytest-rerunfailures>=13.0",
61+
"coverage>=5.3",
62+
"pre-commit",
63+
"torch",
64+
"torchvision",
65+
"catboost>=0.26",
66+
"rgf-python",
67+
"optuna>=2.8.0,<=3.6.1",
68+
"openml",
69+
"statsmodels>=0.12.2",
70+
"psutil",
71+
"transformers[torch]",
72+
"datasets",
73+
"evaluate",
74+
"nltk!=3.8.2",
75+
"rouge_score",
76+
"hcrystalball",
77+
"seqeval",
78+
"pytorch-forecasting",
79+
"mlflow-skinny<=2.22.1",
80+
"joblibspark>=0.5.0",
81+
"joblib<=1.3.2",
82+
"nbconvert",
83+
"nbformat",
84+
"ipykernel",
85+
"pytorch-lightning",
86+
"tensorboardX",
87+
"requests",
88+
"packaging",
89+
"dill",
90+
]
91+
catboost = [
92+
"catboost>=0.26",
93+
]
94+
blendsearch = [
95+
"optuna>=2.8.0,<=3.6.1",
96+
"packaging",
97+
]
98+
ray = [
99+
"ray[tune]>=1.13,<2.5.0",
100+
]
101+
azureml = [
102+
"azureml-mlflow",
103+
]
104+
nni = [
105+
"nni",
106+
]
107+
vw = [
108+
"vowpalwabbit>=8.10.0, <9.0.0",
109+
"scikit-learn",
110+
]
111+
hf = [
112+
"transformers[torch]>=4.26",
113+
"datasets",
114+
"nltk<=3.8.1",
115+
"rouge_score",
116+
"seqeval",
117+
]
118+
nlp = [
119+
"transformers[torch]>=4.26",
120+
"datasets",
121+
"nltk<=3.8.1",
122+
"rouge_score",
123+
"seqeval",
124+
]
125+
ts_forecast = [
126+
"holidays",
127+
"prophet>=1.1.5",
128+
"statsmodels>=0.12.2",
129+
"hcrystalball>=0.1.10",
130+
]
131+
forecast = [
132+
"holidays",
133+
"prophet>=1.1.5",
134+
"statsmodels>=0.12.2",
135+
"hcrystalball>=0.1.10",
136+
"pytorch-forecasting>=0.10.4",
137+
"pytorch-lightning>=1.9.0",
138+
"tensorboardX>=2.6",
139+
]
140+
benchmark = [
141+
"catboost>=0.26",
142+
"psutil==5.8.0",
143+
"xgboost==1.3.3",
144+
"pandas==1.1.4",
145+
]
146+
synapse = [
147+
"joblibspark>=0.5.0",
148+
"optuna>=2.8.0,<=3.6.1",
149+
"pyspark>=3.2.0",
150+
]
151+
autozero = [
152+
"scikit-learn",
153+
"pandas",
154+
"packaging",
155+
]
156+
157+
[tool.setuptools.dynamic]
158+
version = {attr = "flaml.version.__version__"}
159+
160+
[tool.setuptools.packages.find]
161+
include = ["flaml*"]
162+
163+
[tool.setuptools.package-data]
164+
"flaml.default" = ["*/*.json"]
165+
flaml = ["py.typed"]
4166

5167
[tool.pytest.ini_options]
6168
addopts = '-m "not conda"'

setup.py

Lines changed: 1 addition & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,3 @@
1-
import os
2-
31
import setuptools
42

5-
here = os.path.abspath(os.path.dirname(__file__))
6-
7-
with open("README.md", encoding="UTF-8") as fh:
8-
long_description = fh.read()
9-
10-
11-
# Get the code version
12-
version = {}
13-
with open(os.path.join(here, "flaml/version.py")) as fp:
14-
exec(fp.read(), version)
15-
__version__ = version["__version__"]
16-
17-
install_requires = [
18-
"NumPy>=1.17",
19-
]
20-
21-
22-
setuptools.setup(
23-
name="FLAML",
24-
version=__version__,
25-
author="Microsoft Corporation",
26-
author_email="hpo@microsoft.com",
27-
description="A fast library for automated machine learning and tuning",
28-
long_description=long_description,
29-
long_description_content_type="text/markdown",
30-
url="https://github.com/microsoft/FLAML",
31-
packages=setuptools.find_packages(include=["flaml*"]),
32-
package_data={
33-
"flaml.default": ["*/*.json"],
34-
},
35-
include_package_data=True,
36-
install_requires=install_requires,
37-
extras_require={
38-
"automl": [
39-
"lightgbm>=2.3.1",
40-
"xgboost>=0.90,<3.0.0",
41-
"scipy>=1.4.1",
42-
"pandas>=1.1.4",
43-
"scikit-learn>=1.0.0",
44-
],
45-
"notebook": [
46-
"jupyter",
47-
],
48-
"spark": [
49-
"pyspark>=3.2.0",
50-
"pandas<3",
51-
"joblibspark>=0.5.0",
52-
"joblib<=1.3.2",
53-
],
54-
"test": [
55-
"numpy>=1.17,<2.0.0; python_version<'3.13'",
56-
"numpy>=1.17; python_version>='3.13'",
57-
"jupyter",
58-
"lightgbm>=2.3.1",
59-
"xgboost>=0.90,<2.0.0; python_version<'3.11'",
60-
"xgboost>=2.0.0; python_version>='3.11'",
61-
"scipy>=1.4.1",
62-
"pandas>=1.1.4,<2.0.0; python_version<'3.10'",
63-
"pandas>=1.1.4; python_version>='3.10'",
64-
"scikit-learn>=1.2.0",
65-
"thop",
66-
"pytest>=6.1.1",
67-
"pytest-rerunfailures>=13.0",
68-
"coverage>=5.3",
69-
"pre-commit",
70-
"torch",
71-
"torchvision",
72-
"catboost>=0.26",
73-
"rgf-python",
74-
"optuna>=2.8.0,<=3.6.1",
75-
"openml",
76-
"statsmodels>=0.12.2",
77-
"psutil",
78-
"dataclasses",
79-
"transformers[torch]",
80-
"datasets",
81-
"evaluate",
82-
"nltk!=3.8.2", # 3.8.2 doesn't work with mlflow
83-
"rouge_score",
84-
"hcrystalball",
85-
"seqeval",
86-
"pytorch-forecasting",
87-
"mlflow-skinny<=2.22.1", # Refer to https://mvnrepository.com/artifact/org.mlflow/mlflow-spark
88-
"joblibspark>=0.5.0",
89-
"joblib<=1.3.2",
90-
"nbconvert",
91-
"nbformat",
92-
"ipykernel",
93-
"pytorch-lightning", # test_forecast_panel
94-
"tensorboardX", # test_forecast_panel
95-
"requests", # https://github.com/docker/docker-py/issues/3113
96-
"packaging",
97-
"dill", # a drop in replacement of pickle
98-
],
99-
"catboost": [
100-
"catboost>=0.26",
101-
],
102-
"blendsearch": [
103-
"optuna>=2.8.0,<=3.6.1",
104-
"packaging",
105-
],
106-
"ray": [
107-
"ray[tune]>=1.13,<2.5.0",
108-
],
109-
"azureml": [
110-
"azureml-mlflow",
111-
],
112-
"nni": [
113-
"nni",
114-
],
115-
"vw": [
116-
"vowpalwabbit>=8.10.0, <9.0.0",
117-
"scikit-learn",
118-
],
119-
"hf": [
120-
"transformers[torch]>=4.26",
121-
"datasets",
122-
"nltk<=3.8.1",
123-
"rouge_score",
124-
"seqeval",
125-
],
126-
"nlp": [ # for backward compatibility; hf is the new option name
127-
"transformers[torch]>=4.26",
128-
"datasets",
129-
"nltk<=3.8.1",
130-
"rouge_score",
131-
"seqeval",
132-
],
133-
"ts_forecast": [
134-
"holidays",
135-
"prophet>=1.1.5",
136-
"statsmodels>=0.12.2",
137-
"hcrystalball>=0.1.10",
138-
],
139-
"forecast": [
140-
"holidays",
141-
"prophet>=1.1.5",
142-
"statsmodels>=0.12.2",
143-
"hcrystalball>=0.1.10",
144-
"pytorch-forecasting>=0.10.4",
145-
"pytorch-lightning>=1.9.0",
146-
"tensorboardX>=2.6",
147-
],
148-
"benchmark": ["catboost>=0.26", "psutil==5.8.0", "xgboost==1.3.3", "pandas==1.1.4"],
149-
"synapse": [
150-
"joblibspark>=0.5.0",
151-
"optuna>=2.8.0,<=3.6.1",
152-
"pyspark>=3.2.0",
153-
],
154-
"autozero": ["scikit-learn", "pandas", "packaging"],
155-
},
156-
classifiers=[
157-
"License :: OSI Approved :: MIT License",
158-
"Operating System :: OS Independent",
159-
# Specify the Python versions you support here.
160-
"Programming Language :: Python :: 3",
161-
"Programming Language :: Python :: 3.10",
162-
"Programming Language :: Python :: 3.11",
163-
"Programming Language :: Python :: 3.12",
164-
],
165-
python_requires=">=3.10",
166-
)
3+
setuptools.setup()

0 commit comments

Comments
 (0)