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

Kiko/fix stopiteration handling #178

Open
wants to merge 102 commits into
base: releases/1.3.0
Choose a base branch
from

Conversation

Kiko-Aumond
Copy link

Why are these changes needed?

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

dmlyubim and others added 30 commits January 10, 2023 10:47
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
@Kiko-Aumond Kiko-Aumond requested review from a team as code owners February 9, 2023 07:16
@Kiko-Aumond Kiko-Aumond requested review from RuofanKong and a team and removed request for a team February 9, 2023 07:16
Copy link
Collaborator

@RuofanKong RuofanKong left a 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):
Copy link
Collaborator

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"]:
Copy link
Collaborator

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):
Copy link
Collaborator

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.

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.

3 participants