updateTrainingJob method
Update a model training job to request a new Debugger profiling configuration or to change warm pool retention length.
May throw ResourceLimitExceeded.
May throw ResourceNotFound.
Parameter trainingJobName :
The name of a training job to update the Debugger profiling configuration.
Parameter profilerConfig :
Configuration information for Amazon SageMaker Debugger system monitoring,
framework profiling, and storage paths.
Parameter profilerRuleConfigurations :
Configuration information for Amazon SageMaker Debugger rules for
profiling system and framework metrics.
Parameter remoteDebugConfig :
Configuration for remote debugging while the training job is running. You
can update the remote debugging configuration when the
SecondaryStatus of the job is Downloading or
Training.To learn more about the remote debugging
functionality of SageMaker, see Access
a training container through Amazon Web Services Systems Manager (SSM) for
remote debugging.
Parameter resourceConfig :
The training job ResourceConfig to update warm pool retention
length.
Implementation
Future<UpdateTrainingJobResponse> updateTrainingJob({
required String trainingJobName,
ProfilerConfigForUpdate? profilerConfig,
List<ProfilerRuleConfiguration>? profilerRuleConfigurations,
RemoteDebugConfigForUpdate? remoteDebugConfig,
ResourceConfigForUpdate? resourceConfig,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateTrainingJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TrainingJobName': trainingJobName,
if (profilerConfig != null) 'ProfilerConfig': profilerConfig,
if (profilerRuleConfigurations != null)
'ProfilerRuleConfigurations': profilerRuleConfigurations,
if (remoteDebugConfig != null) 'RemoteDebugConfig': remoteDebugConfig,
if (resourceConfig != null) 'ResourceConfig': resourceConfig,
},
);
return UpdateTrainingJobResponse.fromJson(jsonResponse.body);
}