pivot points option in UI

This commit is contained in:
Dobromir Popov
2025-08-13 02:24:12 +03:00
parent 9c1ba6dbe2
commit 6ef1a63054
4 changed files with 124 additions and 106 deletions

View File

@@ -21,7 +21,7 @@ class ModelsTrainingPanel:
def __init__(self, orchestrator=None):
self.orchestrator = orchestrator
def create_panel(self) -> html.Div:
def create_panel(self) -> Any:
try:
data = self._gather_data()
@@ -34,12 +34,13 @@ class ModelsTrainingPanel:
if data.get("system_metrics"):
content.append(self._create_system_metrics_section(data["system_metrics"]))
return html.Div(content, id="training-metrics")
# Return children (to be assigned to 'training-metrics' container)
return content
except Exception as e:
logger.error(f"Error creating models training panel: {e}")
return html.Div([
return [
html.P(f"Error loading training panel: {str(e)}", className="text-danger small")
], id="training-metrics")
]
def _gather_data(self) -> Dict[str, Any]:
result: Dict[str, Any] = {"models": {}, "training_status": {}, "system_metrics": {}}