Progress report
cutana.progress_report
¶
Progress reporting dataclass for Cutana pipeline.
This module provides a clean, type-safe way to handle progress information instead of manually constructing large dictionaries.
ProgressReport(total_sources=0, completed_sources=0, failed_sources=0, progress_percent=0.0, throughput=0.0, eta_seconds=None, memory_percent=0.0, cpu_percent=0.0, memory_available_gb=0.0, memory_total_gb=0.0, memory_used_gb=0.0, active_processes=0, max_workers=0, worker_memory_limit_gb=0.0, worker_memory_allocation_mb=0.0, worker_memory_peak_mb=0.0, worker_memory_remaining_mb=0.0, main_process_memory_mb=0.0, avg_worker_memory_mb=0.0, peak_worker_memory_mb=0.0, processes_measured=0, calibration_completed=False, resource_source='system', total_memory_footprint_mb=0.0, process_errors=0, process_warnings=0, total_errors=0, start_time=None, current_time=None, is_processing=False)
dataclass
¶
Clean dataclass for progress reporting throughout the Cutana pipeline.
empty()
classmethod
¶
Create an empty progress report with safe defaults.
from_status_components(full_status, system_info=None, limits_info=None, performance_info=None, completion_status=None)
classmethod
¶
Create ProgressReport from orchestrator status components.
This outsources the boilerplate of extracting data from the various status dictionaries into a clean, reusable method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
full_status
|
Dict[str, Any]
|
Main status from JobTracker |
required |
system_info
|
Dict[str, Any]
|
System resources from LoadBalancer |
None
|
limits_info
|
Dict[str, Any]
|
Resource limits from LoadBalancer |
None
|
performance_info
|
Dict[str, Any]
|
Performance metrics from LoadBalancer |
None
|
completion_status
|
Dict[str, Any]
|
File-based completion status from JobTracker |
None
|
Returns:
| Type | Description |
|---|---|
ProgressReport
|
ProgressReport with all fields populated |
to_dict()
¶
Convert ProgressReport back to dictionary for compatibility.
safe_float(value, default=0.0)
¶
Ensure value is a valid float.
safe_int(value, default=0)
¶
Ensure value is a valid integer.
validate_and_fix()
¶
Validate and fix any invalid values in the progress report.