cancelHyperparameterTuningJob method
Cancels a HyperparameterTuningJob.
Starts asynchronous cancellation on the HyperparameterTuningJob. The server
makes a best effort to cancel the job, but success is not
guaranteed. Clients can use
JobService.GetHyperparameterTuningJob
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation,
the HyperparameterTuningJob is not deleted; instead it becomes a job with
a
HyperparameterTuningJob.error
value with a google.rpc.Status.code of 1,
corresponding to Code.CANCELLED, and
HyperparameterTuningJob.state
is set to CANCELLED.
Throws a http.ClientException if there were problems communicating with
the API service. Throws a StatusException if the API failed with a
Status message. Throws a ServiceException for any other failure.
Implementation
Future<void> cancelHyperparameterTuningJob(
CancelHyperparameterTuningJobRequest request,
) async {
final url = Uri.https(_host, '/v1beta1/${request.name}:cancel');
await _client.post(url, body: request);
}