Awesome Easy-to-Use Deep Time Series Modeling based on PaddlePaddle, including comprehensive functionality modules like TSDataset, Analysis, Transform, Models, AutoTS, and Ensemble, etc., supporting versatile tasks like time series forecasting, representation learning, and anomaly detection, etc., featured with quick tracking of SOTA deep models.
/usr/local/lib/python3.7/dist-packages/paddlets/models/forecasting/dl/paddle_base_impl.py in _fit(self, train_dataloader, valid_dataloaders)
370 # Call the on_epoch_begin method of each callback before the epoch starts.
371 self._callback_container.on_epoch_begin(epoch_idx)
--> 372 self._train_epoch(train_dataloader)
373
374 # Predict for each eval set.
有人使用静态变量并成功运行过么 我的代码如下: import pandas as pd from paddlets import TSDataset
x = np.linspace(-np.pi, np.pi, 200) sinx = np.sin(x) * 4 + np.random.randn(200)
df = pd.DataFrame( { 'time_col': pd.date_range('2022-01-01', periods=200, freq='1h'), 'value': sinx, 'known_cov_1': sinx + 4, 'known_cov_2': sinx + 5, 'observed_cov': sinx + 8, 'static_cov': [1 for i in range(200)], } ) target_cov_dataset = TSDataset.load_from_dataframe( df, time_col='time_col', target_cols='value', known_cov_cols=['known_cov_1', 'known_cov_2'], observed_cov_cols='observed_cov', static_cov_cols='static_cov', freq='1h' )
temporal_fusion_transformer = TFTModel( in_chunk_len = in_chunk_len, out_chunk_len = out_chunk_len, max_epochs=800, patience=100 )
temporal_fusion_transformer.fit(target_cov_dataset) 报错:
ValueError Traceback (most recent call last) /tmp/ipykernel_43360/875506061.py in
32 )
33
---> 34 temporal_fusion_transformer.fit(target_cov_dataset)
/usr/local/lib/python3.7/dist-packages/paddlets/models/forecasting/dl/paddle_base_impl.py in fit(self, train_tsdataset, valid_tsdataset) 344 self._check_multi_tsdataset(valid_tsdataset) 345 train_dataloader, valid_dataloaders = self._init_fit_dataloaders(train_tsdataset, valid_tsdataset) --> 346 self._fit(train_dataloader, valid_dataloaders) 347 348 def _fit(
/usr/local/lib/python3.7/dist-packages/paddlets/models/forecasting/dl/paddle_base_impl.py in _fit(self, train_dataloader, valid_dataloaders) 370 # Call the
on_epoch_begin
method of each callback before the epoch starts. 371 self._callback_container.on_epoch_begin(epoch_idx) --> 372 self._train_epoch(train_dataloader) 373 374 # Predict for each eval set./usr/local/lib/python3.7/dist-packages/paddlets/models/forecasting/dl/paddle_base_impl.py in _train_epoch(self, train_loader) 438 self._callback_container.on_batch_begin(batch_idx) 439 X, y = self._prepare_X_y(data) --> 440 batch_logs = self._train_batch(X, y) ... 208 helper = LayerHelper('embedding', **locals())
ValueError: (InvalidArgument) Variable value (input) of OP(fluid.layers.embedding) expected >= 0 and < 1, but got 1. Please check input value. [Hint: Expected ids[i] < row_number, but received ids[i]:1 >= row_number:1.] (at /paddle/paddle/phi/kernels/cpu/embedding_kernel.cc:63) [operator < lookup_table_v2 > error]