File tree 16 files changed +135
-42
lines changed
get-dataset-waymo-calibration
get-preprocessed-dataset-criteo
16 files changed +135
-42
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ def preprocess(i):
54
54
def postprocess (i ):
55
55
56
56
env = i ['env' ]
57
+
58
+ if env .get ('MLC_DOWNLOAD_MODE' ) == "dry" :
59
+ return {'return' : 0 }
60
+
57
61
filepath = env .get ('MLC_EXTRACT_EXTRACTED_PATH' , '' )
58
62
if filepath == '' :
59
63
filepath = env .get ('MLC_DOWNLOAD_DOWNLOADED_PATH' , '' )
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ posthook_deps:
30
30
MLC_DAE_EXTRACT_DOWNLOADED :
31
31
- ' yes'
32
32
- ' True'
33
+ skip_if_env :
34
+ MLC_DOWNLOAD_MODE :
35
+ - ' dry'
33
36
names :
34
37
- extract-script
35
38
tags : extract,file
Original file line number Diff line number Diff line change @@ -313,6 +313,9 @@ def postprocess(i):
313
313
314
314
env = i ['env' ]
315
315
316
+ if env .get ('MLC_DOWNLOAD_MODE' ) == "dry" :
317
+ return {'return' : 0 }
318
+
316
319
filepath = env ['MLC_DOWNLOAD_DOWNLOADED_PATH' ]
317
320
318
321
if not os .path .exists (filepath ):
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ if [[ ${require_download} == 1 ]]; then
50
50
fi
51
51
52
52
# Verify checksum again if necessary
53
- if [[ ${ MLC_DOWNLOAD_TOOL} == " mlcutil" || ${require_download} == 1 ]]; then
53
+ if [[ " ${MLC_DOWNLOAD_MODE} " != " dry " && ( " ${ MLC_DOWNLOAD_TOOL}" == " mlcutil" || ${require_download} == 1 ) ]]; then
54
54
if [[ -n " ${MLC_DOWNLOAD_CHECKSUM_CMD} " ]]; then
55
55
echo -e " \nVerifying checksum after download: ${MLC_DOWNLOAD_CHECKSUM_CMD} "
56
56
eval " ${MLC_DOWNLOAD_CHECKSUM_CMD} " || exit $?
Original file line number Diff line number Diff line change @@ -14,16 +14,9 @@ def preprocess(i):
14
14
if env .get ('MLC_DATASET_WAYMO_CALIBRATION_PATH' , '' ) != '' :
15
15
if not os .path .exists (env ['MLC_DATASET_WAYMO_CALIBRATION_PATH' ]):
16
16
return {
17
- 'return' : 1 , 'error' : f"Path { env ['MLC_DATASET_WAYMO_CALIBRATION_PATH' ]} does not exists !" }
17
+ 'return' : 1 , 'error' : f"Path { env ['MLC_DATASET_WAYMO_CALIBRATION_PATH' ]} does not exist !" }
18
18
else :
19
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_CALIBRATION_PATH' ] = env ['MLC_OUTDIRNAME' ]
24
- else :
25
- env ['MLC_DATASET_WAYMO_CALIBRATION_PATH' ] = os .path .join (
26
- os .getcwd (), "kitti_format" , "calibration" )
27
20
28
21
return {'return' : 0 }
29
22
Original file line number Diff line number Diff line change @@ -33,3 +33,33 @@ variations:
33
33
- true
34
34
force_cache : true
35
35
tags : get,rclone-config,_waymo
36
+ - enable_if_env :
37
+ MLC_TMP_REQUIRE_DOWNLOAD :
38
+ - ' yes'
39
+ env :
40
+ MLC_DOWNLOAD_FINAL_ENV_NAME : MLC_DATASET_WAYMO_CALIBRATION_PATH
41
+ MLC_EXTRACT_FINAL_ENV_NAME : MLC_DATASET_WAYMO_CALIBRATION_PATH
42
+ MLC_DOWNLOAD_URL : mlc-waymo:waymo_preprocessed_dataset/kitti_format/testing
43
+ extra_cache_tags : waymo,dataset
44
+ force_cache : true
45
+ names :
46
+ - dae
47
+ tags : download-and-extract
48
+ force_env_keys :
49
+ - MLC_OUTDIRNAME
50
+ update_tags_from_env_with_prefix :
51
+ _url. :
52
+ - MLC_DOWNLOAD_URL
53
+ rclone :
54
+ group : download-tool
55
+ add_deps_recursive :
56
+ dae :
57
+ tags : _rclone
58
+ default : true
59
+ dry-run :
60
+ group : run-mode
61
+ env :
62
+ MLC_DOWNLOAD_MODE : dry
63
+ dry-run,rclone :
64
+ env :
65
+ MLC_DOWNLOAD_EXTRA_OPTIONS : --dry-run
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ if [[ " $MLC_DOWNLOAD_MODE " != " dry" && " $MLC_TMP_REQUIRE_DOWNLOAD " = " true" ]]; then
2
+ cd " ${MLC_DATASET_WAYMO_CALIBRATION_PATH} /testing" || exit
3
+ for f in * .tar.gz; do tar -xzvf " $f " ; done
4
+ cd - || exit
5
+ fi
Original file line number Diff line number Diff line change @@ -17,13 +17,6 @@ def preprocess(i):
17
17
'return' : 1 , 'error' : f"Path { env ['MLC_DATASET_WAYMO_PATH' ]} does not exists!" }
18
18
else :
19
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" )
27
20
28
21
return {'return' : 0 }
29
22
Original file line number Diff line number Diff line change @@ -30,5 +30,35 @@ variations:
30
30
enable_if_env :
31
31
MLC_TMP_REQUIRE_DOWNLOAD :
32
32
- yes
33
+ - enable_if_env :
34
+ MLC_TMP_REQUIRE_DOWNLOAD :
35
+ - ' yes'
36
+ env :
37
+ MLC_DOWNLOAD_FINAL_ENV_NAME : MLC_DATASET_WAYMO_PATH
38
+ MLC_EXTRACT_FINAL_ENV_NAME : MLC_DATASET_WAYMO_PATH
39
+ MLC_DOWNLOAD_URL : mlc-waymo:waymo_preprocessed_dataset/kitti_format
40
+ extra_cache_tags : waymo,dataset
41
+ force_cache : true
42
+ names :
43
+ - dae
44
+ tags : download-and-extract
45
+ force_env_keys :
46
+ - MLC_OUTDIRNAME
47
+ update_tags_from_env_with_prefix :
48
+ _url. :
49
+ - MLC_DOWNLOAD_URL
33
50
env :
34
51
MLC_DOWNLOAD_SRC : mlcommons
52
+ rclone :
53
+ group : download-tool
54
+ add_deps_recursive :
55
+ dae :
56
+ tags : _rclone
57
+ default : true
58
+ dry-run :
59
+ group : run-mode
60
+ env :
61
+ MLC_DOWNLOAD_MODE : dry
62
+ dry-run,rclone :
63
+ env :
64
+ MLC_DOWNLOAD_EXTRA_OPTIONS : --dry-run
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
# echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out
7
7
8
8
# ${MLC_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency
9
+
10
+ if [[ " $MLC_DOWNLOAD_MODE " != " dry" && " $MLC_TMP_REQUIRE_DOWNLOAD " = " true" ]]; then
11
+ cd " ${MLC_DATASET_WAYMO_PATH} /kitti_format/training" || exit
12
+ for f in * .tar.gz; do tar -xzvf " $f " ; done
13
+ cd - || exit
14
+ fi
Original file line number Diff line number Diff line change @@ -15,17 +15,11 @@ def preprocess(i):
15
15
16
16
path = env .get ('MLC_OUTDIRNAME' , '' ).strip ()
17
17
18
- if path != "" :
18
+ if path != "" and env . get ( 'MLC_DOWNLOAD_SRC' , '' ) == "huggingface" :
19
19
os .makedirs (path , exist_ok = True )
20
20
env ['MLC_GIT_CHECKOUT_FOLDER' ] = os .path .join (
21
21
path , env ['MLC_ML_MODEL_NAME' ])
22
22
23
- if env ['MLC_DOWNLOAD_SRC' ] == "mlcommons" :
24
- i ['run_script_input' ]['script_name' ] = 'run-rclone'
25
- if env .get ('MLC_OUTDIRNAME' , '' ) != '' :
26
- env ['LLAMA3_CHECKPOINT_PATH' ] = env ['MLC_OUTDIRNAME' ]
27
- else :
28
- env ['LLAMA3_CHECKPOINT_PATH' ] = os .getcwd ()
29
23
env ['MLC_TMP_REQUIRE_DOWNLOAD' ] = 'yes'
30
24
31
25
return {'return' : 0 }
@@ -35,7 +29,8 @@ def postprocess(i):
35
29
36
30
env = i ['env' ]
37
31
38
- env ['MLC_ML_MODEL_LLAMA3_CHECKPOINT_PATH' ] = env ['LLAMA3_CHECKPOINT_PATH' ]
39
- env ['MLC_GET_DEPENDENT_CACHED_PATH' ] = env ['MLC_ML_MODEL_PATH' ]
32
+ if env .get ('MLC_DOWNLOAD_MODE' , '' ) != "dry" :
33
+ env ['MLC_ML_MODEL_LLAMA3_CHECKPOINT_PATH' ] = env ['LLAMA3_CHECKPOINT_PATH' ]
34
+ env ['MLC_GET_DEPENDENT_CACHED_PATH' ] = env ['MLC_ML_MODEL_PATH' ]
40
35
41
36
return {'return' : 0 }
Original file line number Diff line number Diff line change @@ -61,8 +61,38 @@ variations:
61
61
enable_if_env :
62
62
MLC_TMP_REQUIRE_DOWNLOAD :
63
63
- yes
64
+ - enable_if_env :
65
+ MLC_TMP_REQUIRE_DOWNLOAD :
66
+ - ' yes'
67
+ env :
68
+ MLC_DOWNLOAD_FINAL_ENV_NAME : LLAMA3_CHECKPOINT_PATH
69
+ MLC_EXTRACT_FINAL_ENV_NAME : LLAMA3_CHECKPOINT_PATH
70
+ MLC_DOWNLOAD_URL : mlc-llama3-1:inference/<<<MLC_ML_MODEL_NAME>>>
71
+ extra_cache_tags : waymo,dataset
72
+ force_cache : true
73
+ names :
74
+ - dae
75
+ tags : download-and-extract
76
+ force_env_keys :
77
+ - MLC_OUTDIRNAME
78
+ update_tags_from_env_with_prefix :
79
+ _url. :
80
+ - MLC_DOWNLOAD_URL
64
81
env :
65
82
MLC_DOWNLOAD_SRC : mlcommons
83
+ rclone :
84
+ group : download-tool
85
+ add_deps_recursive :
86
+ dae :
87
+ tags : _rclone
88
+ default : true
89
+ dry-run :
90
+ group : run-mode
91
+ env :
92
+ MLC_DOWNLOAD_MODE : dry
93
+ dry-run,rclone :
94
+ env :
95
+ MLC_DOWNLOAD_EXTRA_OPTIONS : --dry-run
66
96
hf :
67
97
group : download-src
68
98
default_variations :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -142,12 +142,28 @@ variations:
142
142
MLC_EXTRACT_FINAL_ENV_NAME : MLC_DATASET_PREPROCESSED_PATH
143
143
MLC_EXTRACT_TO_FOLDER : criteo-preprocessed
144
144
MLC_RCLONE_CONFIG_NAME : mlc-inference
145
- MLC_RCLONE_URL : mlc-inference:mlcommons-inference-wg-public/dlrm_preprocessed
145
+ MLC_DOWNLOAD_URL : mlc-inference:mlcommons-inference-wg-public/dlrm_preprocessed
146
146
extra_cache_tags : criteo,preprocessed,dataset
147
147
force_cache : true
148
148
names :
149
149
- dae
150
- tags : download-and-extract,_rclone,_url.mlc-inference:mlcommons-inference-wg-public/dlrm_preprocessed
150
+ tags : download-and-extract
151
+ update_tags_from_env_with_prefix :
152
+ _url. :
153
+ - MLC_DOWNLOAD_URL
154
+ rclone :
155
+ group : download-tool
156
+ add_deps_recursive :
157
+ dae :
158
+ tags : _rclone
159
+ default : true
160
+ dry-run :
161
+ group : run-mode
162
+ env :
163
+ MLC_DOWNLOAD_MODE : dry
164
+ dry-run,rclone :
165
+ env :
166
+ MLC_DOWNLOAD_EXTRA_OPTIONS : --dry-run
151
167
preprocess :
152
168
group : src
153
169
validation :
You can’t perform that action at this time.
0 commit comments