NCDSSM icon indicating copy to clipboard operation
NCDSSM copied to clipboard

New Dataset RuntimeError: dtypes match error.

Open RichardShea opened this issue 5 months ago • 0 comments

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, past_indices] = tgt RuntimeError: Index put requires the source and destination dtypes match, got Double for the destination and Float for the source.

RichardShea avatar Sep 13 '24 14:09 RichardShea