Skip to content

Commit

Permalink
Remove required property from optional ClearMLTask attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Mar 1, 2024
1 parent 6f3ebf1 commit b4e91d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/SIL.Machine.AspNetCore/Models/ClearMLTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public record ClearMLTask
public required string Name { get; init; }
public required ClearMLProject Project { get; init; }
public required ClearMLTaskStatus Status { get; init; }
public required string StatusReason { get; init; }
public required string StatusMessage { get; init; }
public string? StatusReason { get; init; }
public string? StatusMessage { get; init; }
public required DateTime Created { get; init; }
public required int LastIteration { get; init; }
public required int ActiveDuration { get; init; }
public int? LastIteration { get; init; }
public int ActiveDuration { get; init; }
public required IReadOnlyDictionary<
string,
IReadOnlyDictionary<string, ClearMLMetricsEvent>
Expand Down
4 changes: 2 additions & 2 deletions src/SIL.Machine.AspNetCore/Services/ClearMLMonitorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ await UpdateTrainJobStatus(
platformService,
engine.CurrentBuild.BuildId,
new ProgressStatus(
task.LastIteration,
task.LastIteration ?? 0,
percentCompleted: GetMetric(task, SummaryMetric, ProgressVariant)
),
0,
Expand All @@ -122,7 +122,7 @@ await UpdateTrainJobStatus(
await UpdateTrainJobStatus(
platformService,
engine.CurrentBuild.BuildId,
new ProgressStatus(task.LastIteration, percentCompleted: 1.0),
new ProgressStatus(task.LastIteration ?? 0, percentCompleted: 1.0),
0,
cancellationToken
);
Expand Down

0 comments on commit b4e91d0

Please sign in to comment.