-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
132 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Python 3.6 examples | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} | ||
- name: Install dependencies | ||
run: | | ||
make dev | ||
# - name: Lint with flake8 | ||
# run: | | ||
# # stop the build if there are Python syntax errors or undefined names | ||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Run examples | ||
run: | | ||
make test_examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Python 3.6 | ||
name: Python 3.6 unit tests | ||
|
||
on: [push] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Python 3.7 | ||
name: Python 3.7 unit tests | ||
|
||
on: [push] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Python 3.8 | ||
name: Python 3.8 unit tests | ||
|
||
on: [push] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
n_numeric_features = 10 | ||
n_informative_numeric_features = 5 | ||
n_categorical_features = 1 | ||
make_regression_init_kwargs = { | ||
f'type_{i}': { | ||
'n_samples': round(1_00/n_categorical_features), | ||
'noise': 100, | ||
'n_features': n_numeric_features, | ||
'n_informative': n_informative_numeric_features, | ||
'coef': True, | ||
'random_state': i, | ||
} | ||
for i in range(n_categorical_features) | ||
} | ||
test_size = 0.2 | ||
n_splits = 1 | ||
contenders_spec = [ | ||
{ | ||
# This is the algo | ||
'__model': ['metaflow_helper.model_handlers.LightGBMRegressorHandler'], | ||
# These go to the model initializer | ||
'__init_kwargs__model__learning_rate': [0.1], | ||
'__init_kwargs__model__max_depth': [1], | ||
'__init_kwargs__model__n_estimators': [10], | ||
# These go to the model fitter | ||
'__fit_kwargs__model__eval_metric': ['mse'], | ||
'__fit_kwargs__model__early_stopping_rounds': [2], | ||
'__fit_kwargs__model__verbose': [0], | ||
}, | ||
{ | ||
# This is the algo | ||
'__model': ['metaflow_helper.model_handlers.KerasRegressorHandler'], | ||
# These go to the model initializer | ||
'__init_kwargs__model__build_model': ['metaflow_helper.model_handlers.build_keras_regression_model'], | ||
'__init_kwargs__model__metric': ['mse'], | ||
'__init_kwargs__model__dense_layer_widths': [(),], | ||
# These go to the model fitter | ||
'__fit_kwargs__model__batch_size': [None], | ||
'__fit_kwargs__model__epochs': [100], | ||
'__fit_kwargs__model__validation_split': [0.2], | ||
'__fit_kwargs__model__monitor': ['val_mse'], | ||
'__fit_kwargs__model__verbose': [0], | ||
'__fit_kwargs__model__patience': [2], | ||
'__fit_kwargs__model__min_delta': [0.1], | ||
}, | ||
] | ||
dependencies = [ | ||
{'metaflow_helper': 'git+ssh://[email protected]/fwhigh/metaflow-helper.git'}, | ||
] | ||
auto_open_figures = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters