UPDATE
This commit is contained in:
@@ -2,7 +2,12 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from .growth_simulation import CurrentFarmChartSimulator, GrowthSimulationError
|
||||
from .growth_simulation import (
|
||||
CurrentFarmChartSimulator,
|
||||
GrowthSimulationError,
|
||||
_fa_engine_name,
|
||||
_fa_model_name,
|
||||
)
|
||||
|
||||
|
||||
def build_yield_prediction_payload(*, farm_uuid: str, plant_name: str | None = None) -> dict[str, Any]:
|
||||
@@ -16,9 +21,9 @@ def build_yield_prediction_payload(*, farm_uuid: str, plant_name: str | None = N
|
||||
"predictedYieldTons": predicted_yield_tons,
|
||||
"predictedYieldRaw": round(yield_estimate, 2),
|
||||
"unit": "تن",
|
||||
"sourceUnit": "kg/ha",
|
||||
"simulationEngine": result.get("engine"),
|
||||
"simulationModel": result.get("model_name"),
|
||||
"sourceUnit": "کیلوگرم در هکتار",
|
||||
"simulationEngine": _fa_engine_name(result.get("engine")),
|
||||
"simulationModel": _fa_model_name(result.get("model_name")),
|
||||
"scenarioId": result.get("scenario_id"),
|
||||
"simulationWarning": result.get("simulation_warning"),
|
||||
"supportingMetrics": result.get("metrics") or {},
|
||||
|
||||
Reference in New Issue
Block a user