*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.
*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.
*Issue #, if available:*
*Description of changes:* Bump to 2.0
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
⚠️ Must be merged after #319 and other related PRs.
*Issue #, if available:*
*Description of changes:* Exports `chronos.__version__` and uses it
dynamically in `pyproject.toml`. Bumps version to 2.0.0.
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
*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>
*Issue #, if available:* Fixes#310 and closes#302
*Description of changes:* This PR fixes an issue related to the new
caching mechanism for T5 introduced in `transformers==4.54`. [Prior
versions
set](https://github.com/huggingface/transformers/blob/v4.53.3/src/transformers/models/t5/modeling_t5.py#L1328)
`encoder_config.is_encoder_decoder = False` when initializing encoder
and decoder. Following transformers, we also initialized Chronos-Bolt in
the same way. However, in v4.54 this line [has been
removed](3fd456b200/src/transformers/models/t5/modeling_t5.py (L1301))
and [new logic has been
added](3fd456b200/src/transformers/models/t5/modeling_t5.py (L494))
which relies on `is_encoder_decoder` [being
True](3fd456b200/src/transformers/models/t5/modeling_t5.py (L1007)).
This causes Chronos-Bolt to break as described in #310. This PR removes
`is_encoder_decoder = False` for both encoder and decoder which fixes
the issue. I re-ran our mini eval in the CI and got the same results for
v4.54 and v4.48 (our current lower bound).
This PR also bumps package versions.
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
*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.
*Issue #, if available:*
*Description of changes:*
Just increased the max version allowed. Tests pass.
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: Abdul Fatir <Abdulfatirs@gmail.com>
*Issue #, if available:* See example build
https://github.com/amazon-science/chronos-forecasting/actions/runs/14302765904/job/40313421985
*Description of changes:*
- Address type-checker complaints, where possible
- Bump bugfix version of the package
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
*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.
*Issue #, if available:* Solves #273
*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.
*Issue #, if available:*
*Description of changes:* Title.
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: Abdul Fatir Ansari <ansarnd@amazon.de>
*Description of changes:* This PR updates project information and
workflows to allow for PyPi release.
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: Abdul Fatir Ansari <ansarnd@amazon.de>
*Issue #, if available:* N/A
*Description of changes:* This PR adds support for Chronos-Bolt models.
TODOs:
- [x] Update evaluation script
- [x] Fix and add tests for Bolt
- [x] Update docstrings
- [x] Update README example and mention Chronos-Bolt
- [x] Update results bar plot in README
- [x] Add versions for libraries in `pyproject.toml`
- [x] Check that the training and eval scripts work
- [x] Change `autogluon` -> `amazon` in model names
Post Merge:
- [ ] Update Citation style in README, both Github and HuggingFace repos
- [ ] Remove note about AutoGluon
- [ ] Update READMEs of original Chronos models to refer to Chronos-Bolt
NOTE: To be merged after Chronos-Bolt models are available under the
`amazon` namespace on HF.
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: Abdul Fatir Ansari <ansarnd@amazon.de>
Co-authored-by: Caner Turkmen <turkmen.ac@gmail.com>
Co-authored-by: Lorenzo Stella <stellalo@amazon.com>
Fixes https://github.com/amazon-science/chronos-forecasting/issues/181.
Chronos' tokenizer has a vocabulary size of `n_tokens`. Among these,
there are `n_special_tokens` reserved for EOS, PAD, etc. and `n_tokens -
n_special_tokens` allocated to numerical values. However, the provided
`MeanScaleUniformBins` tokenizer creates` n_tokens - n_special_tokens +
1` different buckets, resulting in a total of `n_tokens + 1` possible
tokens. This causes training and inference errors when one of the data
points gets allocated to the largest bucket, as the model requires 0 <=
token_id < n_tokens.
This PR modifies the `MeanScaleUniformBins` tokenizer, so that it
creates one less bucket for numerical values.
---
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: Lorenzo Stella <lorenzostella@gmail.com>
*Description of changes:* This PR adds configs and a script to evaluate
Chronos models in the same way as described in the paper.
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: Abdul Fatir Ansari <ansarnd@amazon.de>
*Description of changes:* This PR relaxes `torch` and `transformers`
versions to allow for older versions that were used during original
training. This is needed in light of recent `torch`/`transformers`
versions being slower with DDP.
Relevant issues (but the problem may be deeper than these):
- https://github.com/huggingface/transformers/issues/30840
- https://github.com/pytorch/pytorch/issues/127077
- https://github.com/NVIDIA/nccl/issues/1298
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: Abdul Fatir Ansari <ansarnd@amazon.com>
*Issue #, if available:* #76
*Description of changes:* transformers 4.41 broke something for us, we
need to look into it deeper
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
*Description of changes:* See title.
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: Abdul Fatir Ansari <ansarnd@amazon.com>
*Description of changes:* This PR adds the script to generate synthetic
data from KernelSynth.
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: Abdul Fatir Ansari <ansarnd@amazon.com>
*Description of changes:* Add training script and config files. Can be
used for pre-training, or adapted for fine-tuning chronos models.
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: Abdul Fatir <Abdulfatirs@gmail.com>
*Description of changes:* Fix some type checking issues, add mypy to
github workflow, apply black
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.