-
Notifications
You must be signed in to change notification settings - Fork 60
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
Async Running Problem with AsyncRunner #450
Comments
Oops. I just find a sad fact that Thus my problem turns out to be: will it be possible to add |
The save method does actually not need to be an async method itself. It just needs to be a normal function of type So for example def save(learner):
learner.save(**save_kwargs) Regarding your async problems, in a script you can block with: |
Description:
As a newcomer to this package, I'm exploring the usage of the
AsyncRunner
feature, particularly aiming to employ thestart_periodical_saving
functionality. Below is the code snippet I've implemented:Since the
AsyncRunner
doesn't work well in a script environment, I ran it in a jupyternotebook using the%run
magic command, and got the error message pointing torunner.ioloop.run_until_complete(runner.task)
I suspect that the conflict arises because the
runner.start_periodic_saving
coroutine initiates its own event loop, which contradicts the use ofrun_until_complete
function. Sincerun_until_complete
is crucial for me as it ensures sequential execution of subsequent functions afterrunner.task completion
, I'm seeking guidance on resolving this issue.Request for Assistance:
Could you provide guidance on how to address this conflict and enable the sequential execution of functions following
runner.task
completion, given the necessity of usingrun_until_complete
?Apology for encountering another issue within such a short timeframe. Your package is truly remarkable and has significantly contributed to the success of my project. Thanks for your kind assistance
The text was updated successfully, but these errors were encountered: