Skip to content

Add support for downloading waymo from mlcommons checkpoint #235

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

Merged
merged 3 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions script/get-dataset-waymo/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ def preprocess(i):
if os_info['platform'] == "windows":
return {'return': 1, 'error': 'Script not supported in windows yet!'}

if env.get('MLC_DATASET_WAYMO_PATH', '') == '':
return {'return': 1, 'error': 'Please provide path to kitti dataset using tag \\`--waymo_path\\`as automatic download of this dataset is not supported yet.'}

if not os.path.exists(env['MLC_DATASET_WAYMO_PATH']):
return {
'return': 1, 'error': f"Path {env['MLC_DATASET_WAYMO_PATH']} does not exists!"}
if env.get('MLC_DATASET_WAYMO_PATH', '') != '':
if not os.path.exists(env['MLC_DATASET_WAYMO_PATH']):
return {
'return': 1, 'error': f"Path {env['MLC_DATASET_WAYMO_PATH']} does not exists!"}
else:
env['MLC_TMP_REQUIRE_DOWNLOAD'] = "yes"
if env['MLC_DOWNLOAD_SRC'] == "mlcommons":
i['run_script_input']['script_name'] = 'run-rclone'
if env.get('MLC_OUTDIRNAME', '') != '':
env['MLC_DATASET_WAYMO_PATH'] = env['MLC_OUTDIRNAME']
else:
env['MLC_DATASET_WAYMO_PATH'] = os.path.join(
os.getcwd(), "kitti_format")

return {'return': 0}

Expand Down
15 changes: 15 additions & 0 deletions script/get-dataset-waymo/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,18 @@ variations:
group: dataset-format
env:
MLC_DATASET_WAYMO_FORMAT: kitti
mlc:
group: download-src
default: true
prehook_deps:
- tags: get,rclone
enable_if_env:
MLC_TMP_REQUIRE_DOWNLOAD:
- yes
- tags: get,rclone-config,_waymo
force_cache: true
enable_if_env:
MLC_TMP_REQUIRE_DOWNLOAD:
- yes
env:
MLC_DOWNLOAD_SRC: mlcommons
4 changes: 4 additions & 0 deletions script/get-dataset-waymo/run-rclone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cmd="rclone sync mlc-waymo:waymo_preprocessed_dataset/kitti_format ${MLC_DATASET_WAYMO_PATH} -P"
echo $cmd
eval $cmd
test $? -eq 0 || exit $?
4 changes: 4 additions & 0 deletions script/get-rclone-config/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ variations:
env:
MLC_RCLONE_CONFIG_CMD: 'rclone config create mlc-llama3-1 drive config_is_local=false scope=drive.readonly root_folder_id=12K-2yvmr1ZSZ7SLrhidCbWc0BriN98am'
MLC_RCLONE_CONNECT_CMD: 'rclone config reconnect mlc-llama3-1:'
waymo:
env:
MLC_RCLONE_CONFIG_CMD: 'rclone config create mlc-waymo drive config_is_local=false scope=drive.readonly root_folder_id=1xbfnaUurFeXliFFl1i1gj48eRU2NDiH5'
MLC_RCLONE_CONNECT_CMD: 'rclone config reconnect mlc-waymo:'
Loading