diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 88205bcaf8..f8c47e3340 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -1,4 +1,4 @@ -pandas>=1.1 +pandas>=1.1,<2.2.0 flaky~=3.6 pytest-cov==2.6.* pytest-timeout~=1.3 diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 49df084e85..d7c3bb8f89 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,5 +1,5 @@ numpy~=1.16 -pandas>=1.0,<3 +pandas>=1.0,<2.2.0 pydantic>=1.7,<3 tqdm~=4.23 toolz~=0.10 diff --git a/src/gluonts/time_feature/lag.py b/src/gluonts/time_feature/lag.py index deb1313f97..9abadb3a7f 100644 --- a/src/gluonts/time_feature/lag.py +++ b/src/gluonts/time_feature/lag.py @@ -146,7 +146,7 @@ def _make_lags_for_month(multiple, num_cycles=3): + _make_lags_for_hour(offset.n / (60 * 60)) ) else: - raise Exception("invalid frequency") + raise ValueError(f"invalid frequency | `freq_str={freq_str}` -> `offset_name={offset_name}`") # flatten lags list and filter lags = [ diff --git a/src/gluonts/torch/model/predictor.py b/src/gluonts/torch/model/predictor.py index 59a4fec3be..fd9bd4aef4 100644 --- a/src/gluonts/torch/model/predictor.py +++ b/src/gluonts/torch/model/predictor.py @@ -50,7 +50,7 @@ def __init__( forecast_generator: ForecastGenerator = SampleForecastGenerator(), output_transform: Optional[OutputTransform] = None, lead_time: int = 0, - device: str = "auto", + device: Union[str, torch.device] = "auto", ) -> None: super().__init__(prediction_length, lead_time=lead_time) self.input_names = input_names