Skip to content

Commit b17569d

Browse files
authored
Merge branch 'dev' into ghaction-big-sized-calib
2 parents 7672a40 + 1b9a32d commit b17569d

File tree

6 files changed

+12
-13
lines changed

6 files changed

+12
-13
lines changed

automation/script/module.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def __init__(self, action_object, automation_file):
8282
'skip_system_deps',
8383
'git_ssh',
8484
'gh_token',
85-
'hf_token']
85+
'hf_token',
86+
'verify_ssl']
8687

8788
############################################################
8889

automation/utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ def download_file(i):
178178

179179
text = i.get('text', 'Downloaded: ')
180180

181-
if 'MLC_UTILS_DOWNLOAD_VERIFY_SSL' in os.environ:
182-
verify = os.environ['MLC_UTILS_DOWNLOAD_VERIFY_SSL'] == 'yes'
181+
if 'MLC_VERIFY_SSL' in os.environ:
182+
verify = is_true(os.environ['MLC_VERIFY_SSL'])
183183
else:
184-
verify = i.get('verify', True)
184+
verify = is_true(i.get('verify_ssl', True))
185185

186186
try:
187187
with requests.get(url, stream=True, allow_redirects=True, verify=verify) as download:

script/download-and-extract/meta.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ input_mapping:
1515
store: MLC_DOWNLOAD_PATH
1616
to: MLC_EXTRACT_PATH
1717
url: MLC_DAE_URL
18-
verify: MLC_VERIFY_SSL
1918
new_env_keys:
2019
- MLC_DOWNLOAD_DOWNLOADED_PATH*
2120
- MLC_EXTRACT_EXTRACTED_PATH

script/download-file/customize.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def preprocess(i):
8484

8585
extra_download_options = env.get('MLC_DOWNLOAD_EXTRA_OPTIONS', '')
8686

87-
verify_ssl = env.get('MLC_VERIFY_SSL', "True")
88-
if is_false(verify_ssl) or os_info['platform'] == 'windows':
87+
verify_ssl = is_true(env.get('MLC_VERIFY_SSL', "True"))
88+
if not verify_ssl or os_info['platform'] == 'windows':
8989
verify_ssl = False
9090
else:
9191
verify_ssl = True
@@ -229,17 +229,17 @@ def preprocess(i):
229229
rclone_copy_using = env.get('MLC_RCLONE_COPY_USING', 'sync')
230230
if rclone_copy_using == "sync":
231231
pre_clean = False
232+
if not verify_ssl:
233+
extra_download_options += " --no-check-certificate "
232234
if env["MLC_HOST_OS_TYPE"] == "windows":
233235
# have to modify the variable from url to temp_url if it is
234236
# going to be used anywhere after this point
235237
url = url.replace("%", "%%")
236238
temp_download_file = env['MLC_DOWNLOAD_FILENAME'].replace(
237239
"%", "%%")
238-
env['MLC_DOWNLOAD_CMD'] = f"rclone {rclone_copy_using} {q}{url}{q} {q}{os.path.join(os.getcwd(), temp_download_file)}{q} -P --error-on-no-transfer"
240+
env['MLC_DOWNLOAD_CMD'] = f"rclone {rclone_copy_using} {q}{url}{q} {q}{os.path.join(os.getcwd(), temp_download_file)}{q} -P --error-on-no-transfer {extra_download_options}"
239241
else:
240242
env['MLC_DOWNLOAD_CMD'] = f"rclone {rclone_copy_using} {q}{url}{q} {q}{os.path.join(os.getcwd(), env['MLC_DOWNLOAD_FILENAME'])}{q} -P --error-on-no-transfer {extra_download_options}"
241-
if not verify_ssl:
242-
env['MLC_DOWNLOAD_CMD'] += f" --no-check-certificate"
243243

244244
filename = env['MLC_DOWNLOAD_FILENAME']
245245
env['MLC_DOWNLOAD_DOWNLOADED_FILENAME'] = filename

script/download-file/meta.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ input_mapping:
2424
output_file: MLC_DOWNLOAD_FILENAME
2525
store: MLC_DOWNLOAD_PATH
2626
url: MLC_DOWNLOAD_URL
27-
verify: MLC_VERIFY_SSL
28-
verify_ssl: MLC_VERIFY_SSL
2927
new_env_keys:
3028
- MLC_DOWNLOAD_DOWNLOADED_PATH
3129
- <<<MLC_DOWNLOAD_FINAL_ENV_NAME>>>

script/get-ml-model-gptj/meta.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ variations:
9595
pytorch,fp32:
9696
env:
9797
MLC_DOWNLOAD_CHECKSUM_NOT_USED: e677e28aaf03da84584bb3073b7ee315
98-
MLC_DOWNLOAD_EXTRA_OPTIONS: ' --output-document checkpoint.zip'
9998
MLC_PACKAGE_URL: https://cloud.mlcommons.org/index.php/s/QAZ2oM94MkFtbQx/download
10099
MLC_RCLONE_CONFIG_NAME: mlc-inference
101100
MLC_RCLONE_URL: mlc-inference:mlcommons-inference-wg-public/gpt-j
@@ -105,6 +104,8 @@ variations:
105104
add_deps_recursive:
106105
dae:
107106
tags: _extract
107+
env:
108+
MLC_DOWNLOAD_EXTRA_OPTIONS: ' --output-document checkpoint.zip'
108109
pytorch,int4,intel: {}
109110
pytorch,int8,intel: {}
110111
pytorch,intel:

0 commit comments

Comments
 (0)