OpenPipe / OpenPipe/ART

closing Local backend - bug

Open
#288 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
10.8k
Forks
989
Avg merge
6h 29m
Merged PRs (30d)
85

Description

version: openpipe-art 0.4.4

Notice that in the base class art.backend.Backend the functinon close() is async.
On the other hand, for the art.local.backend.LocalBackend backend, the function close() is not async.

As result, when executing for example await model.backend().close() an exception is getting thrown as we're awaiting a non-awaitable object.


Also related to closing a backend - it might be a good idea that upon closing a LocalBackend, all the runs in LocalBackend._wandb_runs and LocalBackend._weave_clients will be finished (and therefore their results are flushed), by calling:

for run in self._wandb_runs:
    run.finish()

and the same for the weave clients.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating art.backend.Backend.close() and art.local.backend.LocalBackend.close(), then inspect how _wandb_runs and _weave_clients are managed. Confirm the close path that fails when awaited, and verify that completion of a LocalBackend also finishes tracked runs and clients so their results are flushed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.