From a963ddd73fb9407e501a7540a7e74046c590ec01 Mon Sep 17 00:00:00 2001 From: Abdul Fatir Date: Wed, 5 Nov 2025 12:46:58 +0000 Subject: [PATCH 1/2] Relax transformers lower bound --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b42c37f7..ae6cad68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ license = { file = "LICENSE" } requires-python = ">=3.10" dependencies = [ "torch>=2.0,<3", - "transformers>=4.49,<5", + "transformers>=4.41,<5", "accelerate>=0.34,<2", "numpy>=1.21,<3", "einops>=0.7.0,<1", From 3d6c7bd871a4196c293a5d0348edc1426b93c98b Mon Sep 17 00:00:00 2001 From: Abdul Fatir Date: Wed, 5 Nov 2025 12:47:07 +0000 Subject: [PATCH 2/2] dtype -> torch_dtype --- test/test_chronos2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_chronos2.py b/test/test_chronos2.py index 0efde91d..92eb5a15 100644 --- a/test/test_chronos2.py +++ b/test/test_chronos2.py @@ -327,7 +327,7 @@ def test_when_input_is_invalid_then_predict_raises_value_error(pipeline, inputs, @pytest.mark.parametrize("input_dtype", [torch.float32, torch.bfloat16, torch.int64]) def test_pipeline_predict_can_handle_different_model_and_input_dtypes(dtype: torch.dtype, input_dtype: torch.dtype): pipeline = BaseChronosPipeline.from_pretrained( - Path(__file__).parent / "dummy-chronos2-model", device_map="cpu", dtype=dtype + Path(__file__).parent / "dummy-chronos2-model", device_map="cpu", torch_dtype=dtype ) context = 10 * torch.rand(size=(4, 3, 16)) + 10 context = context.to(dtype=input_dtype) @@ -1018,13 +1018,13 @@ def test_eager_and_sdpa_produce_identical_outputs(pipeline): # Reload pipeline with SDPA model_path = Path(__file__).parent / "dummy-chronos2-model" pipeline_sdpa = BaseChronosPipeline.from_pretrained( - model_path, device_map="cpu", attn_implementation="sdpa", dtype=torch.float32 + model_path, device_map="cpu", attn_implementation="sdpa", torch_dtype=torch.float32 ) # Note: the original pipeline fixture uses default attn_implementation which should be sdpa # Force eager for comparison pipeline_eager = BaseChronosPipeline.from_pretrained( - model_path, device_map="cpu", attn_implementation="eager", dtype=torch.float32 + model_path, device_map="cpu", attn_implementation="eager", torch_dtype=torch.float32 ) # Test 1: Simple univariate input