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

Pickle Error #7362

Open
vikashg opened this issue Jan 3, 2024 · 2 comments
Open

Pickle Error #7362

vikashg opened this issue Jan 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vikashg
Copy link

vikashg commented Jan 3, 2024

Describe the bug
I wrote few transforms for handling geometric objects (points and lines). The code was written based on monai 0.8.1, when AddChannel was a valid Transform. However, as I am trying to revive the code with the latest monai 1.3, I get the following error.

[MemorizedFunc(func=<class 'GeometricTransforms_monai_1_3.AugmentBatchJPEG'>, location=./data/cache/joblib)]: Exception while loading results for AugmentBatchJPEG(num_augmentation=5, augmentation_dict={'adjustContrast': 1, 'intensityGaussian': 2, 'rotation': 0}, labels=['bbox'], output_size=(299, 299))
 Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/joblib/memory.py", line 568, in _cached_call
    out = self.store_backend.load_item(
  File "/usr/local/lib/python3.10/dist-packages/joblib/_store_backends.py", line 176, in load_item
    item = numpy_pickle.load(f)
  File "/usr/local/lib/python3.10/dist-packages/joblib/numpy_pickle.py", line 648, in load
    obj = _unpickle(fobj)
  File "/usr/local/lib/python3.10/dist-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()
  File "/usr/lib/python3.10/pickle.py", line 1211, in load
    raise EOFError
EOFError

Instead of using AddChannel, I am using EnsureChannelFirst

Environment
Using monai 0.8.1 with nvcr.io/nvidia/pytorch:21.12-py3 gives correct results.
Using monai 1.3.0 with nvcr.io/nvidia/pytorch:23.12-py3 produces the above error.

Additional context
If someone knows a quick fix or is aware of this problem source, let me know. I will share the gist soon and link it with this issue.

@vikashg vikashg added the bug Something isn't working label Jan 3, 2024
@vikashg vikashg self-assigned this Jan 3, 2024
@KumoLiu
Copy link
Contributor

KumoLiu commented Jan 4, 2024

Perhaps useful, looks like a wrong file format than expected.
https://stackoverflow.com/questions/64865854/eoferror-by-using-joblib-load

@vikashg
Copy link
Author

vikashg commented Jan 4, 2024

Thanks @KumoLiu I will investigate. Curious why it will happen though as I just changed the monai version. But I will look into that link you sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants