Change some values #2
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
| name: CML | |
| on: [push] | |
| jobs: | |
| launch-runner: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: iterative/setup-cml@v1 | |
| - name: Deploy runner on AWS EC2 | |
| # Supports AWS, Azure, GCP, K8s | |
| env: | |
| REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} | |
| run: | | |
| cml runner launch \ | |
| --cloud=aws \ | |
| --cloud-region=us-east-1 \ | |
| --cloud-type=p2.xlarge \ | |
| --cloud-hdd-size=64 \ | |
| --labels=cml-gpu | |
| train-and-report: | |
| runs-on: [self-hosted, cml-gpu] | |
| needs: launch-runner | |
| timeout-minutes: 50400 # 35 days | |
| container: | |
| image: docker://iterativeai/cml:0-dvc2-base1-gpu | |
| options: --gpus all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Train model | |
| run: | | |
| dvc pull transfer | |
| pip install -r requirements.txt | |
| dvc repro | |
| - name: Create CML report | |
| run: | | |
| cml ci | |
| git show origin/main:image.png > image-main.png | |
| cat <<EOF > report.md | |
| # Style transfer | |
| ## Workspace vs. Main | |
|   | |
| ## Training metrics | |
| $(dvc params diff main --show-md) | |
| ## GPU info | |
| $(cat gpu_info.txt) | |
| EOF | |
| cml comment create report.md | |
| env: | |
| REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |