fix(mypy): resolve typing issues in post-training providers and model files

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.
This commit is contained in:
Ashwin Bharambe 2025-10-28 05:23:48 -07:00
parent 4d58147522
commit 01d1a2ffe9
10 changed files with 65 additions and 25 deletions

View file

@ -8,8 +8,8 @@
from collections.abc import Iterable
from typing import Any, cast
from together import AsyncTogether
from together.constants import BASE_URL
from together import AsyncTogether # type: ignore[import-untyped]
from together.constants import BASE_URL # type: ignore[import-untyped]
from llama_stack.apis.inference import (
OpenAIEmbeddingsRequestWithExtraBody,