Skip to content

Commit 62ab2a6

Browse files
committed
add new variables in default ignore_patterns
1 parent 8fe66ba commit 62ab2a6

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/sagemaker/modules/configs.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,21 @@ class SourceCode(BaseConfig):
9898
If not specified, entry_script must be provided.
9999
ignore_patterns: (Optional[List[str]]) :
100100
The ignore patterns to ignore specific files/folders when uploading to S3. If not specified,
101-
default to: ['.env', '.git', '__pycache__', '.DS_Store'].
101+
default to: ['.env', '.git', '__pycache__', '.DS_Store', '.cache', '.ipynb_checkpoints'].
102102
"""
103103

104104
source_dir: Optional[str] = None
105105
requirements: Optional[str] = None
106106
entry_script: Optional[str] = None
107107
command: Optional[str] = None
108-
ignore_patterns: Optional[List[str]] = [".env", ".git", "__pycache__", ".DS_Store"]
108+
ignore_patterns: Optional[List[str]] = [
109+
".env",
110+
".git",
111+
"__pycache__",
112+
".DS_Store",
113+
".cache",
114+
".ipynb_checkpoints",
115+
]
109116

110117

111118
class Compute(shapes.ResourceConfig):

src/sagemaker/modules/train/model_trainer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@ def create_input_data_channel(
780780
``s3://<default_bucket_path>/<key_prefix>/<channel_name>/``
781781
ignore_patterns: (Optional[List[str]]) :
782782
The ignore patterns to ignore specific files/folders when uploading to S3.
783-
If not specified, default to: ['.env', '.git', '__pycache__', '.DS_Store'].
783+
If not specified, default to: ['.env', '.git', '__pycache__', '.DS_Store',
784+
'.cache', '.ipynb_checkpoints'].
784785
"""
785786
channel = None
786787
if isinstance(data_source, str):

0 commit comments

Comments
 (0)