-
Notifications
You must be signed in to change notification settings - Fork 4
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
Kiko/fix stopiteration handling #178
base: releases/1.3.0
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
"`'ignore_worker_failures': True`.") | ||
raise e | ||
else: | ||
if isinstance(e, StopIteration): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to handle it here.
Why are these changes needed?
Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.