-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -468,10 +468,12 @@ def _create_or_update_code_dir( | |
shutil.copy2(inference_script, code_dir) | ||
|
||
for dependency in dependencies: | ||
lib_dir = os.path.join(code_dir, "lib") | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
laurenyu
Author
Contributor
|
||
if os.path.isdir(dependency): | ||
shutil.copytree(dependency, code_dir) | ||
shutil.copytree(dependency, os.path.join(lib_dir, os.path.basename(dependency))) | ||
else: | ||
shutil.copy2(dependency, code_dir) | ||
os.mkdir(lib_dir) | ||
shutil.copy2(dependency, lib_dir) | ||
|
||
|
||
def _extract_model(model_uri, sagemaker_session, tmp): | ||
|
why do you put the code in a lib directory?
when my endpoint is launched, there are import failures as code into the /opt/ml/code/lib is not found from the main script copied into /opt/ml/code. Is there something I miss? or is this a bug?