mirror of
https://github.com/amazon-science/chronos-forecasting
synced 2026-05-24 10:08:33 +00:00
*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.
62 lines
1.6 KiB
TOML
62 lines
1.6 KiB
TOML
[project]
|
|
name = "chronos-forecasting"
|
|
version = "1.5.3"
|
|
authors = [
|
|
{ name = "Abdul Fatir Ansari", email = "ansarnd@amazon.com" },
|
|
{ name = "Lorenzo Stella", email = "stellalo@amazon.com" },
|
|
{ name = "Caner Turkmen", email = "atturkm@amazon.com" },
|
|
]
|
|
description = "Chronos: Pretrained models for time series forecasting"
|
|
readme = "README.md"
|
|
license = { file = "LICENSE" }
|
|
requires-python = ">=3.9"
|
|
dependencies = ["torch>=2.0,<3", "transformers>=4.48,<5", "accelerate>=0.32,<2"]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Operating System :: OS Independent",
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/chronos"]
|
|
|
|
[project.optional-dependencies]
|
|
test = ["pytest~=8.0", "numpy>=1.21,<3"]
|
|
typecheck = ["mypy~=1.9"]
|
|
training = [
|
|
"gluonts[pro]~=0.15",
|
|
"numpy>=1.21,<3",
|
|
"datasets>=2.18,<4",
|
|
"typer",
|
|
"typer-config",
|
|
"joblib",
|
|
"scikit-learn",
|
|
"tensorboard",
|
|
]
|
|
evaluation = [
|
|
"gluonts[pro]~=0.15",
|
|
"numpy>=1.21,<3",
|
|
"datasets>=2.18,<4",
|
|
"typer",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/amazon-science/chronos-forecasting"
|
|
Issues = "https://github.com/amazon-science/chronos-forecasting/issues"
|
|
Paper = "https://arxiv.org/abs/2403.07815"
|
|
|
|
[tool.mypy]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.ruff]
|
|
line-length = 88
|
|
lint.ignore = [
|
|
"E501", # Line too long
|
|
"E731", # Do not assign a `lambda` expression, use a `def`
|
|
"E722", # Do not use bare `except`
|
|
]
|