Skip to content
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

[REQUEST] Can the online learning buffers be used to create an MDPDataset? #22

Closed
jamartinh opened this issue Jan 1, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@jamartinh
Copy link
Contributor

Describe the solution you'd like
When fit_online, it should be very useful to save all the experiences into an MDPDataset so that we can use it for offline RL to improve the policy.

Has sense to use the Buffers already done for online learning? or should we think in another mechanism, such as openai gym wrappers monitor to make this?

Perhaps not all online learning algos use a Buffer, perhaps a new param to the fit_online so save every transition into history and every save time we also save the corresponding MDPDataset?

@jamartinh jamartinh added the enhancement New feature or request label Jan 1, 2021
@takuseno
Copy link
Owner

@jamartinh Hello, sorry for the late response... I've implemented to_mdp_dataset method to ReplayBuffer. Do you think this is good enough for your requirement?
5936131

# convert online buffer to static dataset by tracing Transition objects in the buffer.
dataset = replay_buffer.to_mdp_dataset()

@jamartinh
Copy link
Contributor Author

Beautiful !

@takuseno
Copy link
Owner

I'm glad to hear that. And, let me close this issue since it seems to be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants