mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-07-20 12:40:14 +08:00
upper bound get_lags_for_frequency by context_length
This commit is contained in:
@@ -91,7 +91,9 @@ class DeepAREstimator(PyTorchEstimator):
|
||||
)
|
||||
self.scaling = scaling
|
||||
self.lags_seq = (
|
||||
lags_seq if lags_seq is not None else get_lags_for_frequency(freq_str=freq)
|
||||
lags_seq
|
||||
if lags_seq is not None
|
||||
else get_lags_for_frequency(freq_str=freq, lag_ub=self.context_length)
|
||||
)
|
||||
self.time_features = (
|
||||
time_features
|
||||
|
||||
@@ -9,11 +9,6 @@ from gluonts.torch.model.predictor import PyTorchPredictor
|
||||
from gluonts.torch.modules.distribution_output import DistributionOutput
|
||||
from gluonts.model.predictor import Predictor
|
||||
from gluonts.dataset.field_names import FieldName
|
||||
from gluonts.time_feature import (
|
||||
TimeFeature,
|
||||
get_lags_for_frequency,
|
||||
time_features_from_frequency_str,
|
||||
)
|
||||
from gluonts.transform import (
|
||||
Transformation,
|
||||
Chain,
|
||||
|
||||
Reference in New Issue
Block a user