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

Load a custom logged data (without pscore) to train a BCQ (or others) model? #26

Open
ericyue opened this issue Feb 2, 2024 · 2 comments

Comments

@ericyue
Copy link

ericyue commented Feb 2, 2024

Could you provide a more detail jupyter notebook about how to load a custom logged data (without pscore) to train a BCQ (or others) model? it will be very helpful!

@aiueola
Copy link
Collaborator

aiueola commented Feb 27, 2024

Hi @ericyue,

Thank you for reaching out. If you are interested in only learning a policy (i.e., not aiming at doing off-policy evaluation (OPE)), you can use the following transformation of the logged data:

offlinerl_dataset = MDPDataset(
    observations=train_logged_dataset["state"],
    actions=train_logged_dataset["action"],
    rewards=train_logged_dataset["reward"],
    terminals=train_logged_dataset["done"],
)

(See also: https://scope-rl.readthedocs.io/en/latest/documentation/quickstart.html)

This does not require "score", so it should work on your dataset.

@ericyue
Copy link
Author

ericyue commented Feb 28, 2024

@aiueola thanks for replying! I want to do OPE too, I meet the same error here, can you give some help for this? #25

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

No branches or pull requests

2 participants