Skip to content

Commit

Permalink
Pass buildOptions to SMT --ECL
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Sep 14, 2023
1 parent 649df84 commit 2d25a42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,20 @@ ILogger<SmtTransferEngineBuildJob> logger
public async Task RunAsync(
string engineId,
string buildId,
string buildOptions,
IReadOnlyList<Corpus> corpora,
CancellationToken cancellationToken
)
{
IDistributedReaderWriterLock rwLock = await _lockFactory.CreateAsync(engineId, cancellationToken);

var tokenizer = new LatinWordTokenizer();
var detokenizer = new LatinWordDetokenizer();
ITrainer? smtModelTrainer = null;
ITrainer? truecaseTrainer = null;
try
{
JsonObject? buildOptionsObject = JsonSerializer.Deserialize<JsonObject>(buildOptions); //Use/fields TBD

var stopwatch = new Stopwatch();
TranslationEngine? engine;
await using (await rwLock.WriterLockAsync(cancellationToken: cancellationToken))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,6 @@ IReadOnlyList<Corpus> corpora
)
{
// Token "None" is used here because hangfire injects the proper cancellation token
return r => r.RunAsync(engineId, buildId, corpora, CancellationToken.None); //Not passing build options to SMT yet; is there a need?
return r => r.RunAsync(engineId, buildId, buildOptions, corpora, CancellationToken.None);
}
}

0 comments on commit 2d25a42

Please sign in to comment.