Skip to content

Commit 5ff14b2

Browse files
author
Dewen Qi
committed
change: Disable displaying type hints in doc signature and add PipelineVariable annotations in docstring
1 parent 284ddbe commit 5ff14b2

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
@@ -90,6 +90,13 @@
9090
# Example configuration for intersphinx: refer to the Python standard library.
9191
intersphinx_mapping = {"http://docs.python.org/": None}
9292

93+
# -- Options for autodoc ----------------------------------------------------
94+
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration
95+
96+
# Automatically extract typehints when specified and place them in
97+
# descriptions of the relevant function/method.
98+
autodoc_typehints = "description"
99+
93100
# autosummary
94101
autosummary_generate = True
95102

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
@@ -309,16 +309,16 @@ def __init__(
309309
"""A collection of Amazon :class:~`Record` objects serialized and stored in S3.
310310
311311
Args:
312-
s3_data (str): The S3 location of the training data
312+
s3_data (str or PipelineVariable): The S3 location of the training data
313313
num_records (int): The number of records in the set.
314314
feature_dim (int): The dimensionality of "values" arrays in the
315315
Record features, and label (if each Record is labeled).
316-
s3_data_type (str): Valid values: 'S3Prefix', 'ManifestFile'. If
317-
'S3Prefix', ``s3_data`` defines a prefix of s3 objects to train
316+
s3_data_type (str or PipelineVariable): Valid values: 'S3Prefix', 'ManifestFile'.
317+
If 'S3Prefix', ``s3_data`` defines a prefix of s3 objects to train
318318
on. All objects with s3 keys beginning with ``s3_data`` will be
319319
used to train. If 'ManifestFile', then ``s3_data`` defines a
320320
single s3 manifest file, listing each s3 object to train on.
321-
channel (str): The SageMaker Training Job channel this RecordSet
321+
channel (str or PipelineVariable): The SageMaker Training Job channel this RecordSet
322322
should be bound to
323323
"""
324324
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)