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

Do not train/pretranslate all if textIds is an empty array #390

Merged
merged 1 commit into from
May 20, 2024

Conversation

ddaspit
Copy link
Contributor

@ddaspit ddaspit commented May 16, 2024


This change is Reviewable

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 70.81%. Comparing base (85d87f5) to head (7d6f2be).

Files Patch % Lines
src/Serval.Translation/Services/EngineService.cs 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #390   +/-   ##
=======================================
  Coverage   70.81%   70.81%           
=======================================
  Files         151      151           
  Lines        7172     7172           
  Branches     1121     1121           
=======================================
  Hits         5079     5079           
  Misses       1638     1638           
  Partials      455      455           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@johnml1135 johnml1135 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ddaspit)


src/Serval.Translation/Services/EngineService.cs line 235 at r1 (raw file):

                        {
                            corpus.PretranslateAll =
                                pretranslateCorpus.TextIds is null && pretranslateCorpus.ScriptureRange is null;

This looks great - should there be a test confirming that it works like this?

- only train/pretranslate all if both textIds and scriptureRange are not specified
- fixes #383
Copy link
Contributor Author

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @johnml1135)


src/Serval.Translation/Services/EngineService.cs line 235 at r1 (raw file):

Previously, johnml1135 (John Lambert) wrote…

This looks great - should there be a test confirming that it works like this?

Done.

@johnml1135
Copy link
Collaborator

This should also resolve #385 - to pretranslate on all, both textId and ScriptureRange need to be null, not just textId.

Copy link
Collaborator

@johnml1135 johnml1135 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ddaspit)

@johnml1135 johnml1135 merged commit 367387f into main May 20, 2024
2 checks passed
@ddaspit ddaspit deleted the empty-text-ids branch June 7, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Already written text is not pretranslated if no trainOn books are specified
3 participants