fix(signal_v2-phase3b): use BaseChronosPipeline for new model architectures
ChronosPipeline (legacy T5) does not support amazon/chronos-2 or chronos-bolt-* (input_patch_size). Switch to BaseChronosPipeline which auto-detects variant and returns the appropriate sub-pipeline (ChronosBoltPipeline / Chronos2Pipeline / ChronosPipeline). Also handle the dtype kwarg deprecation: try newer `dtype=` first, fall back to `torch_dtype=` for older versions. Test mock_pipeline fixture updated to patch BaseChronosPipeline. 45/45 tests pass. Verified amazon/chronos-bolt-base loads on CUDA. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,8 +7,9 @@ import pytest
|
||||
|
||||
@pytest.fixture
|
||||
def mock_pipeline():
|
||||
"""Mock ChronosPipeline.from_pretrained returning a mock pipeline object."""
|
||||
with patch("chronos.ChronosPipeline") as cls:
|
||||
"""Mock BaseChronosPipeline.from_pretrained returning a mock pipeline object."""
|
||||
with patch("chronos.BaseChronosPipeline") as cls:
|
||||
cls.__name__ = "BaseChronosPipeline"
|
||||
instance = MagicMock()
|
||||
cls.from_pretrained.return_value = instance
|
||||
yield instance
|
||||
|
||||
Reference in New Issue
Block a user