Skip to content

fix: remove LocalBackend from art.__all__ and fix docs reference#588

Open
koriyoshi2041 wants to merge 1 commit intoOpenPipe:mainfrom
koriyoshi2041:fix/localbackend-init-export
Open

fix: remove LocalBackend from art.__all__ and fix docs reference#588
koriyoshi2041 wants to merge 1 commit intoOpenPipe:mainfrom
koriyoshi2041:fix/localbackend-init-export

Conversation

@koriyoshi2041
Copy link

Summary

  • Remove LocalBackend from art.__all__ — it is listed but never imported, causing AttributeError on from art import LocalBackend
  • Fix the LangGraph integration doc that used the broken art.LocalBackend() pattern

Background

LocalBackend depends on torch, transformers, numpy, aiohttp, and other heavy packages from the [backend] optional extra. Eagerly importing it in art/__init__.py would break the lightweight client usage that only needs openai, litellm, polars, etc.

All existing code already uses the correct pattern:

from art.local import LocalBackend

LocalBackend was the only orphaned entry in __all__ — every other symbol has a matching import.

Test plan

  • Verify from art import * no longer exports LocalBackend
  • Verify from art.local import LocalBackend still works
  • Verify uv run prek run --all-files passes
  • Verify LangGraph doc code example is consistent with other docs

LocalBackend is listed in __all__ but never imported at the top level,
causing AttributeError on `from art import LocalBackend`. It cannot be
imported eagerly because it depends on torch, transformers, and other
heavy optional packages from the [backend] extra. Users should continue
to use `from art.local import LocalBackend`.

Also fix the LangGraph integration doc that used the broken
`art.LocalBackend()` pattern.
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.

1 participant