Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Machine engine to Serval repo #421

Merged
merged 348 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
348 commits
Select commit Hold shift + click to select a range
54ed7c8
Fix DistributedReaderWriterLockTests
ddaspit Mar 3, 2022
d0e2f70
Refactor timeout function
ddaspit Mar 4, 2022
4f94aa7
Add HostId to RWLock
ddaspit Mar 4, 2022
d973c6e
Separate SMT training from engine runtime
ddaspit Mar 4, 2022
b6a8e62
Add separate job server
ddaspit Mar 4, 2022
e63a590
Add support for webhooks
ddaspit Mar 7, 2022
e843e88
Rename webhooks controller
ddaspit Mar 8, 2022
e64a4d6
Rename creation DTOs
ddaspit Mar 8, 2022
bf2f151
Rename BuildRevision to ModelRevision
ddaspit Mar 8, 2022
832b074
Release all distributed locks on startup
ddaspit Mar 9, 2022
ea5c874
Give priority to first writer lock waiter
ddaspit Mar 9, 2022
69a7aff
Fix EngineRuntimeTests
ddaspit Mar 9, 2022
d1b24d6
Fix SMT training
ddaspit Mar 10, 2022
8dc39a7
Remove "admin" url
ddaspit Mar 10, 2022
652dca6
Use filename if no name is provided when uploading file
ddaspit Mar 11, 2022
85e6f71
Refactor corpus processing
ddaspit Mar 21, 2022
be71bf7
Further simplify corpus processing
ddaspit Mar 22, 2022
fc2448b
Refactor truecaser interface
ddaspit Mar 23, 2022
2f9ca95
Refactor truecaser interface
ddaspit Mar 23, 2022
f7fd569
Add ability to only load certain texts
ddaspit Mar 25, 2022
834b0e7
Include step in progress status
ddaspit Mar 29, 2022
b2b7f1c
Merge branch 'k8_dev' into release
johnml1135 Mar 29, 2022
1c525b3
Add ICorpus and IParallelTextCorpus interfaces
ddaspit Apr 1, 2022
0fff7f4
Merge remote-tracking branch 'origin/master' into k8_dev
johnml1135 May 4, 2022
3b1b35b
Add NMT engine to web API
ddaspit Apr 28, 2022
5b62a45
Add Corpus model
ddaspit May 5, 2022
fa5d0d0
Add more documentation to API
ddaspit May 10, 2022
59f614f
Add separate job queues
ddaspit May 10, 2022
852d614
Add parent models dir setting
ddaspit May 10, 2022
5f8d13c
Merge remote-tracking branch 'origin/batch_nmt' into release
johnml1135 May 10, 2022
029d135
Merge branch 'release' into k8_dev
johnml1135 May 10, 2022
45b685d
Initial RestSharp testing. I can authenticate with the QA server and…
johnml1135 May 13, 2022
13cb35d
Add NMT engine to web API
ddaspit Apr 28, 2022
4c5b8da
Add Corpus model
ddaspit May 5, 2022
7fa40bd
Add more documentation to API
ddaspit May 10, 2022
d27c102
Add separate job queues
ddaspit May 10, 2022
4066ccf
Add parent models dir setting
ddaspit May 10, 2022
d3f3d9e
Format code using CSharpier
ddaspit May 23, 2022
78d4132
Format code using CSharpier
ddaspit May 23, 2022
067384a
Merge branch 'batch_nmt'
ddaspit May 25, 2022
855f65b
Merge remote-tracking branch 'origin/master' into gherkin_testing
johnml1135 May 26, 2022
b42666c
Merge remote-tracking branch 'origin/master' into release
johnml1135 Jun 3, 2022
8d202d6
Add ClearMLNmtEngineRuntime and ClearMLNmtEngineBuildJob
ddaspit May 26, 2022
1c2ff3e
Fix unit tests
ddaspit Jun 7, 2022
e6eea3c
Delete all old pretranslations
ddaspit Jun 7, 2022
01cc2b0
Switch default machine.py branch to "release"
ddaspit Jun 7, 2022
587cd67
Update confidence of NMT engine
ddaspit Jun 8, 2022
323b972
Set correct metrics for NMT engine
ddaspit Jun 9, 2022
eb8d106
Use script to start NMT job instead of repository
ddaspit Jun 9, 2022
8415273
Make root ClearML project configurable
ddaspit Jun 10, 2022
5e079d7
Fix unit tests
ddaspit Jun 10, 2022
4753571
Make BuildService unit tests more reliable
ddaspit Jun 10, 2022
5f7b054
Merge remote-tracking branch 'origin/master' into release
johnml1135 Jun 16, 2022
1b03a52
Merge remote-tracking branch 'origin/master' into gherkin_testing
johnml1135 Jun 16, 2022
100fc3a
Initial tests kind of working- they are still failing, but it is an i…
johnml1135 Jun 23, 2022
365d287
Merge branch 'gherkin_testing' into release
johnml1135 Jul 14, 2022
db55cee
Fix a breaking change from SDK 6.0.1: https://docs.microsoft.com/en-u…
johnml1135 Jul 15, 2022
bb5cc05
Make a clean switch to var/machine/corpora
johnml1135 Aug 4, 2022
f9eeea6
Add bible.txt to testing
johnml1135 Aug 16, 2022
a583fd9
Better fix - the files should be app.settings.json
johnml1135 Aug 16, 2022
947c522
Implement removing a corpus from a translation engine
ddaspit Aug 24, 2022
8789dd1
Refactor all engine runtime handling into a separate service
ddaspit Aug 24, 2022
1cef41f
Add engine server
ddaspit Aug 25, 2022
e12536c
Add support for S3 shared files
ddaspit Sep 8, 2022
a44e949
Refactor ITranslationEngine and ITranslationModel interfaces
ddaspit Oct 5, 2022
1a03ab5
Parallelize TranslateBatch for ThotSmtModel
ddaspit Oct 6, 2022
28f9b71
Move data access classes to a separate assembly
ddaspit Feb 9, 2023
76a89c3
Refactor Machine Web API to Serval
ddaspit Feb 15, 2023
3be3bcc
Use AsyncEx library
ddaspit Feb 27, 2023
1e488c5
Remove Serval projects
ddaspit Feb 27, 2023
fa54018
Fix unit tests
ddaspit Feb 27, 2023
505dadf
Update to csharpier 0.22.1
ddaspit Feb 27, 2023
8c931cd
Update all unit test projects to .NET 6
ddaspit Feb 27, 2023
acd61ae
Call platform service when job canceled while pending
ddaspit Mar 13, 2023
a1d7e8c
Fix compile errors
ddaspit Mar 14, 2023
fe0fa7a
Refactor engine services to be stateless
ddaspit Mar 20, 2023
054d7c8
Add initial retry policy for gRPC client
ddaspit Mar 22, 2023
a221bbe
Use IIdGenerator
ddaspit Mar 22, 2023
5d13e22
Disable retry for UpdateBuildStatus
ddaspit Mar 22, 2023
dd36ffb
Throw exception if unable to cancel current build
ddaspit Mar 23, 2023
b5fc046
Update to latest version of Serval API
ddaspit Mar 24, 2023
3f6a250
Update to latest version of Serval.Grpc
ddaspit Mar 27, 2023
f61a0af
Add health checks
ddaspit Mar 29, 2023
8148f18
Do not use transaction when starting a build
ddaspit Apr 21, 2023
7779772
Refactor translation engines to use strings instead of tokens
ddaspit Apr 1, 2023
67f8e21
Make files directory if not exist
johnml1135 Apr 27, 2023
62449fb
Merge remote-tracking branch 'origin/master' into docker-k8s
johnml1135 Apr 27, 2023
0155608
Use latest version of Serval.Grpc
ddaspit May 1, 2023
01ef5a6
Merge remote-tracking branch 'origin' into docker-k8s
johnml1135 May 1, 2023
07fbd2f
Correctly handle punctuation in suggestions
ddaspit May 2, 2023
dd882eb
Update dependencies
ddaspit May 4, 2023
2b87b4a
Merge remote-tracking branch 'origin/master' into docker-k8s
johnml1135 May 4, 2023
71fbb65
fixing clearml authentication and wierd build bug.
johnml1135 May 8, 2023
10ad805
Fix delete filter - needed to explicitly cast to a String
johnml1135 May 8, 2023
167ed94
fixes and updates:
johnml1135 May 12, 2023
ffeed6a
Minor updates from code review
johnml1135 May 16, 2023
a504c27
Update ClearMLService to match Machine.py
ddaspit May 18, 2023
cd283c6
Resolve reviewer feedback:
johnml1135 May 18, 2023
5195a71
Fixes from review:
johnml1135 May 19, 2023
e2bbf61
Refactor ClearMLAuthenticationService into a BackgroundService
ddaspit May 22, 2023
10ebf11
Merge branch 'master' into docker-k8s
ddaspit May 22, 2023
09e4cb8
Merge pull request #36 from sillsdev/docker-k8s
ddaspit May 22, 2023
4629fdd
Convert language tag to NLLB language code
ddaspit May 19, 2023
e7c7f4c
Update Serval.Grpc to 0.8.0
ddaspit May 24, 2023
98d3140
Ensure that icu.net.dll.config is deployed with servers
ddaspit May 31, 2023
968cf68
#42 - fix Ubuntu 22x and libdl.so issue.
johnml1135 May 30, 2023
af30254
#42 - revert back to ubuntu 20
johnml1135 May 31, 2023
2695fd2
#42 - icu.net.dll.config was not copied to the output directory on pu…
johnml1135 May 31, 2023
0f8fff8
#42 further fix:
johnml1135 May 31, 2023
ec9a9b2
Enable a non-root S3 bucket path
johnml1135 Jun 2, 2023
fa26bb7
Fix missing pretranslation refs
ddaspit Jun 14, 2023
6417fc6
Update version to 3.0.0
ddaspit Jun 15, 2023
b8e50ca
* sillsdev/serval#40 Get SMT job cancellation working
johnml1135 Jul 11, 2023
dc2dade
sillsdev/serval#32 Fixes for NMT cancellation
johnml1135 Jul 12, 2023
f8656f7
Update SIL.dataAccess
johnml1135 Jul 12, 2023
a035b5e
Merge pull request #47 from sillsdev/nmt_fixes
johnml1135 Aug 2, 2023
f28eb7a
Minor error-handling change (most was done on serval side)
Enkidu93 Jul 17, 2023
ca16798
Working S3 Bucket Health Check --ECL
Enkidu93 Jul 20, 2023
2ac0094
S3 bucket health check --ECL
Enkidu93 Jul 20, 2023
4133a9a
ClearML Health Chech --ECL
Enkidu93 Jul 20, 2023
5d85e41
Some fixes in response to PR review --ECL
Enkidu93 Aug 3, 2023
4562435
Removed AutoToString --ECL
Enkidu93 Aug 11, 2023
8176819
Changes as per PR review --ECL
Enkidu93 Aug 14, 2023
ebcaa80
Changes as per PR review --ECL
Enkidu93 Aug 14, 2023
8f5ae55
Fix to proj file --ECL
Enkidu93 Aug 15, 2023
9f38cd9
Fixes #46
Enkidu93 Aug 8, 2023
d119822
Removed Stowage library --ECL
Enkidu93 Aug 15, 2023
2caa2bc
Removed Stowage and implemented & tested in-memory & local implementa…
Enkidu93 Aug 16, 2023
5c1d190
Fixes as per PR review --ECL
Enkidu93 Aug 21, 2023
88953b8
Fix after automerging --ECL
Enkidu93 Aug 22, 2023
73f9d45
Fixes #82 --ECL (#57)
johnml1135 Aug 22, 2023
cab043f
#54 - fix race condition
johnml1135 Aug 15, 2023
47d3429
#53 - don't pretranslate things already pretranslated.
johnml1135 Aug 15, 2023
14f7266
Fix #55 and sillsdev/serval#84 - remove SubscribeForCancellation
johnml1135 Aug 15, 2023
d88f310
Working S3 bucket uploading (removed bug with extra slash).
Enkidu93 Aug 25, 2023
714b010
#58 - centralize and make directory deleting more robust
johnml1135 Aug 29, 2023
f3d7c79
Cleanup from review - #63
johnml1135 Aug 30, 2023
c20e38c
#50 auto-restart hangfire
johnml1135 Aug 30, 2023
d971ed7
Revert "#50 auto-restart hangfire"
johnml1135 Aug 30, 2023
24a64c2
Fix configuration of translation Engines
ddaspit Sep 4, 2023
9ee54f6
Remove unnecessary Mongo attributes
ddaspit Sep 4, 2023
609a24e
Simplify distributed lock creation
ddaspit Sep 4, 2023
4bc911a
Removed cancellation token passing after line 99.
Enkidu93 Sep 1, 2023
e868703
Fixes https://github.com/sillsdev/serval/issues/95 --ECL
Enkidu93 Sep 5, 2023
afcc015
Fix - still fail job even with S3 bucket failures
johnml1135 Sep 6, 2023
10ce1a0
Fixes ClearML server is down - and then hangfire crashes #65 --ECL
Enkidu93 Sep 1, 2023
090bfe0
DataAccess - 0.5.0
johnml1135 Sep 7, 2023
2c489d1
#75 - don't fail nmt job on delete failing
johnml1135 Sep 7, 2023
9bbd77e
Fix from review #78
johnml1135 Sep 7, 2023
7eb5771
Reverted to low-level implementation (removing need for large buffers…
Enkidu93 Sep 7, 2023
e9097ab
Fixes Throw error for unbuilt engine #81
Enkidu93 Sep 11, 2023
ab58519
Switch to Aborted --ECL
Enkidu93 Sep 11, 2023
a0b5764
Decoupled engine service from gRPC --ECL
Enkidu93 Sep 12, 2023
8f09e53
Added error message --ECL
Enkidu93 Sep 12, 2023
0a49c3c
Fix broken test --ECL
Enkidu93 Sep 12, 2023
8e7930a
Fixes to test --ECL
Enkidu93 Sep 12, 2023
d033c9e
Fixes Machine S3 health - warn on 1 missing, fail on >86 seconds down…
Enkidu93 Sep 15, 2023
f556a82
Added ClearML retry policy (this included checking to see if Sldr was…
Enkidu93 Sep 18, 2023
60167fa
Remove debug logging --ECL
Enkidu93 Sep 18, 2023
924be5b
Fixes as per PR --ECL
Enkidu93 Sep 18, 2023
6dbc009
Use ClearMLAuthentication service for token-fetching
Enkidu93 Sep 18, 2023
45ec2b3
Get token each CallAsync
Enkidu93 Sep 18, 2023
110e21f
Include status reason in build message
Enkidu93 Sep 18, 2023
ad73a82
Added open telemetry instrumentation (#88)
Enkidu93 Sep 22, 2023
b49008c
Hide console exporter (#90)
Enkidu93 Sep 22, 2023
e1b4dd8
Strict parsing #2 (#92)
Enkidu93 Sep 26, 2023
3a9766a
Update ci.yml (#95)
johnml1135 Sep 28, 2023
6311ffb
Fixes RefId's don't get populated for Paratext Projects #93 (#94)
Enkidu93 Sep 29, 2023
25f5535
Added queue name to ClearML health check failure message (#98)
Enkidu93 Oct 2, 2023
6aa7bd9
Update dataaccess to most recent version
johnml1135 Oct 2, 2023
dc1523b
Refactor ClearML NMT build job
ddaspit Sep 6, 2023
6a44b8d
Add ClearML Project setting (#106)
ddaspit Oct 9, 2023
a2d03ec
Config passing via build options for post-nmt/hangfire refactor (#109)
Enkidu93 Oct 11, 2023
5238743
Queue depth endpoint + status message (#110)
Enkidu93 Oct 13, 2023
3449275
environment types (#111)
johnml1135 Oct 13, 2023
170afe6
Working percent completed (#112)
Enkidu93 Oct 14, 2023
a625de2
Use named HTTP clients for ClearML (#115)
ddaspit Oct 18, 2023
794b495
Fixes https://github.com/sillsdev/serval/issues/121
Enkidu93 Oct 19, 2023
0fc148b
Don't delete S3 bucket files if the build faulted so we can debug (#120)
johnml1135 Oct 23, 2023
e06bee2
Fix corpus count methods (#121)
ddaspit Oct 24, 2023
c9e43f6
Make lang tag to NLLB lang code conversion more robust (#123)
ddaspit Oct 24, 2023
cae03fc
Fixes #118
Enkidu93 Oct 26, 2023
15a0d8a
Improve default script code lookup (#125)
ddaspit Oct 30, 2023
9f27a89
Update language code parsing (#126)
johnml1135 Nov 1, 2023
69e3163
Fixes #128
Enkidu93 Nov 1, 2023
f8e1760
Only upload when count is greater than 0
Enkidu93 Nov 2, 2023
d7d09c4
Fixes https://github.com/sillsdev/serval/issues/202
Enkidu93 Nov 7, 2023
5f4d371
Serval.Grpc 0.11.0
Enkidu93 Nov 7, 2023
45fc609
Merge branch 'master' of https://github.com/sillsdev/machine
Enkidu93 Nov 7, 2023
e0c0808
grpc 12
johnml1135 Nov 8, 2023
b9b9eba
Fixes #130 (#134)
Enkidu93 Nov 10, 2023
4fbe2af
Fixes #133 (#135)
Enkidu93 Nov 10, 2023
47a35a5
Change front of queue to queueDepth = 1
Enkidu93 Nov 7, 2023
b7fdc2e
Fix null reference return error (#140)
ddaspit Nov 27, 2023
4c3ca1c
Check for key terms and write aligned rows during preprocessing
Enkidu93 Nov 22, 2023
f4bb100
Working native key terms functionality
Enkidu93 Nov 28, 2023
fd7eb88
Working key terms solution including:
Enkidu93 Dec 1, 2023
0d936a0
Redesign as per PR review
Enkidu93 Dec 1, 2023
d1f3f8a
Minor fixes from PR review
Enkidu93 Dec 4, 2023
c4159b0
Change SMT default behavior as well
Enkidu93 Dec 4, 2023
1aaa87a
Fix dictionary logic
Enkidu93 Dec 4, 2023
a5dd59d
More PR reviews fixes
Enkidu93 Dec 4, 2023
a91653d
Added testing
Enkidu93 Dec 4, 2023
2a26c55
More PR review fixes
Enkidu93 Dec 4, 2023
2bc9462
Fix key term ids logic
Enkidu93 Dec 4, 2023
414b43b
Remove null check
Enkidu93 Dec 5, 2023
036c700
Fixed test data
Enkidu93 Dec 5, 2023
28bd701
Removed unecessary class from Serval and reworked Machine code using it
Enkidu93 Dec 6, 2023
9486296
Change using's order
Enkidu93 Dec 6, 2023
e675624
Revert to using CustomEnumConverter
Enkidu93 Dec 11, 2023
d8bfd8c
Build log output (#155)
johnml1135 Jan 5, 2024
1c9ae93
Passed shared file folder to ClearML NMT job (#157)
ddaspit Jan 16, 2024
0f34490
Drive health (#156)
johnml1135 Jan 16, 2024
eb65a67
Update serval GRPC interface
johnml1135 Jan 16, 2024
465e1df
Update to latest version of csharpier
ddaspit Jan 30, 2024
628a5ba
Language endpoint (#159)
johnml1135 Jan 31, 2024
8fd1a81
Cancel build gRPC endpoint returns Aborted when no build is running (…
ddaspit Feb 6, 2024
5f80d82
Added chapter-level filtering (#161)
Enkidu93 Feb 6, 2024
f8f472f
Revert "Added chapter-level filtering (#161)"
ddaspit Feb 7, 2024
d6423d3
Chapter level aspnetcore (#167)
Enkidu93 Feb 7, 2024
79b4aa1
Move logic to parallel text corpus
Enkidu93 Feb 7, 2024
f1bb557
Nmt download (#164)
johnml1135 Feb 9, 2024
0605330
Try 2 for editor config: (#171)
johnml1135 Feb 22, 2024
d170577
Refactor models to records (#172)
ddaspit Feb 22, 2024
1f94855
Better error handling for download endpoint (#173)
johnml1135 Feb 26, 2024
5053742
fix #332 - only require fields used (#175)
johnml1135 Feb 27, 2024
79d4a36
Remove required property from optional ClearMLTask attributes
Enkidu93 Feb 29, 2024
5b4af80
Add support for mixed source corpora (#177)
ddaspit Mar 22, 2024
835f994
Fix some logic found during e2e testing (#178)
johnml1135 Mar 26, 2024
f9baaa1
default to major biblical terms (#180)
johnml1135 Apr 10, 2024
95c7759
Add support for non-verse text segments in Scripture corpora (#179)
ddaspit Apr 11, 2024
be44f09
Update to fix vulnerability. (#186)
johnml1135 Apr 16, 2024
340dfcf
Test coverage (#182)
johnml1135 Apr 16, 2024
8cf8c69
Convert to MongoDB callback API (#184)
johnml1135 Apr 17, 2024
c30a9f0
Allow for write commands that are greater than 5MB. (#188)
johnml1135 Apr 18, 2024
8b46eb9
Control the pretranslation of existing text (#189)
johnml1135 Apr 19, 2024
5307e48
Serval was down until langtags.json was added back. (#194)
johnml1135 Apr 25, 2024
769b6ae
Add logic to preprocess
Enkidu93 May 28, 2024
e998121
Add test
Enkidu93 May 29, 2024
3531736
Throw appropriate error; clarify langTag logic
Enkidu93 May 29, 2024
f9ad3e2
Skip parsing excluded books when preprocessing (#207)
ddaspit Jun 7, 2024
807fc5c
Clarify and fix logic for textId and Chapters. (#209)
johnml1135 Jun 7, 2024
359f497
Smt on clearml (#200)
johnml1135 Jun 11, 2024
162d5cf
Retry hangfire jobs (#197)
johnml1135 Jul 2, 2024
7933dee
Merge branch 'machine-migration' into machine
ddaspit Jul 5, 2024
ce1f9d3
Fix code style issues
ddaspit Jul 5, 2024
76a692c
Rename Machine projects
ddaspit Jul 5, 2024
7d02b8d
Fix error when loading icu.net
johnml1135 Jul 8, 2024
6b47050
remove unneeded file
johnml1135 Jul 9, 2024
8e7ca35
Merge commit '73463eba2e54ebb594b29984f6d03f3ef6bbeaa8' into machine
johnml1135 Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Start MongoDB
Expand Down
36 changes: 36 additions & 0 deletions Serval.sln
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{92805246-528
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{BA044B98-3136-4FDE-B90F-B0975758C07F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Machine", "Machine", "{F6142E52-4B58-4D12-980F-B07D8AA932C2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D808D2BE-ED26-4E60-A409-AE58F7C1CB8F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{40C225C2-1EEF-4D1D-9D14-1CBB86C8A1CB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.Machine.Shared", "src\Machine\src\Serval.Machine.Shared\Serval.Machine.Shared.csproj", "{090ECB69-464F-42C8-B92C-0808BE2802FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.Machine.EngineServer", "src\Machine\src\Serval.Machine.EngineServer\Serval.Machine.EngineServer.csproj", "{C02494FB-663E-4430-9F2D-41F1A740B271}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.Machine.JobServer", "src\Machine\src\Serval.Machine.JobServer\Serval.Machine.JobServer.csproj", "{BC766753-E560-4ADF-9923-C7A96076EA47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.Machine.Shared.Tests", "src\Machine\test\Serval.Machine.Shared.Tests\Serval.Machine.Shared.Tests.csproj", "{B0D23A55-AB09-4C2C-B309-F4BEB3BC968D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -134,6 +148,22 @@ Global
{0E220C65-AA88-450E-AFB2-844E49060B3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E220C65-AA88-450E-AFB2-844E49060B3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E220C65-AA88-450E-AFB2-844E49060B3F}.Release|Any CPU.Build.0 = Release|Any CPU
{090ECB69-464F-42C8-B92C-0808BE2802FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{090ECB69-464F-42C8-B92C-0808BE2802FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{090ECB69-464F-42C8-B92C-0808BE2802FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{090ECB69-464F-42C8-B92C-0808BE2802FA}.Release|Any CPU.Build.0 = Release|Any CPU
{C02494FB-663E-4430-9F2D-41F1A740B271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C02494FB-663E-4430-9F2D-41F1A740B271}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C02494FB-663E-4430-9F2D-41F1A740B271}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C02494FB-663E-4430-9F2D-41F1A740B271}.Release|Any CPU.Build.0 = Release|Any CPU
{BC766753-E560-4ADF-9923-C7A96076EA47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC766753-E560-4ADF-9923-C7A96076EA47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC766753-E560-4ADF-9923-C7A96076EA47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC766753-E560-4ADF-9923-C7A96076EA47}.Release|Any CPU.Build.0 = Release|Any CPU
{B0D23A55-AB09-4C2C-B309-F4BEB3BC968D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0D23A55-AB09-4C2C-B309-F4BEB3BC968D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0D23A55-AB09-4C2C-B309-F4BEB3BC968D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0D23A55-AB09-4C2C-B309-F4BEB3BC968D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -160,6 +190,12 @@ Global
{3E753B99-7C31-42AC-B02E-012B802F58DB} = {6D20F76D-9A0E-44AC-8754-B4291C75D25B}
{92805246-5285-4F0A-9BF8-6EE4A027A41B} = {33E6965E-5A58-4C6F-882E-F17C8E88A3FF}
{BA044B98-3136-4FDE-B90F-B0975758C07F} = {33E6965E-5A58-4C6F-882E-F17C8E88A3FF}
{D808D2BE-ED26-4E60-A409-AE58F7C1CB8F} = {F6142E52-4B58-4D12-980F-B07D8AA932C2}
{40C225C2-1EEF-4D1D-9D14-1CBB86C8A1CB} = {F6142E52-4B58-4D12-980F-B07D8AA932C2}
{090ECB69-464F-42C8-B92C-0808BE2802FA} = {D808D2BE-ED26-4E60-A409-AE58F7C1CB8F}
{C02494FB-663E-4430-9F2D-41F1A740B271} = {D808D2BE-ED26-4E60-A409-AE58F7C1CB8F}
{BC766753-E560-4ADF-9923-C7A96076EA47} = {D808D2BE-ED26-4E60-A409-AE58F7C1CB8F}
{B0D23A55-AB09-4C2C-B309-F4BEB3BC968D} = {40C225C2-1EEF-4D1D-9D14-1CBB86C8A1CB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9F18C25E-E140-43C3-B177-D562E1628370}
Expand Down
39 changes: 39 additions & 0 deletions src/Machine/src/Serval.Machine.EngineServer/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Hangfire;
using OpenTelemetry.Trace;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder
.Services.AddMachine(builder.Configuration)
.AddBuildJobService()
.AddMongoDataAccess()
.AddMongoHangfireJobClient()
.AddServalTranslationEngineService()
.AddModelCleanupService()
.AddMessageOutboxDeliveryService()
.AddClearMLService();

if (builder.Environment.IsDevelopment())
{
builder
.Services.AddOpenTelemetry()
.WithTracing(builder =>
{
builder
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddGrpcClientInstrumentation()
.AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources")
.AddConsoleExporter();
});
}

var app = builder.Build();

app.UseHttpsRedirection();

app.MapServalTranslationEngineService();
app.MapHangfireDashboard();

app.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"profiles": {
"SIL.Machine.Serval.EngineServer": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:9000"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>34e222a9-ef76-48f9-869e-338547f9bd25</UserSecretsId>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="icu.net" Version="2.9.0" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.8.0-beta.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Serval.Machine.Shared\Serval.Machine.Shared.csproj" />
</ItemGroup>

<!-- Include icu.net.dll.config - which is only available after the package is built -->
<ItemGroup>
<ResolvedFileToPublish Include=".\bin\Release\net8.0\icu.net.dll.config">
<RelativePath>icu.net.dll.config</RelativePath>
</ResolvedFileToPublish>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"ConnectionStrings": {
"Hangfire": "mongodb://localhost:27017/machine_jobs",
"Mongo": "mongodb://localhost:27017/machine",
"Serval": "https://localhost:8444"
},
"ClearML": {
"MaxSteps": 1000,
"Project": "dev"
},
"SharedFile": {
"Uri": "s3://aqua-ml-data/dev/"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"System.Net.Http.HttpClient.Default": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
43 changes: 43 additions & 0 deletions src/Machine/src/Serval.Machine.EngineServer/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ConnectionStrings": {
"ClearML": "https://api.sil.hosted.allegro.ai"
},
"AllowedHosts": "*",
"Service": {
"ServiceId": "machine_engine"
},
"TranslationEngines": [
"SmtTransfer",
"Nmt"
],
"BuildJob": {
"ClearML": [
{
"TranslationEngineType": "Nmt",
"ModelType": "huggingface",
"Queue": "jobs_backlog",
"DockerImage": "ghcr.io/sillsdev/machine.py:latest"
},
{
"TranslationEngineType": "SmtTransfer",
"ModelType": "thot",
"Queue": "cpu_only",
"DockerImage": "ghcr.io/sillsdev/machine.py:latest"
}
]
},
"SmtTransferEngine": {
"EnginesDir": "/var/lib/machine/engines"
},
"ClearML": {
"BuildPollingEnabled": true
},
"MessageOutbox": {
"OutboxDir": "/var/lib/machine/outbox"
},
"Logging": {
"LogLevel": {
"System.Net.Http.HttpClient.Default": "Warning"
}
}
}
30 changes: 30 additions & 0 deletions src/Machine/src/Serval.Machine.JobServer/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using OpenTelemetry.Trace;

var builder = WebApplication.CreateBuilder(args);

builder
.Services.AddMachine(builder.Configuration)
.AddBuildJobService()
.AddMongoDataAccess()
.AddMongoHangfireJobClient()
.AddHangfireJobServer()
.AddServalPlatformService()
.AddClearMLService();
if (builder.Environment.IsDevelopment())
{
builder
.Services.AddOpenTelemetry()
.WithTracing(builder =>
{
builder
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddGrpcClientInstrumentation()
.AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources")
.AddConsoleExporter();
});
}

var app = builder.Build();

app.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"profiles": {
"SIL.Machine.Serval.JobServer": {
"commandName": "Project",
"launchBrowser": false,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:9100"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aa9e7440-5a04-4de6-ba51-bab9ef4a62e1</UserSecretsId>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
</PropertyGroup>

<Target BeforeTargets="Build" Name="EnforceAppSettingsName">
</Target>

<ItemGroup>
<PackageReference Include="icu.net" Version="2.9.0" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.8.0-beta.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Serval.Machine.Shared\Serval.Machine.Shared.csproj" />
</ItemGroup>

<!-- Include icu.net.dll.config - which is only available after the package is built -->
<ItemGroup>
<ResolvedFileToPublish Include=".\bin\Release\net8.0\icu.net.dll.config">
<RelativePath>icu.net.dll.config</RelativePath>
</ResolvedFileToPublish>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"ConnectionStrings": {
"Hangfire": "mongodb://localhost:27017/machine_jobs",
"Mongo": "mongodb://localhost:27017/machine",
"Serval": "https://localhost:8444"
},
"ClearML": {
"MaxSteps": 1000,
"Project": "dev"
},
"SharedFile": {
"Uri": "s3://aqua-ml-data/dev/"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"System.Net.Http.HttpClient.Default": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Loading
Loading