Skip to content

Commit

Permalink
update logging for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed Dec 28, 2023
1 parent b69be6d commit d0058f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sparcscore/pipeline/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,15 @@ def cellpose_segmentation(self, input_image):

try:
current = multiprocessing.current_process()
self.log(f"current process: {current}")
cpu_name = current.name
self.log(f"cpu name: {cpu_name}")
gpu_id_list = current.gpu_id_list
self.log(f"gpu id list: {gpu_id_list}")
cpu_id = int(cpu_name[cpu_name.find('-') + 1:]) - 1
self.log("cpu id: {cpu_id}")
gpu_id = gpu_id_list[cpu_id]
self.log("gpu id: {gpu_id}")
self.log(f'starting process on GPU {gpu_id}')
status = "multi_GPU"
except:
Expand Down

0 comments on commit d0058f7

Please sign in to comment.