Update SIL.Machine to 3.9.0#999
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #999 +/- ##
==========================================
+ Coverage 66.06% 69.91% +3.84%
==========================================
Files 370 363 -7
Lines 21261 20134 -1127
Branches 2699 2686 -13
==========================================
+ Hits 14047 14077 +30
+ Misses 6201 5048 -1153
+ Partials 1013 1009 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ddaspit
left a comment
There was a problem hiding this comment.
@ddaspit reviewed 10 files and all commit messages, and made 6 comments.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on Enkidu93 and pmachapman).
src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs line 151 at r1 (raw file):
foreach (UsfmVersificationDiagnosticContract diagnostic in diagnostics) { var sb = new StringBuilder();
This would be easier to read if string interpolation was used.
src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs line 169 at r1 (raw file):
sb.Append(" of "); sb.Append(diagnostic.Filename); sb.Append("(parallel corpus ");
I think there should be a space here.
src/Serval/src/Serval.Shared/Services/ParallelCorpusService.cs line 36 at r1 (raw file):
{ using ZipArchive zipArchive = ZipFile.OpenRead(file.Location); UsfmVersificationAnalysis? analysis = new ZipUsfmVersificationAnalyzer(
I don't think this needs to be nullable.
src/Serval/src/Serval.Shared/Services/ParallelCorpusService.cs line 604 at r1 (raw file):
foreach ((string textId, HashSet<int> chapters) in corpus.TrainOnChapters) { if (!bookIdsAndChapters.TryAdd(textId, chapters))
Is this correct? I can't really remember, but I think that if chapters is empty, then it means that all chapters should be included. Also, you should copy chapters. We probably need some test coverage on this method.
src/Serval/src/Serval.Shared/Services/ParallelCorpusService.cs line 621 at r1 (raw file):
foreach ((string textId, HashSet<int> chapters) in corpus.InferenceChapters) { if (!bookIdsAndChapters.TryAdd(textId, chapters))
See comment above.
src/Serval/src/Serval.Shared.Contracts/UsfmVersificationDiagnosticContract.cs line 16 at r1 (raw file):
public required UsfmVersificationDiagnosticType Type { get; init; } public required int NumAffectedVerses { get; init; } public required List<string> References { get; init; }
IReadOnlyList would be better.
a66a7ec to
e2f2fd4
Compare
pmachapman
left a comment
There was a problem hiding this comment.
@pmachapman made 6 comments.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on ddaspit and Enkidu93).
src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs line 151 at r1 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
This would be easier to read if string interpolation was used.
Done.
src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs line 169 at r1 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
I think there should be a space here.
Done.
src/Serval/src/Serval.Shared/Services/ParallelCorpusService.cs line 36 at r1 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
I don't think this needs to be nullable.
Done. Thanks!
src/Serval/src/Serval.Shared/Services/ParallelCorpusService.cs line 604 at r1 (raw file):
Is this correct? I can't really remember, but I think that if
chaptersis empty, then it means that all chapters should be included.
Yes, that is correct. Updated.
Also, you should copy
chapters.
Thanks - updated.
We probably need some test coverage on this method.
Done. I made the method internal and wrote a test to cover all of the combinations I could discover. I could also simplify the logic based on the tests`.
src/Serval/src/Serval.Shared/Services/ParallelCorpusService.cs line 621 at r1 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
See comment above.
Done.
src/Serval/src/Serval.Shared.Contracts/UsfmVersificationDiagnosticContract.cs line 16 at r1 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
IReadOnlyListwould be better.
Done.
ddaspit
left a comment
There was a problem hiding this comment.
@ddaspit reviewed 5 files and all commit messages, made 1 comment, and resolved 6 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Enkidu93).
Enkidu93
left a comment
There was a problem hiding this comment.
Thank you for doing this, Peter! Sorry that this fell on you while I was gone. I was hoping to also add a warning when there were different versifications among the Paratext projects represented in the training and inferencing data. (It's listed in the doc I shared). If you'd rather, I can add that in a separate PR. Or you could just add it here.
@Enkidu93 reviewed 10 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on pmachapman).
src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs line 152 at r2 (raw file):
{ string diagnosticDetails = (diagnostic.NumAffectedVerses > 1 ? $"for {diagnostic.NumAffectedVerses} verses " : string.Empty)
I know we haven't finalized things here, but if you could align the messages so they match, I'd appreciate it. I made you editor on the doc, so use your discretion.
e2f2fd4 to
d518f23
Compare
pmachapman
left a comment
There was a problem hiding this comment.
I was hoping to also add a warning when there were different versifications among the Paratext projects represented in the training and inferencing data.
Done.
@pmachapman made 2 comments and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on pmachapman).
src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs line 152 at r2 (raw file):
Previously, Enkidu93 (Eli C. Lowry) wrote…
I know we haven't finalized things here, but if you could align the messages so they match, I'd appreciate it. I made you editor on the doc, so use your discretion.
Done. I haven't implemented the Diagnostic class/record, just the message wording. Let me know if you want me to do the full structure or if we will save that for a later PR.
I had to make a couple of minor tweaks to wording in the document, and I added a question via a comment.
d518f23 to
a91c6c6
Compare
Enkidu93
left a comment
There was a problem hiding this comment.
@Enkidu93 reviewed 6 files and all commit messages, and made 2 comments.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on pmachapman).
src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs line 152 at r2 (raw file):
Previously, pmachapman (Peter Chapman) wrote…
Done. I haven't implemented the Diagnostic class/record, just the message wording. Let me know if you want me to do the full structure or if we will save that for a later PR.
I had to make a couple of minor tweaks to wording in the document, and I added a question via a comment.
OK, sounds good. Thanks!
a91c6c6 to
c447b1b
Compare
Fixes #955. I also fixed a bug where Serval.Shared.Tests was appearing in codecov as code requiring coverage.
This change is