| @@ -16,7 +16,7 @@ jobs: | |||||
| strategy: | strategy: | ||||
| matrix: | matrix: | ||||
| os: [ubuntu-latest, macos-latest, windows-2019] | os: [ubuntu-latest, macos-latest, windows-2019] | ||||
| python-version: ["3.7", "3.8", "3.9", "3.10"] | |||||
| python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | |||||
| steps: | steps: | ||||
| - uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
| @@ -59,20 +59,17 @@ setuptools.setup( | |||||
| "statsmodels>=0.12.2", | "statsmodels>=0.12.2", | ||||
| "psutil==5.8.0", | "psutil==5.8.0", | ||||
| "dataclasses", | "dataclasses", | ||||
| "transformers>=4.14", | |||||
| "transformers[torch]>=4.14", | |||||
| "datasets", | "datasets", | ||||
| "torch", | |||||
| "nltk", | "nltk", | ||||
| "rouge_score", | "rouge_score", | ||||
| "hcrystalball==0.1.10", | "hcrystalball==0.1.10", | ||||
| "seqeval", | "seqeval", | ||||
| "protobuf<4", # to prevent TypeError in ray | |||||
| ], | ], | ||||
| "catboost": ["catboost>=0.26"], | "catboost": ["catboost>=0.26"], | ||||
| "blendsearch": ["optuna==2.8.0"], | "blendsearch": ["optuna==2.8.0"], | ||||
| "ray": [ | "ray": [ | ||||
| "ray[tune]~=1.10", | |||||
| "protobuf<4", # to prevent TypeError in ray | |||||
| "ray[tune]~=1.13", | |||||
| ], | ], | ||||
| "azureml": [ | "azureml": [ | ||||
| "azureml-mlflow", | "azureml-mlflow", | ||||
| @@ -84,12 +81,11 @@ setuptools.setup( | |||||
| "vowpalwabbit", | "vowpalwabbit", | ||||
| ], | ], | ||||
| "nlp": [ | "nlp": [ | ||||
| "transformers>=4.14", | |||||
| "transformers[torch]>=4.14", | |||||
| "datasets", | "datasets", | ||||
| "torch", | |||||
| "seqeval", | |||||
| "nltk", | "nltk", | ||||
| "rouge_score", | "rouge_score", | ||||
| "seqeval", | |||||
| ], | ], | ||||
| "ts_forecast": [ | "ts_forecast": [ | ||||
| "holidays<0.14", # to prevent installation error for prophet | "holidays<0.14", # to prevent installation error for prophet | ||||
| @@ -110,5 +106,5 @@ setuptools.setup( | |||||
| "License :: OSI Approved :: MIT License", | "License :: OSI Approved :: MIT License", | ||||
| "Operating System :: OS Independent", | "Operating System :: OS Independent", | ||||
| ], | ], | ||||
| python_requires=">=3.7", | |||||
| python_requires=">=3.6", | |||||
| ) | ) | ||||
| @@ -4,7 +4,10 @@ import requests | |||||
| from utils import get_toy_data_tokenclassification, get_automl_settings | from utils import get_toy_data_tokenclassification, get_automl_settings | ||||
| @pytest.mark.skipif(sys.platform == "darwin", reason="do not run on mac os") | |||||
| @pytest.mark.skipif( | |||||
| sys.platform == "darwin" or sys.version < "3.7", | |||||
| reason="do not run on mac os or py<3.7", | |||||
| ) | |||||
| def test_tokenclassification(): | def test_tokenclassification(): | ||||
| from flaml import AutoML | from flaml import AutoML | ||||
| @@ -13,7 +16,9 @@ def test_tokenclassification(): | |||||
| automl_settings = get_automl_settings() | automl_settings = get_automl_settings() | ||||
| automl_settings["task"] = "token-classification" | automl_settings["task"] = "token-classification" | ||||
| automl_settings["metric"] = "seqeval:overall_f1" # evaluating based on the overall_f1 of seqeval | |||||
| automl_settings[ | |||||
| "metric" | |||||
| ] = "seqeval:overall_f1" # evaluating based on the overall_f1 of seqeval | |||||
| automl_settings["fit_kwargs_by_estimator"]["transformer"]["label_list"] = [ | automl_settings["fit_kwargs_by_estimator"]["transformer"]["label_list"] = [ | ||||
| "O", | "O", | ||||
| "B-PER", | "B-PER", | ||||