Skip to content

Commit

Permalink
feat: add models performance workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AzulGarza committed Nov 1, 2023
1 parent 28e8555 commit 381c104
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/models-performance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Models Performance

permissions: write-all

on:
pull_request:
types: [opened, synchronize, reopened]

defaults:
run:
shell: bash -l {0}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run-all-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Clone repo
uses: actions/checkout@v2

- name: Set up environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
create-args: python='3.10'
cache-environment: true

- name: Install pip requirements
run: pip install ./

- name: Run evaluation
env:
TIMEGPT_TOKEN: ${{ secrets.TIMEGPT_TOKEN }}
TIMEGPT_API_URL: ${{ secrets.TIMEGPT_API_URL }}
TIMEGPT_CUSTOM_URL_TOKEN: ${{ secrets.TIMEGPT_CUSTOM_URL_TOKEN }}
TIMEGPT_CUSTOM_URL: ${{ secrets.TIMEGPT_CUSTOM_URL }}
API_KEY_FRED: ${{ secrets.API_KEY_FRED }}
run: python -m action_files.models_performance.main

- name: Upload images to new branch main
run: |
git config --global user.email [email protected]
git config --global user.name AzulGarza
git push https://[email protected]/nixtla/nixtla.git --delete docs/figs-model-performance || true
git checkout -b docs/figs-model-performance
git add -f "*.png"
git commit -m "[cd] update png images" || echo "No changes to commit"
git push https://[email protected]/nixtla/nixtla.git HEAD:docs/figs-model-performance
- name: Upload results to the PR
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const markdown = fs.readFileSync('./action_files/models_performance/summary.md', 'utf8');
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: markdown
});
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 381c104

Please sign in to comment.