Skip to content

Commit b52ef18

Browse files
authored
Merge branch 'master' into framework-processor-python3
2 parents 547425c + 8447430 commit b52ef18

File tree

9 files changed

+248
-48
lines changed

9 files changed

+248
-48
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v2.59.1.post0 (2021-09-13)
4+
5+
### Documentation Changes
6+
7+
* update experiment config doc on fit method
8+
39
## v2.59.1 (2021-09-02)
410

511
### Bug Fixes and Other Changes

src/sagemaker/amazon/amazon_estimator.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,16 @@ def fit(
229229
generates a default job name, based on the training image name
230230
and current timestamp.
231231
experiment_config (dict[str, str]): Experiment management configuration.
232-
Dictionary contains three optional keys, 'ExperimentName',
233-
'TrialName', and 'TrialComponentName'
234-
(default: ``None``).
232+
Optionally, the dict can contain three keys:
233+
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
234+
The behavior of setting these keys is as follows:
235+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
236+
automatically created and the job's Trial Component associated with the Trial.
237+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
238+
will be associated with the Trial.
239+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
240+
will be unassociated.
241+
* `TrialComponentDisplayName` is used for display in Studio.
235242
"""
236243
self._prepare_for_training(records, job_name=job_name, mini_batch_size=mini_batch_size)
237244

src/sagemaker/clarify.py

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,16 @@ def _run(
455455
kms_key (str): The ARN of the KMS key that is used to encrypt the
456456
user code file (default: None).
457457
experiment_config (dict[str, str]): Experiment management configuration.
458-
Dictionary contains three optional keys:
458+
Optionally, the dict can contain three keys:
459459
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
460+
The behavior of setting these keys is as follows:
461+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
462+
automatically created and the job's Trial Component associated with the Trial.
463+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
464+
will be associated with the Trial.
465+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
466+
will be unassociated.
467+
* `TrialComponentDisplayName` is used for display in Studio.
460468
"""
461469
analysis_config["methods"]["report"] = {"name": "report", "title": "Analysis Report"}
462470
with tempfile.TemporaryDirectory() as tmpdirname:
@@ -541,8 +549,16 @@ def run_pre_training_bias(
541549
kms_key (str): The ARN of the KMS key that is used to encrypt the
542550
user code file (default: None).
543551
experiment_config (dict[str, str]): Experiment management configuration.
544-
Dictionary contains three optional keys:
552+
Optionally, the dict can contain three keys:
545553
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
554+
The behavior of setting these keys is as follows:
555+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
556+
automatically created and the job's Trial Component associated with the Trial.
557+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
558+
will be associated with the Trial.
559+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
560+
will be unassociated.
561+
* `TrialComponentDisplayName` is used for display in Studio.
546562
""" # noqa E501
547563
analysis_config = data_config.get_config()
548564
analysis_config.update(data_bias_config.get_config())
@@ -604,8 +620,16 @@ def run_post_training_bias(
604620
kms_key (str): The ARN of the KMS key that is used to encrypt the
605621
user code file (default: None).
606622
experiment_config (dict[str, str]): Experiment management configuration.
607-
Dictionary contains three optional keys:
623+
Optionally, the dict can contain three keys:
608624
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
625+
The behavior of setting these keys is as follows:
626+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
627+
automatically created and the job's Trial Component associated with the Trial.
628+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
629+
will be associated with the Trial.
630+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
631+
will be unassociated.
632+
* `TrialComponentDisplayName` is used for display in Studio.
609633
"""
610634
analysis_config = data_config.get_config()
611635
analysis_config.update(data_bias_config.get_config())
@@ -684,8 +708,16 @@ def run_bias(
684708
kms_key (str): The ARN of the KMS key that is used to encrypt the
685709
user code file (default: None).
686710
experiment_config (dict[str, str]): Experiment management configuration.
687-
Dictionary contains three optional keys:
711+
Optionally, the dict can contain three keys:
688712
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
713+
The behavior of setting these keys is as follows:
714+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
715+
automatically created and the job's Trial Component associated with the Trial.
716+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
717+
will be associated with the Trial.
718+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
719+
will be unassociated.
720+
* `TrialComponentDisplayName` is used for display in Studio.
689721
""" # noqa E501
690722
analysis_config = data_config.get_config()
691723
analysis_config.update(bias_config.get_config())
@@ -755,8 +787,16 @@ def run_explainability(
755787
kms_key (str): The ARN of the KMS key that is used to encrypt the
756788
user code file (default: None).
757789
experiment_config (dict[str, str]): Experiment management configuration.
758-
Dictionary contains three optional keys:
790+
Optionally, the dict can contain three keys:
759791
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
792+
The behavior of setting these keys is as follows:
793+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
794+
automatically created and the job's Trial Component associated with the Trial.
795+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
796+
will be associated with the Trial.
797+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
798+
will be unassociated.
799+
* `TrialComponentDisplayName` is used for display in Studio.
760800
"""
761801
analysis_config = data_config.get_config()
762802
predictor_config = model_config.get_predictor_config()

src/sagemaker/estimator.py

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -674,9 +674,16 @@ def fit(self, inputs=None, wait=True, logs="All", job_name=None, experiment_conf
674674
job_name (str): Training job name. If not specified, the estimator generates
675675
a default job name based on the training image name and current timestamp.
676676
experiment_config (dict[str, str]): Experiment management configuration.
677-
Dictionary contains three optional keys,
677+
Optionally, the dict can contain three keys:
678678
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
679-
679+
The behavior of setting these keys is as follows:
680+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
681+
automatically created and the job's Trial Component associated with the Trial.
682+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
683+
will be associated with the Trial.
684+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
685+
will be unassociated.
686+
* `TrialComponentDisplayName` is used for display in Studio.
680687
"""
681688
self._prepare_for_training(job_name=job_name)
682689

@@ -1443,10 +1450,17 @@ def start_new(cls, estimator, inputs, experiment_config):
14431450
created by the user.
14441451
inputs (str): Parameters used when called
14451452
:meth:`~sagemaker.estimator.EstimatorBase.fit`.
1446-
experiment_config (dict[str, str]): Experiment management configuration used when called
1447-
:meth:`~sagemaker.estimator.EstimatorBase.fit`. Dictionary contains
1448-
three optional keys, 'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
1449-
1453+
experiment_config (dict[str, str]): Experiment management configuration.
1454+
Optionally, the dict can contain three keys:
1455+
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
1456+
The behavior of setting these keys is as follows:
1457+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
1458+
automatically created and the job's Trial Component associated with the Trial.
1459+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
1460+
will be associated with the Trial.
1461+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
1462+
will be unassociated.
1463+
* `TrialComponentDisplayName` is used for display in Studio.
14501464
Returns:
14511465
sagemaker.estimator._TrainingJob: Constructed object that captures
14521466
all information about the started training job.
@@ -1465,9 +1479,17 @@ def _get_train_args(cls, estimator, inputs, experiment_config):
14651479
created by the user.
14661480
inputs (str): Parameters used when called
14671481
:meth:`~sagemaker.estimator.EstimatorBase.fit`.
1468-
experiment_config (dict[str, str]): Experiment management configuration used when called
1469-
:meth:`~sagemaker.estimator.EstimatorBase.fit`. Dictionary contains
1470-
three optional keys, 'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
1482+
experiment_config (dict[str, str]): Experiment management configuration.
1483+
Optionally, the dict can contain three keys:
1484+
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
1485+
The behavior of setting these keys is as follows:
1486+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
1487+
automatically created and the job's Trial Component associated with the Trial.
1488+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
1489+
will be associated with the Trial.
1490+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
1491+
will be unassociated.
1492+
* `TrialComponentDisplayName` is used for display in Studio.
14711493
14721494
Returns:
14731495
Dict: dict for `sagemaker.session.Session.train` method

src/sagemaker/processing.py

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,16 @@ def run(
162162
job_name (str): Processing job name. If not specified, the processor generates
163163
a default job name, based on the base job name and current timestamp.
164164
experiment_config (dict[str, str]): Experiment management configuration.
165-
Dictionary contains three optional keys:
165+
Optionally, the dict can contain three keys:
166166
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
167+
The behavior of setting these keys is as follows:
168+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
169+
automatically created and the job's Trial Component associated with the Trial.
170+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
171+
will be associated with the Trial.
172+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
173+
will be unassociated.
174+
* `TrialComponentDisplayName` is used for display in Studio.
167175
kms_key (str): The ARN of the KMS key that is used to encrypt the
168176
user code file (default: None).
169177
@@ -515,10 +523,16 @@ def run(
515523
job_name (str): Processing job name. If not specified, the processor generates
516524
a default job name, based on the base job name and current timestamp.
517525
experiment_config (dict[str, str]): Experiment management configuration.
518-
Dictionary contains three optional keys:
526+
Optionally, the dict can contain three keys:
519527
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
520-
kms_key (str): The ARN of the KMS key that is used to encrypt the
521-
user code file (default: None).
528+
The behavior of setting these keys is as follows:
529+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
530+
automatically created and the job's Trial Component associated with the Trial.
531+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
532+
will be associated with the Trial.
533+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
534+
will be unassociated.
535+
* `TrialComponentDisplayName` is used for display in Studio.
522536
"""
523537
normalized_inputs, normalized_outputs = self._normalize_args(
524538
job_name=job_name,
@@ -729,8 +743,16 @@ def start_new(cls, processor, inputs, outputs, experiment_config):
729743
outputs (list[:class:`~sagemaker.processing.ProcessingOutput`]): A list of
730744
:class:`~sagemaker.processing.ProcessingOutput` objects.
731745
experiment_config (dict[str, str]): Experiment management configuration.
732-
Dictionary contains three optional keys:
746+
Optionally, the dict can contain three keys:
733747
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
748+
The behavior of setting these keys is as follows:
749+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
750+
automatically created and the job's Trial Component associated with the Trial.
751+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
752+
will be associated with the Trial.
753+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
754+
will be unassociated.
755+
* `TrialComponentDisplayName` is used for display in Studio.
734756
735757
Returns:
736758
:class:`~sagemaker.processing.ProcessingJob`: The instance of ``ProcessingJob`` created
@@ -767,8 +789,16 @@ def _get_process_args(cls, processor, inputs, outputs, experiment_config):
767789
outputs (list[:class:`~sagemaker.processing.ProcessingOutput`]): A list of
768790
:class:`~sagemaker.processing.ProcessingOutput` objects.
769791
experiment_config (dict[str, str]): Experiment management configuration.
770-
Dictionary contains three optional keys:
792+
Optionally, the dict can contain three keys:
771793
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
794+
The behavior of setting these keys is as follows:
795+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
796+
automatically created and the job's Trial Component associated with the Trial.
797+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
798+
will be associated with the Trial.
799+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
800+
will be unassociated.
801+
* `TrialComponentDisplayName` is used for display in Studio.
772802
773803
Returns:
774804
Dict: dict for `sagemaker.session.Session.process` method
@@ -1547,8 +1577,16 @@ def run( # type: ignore[override]
15471577
job_name (str): Processing job name. If not specified, the processor generates
15481578
a default job name, based on the base job name and current timestamp.
15491579
experiment_config (dict[str, str]): Experiment management configuration.
1550-
Dictionary contains three optional keys:
1580+
Optionally, the dict can contain three keys:
15511581
'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
1582+
The behavior of setting these keys is as follows:
1583+
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
1584+
automatically created and the job's Trial Component associated with the Trial.
1585+
* If `TrialName` is supplied and the Trial already exists the job's Trial Component
1586+
will be associated with the Trial.
1587+
* If both `ExperimentName` and `TrialName` are not supplied the trial component
1588+
will be unassociated.
1589+
* `TrialComponentDisplayName` is used for display in Studio.
15521590
kms_key (str): The ARN of the KMS key that is used to encrypt the
15531591
user code file (default: None).
15541592
"""

0 commit comments

Comments
 (0)