Skip to content

fix: Add notebook tests for the seedcode in Sagemaker projects #2585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sagemaker/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ def _upload_code(self, key_prefix, repack=False):

def _framework_env_vars(self):
"""Placeholder docstring"""
script_name = None
dir_name = None
if self.uploaded_code:
script_name = self.uploaded_code.script_name
if self.enable_network_isolation():
Expand All @@ -1105,10 +1107,8 @@ def _framework_env_vars(self):
dir_name = self.uploaded_code.s3_prefix
elif self.entry_point is not None:
script_name = self.entry_point
dir_name = "file://" + self.source_dir
else:
script_name = None
dir_name = None
if self.source_dir is not None:
dir_name = "file://" + self.source_dir

return {
SCRIPT_PARAM_NAME.upper(): script_name or str(),
Expand Down
3 changes: 2 additions & 1 deletion tests/scripts/run-notebook-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ echo "set SAGEMAKER_ROLE_ARN=$SAGEMAKER_ROLE_ARN"
./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow_moving_from_framework_mode_to_script_mode/tensorflow_moving_from_framework_mode_to_script_mode.ipynb \
./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow_script_mode_pipe_mode/tensorflow_script_mode_pipe_mode.ipynb \
./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow_script_mode_quickstart/tensorflow_script_mode_quickstart.ipynb \
./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow_serving_using_elastic_inference_with_your_own_model/tensorflow_serving_pretrained_model_elastic_inference.ipynb
./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow_serving_using_elastic_inference_with_your_own_model/tensorflow_serving_pretrained_model_elastic_inference.ipynb \
./amazon-sagemaker-examples/sagemaker-pipelines/tabular/abalone_build_train_deploy/sagemaker-pipelines-preprocess-train-evaluate-batch-transform.ipynb