Skip to content

Commit 70ff9d8

Browse files
committed
Bump versions
1 parent 6a9c8da commit 70ff9d8

File tree

3 files changed

+32
-21
lines changed

3 files changed

+32
-21
lines changed

pyproject.toml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
[project]
22
name = "chronos-forecasting"
3-
version = "1.5.2"
3+
version = "1.5.3"
44
authors = [
5-
{ name="Abdul Fatir Ansari", email="[email protected]" },
6-
{ name="Lorenzo Stella", email="[email protected]" },
7-
{ name="Caner Turkmen", email="[email protected]" },
5+
{ name = "Abdul Fatir Ansari", email = "[email protected]" },
6+
{ name = "Lorenzo Stella", email = "[email protected]" },
7+
{ name = "Caner Turkmen", email = "[email protected]" },
88
]
99
description = "Chronos: Pretrained models for time series forecasting"
1010
readme = "README.md"
1111
license = { file = "LICENSE" }
1212
requires-python = ">=3.9"
13-
dependencies = [
14-
"torch>=2.0,<3", # package was tested on 2.2
15-
"transformers>=4.48,<5",
16-
"accelerate>=0.32,<2",
17-
]
13+
dependencies = ["torch>=2.0,<3", "transformers>=4.48,<5", "accelerate>=0.32,<2"]
1814
classifiers = [
19-
"Programming Language :: Python :: 3",
20-
"License :: OSI Approved :: Apache Software License",
21-
"Operating System :: OS Independent",
22-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
15+
"Programming Language :: Python :: 3",
16+
"License :: OSI Approved :: Apache Software License",
17+
"Operating System :: OS Independent",
18+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
2319
]
2420

2521
[build-system]
@@ -30,10 +26,19 @@ build-backend = "hatchling.build"
3026
packages = ["src/chronos"]
3127

3228
[project.optional-dependencies]
33-
test = ["pytest~=8.0", "numpy~=1.21"]
29+
test = ["pytest~=8.0", "numpy~=2.0"]
3430
typecheck = ["mypy~=1.9"]
35-
training = ["gluonts[pro]~=0.15", "numpy~=1.21", "datasets~=2.18", "typer", "typer-config", "joblib", "scikit-learn", "tensorboard"]
36-
evaluation = ["gluonts[pro]~=0.15", "numpy~=1.21", "datasets~=2.18", "typer"]
31+
training = [
32+
"gluonts[pro]~=0.15",
33+
"numpy~=2.0",
34+
"datasets~=3.0",
35+
"typer",
36+
"typer-config",
37+
"joblib",
38+
"scikit-learn",
39+
"tensorboard",
40+
]
41+
evaluation = ["gluonts[pro]~=0.15", "numpy~=2.0", "datasets~=3.0", "typer"]
3742

3843
[project.urls]
3944
Homepage = "https://github.com/amazon-science/chronos-forecasting"
@@ -42,3 +47,11 @@ Paper = "https://arxiv.org/abs/2403.07815"
4247

4348
[tool.mypy]
4449
ignore_missing_imports = true
50+
51+
[tool.ruff]
52+
line-length = 88
53+
lint.ignore = [
54+
"E501", # Line too long
55+
"E731", # Do not assign a `lambda` expression, use a `def`
56+
"E722", # Do not use bare `except`
57+
]

src/chronos/chronos.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ def encode(
302302
A tensor of encoder embeddings with shape
303303
(batch_size, sequence_length, d_model).
304304
"""
305-
assert (
306-
self.config.model_type == "seq2seq"
307-
), "Encoder embeddings are only supported for encoder-decoder models"
305+
assert self.config.model_type == "seq2seq", (
306+
"Encoder embeddings are only supported for encoder-decoder models"
307+
)
308308
assert hasattr(self.model, "encoder")
309309

310310
return self.model.encoder(

src/chronos/chronos_bolt.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def __init__(self, config: T5Config):
179179
encoder_config = copy.deepcopy(config)
180180
encoder_config.is_decoder = False
181181
encoder_config.use_cache = False
182-
encoder_config.is_encoder_decoder = False
183182
self.encoder = T5Stack(encoder_config, self.shared)
184183

185184
self._init_decoder(config)
@@ -381,7 +380,6 @@ def forward(
381380
def _init_decoder(self, config):
382381
decoder_config = copy.deepcopy(config)
383382
decoder_config.is_decoder = True
384-
decoder_config.is_encoder_decoder = False
385383
decoder_config.num_layers = config.num_decoder_layers
386384
self.decoder = T5Stack(decoder_config, self.shared)
387385

0 commit comments

Comments
 (0)