def test_init_tensorboard_experiment(self, get_tensorboard_experiment_mock): aiplatform.init(project=_TEST_PROJECT) tensorboard.TensorboardExperiment( tensorboard_experiment_name=_TEST_TENSORBOARD_EXPERIMENT_NAME) get_tensorboard_experiment_mock.assert_called_once_with( name=_TEST_TENSORBOARD_EXPERIMENT_NAME, retry=base._DEFAULT_RETRY)
def test_delete_tensorboard_experiement( self, delete_tensorboard_experiment_mock): aiplatform.init(project=_TEST_PROJECT) my_tensorboard_experiment = tensorboard.TensorboardExperiment( tensorboard_experiment_name=_TEST_TENSORBOARD_EXPERIMENT_NAME) my_tensorboard_experiment.delete() delete_tensorboard_experiment_mock.assert_called_once_with( name=my_tensorboard_experiment.resource_name)
def test_init_tensorboard_experiment_with_id_only_with_project_and_location( self, get_tensorboard_experiment_mock): aiplatform.init(project=_TEST_PROJECT) tensorboard.TensorboardExperiment( tensorboard_experiment_name=_TEST_TENSORBOARD_EXPERIMENT_ID, tensorboard_id=_TEST_ID, project=_TEST_PROJECT, location=_TEST_LOCATION, ) get_tensorboard_experiment_mock.assert_called_once_with( name=_TEST_TENSORBOARD_EXPERIMENT_NAME, retry=base._DEFAULT_RETRY)