Skip to content

Commit 0627fd3

Browse files
committed
Fix py version docs WIP
1 parent 489b00d commit 0627fd3

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/sagemaker/fw_utils.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@
1717
import logging
1818
import os
1919
import re
20-
import time
2120
import shutil
2221
import tempfile
22+
import time
2323
from collections import namedtuple
24-
from typing import List, Optional, Union, Dict
24+
from typing import Dict, List, Optional, Union
25+
2526
from packaging import version
2627

2728
import sagemaker.image_uris
29+
import sagemaker.utils
30+
from sagemaker.deprecations import deprecation_warn_base, renamed_kwargs, renamed_warning
2831
from sagemaker.instance_group import InstanceGroup
2932
from sagemaker.s3_utils import s3_path_join
3033
from sagemaker.session_settings import SessionSettings
31-
import sagemaker.utils
3234
from sagemaker.workflow import is_pipeline_variable
33-
34-
from sagemaker.deprecations import renamed_warning, renamed_kwargs
3535
from sagemaker.workflow.entities import PipelineVariable
36-
from sagemaker.deprecations import deprecation_warn_base
3736

3837
logger = logging.getLogger(__name__)
3938

@@ -691,7 +690,7 @@ def validate_smdistributed(
691690
instance_type (str): A string representing the type of training instance selected.
692691
framework_name (str): A string representing the name of framework selected.
693692
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`
695694
distribution (dict): A dictionary with information to enable distributed training.
696695
(Defaults to None if distributed training is not enabled.) For example:
697696
@@ -763,7 +762,7 @@ def _validate_smdataparallel_args(
763762
instance_type (str): A string representing the type of training instance selected. Ex: `ml.p3.16xlarge`
764763
framework_name (str): A string representing the name of framework selected. Ex: `tensorflow`
765764
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`
767766
distribution (dict): A dictionary with information to enable distributed training.
768767
(Defaults to None if distributed training is not enabled.) Ex:
769768
@@ -846,7 +845,7 @@ def validate_distribution(
846845
instance_groups ([InstanceGroup]): A list contains instance groups used for training.
847846
framework_name (str): A string representing the name of framework selected.
848847
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`
850849
image_uri (str): A string representing a Docker image URI.
851850
kwargs(dict): Additional kwargs passed to this function
852851
@@ -1009,7 +1008,7 @@ def validate_torch_distributed_distribution(
10091008
}
10101009
}
10111010
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`
10131012
image_uri (str): A string representing a Docker image URI.
10141013
entry_point (str or PipelineVariable): The absolute or relative path to the local Python
10151014
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):
11621161
11631162
Args:
11641163
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`
11661165
image_uri (str): The URI of the image.
11671166
11681167
Raises:
@@ -1194,9 +1193,8 @@ def create_image_uri(
11941193
instance_type (str): SageMaker instance type. Used to determine device
11951194
type (cpu/gpu/family-specific optimized).
11961195
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.
12001198
account (str): AWS account that contains the image. (default:
12011199
'520713654638')
12021200
accelerator_type (str): SageMaker Elastic Inference accelerator type.

0 commit comments

Comments
 (0)