HyperParameterTuningJobConfig.fromJson constructor

HyperParameterTuningJobConfig.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory HyperParameterTuningJobConfig.fromJson(Map<String, dynamic> json) {
  return HyperParameterTuningJobConfig(
    resourceLimits: ResourceLimits.fromJson(
        json['ResourceLimits'] as Map<String, dynamic>),
    strategy:
        (json['Strategy'] as String).toHyperParameterTuningJobStrategyType(),
    hyperParameterTuningJobObjective:
        json['HyperParameterTuningJobObjective'] != null
            ? HyperParameterTuningJobObjective.fromJson(
                json['HyperParameterTuningJobObjective']
                    as Map<String, dynamic>)
            : null,
    parameterRanges: json['ParameterRanges'] != null
        ? ParameterRanges.fromJson(
            json['ParameterRanges'] as Map<String, dynamic>)
        : null,
    trainingJobEarlyStoppingType:
        (json['TrainingJobEarlyStoppingType'] as String?)
            ?.toTrainingJobEarlyStoppingType(),
    tuningJobCompletionCriteria: json['TuningJobCompletionCriteria'] != null
        ? TuningJobCompletionCriteria.fromJson(
            json['TuningJobCompletionCriteria'] as Map<String, dynamic>)
        : null,
  );
}