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
Calling dumps(path) on ReplayBuffer with LazyMemmapStorage fails with an error.
cause: replay_buffer._storage._storage.saved_path seems to be set to None.
To Reproduce
Steps to reproduce the behavior.
Execute the example code provided in the doc for ReplayBuffer:dumps()
or this code
None
Traceback (most recent call last):
File "/home/kalyan/.config/JetBrains/PyCharm2024.1/scratches/screatch5.py", line 18, in<module>
replay_buffer.dumps(path='/home/kalyan/tmp')
File "/home/kalyan/anaconda3/envs/rlostrack/lib/python3.8/site-packages/torchrl/data/replay_buffers/replay_buffers.py", line 465, in dumps
self._storage.dumps(path / "storage")
File "/home/kalyan/anaconda3/envs/rlostrack/lib/python3.8/site-packages/torchrl/data/replay_buffers/storages.py", line 97, in dumps
self.checkpointer.dumps(self, path)
File "/home/kalyan/anaconda3/envs/rlostrack/lib/python3.8/site-packages/torchrl/data/replay_buffers/checkpointers.py", line 96, in dumps
and Path(_storage.saved_path).absolute() == Path(path).absolute()
File "/home/kalyan/anaconda3/envs/rlostrack/lib/python3.8/pathlib.py", line 1042, in __new__
self = cls._from_parts(args, init=False)
File "/home/kalyan/anaconda3/envs/rlostrack/lib/python3.8/pathlib.py", line 683, in _from_parts
drv, root, parts = self._parse_args(args)
File "/home/kalyan/anaconda3/envs/rlostrack/lib/python3.8/pathlib.py", line 667, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Describe the bug
Calling dumps(path) on ReplayBuffer with LazyMemmapStorage fails with an error.
cause:
replay_buffer._storage._storage.saved_path
seems to be set to None.To Reproduce
Steps to reproduce the behavior.
Execute the example code provided in the doc for ReplayBuffer:dumps()
or this code
Expected behavior
save the rb
System info
Reason and Possible fixes
When storage init with scratch dir, it fixed the problem
LazyMemmapStorage(10000, scratch_dir='/home/kalyan/tmp')
Checklist
The text was updated successfully, but these errors were encountered: