Repository navigation
fix(prerecorded): return transcript groups in input order - #305
Open
mayankbohradev wants to merge 1 commit into
Open
mayankbohradev wants to merge 1 commit into
mayankbohradev wants to merge 1 commit into
Conversation
Transcriber.transcribe_group, submit_group and TranscriptGroup.wait_for_completion collected their futures in a set and iterated it, so a group came back in an arbitrary order. The futures are now kept in a list and read in submission order. Both still wait for every future before they read a result.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The threaded
Transcriber.transcribe_group/submit_groupandTranscriptGroup.wait_for_completionnow return their transcripts in input order.Why
Both collected their futures in a set and iterated it. A set of futures iterates by hash, so a group came back in an arbitrary order and a caller could not match a transcript to the file it came from. Refs #79.
transcriber.transcribe_group(files)[i]did not correspond tofiles[i].TranscriptGroup.get_by_ids(["a", "b"])could come back asb,a.AsyncTranscriberalready returns its groups in input order.How
Testing
master's source they failed in 20 of 20 runs; with the change they pass.test_a_forked_child_does_not_share_the_parents_tts_connectionsfails on macOS onmastertoo.Notes for reviewers