clvrai / spirl

Official implementation of "Accelerating Reinforcement Learning with Learned Skill Priors", Pertsch et al., CoRL 2020
191 stars 38 forks source link

Dataset for kitchen environment #35

Open CeHao1 opened 1 year ago

CeHao1 commented 1 year ago

Hi Kpertsch, thanks for providing the SPiRL code and Maze dataset. I find you updated the closed-loop model for the kitchen environment. How did you generate the dataset for it?

In D4RL, I find a script to generate kitchen data, but I am not sure if it is correct. https://github.com/kpertsch/d4rl/blob/master/scripts/generate_kitchen_datasets.py

Thanks. Best, Ce

kpertsch commented 1 year ago

Hi Ce,

Not sure whether this is still a problem since you closed the issue, but we're just using the default kitchen dataset provided by D4RL -- you can see how it's downloaded and processed in this file: https://github.com/clvrai/spirl/blob/master/spirl/data/kitchen/src/kitchen_data_loader.py

Note that the dataset does not need to change when switching to the closed-loop model.

-- Karl

CeHao1 commented 1 year ago

Thanks, Karl, I understand how to use the kitchen dataset now. BTW, it seems the SKilD paper https://arxiv.org/pdf/2107.10253.pdf, Appendix F changed the target environment of the kitchen. Do we have instructions about this change? For example, in the Skild repo https://github.com/clvrai/skild.

Best, Ce

kpertsch commented 1 year ago

Hi Ce,

Yes, it's straightforward to change the task in the Kitchen environment.

You can define new versions of the Kitchen environment with different target tasks like here: https://github.com/kpertsch/d4rl/blob/21743171daf2094379b91dfb74bf7c15049b729f/d4rl/kitchen/kitchen_envs.py#L132

Then register the new version of the kitchen environment with gym: https://github.com/kpertsch/d4rl/blob/21743171daf2094379b91dfb74bf7c15049b729f/d4rl/kitchen/__init__.py#L45

And then in the SkiLD codebase we can switch the used version of the Kitchen environment like here: https://github.com/clvrai/skild/blob/91868b1fb1460e7e9013711bd01a047fc7a8ec7b/skild/configs/demo_rl/kitchen/conf.py#L185

-- Karl