-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add option to specify a temporary folder for the experiment. (#5) * added option to rsync input and output data * added docstring * logging to stdout now * fixed script for clusters - now using slurm tmpdir to write temp results * fixing travis * added missing docstring * fixed tensorflow part (method signature change) * renamed variables * Seed for reproducibility (#6) * added option to rsync input and output data * added docstring * logging to stdout now * fixed script for clusters - now using slurm tmpdir to write temp results * fixing travis * added missing docstring * fixed tensorflow part (method signature change) * added seed for pytorch * fixed typo * added comment on how to use seed * fixed flake8 * added test on reproducibility * removed pytorch part from tensorflow * fixed cookiecutter syntax * added check for tensorflow * fixed typo in test file * added command to set the seed in tensorflow * fixed flake8 error * fixed typos * removed duplicate log * typo in docstring * better error message in test * added test to check repro using Orion (#8) * added test to check repro using Orion * more log into travis * more info to debug travis * running two trials for orion * added seed to orion * added orion test to tensorflow part * better log messages in travis * Add support for keras and Pytorch Lighning (#12) * added code for keras - still need to complete all tests * fixed flake8 * started adding PyTorch Lightning support - note that mlflow and loading/saving model still does not work * fixed api change * fixed pytorch early stopping * fixed flake8 * fixed flake8 for pytorch version * fixed keras part for flake8 * added code to resume a model - for pytorch lightning * removed forgotten diff * fixed start_from_scratch (not loading a model even if present) / now printing the val loss in the logs * pytorch lightning now correctly logging under the same run * now pytorch is correctly resuming training and continues to plot in the same mlflow run * added github actions * using a different ubuntu image * printing folder - trying to fix github actions * telling git who I am.. * removed not useful test * fixed typo in test folder * removed travis configuration - using github actions from now on * correctly handling the saved models in pytorch * now passing the full hyper-parameter object to train_impl method (for more flexibility). * added option to ask for gpus in pytorch * improved error message * Fixups for the lightning_and_keras PR (#12) (#22) * Update torch model to pl-lightning model * Refactor train+model impl w/ optim module * Refactor data loader w/ data module for plightning * removing codecov from cookeicutter. (#24) * moving to github actions (#25) * removing coverage computation * moving from travis to gitbug actions. * setting fake name/email for git. * removed (not-correct) duplicate for github actions config file. * fixing tests. * refactored pytorch models. (#26) Co-authored-by: Mirko Bronzi <[email protected]> * running CI also on develop. Co-authored-by: Pierre-Luc St-Charles <[email protected]> * Adding more CI backends. (#27) * added github actions. * moved python version to 3.9 - by default. * added support for azure continuous integration. * updated mlflox/orion dependencies. * now correctly restoring models for pytorch. (#28) * Now running test-coverage locally. (#30) * running test coverage locally. * fixed project name. * correctly allowing mlflow to work in any folder. (#29) * removed duplicate CI. Co-authored-by: Pierre-Luc St-Charles <[email protected]>
- Loading branch information
1 parent
42676a3
commit f139850
Showing
20 changed files
with
637 additions
and
376 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
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
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,27 @@ | ||
jobs: | ||
- job: | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
strategy: | ||
matrix: | ||
Python: | ||
python.version: '{{ cookiecutter.python_version }}' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python $(python.version)' | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
|
||
- script: pip install -e . | ||
displayName: 'Install dependencies' | ||
|
||
- script: sh config/hooks/pre-commit | ||
displayName: 'Running commit hook' | ||
|
||
- script: pytest --cov={{cookiecutter.project_slug}} | ||
displayName: 'Run pytest and display test coverage' | ||
|
||
- script: sh run.sh | ||
workingDirectory: examples/local | ||
displayName: 'Run single toy experiment' |
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,39 @@ | ||
name: unit-tests | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main/develop branch | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: python-{{ cookiecutter.python_version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: {{ cookiecutter.python_version }} | ||
- name: install-dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest | ||
pip install -e . | ||
- name: flake8 | ||
run: | | ||
config/hooks/pre-commit | ||
- name: print env | ||
run: | | ||
env | ||
- name: pytest_and_coverage | ||
run: | | ||
pytest --cov={{cookiecutter.project_slug}} | ||
- name: end2end-toyexp | ||
run: | | ||
cd examples/local | ||
sh run.sh |
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 |
---|---|---|
|
@@ -50,15 +50,40 @@ link your local git to the remote project, which should look like this: | |
git remote add origin [email protected]:{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}.git | ||
git push -u origin master | ||
|
||
### Add Travis | ||
A travis configuration file (`.travis.yml`) is already in your repository (so, no need to | ||
create it). This will run `flake8` and run the tests under `tests`. | ||
### Setup Continuous Integration | ||
|
||
Continuous integration will run the following: | ||
- Unit tests under `tests`. | ||
- End-to-end test under `exmaples/local`. | ||
- `flake8` to check the code syntax. | ||
- Checks on documentation presence and format (using `sphinx`). | ||
|
||
We support the following Continuous Integration providers. | ||
Check the following instructions for more details. | ||
|
||
#### GitHub Actions | ||
|
||
Github actions are already configured in `.github/workflows/tests.yml`. | ||
Github actions are already enabled by default when using Github, so, when | ||
pushing to github, they will be executed automatically for pull requests to | ||
`master` and to `develop`. | ||
|
||
#### Travis | ||
|
||
Travis is already configured in (`.travis.yml`). | ||
|
||
To enable it server-side, just go to https://travis-ci.com/account/repositories and click | ||
` Manage repositories on GitHub`. Give the permission to run on the git repository you just created. | ||
|
||
Note, the link for public project may be https://travis-ci.org/account/repositories . | ||
|
||
#### Azure | ||
|
||
Azure Continuous Integration is already configured in (`.azure_pipeline.yml`). | ||
|
||
To enable it server-side, just in azure and select `.azure_pipeline.yml` as the | ||
configuration one for Continuous Integration. | ||
|
||
## Running the code | ||
|
||
### Run the tests | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
main --data ../data --output output --config config.yaml --disable-progressbar | ||
main --data ../data --output output --config config.yaml --start-from-scratch |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.