20
20
21
21
CHECKPOINT_PATH = 'customer/checkpoint/path'
22
22
JOB_NAME = 'test-1234'
23
+ TUNING_HYPERPARAMETER_NAME = '_tuning_objective_metric'
23
24
TUNING_METRIC = 'some-metric'
24
25
25
26
@@ -70,7 +71,7 @@ def test_get_checkpoint_dir_with_job_name_in_path(train_entry_point_module):
70
71
checkpoint_path_with_job_name = '{}/checkpoints' .format (JOB_NAME )
71
72
hyperparameters = {
72
73
'checkpoint_path' : checkpoint_path_with_job_name ,
73
- 'algorithms_tuning_objective_metric' : TUNING_METRIC ,
74
+ TUNING_HYPERPARAMETER_NAME : TUNING_METRIC ,
74
75
}
75
76
env = Mock (name = 'env' , hyperparameters = hyperparameters , job_name = JOB_NAME )
76
77
checkpoint_dir = train_entry_point_module ._get_checkpoint_dir (env )
@@ -81,7 +82,7 @@ def test_get_checkpoint_dir_with_job_name_in_path(train_entry_point_module):
81
82
def test_get_checkpoint_dir_without_job_name_env (train_entry_point_module ):
82
83
hyperparameters = {
83
84
'checkpoint_path' : CHECKPOINT_PATH ,
84
- 'algorithms_tuning_objective_metric' : TUNING_METRIC ,
85
+ TUNING_HYPERPARAMETER_NAME : TUNING_METRIC ,
85
86
}
86
87
env = Mock (name = 'env' , hyperparameters = hyperparameters , job_name = None )
87
88
checkpoint_dir = train_entry_point_module ._get_checkpoint_dir (env )
@@ -92,7 +93,7 @@ def test_get_checkpoint_dir_without_job_name_env(train_entry_point_module):
92
93
def test_get_checkpoint_dir_appending_job_name (train_entry_point_module ):
93
94
hyperparameters = {
94
95
'checkpoint_path' : CHECKPOINT_PATH ,
95
- 'algorithms_tuning_objective_metric' : TUNING_METRIC ,
96
+ TUNING_HYPERPARAMETER_NAME : TUNING_METRIC ,
96
97
}
97
98
env = Mock (name = 'env' , hyperparameters = hyperparameters , job_name = JOB_NAME )
98
99
checkpoint_dir = train_entry_point_module ._get_checkpoint_dir (env )
0 commit comments