Skip to content
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

Add parent-sha input #257

Merged
merged 5 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Deploy model

on:
push:
# When a new version is registered in Studio Model Registry
tags:
- "results/train=pool-segmentation#*"
- "*"
Copy link
Contributor Author

@daavoo daavoo Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was dependent on a hardcoded model name and it got broken after the prefix was removed.
It should be okay to trigger on all tags as there is a check below that only tries to deploy if gto parses the tag as assigment (I assume it would not that for unrelated tags)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be okay, but in theory we need to account for repos with multiple models, right? What do you think is best? Should we filter here or parse info from gto below?


workflow_dispatch:
inputs:
Expand Down Expand Up @@ -35,15 +34,15 @@ jobs:

deploy-model:
needs: parse
if: ${{ needs.parse.outputs.event }} == 'assignment'
if: "${{ needs.parse.outputs.event == 'assignment' }}"
environment: cloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: aws-actions/configure-aws-credentials@v2
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-to-assume: ${{ vars.AWS_SAGEMAKER_ROLE }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
required: false
type: string
default: ''
parent-sha:
description: 'SHA of the commit to start the experiment from'
required: false
type: string
default: ''
cloud:
description: 'Cloud compute provider to host the runner'
required: false
Expand Down Expand Up @@ -60,8 +65,10 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.parent-sha || '' }}
- uses: iterative/setup-cml@v1
- uses: aws-actions/configure-aws-credentials@v1
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-to-assume: ${{ vars.AWS_SANDBOX_ROLE }}
Expand All @@ -77,19 +84,21 @@ jobs:
--cloud-hdd-size=${{ inputs.storage || '40' }} \
--cloud-type=${{ inputs.type || 'g5.2xlarge' }} \
--idle-timeout=${{ inputs.timeout || '3600' }} \
${{ inputs.spot && '--cloud-spot' }}
${{ (inputs.spot == 'true' && '--cloud-spot') || '' }}

runner-job:
needs: deploy-runner
runs-on: [ self-hosted, cml ]
environment: cloud
container:
image: iterativeai/cml:0-dvc2-base1-gpu
image: iterativeai/cml:latest-gpu

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this working or broken?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are broken 😢

options: --gpus all --ipc host

steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
ref: ${{ inputs.parent-sha || '' }}
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-to-assume: ${{ vars.AWS_SANDBOX_ROLE }}
Expand Down
Loading