@@ -135,14 +135,14 @@ def __init__(
135
135
model container is pulled from ECR, or private registry in your
136
136
VPC. By default it is set to pull model container image from
137
137
ECR. (default: None).
138
- source_dir (str): Path ( absolute, relative or an S3 URI) to a directory
138
+ source_dir (str): The absolute, relative, or S3 URI Path to a directory
139
139
with any other training source code dependencies aside from the entry
140
140
point file (default: None). If ``source_dir`` is an S3 URI, it must
141
- point to a tar.gz file. Structure within this directory are preserved
141
+ point to a tar.gz file. Structure within this directory is preserved
142
142
when training on Amazon SageMaker. If 'git_config' is provided,
143
143
'source_dir' should be a relative location to a directory in the Git repo.
144
- If the directory points to S3, no code will be uploaded and the S3 location
145
- will be used instead.
144
+ If the directory points to S3, no code is uploaded and the S3 location
145
+ is used instead.
146
146
147
147
.. admonition:: Example
148
148
@@ -155,14 +155,14 @@ def __init__(
155
155
156
156
You can assign entry_point='inference.py', source_dir='src'.
157
157
code_location (str): Name of the S3 bucket where custom code is
158
- uploaded (default: None). If not specified, default bucket
158
+ uploaded (default: None). If not specified, the default bucket
159
159
created by ``sagemaker.session.Session`` is used.
160
- entry_point (str): Path ( absolute or relative) to the Python source
161
- file which should be executed as the entry point to model
162
- hosting (default : None). If ``source_dir`` is specified,
163
- then ``entry_point`` must point to a file located at the root of
164
- ``source_dir``. If 'git_config' is provided, 'entry_point' should
165
- be a relative location to the Python source file in the Git repo.
160
+ entry_point (str): The absolute or relative path to the local Python
161
+ source file that should be executed as the entry point to
162
+ model hosting. (Default : None). If ``source_dir`` is specified, then ``entry_point``
163
+ must point to a file located at the root of ``source_dir``.
164
+ If 'git_config' is provided, 'entry_point' should be
165
+ a relative location to the Python source file in the Git repo.
166
166
167
167
Example:
168
168
With the following GitHub repo directory structure:
@@ -176,9 +176,9 @@ def __init__(
176
176
container_log_level (int): Log level to use within the container
177
177
(default: logging.INFO). Valid values are defined in the Python
178
178
logging module.
179
- dependencies (list[str]): A list of paths to directories (absolute
180
- or relative) with any additional libraries that will be exported
181
- to the container (default: []). The library folders will be
179
+ dependencies (list[str]): A list of absolute or relative paths to directories
180
+ with any additional libraries that should be exported
181
+ to the container (default: []). The library folders are
182
182
copied to SageMaker in the same folder where the entrypoint is
183
183
copied. If 'git_config' is provided, 'dependencies' should be a
184
184
list of relative locations to directories with any additional
@@ -193,7 +193,7 @@ def __init__(
193
193
>>> Model(entry_point='inference.py',
194
194
... dependencies=['my/libs/common', 'virtual-env'])
195
195
196
- results in the following inside the container:
196
+ results in the following structure inside the container:
197
197
198
198
>>> $ ls
199
199
@@ -210,7 +210,9 @@ def __init__(
210
210
``repo`` specifies the Git repository where your training script
211
211
is stored. If you don't provide ``branch``, the default value
212
212
'master' is used. If you don't provide ``commit``, the latest
213
- commit in the specified branch is used. .. admonition:: Example
213
+ commit in the specified branch is used.
214
+
215
+ .. admonition:: Example
214
216
215
217
The following config:
216
218
@@ -219,7 +221,7 @@ def __init__(
219
221
>>> 'commit': '329bfcf884482002c05ff7f44f62599ebc9f445a'}
220
222
221
223
results in cloning the repo specified in 'repo', then
222
- checkout the 'master' branch, and checkout the specified
224
+ checking out the 'master' branch, and checking out the specified
223
225
commit.
224
226
225
227
``2FA_enabled``, ``username``, ``password`` and ``token`` are
@@ -232,26 +234,25 @@ def __init__(
232
234
repositories.
233
235
234
236
For GitHub and other Git repos, when SSH URLs are provided, it
235
- doesn't matter whether 2FA is enabled or disabled; you should
236
- either have no passphrase for the SSH key pairs, or have the
237
- ssh-agent configured so that you will not be prompted for SSH
238
- passphrase when you do 'git clone' command with SSH URLs. When
239
- HTTPS URLs are provided: if 2FA is disabled, then either token
240
- or username+ password will be used for authentication if provided
241
- (token prioritized); if 2FA is enabled, only token will be used
237
+ doesn't matter whether 2FA is enabled or disabled. You should
238
+ either have no passphrase for the SSH key pairs or have the
239
+ ssh-agent configured so that you will not be prompted for the SSH
240
+ passphrase when you run the 'git clone' command with SSH URLs. When
241
+ HTTPS URLs are provided, if 2FA is disabled, then either `` token``
242
+ or `` username`` and `` password`` are be used for authentication if provided.
243
+ ``Token`` is prioritized. If 2FA is enabled, only `` token`` is used
242
244
for authentication if provided. If required authentication info
243
- is not provided, python SDK will try to use local credentials
244
- storage to authenticate. If that fails either, an error message
245
- will be thrown.
245
+ is not provided, the SageMaker Python SDK attempts to use local credentials
246
+ to authenticate. If that fails, an error message is thrown.
246
247
247
- For CodeCommit repos, 2FA is not supported, so ' 2FA_enabled'
248
+ For CodeCommit repos, 2FA is not supported, so `` 2FA_enabled``
248
249
should not be provided. There is no token in CodeCommit, so
249
- ' token' should not be provided too . When ' repo' is an SSH URL,
250
- the requirements are the same as GitHub-like repos. When ' repo'
251
- is an HTTPS URL, username+password will be used for
252
- authentication if they are provided; otherwise, python SDK will
253
- try to use either CodeCommit credential helper or local
254
- credential storage for authentication.
250
+ `` token`` should also not be provided. When `` repo`` is an SSH URL,
251
+ the requirements are the same as GitHub repos. When `` repo``
252
+ is an HTTPS URL, `` username`` and ``password`` are used for
253
+ authentication if they are provided. If they are not provided,
254
+ the SageMaker Python SDK attempts to use either the CodeCommit
255
+ credential helper or local credential storage for authentication.
255
256
256
257
"""
257
258
self .model_data = model_data
@@ -1313,7 +1314,9 @@ def __init__(
1313
1314
``repo`` specifies the Git repository where your training script
1314
1315
is stored. If you don't provide ``branch``, the default value
1315
1316
'master' is used. If you don't provide ``commit``, the latest
1316
- commit in the specified branch is used. .. admonition:: Example
1317
+ commit in the specified branch is used.
1318
+
1319
+ .. admonition:: Example
1317
1320
1318
1321
The following config:
1319
1322
0 commit comments