Skip to content

Commit

Permalink
If specified as empty, train on nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Nov 8, 2023
1 parent 7c917b9 commit baeba70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ CancellationToken cancellationToken
/// you may flag a subset of books for pretranslation by including their [abbreviations](https://github.com/sillsdev/libpalaso/blob/master/SIL.Scripture/Canon.cs)
/// in the textIds parameter. If the engine does not support pretranslation, these fields have no effect.
///
/// Similarly, specify the corpora and textIds to train on. If none are provided, all corpora will be used.
/// Similarly, specify the corpora and textIds to train on. If no train_on field is provided, all corpora will be used.
///
/// The `"options"` parameter of the build config provides the ability to pass build configuration parameters as a JSON object.
/// A typical use case would be to set `"options"` to `{"max_steps":10}` in order to configure the maximum
Expand Down
2 changes: 1 addition & 1 deletion src/Serval.Translation/Services/EngineService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public async Task<bool> StartBuildAsync(Build build, CancellationToken cancellat
if (trainingCorpus.TextIds is not null)
corpus.TrainOnTextIds.Add(trainingCorpus.TextIds);
}
else if (trainOn is null || trainOn.Count == 0)
else if (trainOn is not null && trainOn.Count == 0)
{
corpus.TrainOnAll = true;
}
Expand Down

0 comments on commit baeba70

Please sign in to comment.