Start fixing forecast service API 10
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user