TrainingJobDefinition.fromJson constructor

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

Implementation

factory TrainingJobDefinition.fromJson(Map<String, dynamic> json) {
  return TrainingJobDefinition(
    inputDataConfig: (json['InputDataConfig'] as List)
        .whereNotNull()
        .map((e) => Channel.fromJson(e as Map<String, dynamic>))
        .toList(),
    outputDataConfig: OutputDataConfig.fromJson(
        json['OutputDataConfig'] as Map<String, dynamic>),
    resourceConfig: ResourceConfig.fromJson(
        json['ResourceConfig'] as Map<String, dynamic>),
    stoppingCondition: StoppingCondition.fromJson(
        json['StoppingCondition'] as Map<String, dynamic>),
    trainingInputMode:
        (json['TrainingInputMode'] as String).toTrainingInputMode(),
    hyperParameters: (json['HyperParameters'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
  );
}