You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I collected a memmap tensordict similar to the guide provided [1] on the cluster in a jupyter notebook. When loading the same memmap on my local machine (with TensorDict.load_memmap(path), I get the error RuntimeError: Could not find name <class '__main__.ImageNetData'>, since I'm not loading the memmap from in __main__. I suspect the issue is in meta.json file of the memmap, where the type is specified as <class '__main__.ImageNetData'>, but I do not run load_memmap(path) from __main__.
To Reproduce
Follow [1] and save the path to memmap. Then create main.py:
0.5.0 1.26.4 3.9.19 (main, May 6 2024, 19:43:03)
[GCC 11.2.0] linux 2.4.1+cu121
Reason and Possible fixes
I manually changed meta.json to
{"_type":"<class 'data.ImageNetData'>"}
but it is not the most consistent way. There is also an option to make use of snapshots, but from the example [2] I see that to load a snapshot, one needs to initialize memmap each time, which is super time consuming in my case (my data is >500GB of size).
Checklist
I have checked that there is no similar issue in the repo (required)
Describe the bug
I collected a memmap tensordict similar to the guide provided [1] on the cluster in a jupyter notebook. When loading the same memmap on my local machine (with
TensorDict.load_memmap(path)
, I get the errorRuntimeError: Could not find name <class '__main__.ImageNetData'>
, since I'm not loading the memmap from in__main__
. I suspect the issue is inmeta.json
file of the memmap, where the type is specified as<class '__main__.ImageNetData'>
, but I do not runload_memmap(path)
from__main__
.To Reproduce
Follow [1] and save the path to memmap. Then create
main.py
:in
data.py
and you will get
Expected behavior
A slick load of memmap.
System info
0.5.0 1.26.4 3.9.19 (main, May 6 2024, 19:43:03)
[GCC 11.2.0] linux 2.4.1+cu121
Reason and Possible fixes
I manually changed
meta.json
tobut it is not the most consistent way. There is also an option to make use of snapshots, but from the example [2] I see that to load a snapshot, one needs to initialize memmap each time, which is super time consuming in my case (my data is >500GB of size).
Checklist
[1] https://pytorch.org/tensordict/main/tutorials/tensorclass_imagenet.html
[2]
tensordict/benchmarks/distributed/dataloading.py
Line 139 in 1659518
The text was updated successfully, but these errors were encountered: