Spaces:
Build error
Build error
Julian Bilcke commited on
Commit ·
d5d59a0
1
Parent(s): 7408d76
debugging..
Browse files1279 unmodified lines128012811282128312841285128612871288128912901291129212931294129512961297129812991279 unmodified lines# Parse metrics only from stdoutmetrics = parse_training_log(line)if metrics:status = self.get_status()status.update(metrics)self.save_status(**status)# Extract total_steps and current_step for progress trackingif 'step' in metrics:current_step = metrics['step']if 'total_steps' in status:total_steps = status['total_steps']# Update progress bar if available and total_steps is knownif progress_obj and total_steps > 0:progress_value = min(0.99, current_step / total_steps)progress_obj(progress_value, desc=f"Training: step {current_step}/{total_steps}")return Truereturn False1279 unmodified lines128012811282128312841285128612871288128912901291129212931294129512961297129812991279 unmodified lines# Parse metrics only from stdoutmetrics = parse_training_log(line)if metrics:# Get current status firstcurrent_status = self.get_status()# Update with new metricscurrent_status.update(metrics)# Ensure 'state' is present, use current status if available, default to 'training'if 'status' in current_status:# Use 'status' as 'state' to match the required parameterstate = current_status.pop('status', 'training')self.save_status(state, **current_status)else:# If no status in the current_status, use 'training' as the default stateself.save_status('training', **current_status)return Truereturn False
vms/services/trainer.py+14-14