-
Notifications
You must be signed in to change notification settings - Fork 13
Add example-get-started-experiments #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2872bdb
Add example-get-started-cv.
daavoo 891a926
Updates to script and notebook
daavoo 72b0d64
Update generate.sh
daavoo 74eb8be
Add run-studio-experiment.yml
daavoo 9d6406d
Updates from Review
daavoo a7efbe1
newline
daavoo af7d05b
Add eval metrics notebook (#162)
alex000kim 7bcb5e6
move data pull
daavoo f57ab78
notebook updates
daavoo 42155a8
update params
daavoo a0fdeb8
Update log_params
daavoo e59b270
fix evaluate results dir
daavoo acfe482
cleanup
daavoo 1723dea
Rename to example-get-started-experiments
daavoo c19286c
Update README
daavoo 9fdf0e2
run generate.sh
daavoo dbea15a
Add root .devcontainer.json
daavoo ff301ca
Update README
daavoo 1098c17
Delete .devconainer.json
daavoo 7883bcc
full run. update README
daavoo 74ab140
Update aws role in github workflow
daavoo f388778
Use base_lr from notebook iterations
daavoo 89f9c6a
Add environment: cloud
daavoo e328c55
Update lates requirements
daavoo c621091
format READMES
daavoo 135f7e4
format generate.sh
daavoo 09832e9
fix typo
daavoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| # Custom | ||
| *.zip | ||
| /tmp | ||
| build/ |
This file contains hidden or 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,61 @@ | ||
| Generate the actual repo by running: | ||
|
|
||
| ``` | ||
| bash generate.sh | ||
| ``` | ||
|
|
||
| The repo generated in `build/example-get-started-experiments` is intended to be | ||
| published on https://github.com/iterative/example-get-started-experiments. | ||
| Make sure the Github repo exists first and that you have appropriate write | ||
| permissions. | ||
|
|
||
| Run these commands to force push it: | ||
|
|
||
| ``` | ||
| cd build/example-get-started-experiments | ||
| git remote add origin https://github.com/iterative/example-get-started-experiments.git | ||
| git push --force origin main | ||
| git push --force origin tune-architecture | ||
| git push --force origin --tags | ||
| ``` | ||
|
|
||
| Run these to drop and then rewrite the experiment references on the repo: | ||
|
|
||
| ``` | ||
| dvc exp remove -A -g origin | ||
| dvc exp push origin -A | ||
| ``` | ||
|
|
||
| And this to clean the remote cache to only contain the last iteration: | ||
|
|
||
| ``` | ||
| dvc gc -c --all-experiments | ||
| ``` | ||
|
|
||
| - `tune-architecture` P.R. | ||
|
|
||
| To create a PR from the "tune-architecture" branch: | ||
|
|
||
| ``` | ||
| gh pr create -t "Run experiments tuning architecture" \ | ||
| -B main -H tune-architecture | ||
| ``` | ||
|
|
||
| Finally, return to the directory where you started: | ||
|
|
||
| ``` | ||
| cd ../.. | ||
| ``` | ||
|
|
||
| You may remove the generated repo with: | ||
|
|
||
| ``` | ||
| rm -fR build | ||
| ``` | ||
|
|
||
| - Manual Studio P.R. | ||
|
|
||
| Once the repo has been generated and pushed, go to the | ||
| [corresponding Studio project](https://studio.iterative.ai/team/Iterative/projects/example-get-started-experiments-y8toqd433r) | ||
| and create a P.R. using the `Experiment` button, increasing epochs from `8` to | ||
| `12`. | ||
This file contains hidden or 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,18 @@ | ||
| { | ||
| "name": "example-cv", | ||
| "image": "mcr.microsoft.com/devcontainers/python:3.10", | ||
| "runArgs": ["--ipc=host"], | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/nvidia-cuda:1": { | ||
| "installCudnn": true | ||
| }, | ||
| "ghcr.io/iterative/features/dvc:1": {}, | ||
| "ghcr.io/iterative/features/nvtop:1": {} | ||
| }, | ||
| "extensions": [ | ||
| "Iterative.dvc", | ||
| "ms-python.python", | ||
| "redhat.vscode-yaml" | ||
| ], | ||
| "postCreateCommand": "pip install --user -r requirements.txt" | ||
| } |
This file contains hidden or 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,2 @@ | ||
| *.dvc linguist-language=YAML | ||
| dvc.lock linguist-language=YAML |
57 changes: 57 additions & 0 deletions
57
example-get-started-experiments/code/.github/workflows/run-studio-experiment.yml
This file contains hidden or 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,57 @@ | ||
| name: Run Studio Experiment | ||
| on: | ||
| push: | ||
| paths: | ||
| - ".github/workflows/run-experiment.yaml" | ||
| - "data/**" | ||
| - "src/**" | ||
| - "params.yaml" | ||
| - "dvc.*" | ||
| jobs: | ||
| deploy-runner: | ||
| if: github.actor == 'iterative-studio[bot]' | ||
| environment: cloud | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: iterative/setup-cml@v1 | ||
| - uses: aws-actions/configure-aws-credentials@v1 | ||
| with: | ||
| aws-region: us-east-2 | ||
| role-to-assume: arn:aws:iam::342840881361:role/SandboxUser | ||
| role-duration-seconds: 43200 | ||
| - name: Create Runner | ||
| env: | ||
| REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
| run: | | ||
| cml runner launch --single \ | ||
| --labels=cml \ | ||
| --cloud=aws \ | ||
| --cloud-region=us-east \ | ||
| --cloud-hdd-size=40 \ | ||
| --cloud-type=g5.2xlarge | ||
| runner-job: | ||
| needs: deploy-runner | ||
| runs-on: [ self-hosted, cml ] | ||
| container: | ||
| image: iterativeai/cml:0-dvc2-base1-gpu | ||
| options: --gpus all --ipc host | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: aws-actions/configure-aws-credentials@v1 | ||
| with: | ||
| aws-region: us-east-1 | ||
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
| - name: training | ||
| env: | ||
| REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
| STUDIO_TOKEN: ${{ secrets.STUDIO_TOKEN }} | ||
| DVCLIVE_LOGLEVEL: DEBUG | ||
| run: | | ||
| pip install -r requirements.txt | ||
| dvc pull | ||
| cml comment create --publish --watch results/train/report.md & dvc exp run | ||
| dvc push | ||
| cml pr --squash --skip-ci . | ||
| cml comment create --pr --publish results/evaluate/report.md |
This file contains hidden or 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,129 @@ | ||
| # Byte-compiled / optimized / DLL files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
|
|
||
| # C extensions | ||
| *.so | ||
|
|
||
| # Distribution / packaging | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| pip-wheel-metadata/ | ||
| share/python-wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
| MANIFEST | ||
|
|
||
| # PyInstaller | ||
| # Usually these files are written by a python script from a template | ||
| # before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
| *.manifest | ||
| *.spec | ||
|
|
||
| # Installer logs | ||
| pip-log.txt | ||
| pip-delete-this-directory.txt | ||
|
|
||
| # Unit test / coverage reports | ||
| htmlcov/ | ||
| .tox/ | ||
| .nox/ | ||
| .coverage | ||
| .coverage.* | ||
| .cache | ||
| nosetests.xml | ||
| coverage.xml | ||
| *.cover | ||
| *.py,cover | ||
| .hypothesis/ | ||
| .pytest_cache/ | ||
|
|
||
| # Translations | ||
| *.mo | ||
| *.pot | ||
|
|
||
| # Django stuff: | ||
| *.log | ||
| local_settings.py | ||
| db.sqlite3 | ||
| db.sqlite3-journal | ||
|
|
||
| # Flask stuff: | ||
| instance/ | ||
| .webassets-cache | ||
|
|
||
| # Scrapy stuff: | ||
| .scrapy | ||
|
|
||
| # Sphinx documentation | ||
| docs/_build/ | ||
|
|
||
| # PyBuilder | ||
| target/ | ||
|
|
||
| # Jupyter Notebook | ||
| .ipynb_checkpoints | ||
|
|
||
| # IPython | ||
| profile_default/ | ||
| ipython_config.py | ||
|
|
||
| # pyenv | ||
| .python-version | ||
|
|
||
| # pipenv | ||
| # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
| # However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
| # having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
| # install all needed dependencies. | ||
| #Pipfile.lock | ||
|
|
||
| # PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
| __pypackages__/ | ||
|
|
||
| # Celery stuff | ||
| celerybeat-schedule | ||
| celerybeat.pid | ||
|
|
||
| # SageMath parsed files | ||
| *.sage.py | ||
|
|
||
| # Environments | ||
| .env | ||
| .venv | ||
| env/ | ||
| venv/ | ||
| ENV/ | ||
| env.bak/ | ||
| venv.bak/ | ||
|
|
||
| # Spyder project settings | ||
| .spyderproject | ||
| .spyproject | ||
|
|
||
| # Rope project settings | ||
| .ropeproject | ||
|
|
||
| # mkdocs documentation | ||
| /site | ||
|
|
||
| # mypy | ||
| .mypy_cache/ | ||
| .dmypy.json | ||
| dmypy.json | ||
|
|
||
| # Pyre type checker | ||
| .pyre/ |
This file contains hidden or 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,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2022 Iterative | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.