Skip to content

Commit

Permalink
Train on everything if train_on is unspecified; add line in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Nov 8, 2023
1 parent d532be1 commit ffa3206
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Serval.Client/Client.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,8 @@ public partial interface ITranslationEnginesClient
/// <br/>you may flag a subset of books for pretranslation by including their [abbreviations](https://github.com/sillsdev/libpalaso/blob/master/SIL.Scripture/Canon.cs)
/// <br/>in the textIds parameter. If the engine does not support pretranslation, these fields have no effect.
/// <br/>
/// <br/>Similarly, specify the corpora and textIds to train on. If none are provided, all corpora will be used.
/// <br/>
/// <br/>The `"options"` parameter of the build config provides the ability to pass build configuration parameters as a JSON object.
/// <br/>A typical use case would be to set `"options"` to `{"max_steps":10}` in order to configure the maximum
/// <br/>number of training iterations in order to reduce turnaround time for testing purposes.
Expand Down Expand Up @@ -2914,6 +2916,8 @@ public string BaseUrl
/// <br/>you may flag a subset of books for pretranslation by including their [abbreviations](https://github.com/sillsdev/libpalaso/blob/master/SIL.Scripture/Canon.cs)
/// <br/>in the textIds parameter. If the engine does not support pretranslation, these fields have no effect.
/// <br/>
/// <br/>Similarly, specify the corpora and textIds to train on. If none are provided, all corpora will be used.
/// <br/>
/// <br/>The `"options"` parameter of the build config provides the ability to pass build configuration parameters as a JSON object.
/// <br/>A typical use case would be to set `"options"` to `{"max_steps":10}` in order to configure the maximum
/// <br/>number of training iterations in order to reduce turnaround time for testing purposes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,8 @@ 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.
///
/// 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
/// number of training iterations in order to reduce turnaround time for testing purposes.
Expand Down
4 changes: 4 additions & 0 deletions src/Serval.Translation/Services/EngineService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ public async Task<bool> StartBuildAsync(Build build, CancellationToken cancellat
if (trainingCorpus.TextIds is not null)
corpus.TrainOnTextIds.Add(trainingCorpus.TextIds);
}
else if (trainOn?.Count == 0)
{
corpus.TrainOnAll = true;
}
return corpus;
})
}
Expand Down

0 comments on commit ffa3206

Please sign in to comment.