File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -469,9 +469,12 @@ def _prepare_training_volumes(
469469
470470 volumes .append (_Volume (model_dir , "/opt/ml/model" ))
471471
472- # Mount the metadata directory on the notebook instance,
473- # this is used by some DeepEngine libraries
474- volumes .append (_Volume ("/opt/ml/metadata" , "/opt/ml/metadata" ))
472+ # Mount the metadata directory if present.
473+ # Only expected to be present on SM notebook instances.
474+ # This is used by some DeepEngine libraries
475+ metadata_dir = "/opt/ml/metadata"
476+ if os .path .isdir (metadata_dir ):
477+ volumes .append (_Volume (metadata_dir , metadata_dir ))
475478
476479 # Set up the channels for the containers. For local data we will
477480 # mount the local directory to the container. For S3 Data we will download the S3 data
You can’t perform that action at this time.
0 commit comments