File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def __init__(self, log_dir: Path):
1616 """Initialise log directory."""
1717 self .log_dir = log_dir
1818 self .setup_main_logger ()
19+ self .total_jobs = 0
1920
2021 def setup_main_logger (self ):
2122 """Set up the main scheduler logger for scheduling events only."""
@@ -88,8 +89,8 @@ def log_job_start(
8889
8990 # Log to scheduler log (minimal info)
9091 self .logger .info (
91- f"Starting job { job_index } ( { job_info [ 'job_name' ] } ) on \
92- GPU { gpu_id } slot { slot_id } "
92+ f"Starting job { job_index } / { self . total_jobs } "
93+ f"( { job_info [ 'job_name' ] } ) on GPU { gpu_id } slot { slot_id } "
9394 )
9495
9596 # Log full details to job log
@@ -116,7 +117,8 @@ def log_job_completion(
116117
117118 # Log to scheduler log (minimal info)
118119 self .logger .info (
119- f"Job { job_index } ({ completion_info ['job_name' ]} ) completed "
120+ f"Job { job_index } /{ self .total_jobs } "
121+ f"({ completion_info ['job_name' ]} ) completed "
120122 f"with status: { completion_info ['status' ]} "
121123 )
122124
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ def run_jobs(self, jobs: List[Job]) -> List[int]:
142142 job_queue = Queue ()
143143 slot_queue = Queue ()
144144 self .total_jobs = len (jobs )
145+ self .job_logger .total_jobs = self .total_jobs
145146
146147 for slot in self .gpu_slots :
147148 slot_queue .put (slot )
@@ -192,11 +193,3 @@ def worker():
192193 concurrent .futures .wait (futures )
193194
194195 self .logger .info ("\n All jobs completed!" )
195- self .logger .info ("Results summary:" )
196- for i , result in enumerate (results ):
197- status = (
198- "Success" if result == 0 else f"Failed (code { result } )"
199- )
200- self .logger .info (f"Job { i } : { status } " )
201-
202- return results
You can’t perform that action at this time.
0 commit comments