Temporarily allow null values in benchmark data models

This commit is contained in:
hunteraraujo
2023-09-22 13:48:03 -07:00
parent a0e383f4d9
commit 18333fbc7c
6 changed files with 22 additions and 14 deletions

View File

@@ -1,3 +1,4 @@
// TODO: Remove the ability to have null values when benchmark implementation is complete
/// TaskInfo holds information related to a specific benchmark task.
///
/// The class encapsulates various attributes of a task, such as the path to the data file,
@@ -47,7 +48,7 @@ class TaskInfo {
/// Returns a new TaskInfo populated with values from the map.
factory TaskInfo.fromJson(Map<String, dynamic> json) => TaskInfo(
dataPath: json['data_path'],
isRegression: json['is_regression'],
isRegression: json['is_regression'] ?? false,
category: List<String>.from(json['category']),
task: json['task'],
answer: json['answer'],