File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -1730,7 +1730,7 @@ def _pack_and_upload_code(
1730
1730
"sagemaker_session unspecified when creating your Processor to have one set up "
1731
1731
"automatically."
1732
1732
)
1733
- if ("sourcedir.tar.gz" in estimator .uploaded_code .s3_prefix ):
1733
+ if ("/ sourcedir.tar.gz" in estimator .uploaded_code .s3_prefix ):
1734
1734
# Upload the bootstrapping code as s3://.../jobname/source/runproc.sh.
1735
1735
entrypoint_s3_uri = estimator .uploaded_code .s3_prefix .replace (
1736
1736
"sourcedir.tar.gz" ,
Original file line number Diff line number Diff line change @@ -40,6 +40,26 @@ def xgboost_training_job(
40
40
)
41
41
42
42
43
+ def test_sourcedir_naming (
44
+ sagemaker_session ,
45
+ xgboost_latest_version ,
46
+ xgboost_latest_py_version ,
47
+ cpu_instance_type ,
48
+ ):
49
+ with pytest .raises (RuntimeError ):
50
+ processor = XGBoostProcessor (
51
+ framework_version = xgboost_latest_version ,
52
+ role = ROLE ,
53
+ instance_count = 1 ,
54
+ instance_type = cpu_instance_type ,
55
+ sagemaker_session = sagemaker_session ,
56
+ )
57
+ processor .run (
58
+ source_dir = "s3://bucket/deps.tar.gz" ,
59
+ code = "main_script.py" ,
60
+ )
61
+
62
+
43
63
@pytest .mark .release
44
64
def test_framework_processing_job_with_deps (
45
65
sagemaker_session ,
You can’t perform that action at this time.
0 commit comments