Skip to content

Commit

Permalink
Backports for v0.14.4 (#3121)
Browse files Browse the repository at this point in the history
*Description of changes:* backporting fixes
- #3094 
- #3115 

Additionally: cap pandas version to <2.2


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.


**Please tag this pr with at least one of these labels to make our
release process faster:** BREAKING, new feature, bug fix, other change,
dev setup

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
  • Loading branch information
lostella and Borda authored Feb 2, 2024
1 parent ed8d813 commit 0cc3cd9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pandas>=1.1
pandas>=1.1,<2.2.0
flaky~=3.6
pytest-cov==2.6.*
pytest-timeout~=1.3
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/time_feature/lag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/torch/model/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cc3cd9

Please sign in to comment.