TuningTask.fromJson constructor
TuningTask.fromJson(
- Object? j
Implementation
factory TuningTask.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return TuningTask(
startTime: switch (json['startTime']) {
null => null,
Object $1 => Timestamp.fromJson($1),
},
completeTime: switch (json['completeTime']) {
null => null,
Object $1 => Timestamp.fromJson($1),
},
snapshots: switch (json['snapshots']) {
null => [],
List<Object?> $1 => [for (final i in $1) TuningSnapshot.fromJson(i)],
_ => throw const FormatException('"snapshots" is not a list'),
},
trainingData: switch (json['trainingData']) {
null => null,
Object $1 => Dataset.fromJson($1),
},
hyperparameters: switch (json['hyperparameters']) {
null => null,
Object $1 => Hyperparameters.fromJson($1),
},
);
}