This commit achieves zero mypy errors across all 430 source files by addressing type issues in post-training providers, model implementations, and testing infrastructure.
Key changes:
- Created HFAutoModel Protocol for HuggingFace models to provide type safety without requiring complete type stubs
- Added module overrides in pyproject.toml for libraries lacking type stubs (torchtune, fairscale, torchvision, datasets, etc.)
- Fixed type issues in databricks provider and api_recorder
Using centralized mypy.overrides instead of scattered inline suppressions provides cleaner code organization.
Fixes mypy type errors in provider utilities and testing infrastructure:
- `mcp.py`: Cast incompatible client types, wrap image data properly
- `batches.py`: Rename walrus variable to avoid shadowing
- `api_recorder.py`: Use cast for Pydantic field annotation
No functional changes.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Migrates package structure to src/ layout following Python packaging
best practices.
All code moved from `llama_stack/` to `src/llama_stack/`. Public API
unchanged - imports remain `import llama_stack.*`.
Updated build configs, pre-commit hooks, scripts, and GitHub workflows
accordingly. All hooks pass, package builds cleanly.
**Developer note**: Reinstall after pulling: `pip install -e .`
2025-10-27 12:02:21 -07:00
Renamed from llama_stack/providers/remote/inference/together/together.py (Browse further)