feature(wrh): add robotwin converting data and training#29
Open
ruiheng123 wants to merge 1 commit intoOpenHelix-Team:mainfrom
Open
feature(wrh): add robotwin converting data and training#29ruiheng123 wants to merge 1 commit intoOpenHelix-Team:mainfrom
ruiheng123 wants to merge 1 commit intoOpenHelix-Team:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Feature(wrh): Adding training code for robotwin 2.0 implementation for adapter.
This PR commits my implementation of finetuning VLA-adapter on RoboTwin 2.0 benchmark (onlty training code).
Todo list:
Process:
RoboTwin 2.0 documentation
Setup RoboTwin 2.0 environment and install requirements by following here
I first generate the dataset. (reference: here. RoboTwin provides 50 bimanual tasks in total; for brevity, only one representative task is detailed below—the remaining 49 tasks are processed in exactly the same way.
NOTE: I give
beat_block_hammeras an example here. More tasks likeadjust_bottle,click_bell, etc. have similar process!1. Executing generate dataset shell script
and you can find generated data in
datafolder (in the robotwin working directory) .I collect 1000 episodes per task, num_episodes can be modified in
task_config/demo_clean.ymlkeyepisode_numfor demo_clean and similar to demo_randomized.2. convert hdf5 to rlds format
Since VLA-adapter is built upon OpenVLA-OFT, which supports rlds tensorflow dataset format, we need to convert generated hdf5 format data to rlds format.
Back to adapter working directory, I give an example of converting
beat_block_hammerdata to rlds format by adding this folder:Remember to replace the dataset paths!
you can change the name. Here I add postfix
rtmeans robotwin dataset, which need to be recognized as aloha platform in adapter training scripts.To keep naming consistent, use CamelCase for the class name (
BeatBlockHammerRt) and convert it to lowercase with underscores for the file name (beat_block_hammer_rt.py).and now execute
~/vla/VLA-Adapter$ tfds build beat_block_hammer_rt --overwriteThis command will find
beat_block_hammer_rt/beat_block_hammer_rt.pyfile to build the rlds dataset. After this you can find converted data in~/tensoflow_datasetsdirectory:which is the converted rlds dataset.
REMARK: Please make sure all keys are aligned!
3. Register in oxe dataset list
We add 3 settings in: (refering
alohabimanual platform setup)I added some modification to enable beat block hammer dataset can be recognized as aloha platform. Then you can input
and the dataset can be built by our
RLDSDatasetsuccessfully!Moreover, I also added a jupyter notebook for minimal checking, making sure if the converted rlds dataset can be loaded by Adapter dataloader. This can be found in


vla-scripts/loading_data.ipynb, including loading + visualizing 3 views of data.Deploying (evaluating) : to be continued! This only gives a typical case of collecting--converting--loading process for VLA-adapter training on RoboTwin 2.0 tasks!