Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/requirements-extras-r.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rpy2~=3.5
rpy2~=3.5,<3.6
3 changes: 3 additions & 0 deletions requirements/requirements-extras-statsforecast.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# scipy cap can be removed once this is resolved: https://github.com/statsmodels/statsmodels/issues/9584
scipy<1.16.0; python_version > "3.7.0"
scipy~=1.7.3; python_version <= "3.7.0"
statsforecast~=1.0
3 changes: 2 additions & 1 deletion requirements/requirements-pytorch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ torch>=1.9,<3
lightning>=2.2.2,<2.5
# Capping `lightning` does not cap `pytorch_lightning`, so we cap manually
pytorch_lightning>=2.2.2,<2.5
scipy~=1.10; python_version > "3.7.0"
# scipy cap can be removed once this is resolved: https://github.com/statsmodels/statsmodels/issues/9584
scipy<1.16.0; python_version > "3.7.0"
scipy~=1.7.3; python_version <= "3.7.0"
10 changes: 4 additions & 6 deletions src/gluonts/transform/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def __init__(
is_pad_field: str = FieldName.IS_PAD,
start_field: str = FieldName.START,
forecast_start_field: str = FieldName.FORECAST_START,
observed_value_field: str = FieldName.OBSERVED_VALUES,
observed_value_field: Optional[str] = FieldName.OBSERVED_VALUES,
lead_time: int = 0,
output_NTC: bool = True,
time_series_fields: List[str] = [],
Expand Down Expand Up @@ -529,11 +529,9 @@ def flatmap_transform(

sampled_indices = self.instance_sampler(target)

slice_cols = (
self.ts_fields
+ self.past_ts_fields
+ [self.target_field, self.observed_value_field]
)
slice_cols = self.ts_fields + self.past_ts_fields + [self.target_field]
if self.observed_value_field is not None:
slice_cols.append(self.observed_value_field)
for i in sampled_indices:
pad_length = max(self.past_length - i, 0)
d = data.copy()
Expand Down
Loading