Skip to content

Commit

Permalink
Package (microsoft#244)
Browse files Browse the repository at this point in the history
* build and upload pypi package

* pandas in dependency
  • Loading branch information
sonichi authored Oct 11, 2021
1 parent 948f688 commit ddc1a63
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 5 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflows will build and upload a Python Package using Twine when a release is published
# Conda-forge bot will pick up new PyPI version and automatically create new version
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: CD

on:
release:
types: [published]

jobs:
deploy:
strategy:
matrix:
os: ['ubuntu-latest']
python-version: [3.8]
runs-on: ${{ matrix.os }}
environment: package
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
with:
path: ~/conda_pkgs_dir
key: conda-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('environment.yml') }}
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: hcrystalball
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true
- name: Install from source
# This is required for the pre-commit tests
shell: pwsh
run: pip install .
- name: Conda list
shell: pwsh
run: conda list
- name: Build
shell: pwsh
run: |
pip install twine
python setup.py sdist bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
shell: pwsh
run: twine upload dist/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ automl_settings = {
"time_budget": 10, # in seconds
"metric": 'r2',
"task": 'regression',
"log_file_name": "test/california.log",
"log_file_name": "test/boston.log",
}
X_train, y_train = fetch_california_housing(return_X_y=True)
# Train with labeled input data
Expand Down
2 changes: 1 addition & 1 deletion flaml/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.6"
__version__ = "0.6.7"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"lightgbm>=2.3.1",
"xgboost>=0.90,<=1.3.3",
"scipy>=1.4.1",
# "catboost>=0.23", # making optional for conda
"pandas>=1.1.4",
"scikit-learn>=0.24",
]

Expand Down
4 changes: 2 additions & 2 deletions test/test_automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def test_regression(self):
automl_settings = {
"time_budget": 2,
"task": "regression",
"log_file_name": "test/california.log",
"log_file_name": "test/boston.log",
"log_training_metric": True,
"n_jobs": 1,
"model_history": True,
Expand Down Expand Up @@ -625,7 +625,7 @@ def test_parallel(self, hpo_method=None):
automl_settings = {
"time_budget": 10,
"task": "regression",
"log_file_name": "test/california.log",
"log_file_name": "test/boston.log",
"log_type": "all",
"n_jobs": 1,
"n_concurrent_trials": 2,
Expand Down

0 comments on commit ddc1a63

Please sign in to comment.