Skip to content

Commit 1d421fc

Browse files
authored
Add support for downloading waymo from mlcommons checkpoint (#235)
* add support for downloading mlcommons checkpoint
1 parent d7e33d7 commit 1d421fc

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

script/get-dataset-waymo/customize.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@ def preprocess(i):
1111
if os_info['platform'] == "windows":
1212
return {'return': 1, 'error': 'Script not supported in windows yet!'}
1313

14-
if env.get('MLC_DATASET_WAYMO_PATH', '') == '':
15-
return {'return': 1, 'error': 'Please provide path to kitti dataset using tag \\`--waymo_path\\`as automatic download of this dataset is not supported yet.'}
16-
17-
if not os.path.exists(env['MLC_DATASET_WAYMO_PATH']):
18-
return {
19-
'return': 1, 'error': f"Path {env['MLC_DATASET_WAYMO_PATH']} does not exists!"}
14+
if env.get('MLC_DATASET_WAYMO_PATH', '') != '':
15+
if not os.path.exists(env['MLC_DATASET_WAYMO_PATH']):
16+
return {
17+
'return': 1, 'error': f"Path {env['MLC_DATASET_WAYMO_PATH']} does not exists!"}
18+
else:
19+
env['MLC_TMP_REQUIRE_DOWNLOAD'] = "yes"
20+
if env['MLC_DOWNLOAD_SRC'] == "mlcommons":
21+
i['run_script_input']['script_name'] = 'run-rclone'
22+
if env.get('MLC_OUTDIRNAME', '') != '':
23+
env['MLC_DATASET_WAYMO_PATH'] = env['MLC_OUTDIRNAME']
24+
else:
25+
env['MLC_DATASET_WAYMO_PATH'] = os.path.join(
26+
os.getcwd(), "kitti_format")
2027

2128
return {'return': 0}
2229

script/get-dataset-waymo/meta.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,18 @@ variations:
1717
group: dataset-format
1818
env:
1919
MLC_DATASET_WAYMO_FORMAT: kitti
20+
mlc:
21+
group: download-src
22+
default: true
23+
prehook_deps:
24+
- tags: get,rclone
25+
enable_if_env:
26+
MLC_TMP_REQUIRE_DOWNLOAD:
27+
- yes
28+
- tags: get,rclone-config,_waymo
29+
force_cache: true
30+
enable_if_env:
31+
MLC_TMP_REQUIRE_DOWNLOAD:
32+
- yes
33+
env:
34+
MLC_DOWNLOAD_SRC: mlcommons
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cmd="rclone sync mlc-waymo:waymo_preprocessed_dataset/kitti_format ${MLC_DATASET_WAYMO_PATH} -P"
2+
echo $cmd
3+
eval $cmd
4+
test $? -eq 0 || exit $?

script/get-rclone-config/meta.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ variations:
1919
env:
2020
MLC_RCLONE_CONFIG_CMD: 'rclone config create mlc-llama3-1 drive config_is_local=false scope=drive.readonly root_folder_id=12K-2yvmr1ZSZ7SLrhidCbWc0BriN98am'
2121
MLC_RCLONE_CONNECT_CMD: 'rclone config reconnect mlc-llama3-1:'
22+
waymo:
23+
env:
24+
MLC_RCLONE_CONFIG_CMD: 'rclone config create mlc-waymo drive config_is_local=false scope=drive.readonly root_folder_id=1xbfnaUurFeXliFFl1i1gj48eRU2NDiH5'
25+
MLC_RCLONE_CONNECT_CMD: 'rclone config reconnect mlc-waymo:'

0 commit comments

Comments
 (0)