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

Make non-blocking requests #39

Open
daavoo opened this issue May 23, 2023 · 1 comment
Open

Make non-blocking requests #39

daavoo opened this issue May 23, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@daavoo
Copy link
Contributor

daavoo commented May 23, 2023

Now that images can be sent through the API, the requests can take significant time, and would be nice to not block the main thread where the training will be happening.

@daavoo daavoo added the enhancement New feature or request label May 23, 2023
@natikgadzhi
Copy link

So looks like the plan could be to:

  1. Provide a new async version of async_post_live_metrics.
  2. Make _post_in_chunks async. Send params and metrics async, process data and send the image / plots chunk async as well.
  3. In post_live_metrics, accept a blocking: Bool = True. By sticking with the current behavior by default, we can keep the Bool return type for existing client code. In non-blocking mode, we can return asyncio.create_task(async_post_live_metrics(...)).

Am I close? If that works, happy to submit a PR with that, unit tests, and docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants