clear-nus / NCDSSM

PyTorch implementation of the NCDSSM models presented in the ICML '23 paper "Neural Continuous-Discrete State Space Models for Irregularly-Sampled Time Series".
MIT License
24 stars 2 forks source link

New Dataset RuntimeError: dtypes match error. #3

Open RichardShea opened 2 months ago

RichardShea commented 2 months ago

Hi,

When trying to run a new dataset, I match the datatype exactly as the climate datatype. The new dataset are timestamps generated from a Hawkes process. Below is the error.

Thank you,

-Richard

_Traceback (most recent call last): File "/content/train_ts.py", line 251, in main() File "/content/train_ts.py", line 168, in main train_batch = next(train_gen) File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 630, in next data = self._next_data() File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1344, in _next_data return self._process_data(data) File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1370, in _process_data data.reraise() File "/usr/local/lib/python3.10/dist-packages/torch/_utils.py", line 706, in reraise raise exception RuntimeError: Caught RuntimeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/worker.py", line 309, in _worker_loop data = fetcher.fetch(index) # type: ignore[possibly-undefined] File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 55, in fetch return self.collate_fn(data) File "/content/ncdssm/datasets/climate.py", line 140, in collate_fn comb_past_target[i, pastindices] = tgt RuntimeError: Index put requires the source and destination dtypes match, got Double for the destination and Float for the source.

abdulfatir commented 3 weeks ago

Hi @RichardShea! I am not sure if using the same setup as the climate dataset is directly applicable on a new dataset. Maybe try adding print statements to debug which dtype is incorrect?