run_chronos2_benchmark.py fails on macOS with default settings (STATIC checkpoint + BATCH_SIZE=16)
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend, machine-learning
Research direction
Start with examples/benchmarks/liander2024/run_chronos2_benchmark.py and trace how its BATCH_SIZE reaches FoundationModelBacktestForecaster.from_workflow and Chronos2Forecaster.predict_batch. Check how the selected checkpoint variant and its static_shapes metadata affect the batch passed to ONNX Runtime. Done means the unchanged macOS benchmark runs with the default static checkpoint, or fails early with a clear explanation and compatible setting.
Written by the indexing model from the issue text.
Description
Describe the bug and its impact
On macOS, CheckpointVariant.recommended() returns STATIC. The static Chronos-2 checkpoint (chronos-2_static.onnx, metadata static_shapes: true, max_covariates: 3) has a frozen batch axis: one forecast window = 1 target row + 3 covariate rows = 4 rows. The Liander 2024 Chronos-2 benchmark example sets BATCH_SIZE = 16, so the first batched backend call sends 64 rows and ONNX Runtime rejects it. The example therefore fails out of the box on macOS.
Affected package(s)
- openstef-core
- openstef-models
- openstef-beam
- openstef-foundation-models
- openstef-meta
- examples / deployment
- docs
- not sure
Steps / code to reproduce
Run examples/benchmarks/liander2024/run_chronos2_benchmark.py unchanged on macOS (Apple silicon), with openstef-foundation-models[cpu]==4.7.0.
Expected behavior
The benchmark runs: either the batch size is compatible with the selected checkpoint variant, or batching is disabled/adapted for static-shape checkpoints.
Actual behavior
File ".../openstef_foundation_models/models/forecasting/chronos2_forecaster.py", line 120, in predict_batch
results.extend(self._forecast(data))
File ".../openstef_foundation_models/models/forecasting/chronos2_forecaster.py", line 137, in _forecast
outputs = self.backend.run(inputs)
File ".../openstef_foundation_models/inference/onnx_backend.py", line 163, in run
results = self._session.run(output_names, dict(inputs))
File ".../onnxruntime/capi/onnxruntime_inference_collection.py", line 395, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Got invalid dimensions for input: group_ids for the following indices
index: 0 Got: 64 Expected: 4
Please fix either the inputs/outputs or the model.
Environment
openstef-foundation-models: 4.7.0
openstef-beam: 4.7.0
openstef-models: 4.7.0
onnxruntime: 1.31.1
Python: 3.12
OS: macOS 26.5.1 (Apple M5)
Additional context
Possible fixes:
- in
FoundationModelBacktestForecaster.from_workflow(or the backtest adapter), capbatch_sizeto 1 when the backend metadata reportsstatic_shapes=True; - or raise a clear error early, similar to the existing
max_covariatescheck inChronos2Forecaster._build_group_matrix; - or, in the example, choose
BATCH_SIZE = 1when the selected variant isSTATIC.
Workaround: Chronos2.BASE.checkpoint(CheckpointVariant.DYNAMIC); with it the example runs, and results are identical for BATCH_SIZE = 1 and 16.
Would you be interested in submitting a fix?
- I'd be interested in opening a PR for this once triaged
- Dominant language
- Python
- Stars
- 169
- Forks
- 59
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenSTEF/openstef
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 2 days
-
Add support for LightGBM importance_type hyperparameterPossibly taken @divya234-hue claimed this 20 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
chore github-actions
Difficulty 3/5 1-2 days Newbie friendliness 67/100
Maintainers usually reply within 2 days
-
Add RMSEPossibly taken @SANJANAKUMARI83 claimed this 1 day ago. Openenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
Maintainers usually reply within 2 days
All issues in OpenSTEF/openstef
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
software-mansion-labs/Diplomat#20 ·
Maintainers usually reply within 1 day
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
View Counts discarded due to field name mismatchPossibly taken @rsiva0400 claimed this today. Opensite-bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Model version publishes the new UK firm entity as a personPossibly taken @vahid-ahmadi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#764 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
spcl/HPCAgent-Bench#264 ·
Maintainers usually reply within 1 day