Exemple #1
0
    def test_utils_stop_hyper_parameter_tuning_job(self):
        mock_sm_client = MagicMock()
        mock_sm_client.stop_hyper_parameter_tuning_job.return_value = None

        response = _utils.stop_hyperparameter_tuning_job(
            mock_sm_client, 'FakeJobName')

        mock_sm_client.stop_hyper_parameter_tuning_job.assert_called_once_with(
            HyperParameterTuningJobName='FakeJobName')
        self.assertEqual(response, None)
Exemple #2
0
 def signal_term_handler(signalNumber, frame):
     _utils.stop_hyperparameter_tuning_job(client, hpo_job_name)
     logging.info(
         f"HyperParameter Tuning Job: {hpo_job_name} request submitted to Stop"
     )