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

synchronous run and resume functionality + nbrun for runner API #1845

Merged
merged 5 commits into from
May 24, 2024

Conversation

madhur-ob
Copy link
Collaborator

@madhur-ob madhur-ob commented May 21, 2024

Should only be merged after #1732

This allows us to do stuff like:

    runner = Runner('../try.py', metadata="local")
    result = runner.run(alpha=5, tags=["abc", "def"], max_workers=5)

    while not result.run.finished:
        print('trying again...')
        result = runner.resume()

Also allows us to use run inside environments which already have a running event loop such as Jupyter notebooks.

@madhur-ob madhur-ob marked this pull request as ready for review May 21, 2024 08:16
@madhur-ob madhur-ob changed the title synchronous run and resume functionality synchronous run and resume functionality for runner API May 21, 2024
@madhur-ob madhur-ob force-pushed the resume-and-nbrun branch 2 times, most recently from eeb07f2 to d7266e2 Compare May 21, 2024 17:41
@madhur-ob madhur-ob force-pushed the resume-and-nbrun branch 3 times, most recently from c8b9ab2 to 9ad1c0a Compare May 23, 2024 04:30
savingoyal
savingoyal previously approved these changes May 23, 2024
@madhur-ob madhur-ob changed the title synchronous run and resume functionality for runner API synchronous run and resume functionality + nbrun for runner API May 23, 2024

ipython = get_ipython()
except ModuleNotFoundError:
print("'nbrun' requires an interactive python environment (such as Jupyter)")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'NBRunner'?

@savingoyal savingoyal merged commit 125a018 into Netflix:master May 24, 2024
26 checks passed
@madhur-ob madhur-ob deleted the resume-and-nbrun branch May 25, 2024 04:06
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