Project-MONAI / Project-MONAI/MONAI
Pickle Error
@vikashg is already working on this.
Since Jan 3, 2024.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.