Skip to content

fix(api): keep tokenizer loaders lazy at the public API boundary - #467

Open
chnlyy wants to merge 2 commits into
inclusionAI:mainfrom
chnlyy:fix/api-import-boundary
Open

fix(api): keep tokenizer loaders lazy at the public API boundary#467
chnlyy wants to merge 2 commits into
inclusionAI:mainfrom
chnlyy:fix/api-import-boundary

Conversation

@chnlyy

@chnlyy chnlyy commented Aug 11, 2026

Copy link
Copy Markdown

Wrap load_tokenizer/load_processor lazily so importing areno.api / areno.api.trainer no longer pulls areno.engine.data.tokenizer. Extend the import-boundary CPU test to cover the seam and the engine tokenizer leak.

Closes #65

What does this PR do?

Related issue

Fixes #(issue)

Type of change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change (public API / CLI behavior changes in a non-backward-compatible way)
  • 📝 Documentation update
  • ♻️ Refactoring
  • ⚡ Performance improvement
  • ✅ Test coverage improvement

How was it tested?

Checklist

  • The PR title summarizes the contribution.
  • Linked the related issue in the description (if any).
  • Existing tests pass (pytest tests/ -k cpu).
  • New behavior is covered by tests.
  • Described the test commands run and any hardware limitations.
  • Public API / CLI changes are additive and backward-compatible (see CONTRIBUTING.md).

Breaking change details

Wrap load_tokenizer/load_processor lazily so importing areno.api /
areno.api.trainer no longer pulls areno.engine.data.tokenizer. Extend the
import-boundary CPU test to cover the seam and the engine tokenizer leak.

Closes inclusionAI#65
@chnlyy
chnlyy force-pushed the fix/api-import-boundary branch from f5763ef to 66f841b Compare August 11, 2026 11:03
@chnlyy chnlyy changed the title fix(api): keep areno.api.tokenizer free of engine import fix(api): keep tokenizer loaders lazy at the public API boundary Aug 11, 2026
@chnlyy

chnlyy commented Aug 11, 2026

Copy link
Copy Markdown
Author

#65

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.

Protect API imports from engine-heavy imports

1 participant