train #95
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
name: train | |
on: | |
workflow_dispatch: | |
inputs: | |
model: | |
type: choice | |
description: Model type to train | |
default: 'small' | |
options: | |
- full | |
- small | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
jobs: | |
run: | |
environment: aws | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: iterative/setup-dvc@v1 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- 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: 3600 | |
- name: train | |
env: | |
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DVCLIVE_LOG_LEVEL: DEBUG | |
DVC_STUDIO_TOKEN: ${{ secrets.STUDIO_TOKEN }} | |
run: | | |
pip install --upgrade -r requirements.txt | |
git config user.name "Github-Bot" | |
git config user.email "[email protected]" | |
dvc exp run --pull --allow-missing -S model=${{ github.event.inputs.model }} | |
dvc exp push -v --rev HEAD origin | |
gto -v register best |