Skip to content

Commit

Permalink
Update cml.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dec1costello authored Oct 14, 2024
1 parent e566c74 commit 9dfb042
Showing 1 changed file with 61 additions and 3 deletions.
64 changes: 61 additions & 3 deletions .github/workflows/cml.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: model-training
on: [push]
jobs:
run:
setup-and-train:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: iterative/setup-cml@v1

- name: Set up Python environment
run: |
python -m venv venv
Expand All @@ -20,7 +20,18 @@ jobs:
source venv/bin/activate
python Streamlit/train.py
# Improve this .md
report-and-commit:
runs-on: ubuntu-latest
needs: setup-and-train
steps:
- uses: actions/checkout@v3
- name: Set up Python environment for report
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r Streamlit/requirements.txt
- name: Create report.md
run: |
cat "Streamlit/Training Report/results.txt" > "Streamlit/Training Report/report.md"
Expand All @@ -42,3 +53,50 @@ jobs:
run: |
source venv/bin/activate
cml comment create "Streamlit/Training Report/report.md" --token ${{ secrets.GITHUB_TOKEN }}
# name: model-training
# on: [push]
# jobs:
# run:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# - uses: iterative/setup-cml@v1

# - name: Set up Python environment
# run: |
# python -m venv venv
# source venv/bin/activate
# pip install --upgrade pip
# pip install -r Streamlit/requirements.txt

# - name: Train model
# run: |
# source venv/bin/activate
# python Streamlit/train.py

# # Improve this .md
# - name: Create report.md
# run: |
# cat "Streamlit/Training Report/results.txt" > "Streamlit/Training Report/report.md"
# echo "![](residuals.png)" >> "Streamlit/Training Report/report.md"

# - name: Commit results and report
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
# git add "Streamlit/Training Report/results.txt"
# git add "Streamlit/Training Report/report.md"
# git add "Streamlit/Training Report/residuals.png"
# git commit -m "Add model results and report"
# git push

# - name: Create CML Report
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# source venv/bin/activate
# cml comment create "Streamlit/Training Report/report.md" --token ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9dfb042

Please sign in to comment.