fix: copy model in the right workflow #5
Workflow file for this run
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
# Checks model performance, and retrains | |
# if model degradation is detected | |
name: Performance Evaluation | |
on: | |
workflow_run: # Trigger after another workflow completes | |
workflows: ["Production Data Batching"] | |
types: | |
- completed | |
push: | |
branches: ijdoc/issue9 | |
jobs: | |
eval_check: | |
runs-on: self-hosted | |
outputs: # Define outputs for downstream jobs | |
drift_detected: ${{ steps.eval_check.outputs.degraded }} | |
steps: | |
- name: ⏬ Checkout repository | |
uses: actions/checkout@v4 | |
- name: 📦 Grab dependencies | |
run: | | |
cp transformer_model.py eval/ | |
- name: ⚙️ Run Evaluation | |
env: | |
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }} | |
id: eval_check | |
run: | | |
cd eval | |
output=$(python eval.py) | |
echo "$output" >> $GITHUB_STEP_SUMMARY | |
# Uncomment the following block to automatically | |
# retrain the model when drift is detected | |
# retrain: | |
# needs: eval_check | |
# if: ${{ needs.eval_check.outputs.drift_detected == 'True' }} | |
# runs-on: self-hosted | |
# steps: | |
# - name: ⏬ Checkout repository | |
# uses: actions/checkout@v4 | |
# - name: ⚙️ Train! | |
# env: | |
# WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }} | |
# run: | | |
# python train.py |