|
17 | 17 | import logging
|
18 | 18 | import os
|
19 | 19 | import re
|
20 |
| -import time |
21 | 20 | import shutil
|
22 | 21 | import tempfile
|
| 22 | +import time |
23 | 23 | from collections import namedtuple
|
24 |
| -from typing import List, Optional, Union, Dict |
| 24 | +from typing import Dict, List, Optional, Union |
| 25 | + |
25 | 26 | from packaging import version
|
26 | 27 |
|
27 | 28 | import sagemaker.image_uris
|
| 29 | +import sagemaker.utils |
| 30 | +from sagemaker.deprecations import deprecation_warn_base, renamed_kwargs, renamed_warning |
28 | 31 | from sagemaker.instance_group import InstanceGroup
|
29 | 32 | from sagemaker.s3_utils import s3_path_join
|
30 | 33 | from sagemaker.session_settings import SessionSettings
|
31 |
| -import sagemaker.utils |
32 | 34 | from sagemaker.workflow import is_pipeline_variable
|
33 |
| - |
34 |
| -from sagemaker.deprecations import renamed_warning, renamed_kwargs |
35 | 35 | from sagemaker.workflow.entities import PipelineVariable
|
36 |
| -from sagemaker.deprecations import deprecation_warn_base |
37 | 36 |
|
38 | 37 | logger = logging.getLogger(__name__)
|
39 | 38 |
|
@@ -691,7 +690,7 @@ def validate_smdistributed(
|
691 | 690 | instance_type (str): A string representing the type of training instance selected.
|
692 | 691 | framework_name (str): A string representing the name of framework selected.
|
693 | 692 | framework_version (str): A string representing the framework version selected.
|
694 |
| - py_version (str): A string representing the python version selected. |
| 693 | + py_version (str): A string representing the python version selected. Ex: `py38, py39, py310, py311` |
695 | 694 | distribution (dict): A dictionary with information to enable distributed training.
|
696 | 695 | (Defaults to None if distributed training is not enabled.) For example:
|
697 | 696 |
|
@@ -763,7 +762,7 @@ def _validate_smdataparallel_args(
|
763 | 762 | instance_type (str): A string representing the type of training instance selected. Ex: `ml.p3.16xlarge`
|
764 | 763 | framework_name (str): A string representing the name of framework selected. Ex: `tensorflow`
|
765 | 764 | framework_version (str): A string representing the framework version selected. Ex: `2.3.1`
|
766 |
| - py_version (str): A string representing the python version selected. Ex: `py3` |
| 765 | + py_version (str): A string representing the python version selected. Ex: `py38, py39, py310, py311` |
767 | 766 | distribution (dict): A dictionary with information to enable distributed training.
|
768 | 767 | (Defaults to None if distributed training is not enabled.) Ex:
|
769 | 768 |
|
@@ -846,7 +845,7 @@ def validate_distribution(
|
846 | 845 | instance_groups ([InstanceGroup]): A list contains instance groups used for training.
|
847 | 846 | framework_name (str): A string representing the name of framework selected.
|
848 | 847 | framework_version (str): A string representing the framework version selected.
|
849 |
| - py_version (str): A string representing the python version selected. |
| 848 | + py_version (str): A string representing the python version selected. Ex: `py38, py39, py310, py311` |
850 | 849 | image_uri (str): A string representing a Docker image URI.
|
851 | 850 | kwargs(dict): Additional kwargs passed to this function
|
852 | 851 |
|
@@ -1009,7 +1008,7 @@ def validate_torch_distributed_distribution(
|
1009 | 1008 | }
|
1010 | 1009 | }
|
1011 | 1010 | framework_version (str): A string representing the framework version selected.
|
1012 |
| - py_version (str): A string representing the python version selected. |
| 1011 | + py_version (str): A string representing the python version selected. Ex: `py38, py39, py310, py311` |
1013 | 1012 | image_uri (str): A string representing a Docker image URI.
|
1014 | 1013 | entry_point (str or PipelineVariable): The absolute or relative path to the local Python
|
1015 | 1014 | source file that should be executed as the entry point to
|
@@ -1162,7 +1161,7 @@ def validate_version_or_image_args(framework_version, py_version, image_uri):
|
1162 | 1161 |
|
1163 | 1162 | Args:
|
1164 | 1163 | framework_version (str): The version of the framework.
|
1165 |
| - py_version (str): The version of Python. |
| 1164 | + py_version (str): A string representing the python version selected. Ex: `py38, py39, py310, py311` |
1166 | 1165 | image_uri (str): The URI of the image.
|
1167 | 1166 |
|
1168 | 1167 | Raises:
|
@@ -1194,9 +1193,8 @@ def create_image_uri(
|
1194 | 1193 | instance_type (str): SageMaker instance type. Used to determine device
|
1195 | 1194 | type (cpu/gpu/family-specific optimized).
|
1196 | 1195 | framework_version (str): The version of the framework.
|
1197 |
| - py_version (str): Optional. Python version. If specified, should be one |
1198 |
| - of 'py2' or 'py3'. If not specified, image uri will not include a |
1199 |
| - python component. |
| 1196 | + py_version (str): Optional. Python version Ex: `py38, py39, py310, py311`. |
| 1197 | + If not specified, image uri will not include a python component. |
1200 | 1198 | account (str): AWS account that contains the image. (default:
|
1201 | 1199 | '520713654638')
|
1202 | 1200 | accelerator_type (str): SageMaker Elastic Inference accelerator type.
|
|
0 commit comments