This pull request introduces a possible fix to improve how paths are handled in the replay_buffer.py module. Currently, it seems that the code expects absolute paths (based on example bash scripts), which limits flexibility when working with relative paths in the provided bash scripts.
Problem
In the scripts under Improved-3D-Diffusion-Policy/scripts, the dataset_path variable is set as an absolute path. Using a relative path results in an error. Most likely it's caused by the misuse of os.path.expanduser in the replay_buffer.py file. (Though I'm not sure why...)
Solution
I’ve implemented a custom function, _get_absolute_zarr_path, to convert relative paths into absolute ones based on the repository’s root directory. This ensures that both relative and absolute paths can be used seamlessly, offering more flexibility for users.
P.S.
I did find this helpful but I'm not sure if _get_absolute_zarr_path behaved like what you would expect... However, I'd appreciate feedback on whether this solution aligns with your expectations.
Overview
This pull request introduces a possible fix to improve how paths are handled in the
replay_buffer.py
module. Currently, it seems that the code expects absolute paths (based on example bash scripts), which limits flexibility when working with relative paths in the provided bash scripts.Problem
In the scripts under
Improved-3D-Diffusion-Policy/scripts
, thedataset_path
variable is set as an absolute path. Using a relative path results in an error. Most likely it's caused by the misuse ofos.path.expanduser
in thereplay_buffer.py
file. (Though I'm not sure why...)Solution
I’ve implemented a custom function,
_get_absolute_zarr_path
, to convert relative paths into absolute ones based on the repository’s root directory. This ensures that both relative and absolute paths can be used seamlessly, offering more flexibility for users.P.S.
I did find this helpful but I'm not sure if
_get_absolute_zarr_path
behaved like what you would expect... However, I'd appreciate feedback on whether this solution aligns with your expectations.