Fix new Frontend 15
This commit is contained in:
@@ -169,13 +169,6 @@ async def execute_training_job_background(
|
||||
"api_version": "v1"
|
||||
}
|
||||
|
||||
# Publish immediate event (training started)
|
||||
await publish_job_started(
|
||||
job_id=job_id,
|
||||
tenant_id=tenant_id,
|
||||
config=training_config
|
||||
)
|
||||
|
||||
await status_manager.update_job_status(
|
||||
job_id=job_id,
|
||||
status="running",
|
||||
|
||||
@@ -446,6 +446,7 @@ class BakeryMLTrainer:
|
||||
logger.info(f"Successfully trained model for {product_name}")
|
||||
|
||||
completed_products = i + 1
|
||||
i = i + 1
|
||||
progress = base_progress + int((completed_products / total_products) * (max_progress - base_progress))
|
||||
|
||||
if self.status_publisher:
|
||||
@@ -469,6 +470,7 @@ class BakeryMLTrainer:
|
||||
}
|
||||
|
||||
completed_products = i + 1
|
||||
i = i + 1
|
||||
|
||||
if self.status_publisher:
|
||||
self.status_publisher.products_completed = completed_products
|
||||
@@ -479,7 +481,6 @@ class BakeryMLTrainer:
|
||||
step_details=f"Failed training for {product_name}: {str(e)}"
|
||||
)
|
||||
|
||||
|
||||
return training_results
|
||||
|
||||
def _calculate_training_summary(self, training_results: Dict[str, Any]) -> Dict[str, Any]:
|
||||
|
||||
@@ -81,6 +81,13 @@ class TrainingService:
|
||||
|
||||
# Step 1: Prepare training dataset with date alignment and orchestration
|
||||
logger.info("Step 1: Preparing and aligning training data")
|
||||
|
||||
await self.status_publisher.progress_update(
|
||||
progress=10,
|
||||
step="data_validation",
|
||||
step_details="Data validation and alignment completed"
|
||||
)
|
||||
|
||||
training_dataset = await self.orchestrator.prepare_training_data(
|
||||
tenant_id=tenant_id,
|
||||
bakery_location=bakery_location,
|
||||
@@ -89,12 +96,6 @@ class TrainingService:
|
||||
job_id=job_id
|
||||
)
|
||||
|
||||
await self.status_publisher.progress_update(
|
||||
progress=10,
|
||||
step="data_validation",
|
||||
step_details="Data validation and alignment completed"
|
||||
)
|
||||
|
||||
# Step 2: Execute ML training pipeline
|
||||
logger.info("Step 2: Starting ML training pipeline")
|
||||
training_results = await self.trainer.train_tenant_models(
|
||||
|
||||
Reference in New Issue
Block a user