Kiko/fix stopiteration handling#178
Open
Kiko-Aumond wants to merge 102 commits intoreleases/1.3.0from
Open
Conversation
…proper train iteration size)
The test passes for me in command line but fails in the pipeline where it fails to locate the json data file.
* set recursive mod 777 on /home/vsts/work/_temp/_bazel_vsts directory prior to build * use $TEST_TMPDIR env variable instead of literal directory name
…o dmlyubim/cql-1.7.2-port
…ko/cql-1.7.2-port
…stopiteration_handling
RuofanKong
suggested changes
Feb 15, 2023
RuofanKong
left a comment
There was a problem hiding this comment.
Generally LGTM! Also, I forgot why we want to differentiate "NoSamplesAvailable" from "StopIterationError" (@Random-Word Could you share more context here?). On the other hand, introducing a new type of error may introduce risks on improperly handling it. So if there's no urgent product impact, I'd prefer keeping to just have "StopIterationError" for now. And for the memory error handling, it looks good to me!
| else: | ||
| # always retry on NoSamplesAvailable as this is by definition | ||
| # a retryable situation | ||
| if isinstance(e, NoSamplesAvailable): |
There was a problem hiding this comment.
Rather than catching it here and doing _try_recover(), we need to handle it in our bonsai code (I'll show you).
| if isinstance(e, NoSamplesAvailable): | ||
| logger.info("No samples available yet, retrying.") | ||
| self._try_recover() | ||
| elif self.config["ignore_worker_failures"]: |
| "`'ignore_worker_failures': True`.") | ||
| raise e | ||
| else: | ||
| if isinstance(e, StopIteration): |
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.
Why are these changes needed?
Related issue number
Checks
scripts/format.shto lint the changes in this PR.