Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't load other datasets in ST-SSL_Dataset #1

Open
shiyuqiii opened this issue Apr 6, 2023 · 4 comments
Open

can't load other datasets in ST-SSL_Dataset #1

shiyuqiii opened this issue Apr 6, 2023 · 4 comments

Comments

@shiyuqiii
Copy link

shiyuqiii commented Apr 6, 2023

I download all datasets from ST-SSL_Dataset.
when I load BJTaxi in ST-SSL_Dataset:
Failed to interpret file '../ST-SSL_Dataset/NYCBike1/test.npz' as a pickle.

my numpy version is 1.23.3

@XBR-1111
Copy link

I would like to share that I successfully loaded BJTaxi test data using the following code. It worked for me. Additionally, I would like to mention that my numpy version is 1.23.1.

import numpy as np

data = np.load('./BJTaxi/test.npz')
for file in data.files:
    print(file, data[file].shape)

If you could share any specific error messages or log files related to the issue, it would greatly help in identifying the problem.

@Echo-Ji Echo-Ji closed this as completed May 26, 2023
@DataScience-SX
Copy link

can't load other datasets in ST-SSL_Dataset with numpy 1.22.0.

and the error is as follows:
Traceback (most recent call last):
File "e:/x/xx/ST-SSL/npz.py", line 3, in
data = np.load('E:/x/xx/ST-SSL/data/BJTaxi/test.npz')
File "D:\anaconda3\envs\ptgpu\lib\site-packages\numpy\lib\npyio.py", line 435, in load
raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False

If I add"allow_pickle=True",it alse had error:
data = np.load('E:/x/xx/ST-SSL/data/BJTaxi/test.npz', allow_pickle=True)
File "D:\anaconda3\envs\ptgpu\lib\site-packages\numpy\lib\npyio.py", line 440, in load
raise pickle.UnpicklingError(
_pickle.UnpicklingError: Failed to interpret file 'E:/x/xx/ST-SSL/data/BJTaxi/test.npz' as a pickle

@Echo-Ji
Copy link
Owner

Echo-Ji commented Mar 4, 2024

can't load other datasets in ST-SSL_Dataset with numpy 1.22.0.

and the error is as follows:

Traceback (most recent call last):
File "e:/x/xx/ST-SSL/npz.py", line 3, in
data = np.load('E:/x/xx/ST-SSL/data/BJTaxi/test.npz')
File "D:\anaconda3\envs\ptgpu\lib\site-packages\numpy\lib\npyio.py", line 435, in load
raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False
If I add"allow_pickle=True",it alse had error: data = np.load('E:/x/xx/ST-SSL/data/BJTaxi/test.npz', allow_pickle=True) File "D:\anaconda3\envs\ptgpu\lib\site-packages\numpy\lib\npyio.py", line 440, in load raise pickle.UnpicklingError( _pickle.UnpicklingError: Failed to interpret file 'E:/x/xx/ST-SSL/data/BJTaxi/test.npz' as a pickle

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.

@Echo-Ji Echo-Ji reopened this Mar 4, 2024
@Echo-Ji
Copy link
Owner

Echo-Ji commented Mar 4, 2024

I download all datasets from ST-SSL_Dataset. when I load BJTaxi in ST-SSL_Dataset: Failed to interpret file '../ST-SSL_Dataset/NYCBike1/test.npz' as a pickle.

my numpy version is 1.23.3

You'd better 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants