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

Restyle Get Started: Model Management #4992

Merged
merged 1 commit into from
Nov 16, 2023
Merged
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
35 changes: 17 additions & 18 deletions content/docs/start/model-management/model-cicd.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,16 @@ on:
# the workflow is triggered whenever a tag is pushed to the repository
push:
tags:
- "*"
- '*'
jobs:

# This job parses the git tag with the GTO GitHub Action to identify model registry actions
parse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Parse GTO tag"
id: gto
uses: iterative/gto-action@v2
- uses: actions/checkout@v3
- name: 'Parse GTO tag'
id: gto
uses: iterative/gto-action@v2
outputs:
event: ${{ steps.gto.outputs.event }}
name: ${{ steps.gto.outputs.name }}
Expand All @@ -222,18 +221,18 @@ jobs:
# using the outputs from the "parse" job, we run this job only for actions
# in the model registry and only when the model was assigned to a stage called "prod"
# You can replace this with your own conditions
if: ${{ needs.parse.outputs.event == 'assignment' && needs.parse.outputs.stage == 'prod' }}
if:
${{ needs.parse.outputs.event == 'assignment' && needs.parse.outputs.stage
== 'prod' }}
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-dvc@v1
# this step uses DVC to download the model from the remote repository and deploys the model
# Model deployment is mocked here as it is specific to each deployment environment
# The DVC Studio token is used to avoid having to store specific remote storage credentials on GitHub
- name: Get Model For Deployment
run: |
dvc config --global studio.token ${{ secrets.DVC_STUDIO_TOKEN }}
dvc artifacts get ${{ github.server_url }}/${{ github.repository }} ${{ needs.parse.outputs.name }} --rev ${{ needs.parse.outputs.version }}
echo "The right model is available and you can use the rest of this command to deploy it. Good job!"


- uses: iterative/setup-dvc@v1
# this step uses DVC to download the model from the remote repository and deploys the model
# Model deployment is mocked here as it is specific to each deployment environment
# The DVC Studio token is used to avoid having to store specific remote storage credentials on GitHub
- name: Get Model For Deployment
run: |
dvc config --global studio.token ${{ secrets.DVC_STUDIO_TOKEN }}
dvc artifacts get ${{ github.server_url }}/${{ github.repository }} ${{ needs.parse.outputs.name }} --rev ${{ needs.parse.outputs.version }}
echo "The right model is available and you can use the rest of this command to deploy it. Good job!"
```