Commit graph

13 commits

Author SHA1 Message Date
Oleksandr Shchur
f951d9aefa
Rename task -> input in dataset.py (#467)
*Issue #, if available:*

*Description of changes:*

Rename all variables and methods that refer to "task" in `dataset.py` to
use `input` instead:
- `PreparedTask` → `PreparedInput`
- `self.tasks` → `self.inputs`
- `prepare_tasks` → `prepare_inputs`
- `validate_and_prepare_single_dict_task` →
`validate_and_prepare_single_dict_input`
- All `task_` prefixed local variables renamed (e.g., `task_target` →
`target`, `task_context` → `context`, `task_past_tensor` →
`past_tensor`, etc.)


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2026-02-19 13:30:08 +01:00
Oleksandr Shchur
0e9db70afc
Move input preparation outside of Chronos2Dataset (#466)
*Issue #, if available:*

This PR enables fine-tuning on datasets that don't fit into memory. The
main idea is to decouple the preprocessing logic from the
`Chronos2Dataset` class.

The workflow is as follows:
1. Preprocess raw data once using `prepare_tasks()` → save to any
`Sequence[PreparedTask]` container like `datasets.Dataset`
  2. During training, load tasks lazily via memory-mapped Arrow files
3. Pass data to `pipeline.fit(..., convert_inputs=False)` to skip
redundant preprocessing

*Description of changes:*
- Added `PreparedTask` `TypedDict` defining the preprocessed task schema
(context, future_covariates, n_targets, n_covariates,
n_future_covariates as torch.Tensor/int)
- Extracted `prepare_tasks()` as a standalone function so it can be used
in preprocessing scripts
- Added `convert_inputs` parameter to `Chronos2Dataset` and
`Chronos2Pipeline.fit()` to toggle between raw input preprocessing
(default) and pre-processed input passthrough.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2026-02-19 10:10:07 +01:00
Abdul Fatir
efb86e02c2
Chronos-2: Add after_batch callback (#436)
*Issue #, if available:*

*Description of changes:* Adds support for custom callbacks after each
batch is processed during prediction. This allows for keeping track of
the time limit in AutoGluon.


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-12-17 11:45:16 +01:00
Abdul Fatir
3cb8f8831a
Chronos-2: Rename predict_batches_jointly to cross_learning (#418)
*Issue #, if available:*

*Description of changes:*
- Rename `predict_batches_jointly` to `cross_learning`
- Add deprecation warning
- Add cross_learning to predict_df docstring

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-12-03 15:15:37 +00:00
Oleksandr Shchur
4eea8d0122
Handle prediction_length below 3 (#407)
*Issue #, if available:* Fixes #403

*Description of changes:*
- Update the `future_df` validation logic to only check that
`prediction_length` values are provided for each item.
- Update unit tests for DF-based methods in `test_chronos2.py`
- Ignore fine-tuned checkpoint folders with `.gitignore`


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-12-01 13:10:16 +01:00
Abdul Fatir
b438bed63f
Chronos-2: Add option to skip dataframe validation in predict_df (#400)
*Issue #, if available:*

*Description of changes:* This PR adds a `validate_inputs ` argument to
`predict_df` (defaults to `True`), which allows the user to disable
dataframe validation when they know that their dataframe is in the right
format. This reduces runtime by removing the input validation component,
e.g., when calling this method from
[AutoGluon](https://github.com/autogluon/autogluon/pull/5427), and also
handles series with shorter than 3 timesteps.


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-11-27 16:52:37 +01:00
Abdul Fatir
c5907ef52e
Chronos-2: Add LoRA fine-tuning support (#393)
*Issue #, if available:*

*Description of changes:* Adds support for LoRA fine-tuning.

- [x] Move peft/pandas dependency to an extra
- [x] Add tests for LoRA
- [x] Update notebook with LoRA info
- [x] Enable automatic recognition and loading of LoRA adapters


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-11-25 16:06:58 +01:00
Abdul Fatir
111972a6cc
Add Chronos2Pipeline.embed (#361)
*Issue #, if available:* #354 

*Description of changes:* This PR adds `Chronos2Pipeline.embed` to
enable users to extract embeddings from the last encoder layer in an
easy way. The API and behavior is similar to what Chronos and
Chronos-Bolt provides.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-11-17 17:16:50 +01:00
Abdul Fatir
e48f48071f
Add predict_df support for Chronos and Chronos-Bolt (#371)
*Issue #, if available:*

*Description of changes:* This PR adds `predict_df` to the base pipeline
which enables pandas support for the univariate Chronos and Chronos-Bolt
models.


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-11-11 18:37:19 +01:00
Abdul Fatir
93419cfe9f
Relax transformers lower bound to >=4.41 (#364) 2025-11-05 14:27:46 +01:00
Oleksandr Shchur
9f8fef2116
Update model link to Hugging Face (#353)
*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
2025-10-30 18:08:57 +01:00
Kashif Rasul
ca9c3275a2
[chronos-2] add support for SDPA (#331)
This pull request introduces configurable attention backends to the
Chronos-2 model, allowing users to select between eager, SDPA, and
FlashAttention-2 implementations.

---------

Co-authored-by: Oleksandr Shchur <oleks.shchur@gmail.com>
Co-authored-by: Abdul Fatir <Abdulfatirs@gmail.com>
2025-10-22 14:02:09 +02:00
Abdul Fatir
15ffe8835d
Add Chronos-2 (#319)
*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>
2025-10-20 10:34:20 +02:00