Merge pull request #3 from Hestia-Homes/model-test

Model test
This commit is contained in:
quandanrepo 2023-09-11 09:04:31 +01:00 committed by GitHub
commit 88212104f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 4 deletions

View file

@ -0,0 +1,42 @@
name: Register the model for the given pipeline branch
# on:
# push:
# branches:
# - "model-**"
on:
pull_request:
types:
- closed
branches:
- "master"
permissions: write-all
jobs:
Register-New-Model:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install packages to register model
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }}
run: |
pip install --upgrade pip
pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt
- name: Register Model
run: |
REGISTER_MODEL_NAME=$(echo ${{github.ref_name}} | awk -F"-" '{print $1}')
git config user.name "Github-Bot"
git config user.email "Github-Bot"
gto register ${REGISTER_MODEL_NAME}
gto assign ${REGISTER_MODEL_NAME} --stage dev
gto show

View file

@ -1,9 +1,9 @@
name: Build and test model using a dummy prediction pipeline
on:
push:
branches:
- "model-**"
# push:
# branches:
# - "model-**"
pull_request:
branches: [ "master" ]
@ -74,7 +74,7 @@ jobs:
# Compare metrics to master
git fetch --depth=1 origin master:master
dvc metrics diff --md master >> report.md
dvc metrics diff --md --all master >> report.md
cml comment create report.md