Skip to content
Open
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
16 changes: 13 additions & 3 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.workflow_run.head.sha }}
- name: Install Python 3.12
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -49,9 +49,10 @@ jobs:
run: echo "## Model Benchmark" >> report.md
- name: Write Benchmark Report
run: poetry run python tests/metrics/compareMetrics.py >> report.md
- name: Publish Report with CML
- name: Update report.md plots with CML
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
run: |
echo "<details>\n<summary>Model training plots</summary>\n" >> report.md
echo "## Model Training" >> report.md
Expand All @@ -64,7 +65,16 @@ jobs:
echo "### EnergyPriceDaily" >> report.md
cml asset publish tests/metrics/EnergyPriceDaily.svg --md >> report.md
echo "\n</details>" >> report.md
cml comment update --target=pr report.md # Post reports as comments in GitHub PRs
- name: Post comment to PR with CML
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
run: |
echo
echo $GITHUB_SHA
echo ${{ github.event.pull_request.head.sha }}
echo $GITHUB_REPOSITORY_OWNER
cml comment update --target=pr report.md # post to PR # --target=pr/${{ github.event.pull_request.head.sha }} --repo=${{ github.event.pull_request.head.repo.html_url }}
cml check create --title=ModelReport report.md # update status of check in PR
- name: Upload metrics if on main
uses: actions/upload-artifact@v3
Expand Down