Start fixing forecast service API 10

This commit is contained in:
Urtzi Alfaro
2025-07-29 18:37:23 +02:00
parent 2a1aec95bc
commit 07872f50d0
3 changed files with 13 additions and 11 deletions

View File

@@ -251,7 +251,7 @@ class ForecastingService:
# Pass the product_name to the model client
model_data = await self.model_client.get_best_model_for_forecasting(
tenant_id=tenant_id,
product_id=product_name # Make sure to pass product_name
product_name=product_name # Make sure to pass product_name
)
return model_data
except Exception as e:

View File

@@ -57,7 +57,7 @@ class ModelClient:
async def get_best_model_for_forecasting(
self,
tenant_id: str,
product_id: Optional[str] = None
product_name: Optional[str] = None
) -> Optional[Dict[str, Any]]:
"""
Get the best model for forecasting based on performance metrics
@@ -66,7 +66,7 @@ class ModelClient:
# Get latest model
latest_model = await self.clients.training.get_active_model_for_product(
tenant_id=tenant_id,
product_name=product_id
product_name=product_name
)
if not latest_model: