SF-3852 Show quality estimates#3990
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3990 +/- ##
==========================================
- Coverage 81.03% 81.03% -0.01%
==========================================
Files 645 645
Lines 41522 41526 +4
Branches 6763 6758 -5
==========================================
Hits 33649 33649
- Misses 6761 6762 +1
- Partials 1112 1115 +3 ☔ View full report in Codecov by Harness. |
pmachapman
left a comment
There was a problem hiding this comment.
@pmachapman reviewed 8 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Nateowami).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.ts line 144 at r1 (raw file):
.pipe(quietTakeUntilDestroyed(this.destroyRef), takeUntil(this.entryChanged)) .subscribe(confidences => (this._buildConfidences = confidences)); }
This results in a large amount of requests being sent to the backend - one request per build, every time the page is loaded.
Would it be possible to instead update MachineApiService.MapDtoAsync() to load the corresponding draft metrics for the build, and populate the book level build confidences into the model ServalBuildDto for any builds that have quality estimation configured?
Code quote:
// Get the quality estimation confidences for this build, if available
this._buildConfidences = undefined;
const buildId = this._entry?.additionalInfo?.buildId;
if (this.activatedProjectService.projectId != null && buildId != null && buildId !== '') {
this.draftGenerationService
.getBuildConfidences(this.activatedProjectService.projectId, buildId)
.pipe(quietTakeUntilDestroyed(this.destroyRef), takeUntil(this.entryChanged))
.subscribe(confidences => (this._buildConfidences = confidences));
}9bc3406 to
0b85867
Compare
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami made 1 comment.
Reviewable status: 6 of 18 files reviewed, 1 unresolved discussion (waiting on pmachapman).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.ts line 144 at r1 (raw file):
Previously, pmachapman (Peter Chapman) wrote…
This results in a large amount of requests being sent to the backend - one request per build, every time the page is loaded.
Would it be possible to instead update
MachineApiService.MapDtoAsync()to load the corresponding draft metrics for the build, and populate the book level build confidences into the modelServalBuildDtofor any builds that have quality estimation configured?
Good point. I've made the change and ripped out the unused endpoint. Do you think that was too aggressive?
pmachapman
left a comment
There was a problem hiding this comment.
@pmachapman reviewed 12 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Nateowami).
This change is