DOWNLOAD_DIR="" # todo: CONVERSION_DIR="" # todo: N_WORKERS=10 # number of workers used for parallel conversion --> adjust based on available RAM MAX_EPISODES_IN_MEMORY=100 # number of episodes converted in parallel --> adjust based on available RAM # increase limit on number of files opened in parallel to 20k --> conversion opens up to 1k temporary files # in /tmp to store dataset during conversion ulimit -n 20000 # format: [dataset_name, dataset_version, transforms] DATASET_TRANSFORMS=( # Datasets used for OpenVLA: https://openvla.github.io/ "fractal20220817_data 0.1.0 resize_and_jpeg_encode" "kuka 0.1.0 resize_and_jpeg_encode,filter_success" "taco_play 0.1.0 resize_and_jpeg_encode" "jaco_play 0.1.0 resize_and_jpeg_encode" "berkeley_cable_routing 0.1.0 resize_and_jpeg_encode" "roboturk 0.1.0 resize_and_jpeg_encode" "viola 0.1.0 resize_and_jpeg_encode" "berkeley_autolab_ur5 0.1.0 resize_and_jpeg_encode,flip_wrist_image_channels" "toto 0.1.0 resize_and_jpeg_encode" "language_table 0.1.0 resize_and_jpeg_encode" "stanford_hydra_dataset_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode,flip_wrist_image_channels,flip_image_channels" "austin_buds_dataset_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "nyu_franka_play_dataset_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "furniture_bench_dataset_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "ucsd_kitchen_dataset_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "austin_sailor_dataset_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "austin_sirius_dataset_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "bc_z 0.1.0 resize_and_jpeg_encode" "dlr_edan_shared_control_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "iamlab_cmu_pickup_insert_converted_externally_to_rlds 0.1.0 resize_and_jpeg_encode" "utaustin_mutex 0.1.0 resize_and_jpeg_encode,flip_wrist_image_channels,flip_image_channels" "berkeley_fanuc_manipulation 0.1.0 resize_and_jpeg_encode,flip_wrist_image_channels,flip_image_channels" "cmu_stretch 0.1.0 resize_and_jpeg_encode" "dobbe 0.0.1 resize_and_jpeg_encode" "fmb 0.0.1 resize_and_jpeg_encode" "droid 1.0.0 resize_and_jpeg_encode" ) for tuple in "${DATASET_TRANSFORMS[@]}"; do # Extract strings from the tuple strings=($tuple) DATASET=${strings[0]} VERSION=${strings[1]} TRANSFORM=${strings[2]} mkdir ${DOWNLOAD_DIR}/${DATASET} ./google-cloud-sdk/bin/gsutil -m cp -r gs://gresearch/robotics/${DATASET}/${VERSION} ${DOWNLOAD_DIR}/${DATASET} python3 modify_rlds_dataset.py --dataset=$DATASET --data_dir=$DOWNLOAD_DIR --target_dir=$CONVERSION_DIR --mods=$TRANSFORM --n_workers=$N_WORKERS --max_episodes_in_memory=$MAX_EPISODES_IN_MEMORY rm -rf ${DOWNLOAD_DIR}/${DATASET} mv ${CONVERSION_DIR}/${DATASET} ${DOWNLOAD_DIR} # python3 upload_hf.py $DATASET $VERSION rm -rf ${DOWNLOAD_DIR}/${DATASET} done