Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions recOrder/cli/apply_inverse_transfer_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
transfer_function_dirpath,
ram_multiplier,
unique_id,
verbose
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing you forgot to add parsing.py to the commit? The test show this import is failing.

)
from recOrder.cli.printing import echo_headline, echo_settings
from recOrder.cli.settings import ReconstructionSettings
Expand Down Expand Up @@ -349,6 +350,7 @@ def apply_inverse_transfer_function_cli(
executor = submitit.AutoExecutor(folder=Path(executor_folder))

executor.update_parameters(
slurm_job_name = "reconstruct",
slurm_array_parallelism=np.min([50, num_jobs]),
slurm_mem_per_cpu=f"{gb_ram_request}G",
slurm_cpus_per_task=cpu_request,
Expand All @@ -374,9 +376,10 @@ def apply_inverse_transfer_function_cli(
echo_headline(
f"{num_jobs} job{'s' if num_jobs > 1 else ''} submitted {'locally' if executor.cluster == 'local' else 'via ' + executor.cluster}."
)



doPrint = True # CLI prints Job status when used as cmd line
if unique_id != "": # no unique_id means no job submission info being listened to
if unique_id != "" and unique_id !="-1": # no unique_id means no job submission info being listened to
JM.start_client()
i=0
for j in jobs:
Expand All @@ -388,6 +391,13 @@ def apply_inverse_transfer_function_cli(
JM.send_data_thread()
JM.set_shorter_timeout()
doPrint = False # CLI printing disabled when using GUI
elif unique_id==-1: # CLI used to run automatic pipeline
doPrint = False
job_ids = [job.job_id for job in jobs] # Access job IDs after batch submission

log_path = Path(executor_folder/"submitit_jobs_ids.log")
with log_path.open("w") as log_file:
log_file.write("\n".join(job_ids))

monitor_jobs(jobs, input_position_dirpaths, doPrint)

Expand Down
Loading