updateTrainingJob method

Future<UpdateTrainingJobResponse> updateTrainingJob({
  1. required String trainingJobName,
  2. ProfilerConfigForUpdate? profilerConfig,
  3. List<ProfilerRuleConfiguration>? profilerRuleConfigurations,
})

Update a model training job to request a new Debugger profiling configuration.

May throw ResourceNotFound.

Parameter trainingJobName : The name of a training job to update the Debugger profiling configuration.

Parameter profilerConfig : Configuration information for Debugger system monitoring, framework profiling, and storage paths.

Parameter profilerRuleConfigurations : Configuration information for Debugger rules for profiling system and framework metrics.

Implementation

Future<UpdateTrainingJobResponse> updateTrainingJob({
  required String trainingJobName,
  ProfilerConfigForUpdate? profilerConfig,
  List<ProfilerRuleConfiguration>? profilerRuleConfigurations,
}) async {
  ArgumentError.checkNotNull(trainingJobName, 'trainingJobName');
  _s.validateStringLength(
    'trainingJobName',
    trainingJobName,
    1,
    63,
    isRequired: true,
  );
  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,
    },
  );

  return UpdateTrainingJobResponse.fromJson(jsonResponse.body);
}