Skip to content

Commit 93f33d9

Browse files
konradsemschKonrad Semsch
and
Konrad Semsch
authored
Fixes the completion_criteria_config dict in the to_input_req method (#3744)
Co-authored-by: Konrad Semsch <[email protected]>
1 parent ce5f8a6 commit 93f33d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sagemaker/tuner.py

+2
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ def to_input_req(self):
559559
"""
560560
completion_criteria_config = {}
561561
if self.max_number_of_training_jobs_not_improving is not None:
562+
completion_criteria_config[BEST_OBJECTIVE_NOT_IMPROVING] = {}
562563
completion_criteria_config[BEST_OBJECTIVE_NOT_IMPROVING][
563564
MAX_NUMBER_OF_TRAINING_JOBS_NOT_IMPROVING
564565
] = self.max_number_of_training_jobs_not_improving
@@ -569,6 +570,7 @@ def to_input_req(self):
569570
] = self.target_objective_metric_value
570571

571572
if self.complete_on_convergence is not None:
573+
completion_criteria_config[CONVERGENCE_DETECTED] = {}
572574
completion_criteria_config[CONVERGENCE_DETECTED][COMPLETE_ON_CONVERGENCE_DETECTED] = (
573575
"Enabled" if self.complete_on_convergence else "Disabled"
574576
)

0 commit comments

Comments
 (0)