Skip to content

Commit

Permalink
Return status
Browse files Browse the repository at this point in the history
  • Loading branch information
wvangeit committed Jul 10, 2024
1 parent 98d788f commit a1b498a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker_scripts/parallelrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,15 @@ def run_job(self, job_inputs):

return job_outputs, status

def process_job_outputs(self, results, batch):
def process_job_outputs(self, results, batch, status):
if self.template_id == "TEST_UUID":
logger.info("Map in test mode, just returning input")

return batch

for task_i, task in enumerate(batch):
output = task["output"]
task["status"] = status
for probe_name, probe_outputs in results.items():
if probe_name not in output:
raise ValueError(f"Unknown probe in output: {probe_name}")
Expand Down Expand Up @@ -433,7 +434,7 @@ def map_func(batch, trial_number=1):

job_outputs, status = self.run_job(job_inputs)

batch = self.process_job_outputs(job_outputs, batch)
batch = self.process_job_outputs(job_outputs, batch, status)

logger.info(
"Worker has finished batch "
Expand Down

0 comments on commit a1b498a

Please sign in to comment.