address greptile review feedback (greploop iteration 3)

- Remove redundant _ensure_training_type call from acreate_fine_tuning_job
- Use explicit _AZURE_STATUS_MAP for status normalization

Made-with: Cursor
This commit is contained in:
Sameer Kankute
2026-03-27 20:04:41 +05:30
parent a9c7b17bfa
commit d4d91684cf
2 changed files with 8 additions and 4 deletions
@@ -37,7 +37,6 @@ class AzureOpenAIFineTuningAPI(OpenAIFineTuningAPI, BaseAzureLLM):
create_fine_tuning_job_data: dict,
openai_client: Union[AsyncOpenAI, AsyncAzureOpenAI],
) -> LiteLLMFineTuningJob:
self._ensure_training_type(create_fine_tuning_job_data)
response = await openai_client.fine_tuning.jobs.create(
**create_fine_tuning_job_data
)
+8 -3
View File
@@ -6,6 +6,10 @@ from openai import AsyncAzureOpenAI, AsyncOpenAI, AzureOpenAI, OpenAI
from litellm._logging import verbose_logger
from litellm.types.utils import LiteLLMFineTuningJob
_AZURE_STATUS_MAP = {
"pending": "queued",
}
def _normalize_fine_tuning_job_dict(
data: Dict[str, Any], is_azure: bool = False
@@ -16,7 +20,7 @@ def _normalize_fine_tuning_job_dict(
Azure differences:
- organization_id: null → ""
- result_files: null → []
- status: "pending""queued"
- status: mapped via _AZURE_STATUS_MAP
"""
if not is_azure:
return data
@@ -29,8 +33,9 @@ def _normalize_fine_tuning_job_dict(
if normalized.get("result_files") is None:
normalized["result_files"] = []
if normalized.get("status") == "pending":
normalized["status"] = "queued"
status = normalized.get("status")
if status in _AZURE_STATUS_MAP:
normalized["status"] = _AZURE_STATUS_MAP[status]
return normalized