You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
Original Traceback (most recent call last):
File "/home/eee/qzz/SF_main/uni2ts/venv/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 309, in _worker_loop
data = fetcher.fetch(index) # type: ignore[possibly-undefined]
File "/home/eee/qzz/SF_main/uni2ts/venv/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
data = [self.dataset[idx] foridxin possibly_batched_index]
File "/home/eee/qzz/SF_main/uni2ts/venv/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 52, in<listcomp>
data = [self.dataset[idx] foridxin possibly_batched_index]
File "/home/eee/qzz/SF_main/uni2ts/venv/lib/python3.10/site-packages/torch/utils/data/dataset.py", line 350, in __getitem__
return self.datasets[dataset_idx][sample_idx]
File "/home/eee/qzz/SF_main/uni2ts/src/uni2ts/data/dataset.py", line 73, in __getitem__
return self.transform(self._flatten_data(self._get_data(idx)))
File "/home/eee/qzz/SF_main/uni2ts/src/uni2ts/transform/_base.py", line 62, in __call__
data_entry = t(data_entry)
File "/home/eee/qzz/SF_main/uni2ts/src/uni2ts/transform/patch.py", line 91, in __call__
constraints = self.patch_size_constraints(freq)
File "/home/eee/qzz/SF_main/uni2ts/src/uni2ts/transform/patch.py", line 39, in __call__
start, stop = self._get_boundaries(offset.n, norm_freq_str(offset.name))
AttributeError: 'NoneType' object has no attribute 'n'. Did you mean: '_return_value'?
Root cause tracking
This issue arises becausefreq for each data_entry is None.
The problem is due to the use of pd.infer_freq in simple.py, which return None for the Weather dataset (and possibly other datasets).
Environment
Operating system: Linux 6.5.0
Python version: Python 3.10.12
PyTorch version: 2.4.0
uni2ts version: Latest version.
The text was updated successfully, but these errors were encountered:
Thanks for pointing out this issue! According to pandas doc, it's possible to return None if no discernible frequency. I would suggest setting it to a default frequency (maybe hourly) when it gets None with pd.infer_freq. If you want, you can create a PR for this. Otherwise, we will fix this soon :)
Describe the bug
When finetuning moriai on
Weather
dataset, errors occur due tofreq
ofdata_entry
being None.To Reproduce
Expected behavior
The following error will occur:
Root cause tracking
This issue arises because
freq
for eachdata_entry
is None.The problem is due to the use of pd.infer_freq in simple.py, which return None for the Weather dataset (and possibly other datasets).
Environment
The text was updated successfully, but these errors were encountered: