@@ -17,16 +17,16 @@ def _copy_jumpstart_artifacts(model_data: str, js_id: str, code_dir: Path) -> bo
17
17
"""Placeholder Docstring"""
18
18
logger .info ("Downloading JumpStart artifacts from S3..." )
19
19
with _tmpdir (directory = str (code_dir )) as js_model_dir :
20
- # TODO: remove if block after 10/30 once everything is shifted to uncompressed
21
- if model_data . endswith ( "tar.gz" ):
22
- subprocess . run ([ "aws" , "s3" , "cp" , model_data , js_model_dir ])
23
-
20
+ js_model_data_loc = model_data . get ( "S3DataSource" ). get ( "S3Uri" )
21
+ # TODO: leave this check here until we are sure every js model has moved to uncompressed
22
+ if js_model_data_loc . endswith ( "tar.gz" ):
23
+ subprocess . run ([ "aws" , "s3" , "cp" , js_model_data_loc , js_model_dir ])
24
24
logger .info ("Uncompressing JumpStart artifacts for faster loading..." )
25
25
tmp_sourcedir = Path (js_model_dir ).joinpath (f"infer-prepack-{ js_id } .tar.gz" )
26
26
with tarfile .open (str (tmp_sourcedir )) as resources :
27
27
resources .extractall (path = code_dir )
28
28
else :
29
- subprocess .run (["aws" , "s3" , "cp" , model_data , js_model_dir , "--recursive" ])
29
+ subprocess .run (["aws" , "s3" , "cp" , js_model_data_loc , js_model_dir , "--recursive" ])
30
30
return True
31
31
32
32
0 commit comments