Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
97 changes: 97 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[metadata]
url = https://github.com/microsoft/FLAML
maintainer = Microsoft Corporation
maintainer_email = hpo@microsoft.com
name = FLAML
version = attr: flaml.version.__version__
description = A fast library for automated machine learning and tuning
long_description = file:README.md
long_description_content_type = text/markdown; charset=UTF-8
license = MIT
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
python_requires = >= 3.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: does this way of packaging support python 3.6? I wanted to allow installation in python 3.6 by changing >=3.7 into >=3.6.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am almost completely positive that there shouldn't be a problem but I can't seem to find anything definitive trying to look it up. Would you like for me to add Python 3.6 to the CI matrix?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I knew that CI would not pass in Python 3.6 because an optional dependency (seqeval) doesn't support 3.6 and the test under nlp/ fails. One workaround is to skip those tests in Python 3.6.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then just in terms of replacing setup.py with setup.cfg there shouldn't be a problem, but perhaps it's worth opening a seperate issue for adding support for Python 3.6 and updating this only after the CI is set up.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you test the installation at least? No need to test optional dependencies or any unittests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the same command work in a different version of Python?

Copy link
Collaborator Author

@ZviBaratz ZviBaratz Jun 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, running pip install . from the root directory while a Python 3.9 virtual environment is activated works without a problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Is there a way to allow Python 3.6 installation? Though we do not plan to support Python 3.6 in future, I hope to give Python 3.6 users a grace period to be able to install it before they finish the migration.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Sorry if you already read my previous comment, I had a mistake, this is the correct status]
I rebuilt the devcontainer with Python 3.6 and could verify the installation is working properly with the original setup.py but raising the same exception I was getting before for setup.cfg. I tried looking up possible causes but unfortunately haven't managed to figure this out so far. Seems like collecting requirements for the wheel build isn't succeeding, but nothing seems to resolve it. I tried adding a minimal setup.py but that didn't work either.
I guess the options are either to drop support for 3.6 or wait with this PR until that happens.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. If there is no strong reason to change the packaging format now, perhaps we should wait with this PR. In the same time, let's watch the progress of users' migration.

install_requires =
numpy >= 1.17.0rc1
lightgbm >= 2.3.1
xgboost >= 0.90
scipy >= 1.4.1
pandas >= 1.1.4
scikit-learn >= 0.24
packages = find:
include_package_data = True

[options.packages.find]
include =
flaml*

[options.package_data]
flaml.default =
*/*.json

[options.extras_require]
notebook =
openml == 0.10.2
jupyter
matplotlib
rgf-python
catboost >= 0.26
test =
flake8 >= 3.8.4
pytest >= 6.1.1
coverage >= 5.3
pre-commit
catboost >= 0.26
rgf-python
optuna == 2.8.0
vowpalwabbit
openml
statsmodels >= 0.12.2
psutil == 5.8.0
dataclasses
transformers >= 4.14
datasets
torch
nltk
rouge_score
hcrystalball == 0.1.10
seqeval
protobuf < 4 # to prevent TypeError in ray
catboost =
catboost >= 0.26
blendsearch =
optuna == 2.8.0
ray =
ray[tune] ~= 1.10
protobuf < 4 # to prevent TypeError in ray
azureml =
azureml-mlflow
nni =
nni
vw =
vowpalwabbit
nlp =
transformers >= 4.14
datasets
torch
seqeval
nltk
rouge_score
ts_forecast =
holidays < 0.14 # to prevent installation error for prophet
prophet >= 1.0.1
statsmodels >= 0.12.2
hcrystalball == 0.1.10
forecast =
holidays < 0.14 # to prevent installation error for prophet
prophet >= 1.0.1
statsmodels >= 0.12.2
hcrystalball == 0.1.10
benchmark =
catboost >= 0.26
psutil == 5.8.0
xgboost == 1.3.3
114 changes: 0 additions & 114 deletions setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion website/docs/Contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.

If you are new to GitHub [here](https://help.github.com/categories/collaborating-with-issues-and-pull-requests/) is a detailed help source on getting involved with development on GitHub.
If you are new to GitHub, [here](https://help.github.com/categories/collaborating-with-issues-and-pull-requests/) is a detailed help source on getting involved with development on GitHub.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
Expand All @@ -35,6 +35,7 @@ There is currently no formal reviewer solicitation process. Current reviewers id
### Setup

```bash
pip install -U pip
git clone https://github.com/microsoft/FLAML.git
pip install -e FLAML[test,notebook]
```
Expand Down