-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Question] Parallel Sampling #136
Comments
First, thanks for using Minari! And these questions are really helpful for us; it's difficult to refine a product without hearing from users. OK so for the first part. We are working on a optional https://docs.mosaicml.com/projects/streaming/en/stable/ streamingdataset backend. We are open to design suggestions for parallel sampling for both a streaming dataset and h5py backend(I'm not sure what we need to do to get true parallelism in python in the setting of memory shared between physical threads, maybe this is easy). It may be that a parallel sampling implementation could be a strict improvement over our current implementation on any machine with more than once physical CPU core. For the second one. We don't have any built-in features for sampling from multiple datasets at once. The closest thing that comes to mind is generating the list of indices to sample externally to minari, then sampling from each dataset using We are open to feature requests, so feel free to propose any features you think would support your use-case. |
Thanks for the response! Regarding the development of the streaming dataset backend, is this currently in a public fork? Curious to just to take a look and see if I could patch together something similar in the mean time before this becomes an official feature. |
Parallel episode sampling
I have a use case where we have a dataset consisting of image-based observations, and I notice that sampling speed seems to be slower than with 1D observations. I checked out how sampling is working internally, and noticed that Minari samples episodes serially, instead of sampling in parallel. I thought that parallelizing this call may have been thought about already, so I was curious for any recommendations on the best way to do this. I was also wondering if this was something that will be added in the future.
I have one more layer of complexity on top of this, where instead of 1 dataset, I have say 10 datasets from different envs, each have image-based observations. Think multi-task Atari. I have 10 minari datasets, and then say want 30 episodes from each for each gradient update. Also want to do this in parallel, and will experiment with different parallelization techniques but curious if others had intuition about this.
Minari/minari/dataset/minari_storage.py
Lines 153 to 180 in c0669fc
The text was updated successfully, but these errors were encountered: