mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 20:12:33 +00:00
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:
parent
4d58147522
commit
01d1a2ffe9
10 changed files with 65 additions and 25 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue