Skip to content

Commit 9f400bd

Browse files
qidewenwhenDewen Qi
andauthored
change: Disable type hints in doc signature and add PipelineVariable annotations in docstring (#3292)
Co-authored-by: Dewen Qi <[email protected]>
1 parent ace07d7 commit 9f400bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+770
-670
lines changed

doc/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@
9696
# Example configuration for intersphinx: refer to the Python standard library.
9797
intersphinx_mapping = {"http://docs.python.org/": None}
9898

99+
# -- Options for autodoc ----------------------------------------------------
100+
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration
101+
102+
# Automatically extract typehints when specified and place them in
103+
# descriptions of the relevant function/method.
104+
autodoc_typehints = "description"
105+
99106
# autosummary
100107
autosummary_generate = True
101108

doc/workflows/pipelines/sagemaker.workflow.pipelines.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Entities
4646

4747
.. autoclass:: sagemaker.workflow.entities.Expression
4848

49+
.. autoclass:: sagemaker.workflow.entities.PipelineVariable
50+
4951
Execution Variables
5052
-------------------
5153

src/sagemaker/amazon/amazon_estimator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,16 @@ def __init__(
316316
"""A collection of Amazon :class:~`Record` objects serialized and stored in S3.
317317
318318
Args:
319-
s3_data (str): The S3 location of the training data
319+
s3_data (str or PipelineVariable): The S3 location of the training data
320320
num_records (int): The number of records in the set.
321321
feature_dim (int): The dimensionality of "values" arrays in the
322322
Record features, and label (if each Record is labeled).
323-
s3_data_type (str): Valid values: 'S3Prefix', 'ManifestFile'. If
324-
'S3Prefix', ``s3_data`` defines a prefix of s3 objects to train
323+
s3_data_type (str or PipelineVariable): Valid values: 'S3Prefix', 'ManifestFile'.
324+
If 'S3Prefix', ``s3_data`` defines a prefix of s3 objects to train
325325
on. All objects with s3 keys beginning with ``s3_data`` will be
326326
used to train. If 'ManifestFile', then ``s3_data`` defines a
327327
single s3 manifest file, listing each s3 object to train on.
328-
channel (str): The SageMaker Training Job channel this RecordSet
328+
channel (str or PipelineVariable): The SageMaker Training Job channel this RecordSet
329329
should be bound to
330330
"""
331331
self.s3_data = s3_data

src/sagemaker/amazon/factorization_machines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def __init__(
333333
"""Initialization for FactorizationMachinesModel class.
334334
335335
Args:
336-
model_data (str): The S3 location of a SageMaker model data
336+
model_data (str or PipelineVariable): The S3 location of a SageMaker model data
337337
``.tar.gz`` file.
338338
role (str): An AWS IAM role (either name or full ARN). The Amazon
339339
SageMaker training jobs and APIs that create Amazon SageMaker

src/sagemaker/amazon/ipinsights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def __init__(
236236
"""Creates object to get insights on S3 model data.
237237
238238
Args:
239-
model_data (str): The S3 location of a SageMaker model data
239+
model_data (str or PipelineVariable): The S3 location of a SageMaker model data
240240
``.tar.gz`` file.
241241
role (str): An AWS IAM role (either name or full ARN). The Amazon
242242
SageMaker training jobs and APIs that create Amazon SageMaker

src/sagemaker/amazon/kmeans.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def __init__(
260260
"""Initialization for KMeansModel class.
261261
262262
Args:
263-
model_data (str): The S3 location of a SageMaker model data
263+
model_data (str or PipelineVariable): The S3 location of a SageMaker model data
264264
``.tar.gz`` file.
265265
role (str): An AWS IAM role (either name or full ARN). The Amazon
266266
SageMaker training jobs and APIs that create Amazon SageMaker

src/sagemaker/amazon/knn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def __init__(
252252
"""Function to initialize KNNModel.
253253
254254
Args:
255-
model_data (str): The S3 location of a SageMaker model data
255+
model_data (str or PipelineVariable): The S3 location of a SageMaker model data
256256
``.tar.gz`` file.
257257
role (str): An AWS IAM role (either name or full ARN). The Amazon
258258
SageMaker training jobs and APIs that create Amazon SageMaker

src/sagemaker/amazon/lda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def __init__(
234234
"""Initialization for LDAModel class.
235235
236236
Args:
237-
model_data (str): The S3 location of a SageMaker model data
237+
model_data (str or PipelineVariable): The S3 location of a SageMaker model data
238238
``.tar.gz`` file.
239239
role (str): An AWS IAM role (either name or full ARN). The Amazon
240240
SageMaker training jobs and APIs that create Amazon SageMaker

src/sagemaker/amazon/linear_learner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def __init__(
495495
"""Initialization for LinearLearnerModel.
496496
497497
Args:
498-
model_data (str): The S3 location of a SageMaker model data
498+
model_data (str or PipelineVariable): The S3 location of a SageMaker model data
499499
``.tar.gz`` file.
500500
role (str): An AWS IAM role (either name or full ARN). The Amazon
501501
SageMaker training jobs and APIs that create Amazon SageMaker

src/sagemaker/amazon/ntm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def __init__(
263263
"""Initialization for NTMModel class.
264264
265265
Args:
266-
model_data (str): The S3 location of a SageMaker model data
266+
model_data (str or PipelineVariable): The S3 location of a SageMaker model data
267267
``.tar.gz`` file.
268268
role (str): An AWS IAM role (either name or full ARN). The Amazon
269269
SageMaker training jobs and APIs that create Amazon SageMaker

0 commit comments

Comments
 (0)