79
79
get_config_value ,
80
80
name_from_base ,
81
81
to_string ,
82
+ check_and_get_run_experiment_config ,
82
83
)
83
84
from sagemaker .workflow import is_pipeline_variable
84
85
from sagemaker .workflow .entities import PipelineVariable
@@ -1103,8 +1104,8 @@ def fit(
1103
1104
job_name (str): Training job name. If not specified, the estimator generates
1104
1105
a default job name based on the training image name and current timestamp.
1105
1106
experiment_config (dict[str, str]): Experiment management configuration.
1106
- Optionally, the dict can contain three keys:
1107
- 'ExperimentName', 'TrialName', and 'TrialComponentDisplayName' .
1107
+ Optionally, the dict can contain four keys:
1108
+ 'ExperimentName', 'TrialName', 'TrialComponentDisplayName' and 'RunName'. .
1108
1109
The behavior of setting these keys is as follows:
1109
1110
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
1110
1111
automatically created and the job's Trial Component associated with the Trial.
@@ -1122,6 +1123,7 @@ def fit(
1122
1123
"""
1123
1124
self ._prepare_for_training (job_name = job_name )
1124
1125
1126
+ experiment_config = check_and_get_run_experiment_config (experiment_config )
1125
1127
self .latest_training_job = _TrainingJob .start_new (self , inputs , experiment_config )
1126
1128
self .jobs .append (self .latest_training_job )
1127
1129
if wait :
@@ -2023,8 +2025,8 @@ def start_new(cls, estimator, inputs, experiment_config):
2023
2025
inputs (str): Parameters used when called
2024
2026
:meth:`~sagemaker.estimator.EstimatorBase.fit`.
2025
2027
experiment_config (dict[str, str]): Experiment management configuration.
2026
- Optionally, the dict can contain three keys:
2027
- 'ExperimentName', 'TrialName', and 'TrialComponentDisplayName '.
2028
+ Optionally, the dict can contain four keys:
2029
+ 'ExperimentName', 'TrialName', 'TrialComponentDisplayName' and 'RunName '.
2028
2030
The behavior of setting these keys is as follows:
2029
2031
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
2030
2032
automatically created and the job's Trial Component associated with the Trial.
@@ -2033,6 +2035,7 @@ def start_new(cls, estimator, inputs, experiment_config):
2033
2035
* If both `ExperimentName` and `TrialName` are not supplied the trial component
2034
2036
will be unassociated.
2035
2037
* `TrialComponentDisplayName` is used for display in Studio.
2038
+ * `RunName` is used to record an experiment run.
2036
2039
Returns:
2037
2040
sagemaker.estimator._TrainingJob: Constructed object that captures
2038
2041
all information about the started training job.
@@ -2053,8 +2056,8 @@ def _get_train_args(cls, estimator, inputs, experiment_config):
2053
2056
inputs (str): Parameters used when called
2054
2057
:meth:`~sagemaker.estimator.EstimatorBase.fit`.
2055
2058
experiment_config (dict[str, str]): Experiment management configuration.
2056
- Optionally, the dict can contain three keys:
2057
- 'ExperimentName', 'TrialName', and 'TrialComponentDisplayName '.
2059
+ Optionally, the dict can contain four keys:
2060
+ 'ExperimentName', 'TrialName', 'TrialComponentDisplayName' and 'RunName '.
2058
2061
The behavior of setting these keys is as follows:
2059
2062
* If `ExperimentName` is supplied but `TrialName` is not a Trial will be
2060
2063
automatically created and the job's Trial Component associated with the Trial.
@@ -2063,6 +2066,7 @@ def _get_train_args(cls, estimator, inputs, experiment_config):
2063
2066
* If both `ExperimentName` and `TrialName` are not supplied the trial component
2064
2067
will be unassociated.
2065
2068
* `TrialComponentDisplayName` is used for display in Studio.
2069
+ * `RunName` is used to record an experiment run.
2066
2070
2067
2071
Returns:
2068
2072
Dict: dict for `sagemaker.session.Session.train` method
0 commit comments