Echo-Ji / ST-SSL

ST-SSL (STSSL): Spatio-Temporal Self-Supervised Learning for Traffic Flow Forecasting/Prediction
152 stars 29 forks source link

ValueError: Cannot load file containing pickled data when allow_pickle=False #4

Closed nana1223 closed 6 days ago

nana1223 commented 9 months ago

Hi,I have a question to ask. When I run with taxibj dataset, have a bug 'ValueError: Cannot load file containing pickled data when allow_pickle=False' in the line 'cat_data = np.load(os.path.join(data_dir, dataset, category + '.npz'))', and then I modify this line to 'cat_data = np.load(os.path.join(data_dir, dataset, category + '.npz'), allow_pickle=True)', but still have a bug 'pickle.UnpicklingError: Failed to interpret file 'data/BJTaxi/train.npz' as a pickle'; and also I replace np.load to np.loadtxt, but still unsuccessful.

Could you tell me how to load the taxibj dataset? thank you!!!

Echo-Ji commented 8 months ago

@nana1223 How do you download the data?

If you download from ST-SSL_Dataset, please ensure you use the lfs tool.

Specifically, you have to get these data files pulled using git-lfs.

git lfs install
git lfs pull

Otherwise, the .npy file will be corrupted, so you cannot open them.