|
11 | 11 | # ANY KIND, either express or implied. See the License for the specific |
12 | 12 | # language governing permissions and limitations under the License. |
13 | 13 | """Placeholder docstring""" |
14 | | -from __future__ import print_function, absolute_import |
| 14 | +from __future__ import absolute_import, print_function |
15 | 15 |
|
16 | 16 | import json |
17 | 17 | import logging |
18 | 18 | import os |
19 | 19 | import uuid |
| 20 | +from abc import ABCMeta, abstractmethod |
20 | 21 |
|
21 | | -from abc import ABCMeta |
22 | | -from abc import abstractmethod |
23 | | - |
24 | | -from six import with_metaclass |
25 | | -from six import string_types |
| 22 | +from six import string_types, with_metaclass |
26 | 23 | from six.moves.urllib.parse import urlparse |
| 24 | + |
27 | 25 | import sagemaker |
28 | | -from sagemaker import git_utils, image_uris |
| 26 | +from sagemaker import git_utils, image_uris, vpc_utils |
29 | 27 | from sagemaker.analytics import TrainingJobAnalytics |
30 | | -from sagemaker.debugger import TensorBoardOutputConfig # noqa: F401 # pylint: disable=unused-import |
31 | | -from sagemaker.debugger import ( |
| 28 | +from sagemaker.debugger import ( # noqa: F401 # pylint: disable=unused-import |
32 | 29 | DEBUGGER_FLAG, |
33 | 30 | DebuggerHookConfig, |
34 | 31 | FrameworkProfile, |
35 | | - get_default_profiler_rule, |
36 | | - get_rule_container_image_uri, |
37 | 32 | ProfilerConfig, |
38 | 33 | ProfilerRule, |
39 | 34 | Rule, |
| 35 | + TensorBoardOutputConfig, |
| 36 | + get_default_profiler_rule, |
| 37 | + get_rule_container_image_uri, |
40 | 38 | ) |
41 | | -from sagemaker.deprecations import ( |
42 | | - removed_kwargs, |
43 | | - removed_function, |
44 | | - renamed_kwargs, |
45 | | -) |
46 | | -from sagemaker.s3 import S3Uploader, parse_s3_url |
47 | | - |
| 39 | +from sagemaker.deprecations import removed_function, removed_kwargs, renamed_kwargs |
48 | 40 | from sagemaker.fw_utils import ( |
49 | | - tar_and_upload_dir, |
50 | 41 | UploadedCode, |
51 | | - validate_source_dir, |
52 | 42 | _region_supports_debugger, |
53 | 43 | _region_supports_profiler, |
54 | 44 | get_mp_parameters, |
| 45 | + tar_and_upload_dir, |
| 46 | + validate_source_dir, |
55 | 47 | ) |
56 | | -from sagemaker.workflow.properties import Properties |
57 | | -from sagemaker.workflow.parameters import Parameter |
58 | | -from sagemaker.workflow.entities import Expression |
59 | 48 | from sagemaker.inputs import TrainingInput |
60 | 49 | from sagemaker.job import _Job |
61 | 50 | from sagemaker.local import LocalSession |
62 | | -from sagemaker.model import Model, NEO_ALLOWED_FRAMEWORKS |
63 | 51 | from sagemaker.model import ( |
64 | | - SCRIPT_PARAM_NAME, |
65 | | - DIR_PARAM_NAME, |
66 | 52 | CONTAINER_LOG_LEVEL_PARAM_NAME, |
| 53 | + DIR_PARAM_NAME, |
67 | 54 | JOB_NAME_PARAM_NAME, |
| 55 | + NEO_ALLOWED_FRAMEWORKS, |
68 | 56 | SAGEMAKER_REGION_PARAM_NAME, |
| 57 | + SCRIPT_PARAM_NAME, |
| 58 | + Model, |
69 | 59 | ) |
70 | 60 | from sagemaker.predictor import Predictor |
| 61 | +from sagemaker.s3 import S3Uploader, parse_s3_url |
71 | 62 | from sagemaker.session import Session |
72 | 63 | from sagemaker.transformer import Transformer |
73 | 64 | from sagemaker.utils import ( |
|
77 | 68 | get_config_value, |
78 | 69 | name_from_base, |
79 | 70 | ) |
80 | | -from sagemaker import vpc_utils |
| 71 | +from sagemaker.workflow.entities import Expression |
| 72 | +from sagemaker.workflow.parameters import Parameter |
| 73 | +from sagemaker.workflow.properties import Properties |
81 | 74 |
|
82 | 75 | logger = logging.getLogger(__name__) |
83 | 76 |
|
@@ -150,11 +143,14 @@ def __init__( |
150 | 143 | 60 * 60). After this amount of time Amazon SageMaker terminates |
151 | 144 | the job regardless of its current status. |
152 | 145 | input_mode (str): The input mode that the algorithm supports |
153 | | - (default: 'File'). Valid modes: 'File' - Amazon SageMaker copies |
154 | | - the training dataset from the S3 location to a local directory. |
| 146 | + (default: 'File'). Valid modes: |
| 147 | + 'File' - Amazon SageMaker copiesthe training dataset from the |
| 148 | + S3 location to a local directory. |
155 | 149 | 'Pipe' - Amazon SageMaker streams data directly from S3 to the |
156 | | - container via a Unix-named pipe. This argument can be overriden |
157 | | - on a per-channel basis using |
| 150 | + container via a Unix-named pipe. |
| 151 | + 'FastFile' - Amazon SageMaker streams data from S3 on demand instead of |
| 152 | + downloading the entire dataset before training begins. This argument can |
| 153 | + be overriden on a per-channel basis using |
158 | 154 | ``sagemaker.inputs.TrainingInput.input_mode``. |
159 | 155 | output_path (str): S3 location for saving the training result (model |
160 | 156 | artifacts and output files). If not specified, results are |
|
0 commit comments