mirror of
https://github.com/amazon-science/chronos-forecasting
synced 2026-05-24 01:58:27 +00:00
*Issue #, if available:* *Description of changes:* This PR adds the Chronos-2 model. * Chronos-2 modeling and pipeline code, including tests. * Updated `pyproject.toml`. Merge `training` and `evaluation` extras into a single `dev` extra. This stuff is only relevant for the Chronos models. * Added `predict_fev` to `BaseChronosPipeline`. * Changes to `InstanceNorm` for Chronos-Bolt to make it general and compatible with Chronos-2. * Minor renaming and polishing in the inference code for Chronos and Chronos-Bolt. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Oleksandr Shchur <oleks.shchur@gmail.com>
44 lines
1.7 KiB
YAML
44 lines
1.7 KiB
YAML
# Evaluates Chronos-Bolt (Small) model on selected datasets
|
|
name: Evaluate
|
|
|
|
on:
|
|
# Runs only with read privilages for the GITHUB_TOKEN
|
|
pull_request:
|
|
branches: ["main"] # Run on PRs to main branch
|
|
types:
|
|
- opened # When a PR is created
|
|
- reopened # When a closed PR is reopened
|
|
- synchronize # When new commits are pushed to the PR
|
|
- labeled # When a label is added to the PR
|
|
|
|
jobs:
|
|
evaluate-and-print:
|
|
if: contains(github.event.pull_request.labels.*.name, 'run-eval') # Only run if 'run-eval' label is added
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CHRONOS_BOLT_RESULTS_CSV: "eval-ci-metrics-chronos-bolt-${{ github.event.pull_request.number }}.csv"
|
|
CHRONOS_2_RESULTS_CSV: "eval-ci-metrics-chronos-2-${{ github.event.pull_request.number }}.csv"
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install Dependencies
|
|
run: pip install ".[dev]" -f https://download.pytorch.org/whl/cpu/torch_stable.html
|
|
|
|
- name: Run Eval Script for Chronos-2
|
|
run: python scripts/evaluation/evaluate.py chronos-2 ci/evaluate/backtest_config.yaml $CHRONOS_2_RESULTS_CSV --model-id=s3://autogluon/chronos-2 --device=cpu --torch-dtype=float32
|
|
|
|
- name: Print Chronos-2 CSV
|
|
run: cat $CHRONOS_2_RESULTS_CSV
|
|
|
|
- name: Run Eval Script for Chronos-Bolt
|
|
run: python scripts/evaluation/evaluate.py chronos-bolt ci/evaluate/backtest_config.yaml $CHRONOS_BOLT_RESULTS_CSV --model-id=amazon/chronos-bolt-small --device=cpu --torch-dtype=float32
|
|
|
|
- name: Print Chronos-Bolt CSV
|
|
run: cat $CHRONOS_BOLT_RESULTS_CSV
|