prasb commited on
Commit
c80d50f
·
verified ·
1 Parent(s): 373aad2

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
.DiffTumor.txt.swp ADDED
Binary file (16.4 kB). View file
 
.gitattributes CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  difftumor_final_updated.sif filter=lfs diff=lfs merge=lfs -text
 
 
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  difftumor_final_updated.sif filter=lfs diff=lfs merge=lfs -text
37
+ logs_difftumor_atlas_test.txt filter=lfs diff=lfs merge=lfs -text
ADiffTumor.o427024 ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
12
+ rm: cannot remove '/fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir/case00001.nii.gz': No such file or directory
ADiffTumordb.txt ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
  0%| | 0/1 [00:00<?, ?it/s]['case00001']
 
 
 
 
 
 
 
 
1
  0%| | 0/1 [00:45<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0
2
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
3
+ INFO: Using fakeroot command combined with root-mapped namespace
4
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
5
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-f4b41184-398a-ffd0-e84a-620cbce79589] from parent process environment
6
+ INFO: unknown argument ignored: lazytime
7
+ unknown argument ignored: xino=on
8
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
9
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
10
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
11
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
12
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
13
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
14
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
15
+ WARNING: There was an error checking the latest version of pip.
16
+ Use pretrained weights
17
+ test len 1
18
+
19
  0%| | 0/1 [00:00<?, ?it/s]['case00001']
20
+ 2024-07-12 21:02:53,968 INFO image_writer.py:190 - writing: /workspace/outputs/case00001/predictions/case00001_liver.nii.gz
21
+ 2024-07-12 21:02:55,938 INFO image_writer.py:190 - writing: /workspace/outputs/case00001/predictions/case00001_pancreas.nii.gz
22
+ 2024-07-12 21:02:57,950 INFO image_writer.py:190 - writing: /workspace/outputs/case00001/predictions/case00001_kidney.nii.gz
23
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
24
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
25
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
26
+ -> for index, batch in enumerate(tqdm(ValLoader)):
27
+ (Pdb)
28
  0%| | 0/1 [00:45<?, ?it/s]
29
+
30
+ Traceback (most recent call last):
31
+ File "organ_mask_access/organ_test.py", line 135, in <module>
32
+ main()
33
+ File "organ_mask_access/organ_test.py", line 132, in main
34
+ validation(model, test_loader, val_transforms, args)
35
+ File "organ_mask_access/organ_test.py", line 30, in validation
36
+ for index, batch in enumerate(tqdm(ValLoader)):
37
+ File "organ_mask_access/organ_test.py", line 30, in validation
38
+ for index, batch in enumerate(tqdm(ValLoader)):
39
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
40
+ return self.dispatch_line(frame)
41
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
42
+ if self.quitting: raise BdbQuit
43
+ bdb.BdbQuit
44
+ MAIN Argument values:
45
+ data_root => /workspace/inputs
46
+ organ_type => liver
47
+ fold => 0
48
+ save_dir => /workspace/outputs
49
+ feature_size => 16
50
+ val_overlap => 0.75
51
+ num_classes => 3
52
+ model => unet
53
+ swin_type => base
54
+ -----------------
55
+ val len 1
56
+ unet
57
+ Use logdir weights
58
+ Total parameters count 4807482
59
+ case_name case00001
60
+ MAIN Argument values:
61
+ data_root => /workspace/inputs
62
+ organ_type => pancreas
63
+ fold => 0
64
+ save_dir => /workspace/outputs
65
+ feature_size => 16
66
+ val_overlap => 0.75
67
+ num_classes => 3
68
+ model => unet
69
+ swin_type => base
70
+ -----------------
71
+ Traceback (most recent call last):
72
+ File "tumor_mask_access/pancreas_tumor.py", line 251, in <module>
73
+ main()
74
+ File "tumor_mask_access/pancreas_tumor.py", line 212, in main
75
+ val_loader, post_transforms = _get_loader(args)
76
+ File "tumor_mask_access/pancreas_tumor.py", line 158, in _get_loader
77
+ test_data_list = os.listdir(args.data_root)
78
+ FileNotFoundError: [Errno 2] No such file or directory: '/workspace/inputs'
79
+ MAIN Argument values:
80
+ data_root => /workspace/inputs
81
+ organ_type => kidney
82
+ fold => 0
83
+ save_dir => /workspace/outputs
84
+ feature_size => 16
85
+ val_overlap => 0.75
86
+ num_classes => 3
87
+ model => unet
88
+ swin_type => base
89
+ -----------------
90
+ Traceback (most recent call last):
91
+ File "tumor_mask_access/kidney_tumor.py", line 249, in <module>
92
+ main()
93
+ File "tumor_mask_access/kidney_tumor.py", line 210, in main
94
+ val_loader, post_transforms = _get_loader(args)
95
+ File "tumor_mask_access/kidney_tumor.py", line 156, in _get_loader
96
+ test_data_list = os.listdir(args.data_root)
97
+ FileNotFoundError: [Errno 2] No such file or directory: '/workspace/inputs'
BDiffTumor.o427025 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
BDiffTumorSingle.sh ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ #PBS -l select=1:ncpus=10:ngpus=1
3
+ #PBS -l walltime=23:59:00
4
+ #PBS -j oe
5
+ #PBS -N BDiffTumor
6
+ #PBS -q gpu
7
+
8
+ module load nvhpc-hpcx-cuda11/23.5
9
+ module load go-1.19.4/singularity-1.1.8
10
+
11
+ cd /work/psalvador
12
+ output_file="BDiffTumordb.txt"
13
+ echo "0"> "$output_file"
14
+
15
+ #Number of processes per node to launch
16
+ NPROC_PER_NODE=4
17
+ #Number of process in all modes
18
+ WORLD_SIZE=$PBS_NUM_NODES
19
+ MASTER_ADDR=`/bin/hostname -s`
20
+ cat $PBS_NODEFILE>nodelist
21
+ #Make sure this node (MASTER) comes first
22
+ SLAVES=`cat nodelist | grep -v $MASTER_ADDR | uniq`
23
+ #We want names of master and slave nodes
24
+ HOSTLIST="$MASTER_ADDR $SLAVES"
25
+
26
+ #Get free port:
27
+ BASE_PORT=16998
28
+ INCREMENT=1
29
+ port=$BASE_PORT
30
+ isfree=$(netstat -taln | grep $port)
31
+ while [[ -n "$isfree" ]]; do
32
+ port=$[port+INCREMENT]
33
+ isfree=$(netstat -taln | grep $port)
34
+ done
35
+ MASTER_PORT=$port
36
+
37
+ export NCCL_DEBUG=INFO
38
+
39
+ arr=($HOSTLIST)
40
+
41
+ export TORCH_HOME=/fastwork/psalvador/cache
42
+ export TORCHVISION_HOME=/fastwork/psalvador/cache
43
+ #This command to run your pytorch script
44
+
45
+
46
+ export inputs_data=/fastwork/psalvador/JHU/data/UCSF_remaining/SXz0J6vDWz/SXz0J6vDWz/1J07NmUKTS
47
+ export outputs_data=/fastwork/psalvador/JHU/UCSF/DiffTumor/outputs/SXz0J6vDWz_1J07NmUKTS
48
+
49
+ mkdir -p "$outputs_data"
50
+
51
+ chmod 644 overlay.img
52
+
53
+ cd /fastwork/psalvador/JHU/UCSF/DiffTumor
54
+ echo "0"> "$output_file"
55
+
56
+ export dir=/fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir
57
+ # Check if the directory exists
58
+ if [ -d "$dir" ]; then
59
+ # If the directory exists, remove it
60
+ rm -rf "$dir"
61
+ echo "Directory $dir has been removed."
62
+ fi
63
+ # Create the directory
64
+ mkdir -p "$dir"
65
+
66
+
67
+ for ct_file in "$inputs_data"/*.nii.gz; do
68
+ if [ -f "$ct_file" ]; then
69
+ cp "$ct_file" "$dir/$(basename "$ct_file")"
70
+ SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity run --fakeroot --overlay /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img --nv -B $dir:/workspace/inputs -B $outputs_data:/workspace/outputs difftumor_final.sif>> "$output_file" 2>&1
71
+ rm "$dir/$(basename "$ct_file")"
72
+ fi
73
+ done
BDiffTumordb.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ 0
2
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
3
+ INFO: Using fakeroot command combined with root-mapped namespace
4
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
5
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-d2b0673e-c3cb-a631-b7b0-f33f88b95388] from parent process environment
6
+ FATAL: while loading overlay images: failed to open overlay image /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img: while locking ext3 partition from /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img: can't open /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img for writing, currently in use by another process
DiffTumor.o425447 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425448 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425449 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425450 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425451 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425452 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425453 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425454 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425455 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425456 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425457 ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
DiffTumor.o425458 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
DiffTumor.o425459 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
DiffTumor.o425460 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
DiffTumor.o425461 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
DiffTumor.o425463 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
DiffTumor.o426418 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ /var/spool/pbs/mom_priv/jobs/426418.pbs01.priv.franklin.lan.SC: line 70: syntax error: unexpected end of file
DiffTumor.o426420 ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory tmp_dir has been removed.
12
+ /var/spool/pbs/mom_priv/jobs/426420.pbs01.priv.franklin.lan.SC: line 70: syntax error: unexpected end of file
DiffTumor.o426421 ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory tmp_dir has been removed.
12
+ /var/spool/pbs/mom_priv/jobs/426421.pbs01.priv.franklin.lan.SC: line 70: syntax error: unexpected end of file
DiffTumor.o426422 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ /var/spool/pbs/mom_priv/jobs/426422.pbs01.priv.franklin.lan.SC: line 71: syntax error: unexpected end of file
DiffTumor.o426423 ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
12
+ =>> PBS: job killed: walltime 991 exceeded limit 900
DiffTumor.o426426 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumor.o426427 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumor.o426428 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumor.o426604 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumor.o426817 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumor.o426868 ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
12
+ rm: cannot remove '/fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir/case00010.nii.gz': No such file or directory
DiffTumor.o429178 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumor.o429215 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumor.sh ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ #PBS -l select=1:ncpus=10:ngpus=1
3
+ #PBS -l walltime=23:59:00
4
+ #PBS -j oe
5
+ #PBS -N DiffTumor
6
+ #PBS -q gpu
7
+
8
+ module load nvhpc-hpcx-cuda11/23.5
9
+ module load go-1.19.4/singularity-1.1.8
10
+
11
+ cd /work/psalvador
12
+ output_file="DiffTumordb.txt"
13
+ echo "0"> "$output_file"
14
+
15
+ #Number of processes per node to launch
16
+ NPROC_PER_NODE=4
17
+ #Number of process in all modes
18
+ WORLD_SIZE=$PBS_NUM_NODES
19
+ MASTER_ADDR=`/bin/hostname -s`
20
+ cat $PBS_NODEFILE>nodelist
21
+ #Make sure this node (MASTER) comes first
22
+ SLAVES=`cat nodelist | grep -v $MASTER_ADDR | uniq`
23
+ #We want names of master and slave nodes
24
+ HOSTLIST="$MASTER_ADDR $SLAVES"
25
+
26
+ #Get free port:
27
+ BASE_PORT=16998
28
+ INCREMENT=1
29
+ port=$BASE_PORT
30
+ isfree=$(netstat -taln | grep $port)
31
+ while [[ -n "$isfree" ]]; do
32
+ port=$[port+INCREMENT]
33
+ isfree=$(netstat -taln | grep $port)
34
+ done
35
+ MASTER_PORT=$port
36
+
37
+ export NCCL_DEBUG=INFO
38
+
39
+ arr=($HOSTLIST)
40
+
41
+ export TORCH_HOME=/fastwork/psalvador/cache
42
+ export TORCHVISION_HOME=/fastwork/psalvador/cache
43
+ #This command to run your pytorch script
44
+
45
+
46
+ export inputs_data=/fastwork/psalvador/JHU/data/SingleFolderUCSFRenamed
47
+ export outputs_data=/fastwork/psalvador/JHU/UCSF/DiffTumor/outputs
48
+
49
+ chmod 644 overlay.img
50
+
51
+ cd /fastwork/psalvador/JHU/UCSF/DiffTumor
52
+ echo "0"> "$output_file"
53
+
54
+ export dir=/fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir
55
+ # Check if the directory exists
56
+ if [ -d "$dir" ]; then
57
+ # If the directory exists, remove it
58
+ rm -rf "$dir"
59
+ echo "Directory $dir has been removed."
60
+ fi
61
+ # Create the directory
62
+ mkdir -p "$dir"
63
+
64
+
65
+ for ct_file in "$inputs_data"/*.nii.gz; do
66
+ if [ -f "$ct_file" ]; then
67
+ cp "$ct_file" "$dir/$(basename "$ct_file")"
68
+ SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity run --fakeroot --overlay /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img --nv -B $dir:/workspace/inputs -B $outputs_data:/workspace/outputs difftumor_final.sif>> "$output_file" 2>&1
69
+ rm "$dir/$(basename "$ct_file")"
70
+ fi
71
+ done
DiffTumor.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 0
DiffTumorHealthy.o426937 ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
11
+ Directory /fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir has been removed.
DiffTumorHealthy.o426938 ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Loading nvhpc-hpcx-cuda11/23.5
2
+ ERROR: Directory
3
+ '/applications/sdk/nvidia/hpc_sdk/Linux_x86_64/23.5/comm_libs/11.8/hpcx/latest/modulefiles' not found
4
+ ERROR: Unable to locate a modulefile for 'hpcx'
5
+ ERROR: Load of requirement 'hpcx' failed
6
+ *** WARNING: Deprecated module name, singularity project has been renamed into apptainer.
7
+
8
+ Loading go-1.19.4/singularity-1.1.8
9
+ Loading requirement: go-1.19.4/go go-1.19.4/apptainer-1.1.8
10
+ chmod: cannot access 'overlay.img': No such file or directory
DiffTumorHealthy.sh ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ #PBS -l select=1:ncpus=10:ngpus=1
3
+ #PBS -l walltime=23:59:00
4
+ #PBS -j oe
5
+ #PBS -N DiffTumorHealthy
6
+ #PBS -q gpu
7
+
8
+ module load nvhpc-hpcx-cuda11/23.5
9
+ module load go-1.19.4/singularity-1.1.8
10
+
11
+ cd /work/psalvador
12
+ output_file="DiffTumorHealthy.txt"
13
+ echo "0"> "$output_file"
14
+
15
+ #Number of processes per node to launch
16
+ NPROC_PER_NODE=4
17
+ #Number of process in all modes
18
+ WORLD_SIZE=$PBS_NUM_NODES
19
+ MASTER_ADDR=`/bin/hostname -s`
20
+ cat $PBS_NODEFILE>nodelist
21
+ #Make sure this node (MASTER) comes first
22
+ SLAVES=`cat nodelist | grep -v $MASTER_ADDR | uniq`
23
+ #We want names of master and slave nodes
24
+ HOSTLIST="$MASTER_ADDR $SLAVES"
25
+
26
+ #Get free port:
27
+ BASE_PORT=16998
28
+ INCREMENT=1
29
+ port=$BASE_PORT
30
+ isfree=$(netstat -taln | grep $port)
31
+ while [[ -n "$isfree" ]]; do
32
+ port=$[port+INCREMENT]
33
+ isfree=$(netstat -taln | grep $port)
34
+ done
35
+ MASTER_PORT=$port
36
+
37
+ export NCCL_DEBUG=INFO
38
+
39
+ arr=($HOSTLIST)
40
+
41
+ export TORCH_HOME=/fastwork/psalvador/cache
42
+ export TORCHVISION_HOME=/fastwork/psalvador/cache
43
+ #This command to run your pytorch script
44
+
45
+
46
+ export inputs_data=/fastwork/psalvador/JHU/data/TSHealthyRenamed
47
+ export outputs_data=/fastwork/psalvador/JHU/UCSF/DiffTumor/outputsHealthy
48
+
49
+ chmod 644 overlay.img
50
+
51
+ cd /fastwork/psalvador/JHU/UCSF/DiffTumor
52
+ echo "0"> "$output_file"
53
+
54
+ export dir=/fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir_healthy
55
+ # Check if the directory exists
56
+ if [ -d "$dir" ]; then
57
+ # If the directory exists, remove it
58
+ rm -rf "$dir"
59
+ echo "Directory $dir has been removed."
60
+ fi
61
+ # Create the directory
62
+ mkdir -p "$dir"
63
+
64
+
65
+ for ct_file in "$inputs_data"/*.nii.gz; do
66
+ if [ -f "$ct_file" ]; then
67
+ cp "$ct_file" "$dir/$(basename "$ct_file")"
68
+ SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity run --fakeroot --overlay /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img --nv -B $dir:/workspace/inputs -B $outputs_data:/workspace/outputs difftumor_final.sif>> "$output_file" 2>&1
69
+ rm "$dir/$(basename "$ct_file")"
70
+ fi
71
+ done
DiffTumorHealthy.txt ADDED
@@ -0,0 +1,882 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
  0%| | 0/1 [00:00<?, ?it/s]['case00001']
 
 
 
 
 
 
 
 
1
  0%| | 0/1 [00:23<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  0%| | 0/1 [00:00<?, ?it/s]['case00002']
 
 
 
 
 
 
 
 
3
  0%| | 0/1 [00:37<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  0%| | 0/1 [00:00<?, ?it/s]['case00003']
 
 
 
 
 
 
 
 
5
  0%| | 0/1 [00:10<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  0%| | 0/1 [00:00<?, ?it/s]['case00004']
 
 
 
 
 
 
 
 
7
  0%| | 0/1 [00:09<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  0%| | 0/1 [00:00<?, ?it/s]['case00005']
 
 
 
 
 
 
 
 
9
  0%| | 0/1 [00:29<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  0%| | 0/1 [00:00<?, ?it/s]['case00006']
 
 
 
 
 
 
 
 
11
  0%| | 0/1 [00:14<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  0%| | 0/1 [00:00<?, ?it/s]['case00007']
 
 
 
 
 
 
 
 
13
  0%| | 0/1 [00:32<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  0%| | 0/1 [00:00<?, ?it/s]['case00008']
 
 
 
 
 
 
 
 
15
  0%| | 0/1 [00:22<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  0%| | 0/1 [00:00<?, ?it/s]['case00009']
 
 
 
 
 
 
 
 
17
  0%| | 0/1 [00:37<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  0%| | 0/1 [00:00<?, ?it/s]['case00010']
 
 
 
 
 
 
 
 
19
  0%| | 0/1 [00:22<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0
2
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
3
+ INFO: Using fakeroot command combined with root-mapped namespace
4
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
5
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
6
+ INFO: Warning: Mounting unchecked fs, running e2fsck is recommended.
7
+ INFO: unknown argument ignored: lazytime
8
+ unknown argument ignored: xino=on
9
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
10
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
11
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
12
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
13
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
14
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
15
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
16
+ WARNING: There was an error checking the latest version of pip.
17
+ Use pretrained weights
18
+ test len 1
19
+
20
  0%| | 0/1 [00:00<?, ?it/s]['case00001']
21
+ 2024-07-12 16:39:06,081 INFO image_writer.py:190 - writing: /workspace/outputs/case00001/predictions/case00001_liver.nii.gz
22
+ 2024-07-12 16:39:06,299 INFO image_writer.py:190 - writing: /workspace/outputs/case00001/predictions/case00001_pancreas.nii.gz
23
+ 2024-07-12 16:39:06,506 INFO image_writer.py:190 - writing: /workspace/outputs/case00001/predictions/case00001_kidney.nii.gz
24
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
25
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
26
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
27
+ -> for index, batch in enumerate(tqdm(ValLoader)):
28
+ (Pdb)
29
  0%| | 0/1 [00:23<?, ?it/s]
30
+
31
+ Traceback (most recent call last):
32
+ File "organ_mask_access/organ_test.py", line 135, in <module>
33
+ main()
34
+ File "organ_mask_access/organ_test.py", line 132, in main
35
+ validation(model, test_loader, val_transforms, args)
36
+ File "organ_mask_access/organ_test.py", line 30, in validation
37
+ for index, batch in enumerate(tqdm(ValLoader)):
38
+ File "organ_mask_access/organ_test.py", line 30, in validation
39
+ for index, batch in enumerate(tqdm(ValLoader)):
40
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
41
+ return self.dispatch_line(frame)
42
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
43
+ if self.quitting: raise BdbQuit
44
+ bdb.BdbQuit
45
+ MAIN Argument values:
46
+ data_root => /workspace/inputs
47
+ organ_type => liver
48
+ fold => 0
49
+ save_dir => /workspace/outputs
50
+ feature_size => 16
51
+ val_overlap => 0.75
52
+ num_classes => 3
53
+ model => unet
54
+ swin_type => base
55
+ -----------------
56
+ val len 1
57
+ unet
58
+ Use logdir weights
59
+ Total parameters count 4807482
60
+ case_name case00001
61
+ MAIN Argument values:
62
+ data_root => /workspace/inputs
63
+ organ_type => pancreas
64
+ fold => 0
65
+ save_dir => /workspace/outputs
66
+ feature_size => 16
67
+ val_overlap => 0.75
68
+ num_classes => 3
69
+ model => unet
70
+ swin_type => base
71
+ -----------------
72
+ val len 1
73
+ unet
74
+ Use logdir weights
75
+ Total parameters count 4807482
76
+ case_name case00001
77
+ MAIN Argument values:
78
+ data_root => /workspace/inputs
79
+ organ_type => kidney
80
+ fold => 0
81
+ save_dir => /workspace/outputs
82
+ feature_size => 16
83
+ val_overlap => 0.75
84
+ num_classes => 3
85
+ model => unet
86
+ swin_type => base
87
+ -----------------
88
+ val len 1
89
+ unet
90
+ Use logdir weights
91
+ Total parameters count 4807482
92
+ case_name case00001
93
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
94
+ INFO: Using fakeroot command combined with root-mapped namespace
95
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
96
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
97
+ INFO: unknown argument ignored: lazytime
98
+ unknown argument ignored: xino=on
99
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
100
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
101
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
102
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
103
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
104
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
105
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
106
+ WARNING: There was an error checking the latest version of pip.
107
+ Use pretrained weights
108
+ test len 1
109
+
110
  0%| | 0/1 [00:00<?, ?it/s]['case00002']
111
+ 2024-07-12 16:41:57,917 INFO image_writer.py:190 - writing: /workspace/outputs/case00002/predictions/case00002_liver.nii.gz
112
+ 2024-07-12 16:41:58,310 INFO image_writer.py:190 - writing: /workspace/outputs/case00002/predictions/case00002_pancreas.nii.gz
113
+ 2024-07-12 16:41:58,712 INFO image_writer.py:190 - writing: /workspace/outputs/case00002/predictions/case00002_kidney.nii.gz
114
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
115
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
116
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
117
+ -> for index, batch in enumerate(tqdm(ValLoader)):
118
+ (Pdb)
119
  0%| | 0/1 [00:37<?, ?it/s]
120
+
121
+ Traceback (most recent call last):
122
+ File "organ_mask_access/organ_test.py", line 135, in <module>
123
+ main()
124
+ File "organ_mask_access/organ_test.py", line 132, in main
125
+ validation(model, test_loader, val_transforms, args)
126
+ File "organ_mask_access/organ_test.py", line 30, in validation
127
+ for index, batch in enumerate(tqdm(ValLoader)):
128
+ File "organ_mask_access/organ_test.py", line 30, in validation
129
+ for index, batch in enumerate(tqdm(ValLoader)):
130
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
131
+ return self.dispatch_line(frame)
132
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
133
+ if self.quitting: raise BdbQuit
134
+ bdb.BdbQuit
135
+ MAIN Argument values:
136
+ data_root => /workspace/inputs
137
+ organ_type => liver
138
+ fold => 0
139
+ save_dir => /workspace/outputs
140
+ feature_size => 16
141
+ val_overlap => 0.75
142
+ num_classes => 3
143
+ model => unet
144
+ swin_type => base
145
+ -----------------
146
+ val len 1
147
+ unet
148
+ Use logdir weights
149
+ Total parameters count 4807482
150
+ case_name case00002
151
+ MAIN Argument values:
152
+ data_root => /workspace/inputs
153
+ organ_type => pancreas
154
+ fold => 0
155
+ save_dir => /workspace/outputs
156
+ feature_size => 16
157
+ val_overlap => 0.75
158
+ num_classes => 3
159
+ model => unet
160
+ swin_type => base
161
+ -----------------
162
+ val len 1
163
+ unet
164
+ Use logdir weights
165
+ Total parameters count 4807482
166
+ case_name case00002
167
+ MAIN Argument values:
168
+ data_root => /workspace/inputs
169
+ organ_type => kidney
170
+ fold => 0
171
+ save_dir => /workspace/outputs
172
+ feature_size => 16
173
+ val_overlap => 0.75
174
+ num_classes => 3
175
+ model => unet
176
+ swin_type => base
177
+ -----------------
178
+ val len 1
179
+ unet
180
+ Use logdir weights
181
+ Total parameters count 4807482
182
+ case_name case00002
183
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
184
+ INFO: Using fakeroot command combined with root-mapped namespace
185
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
186
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
187
+ INFO: unknown argument ignored: lazytime
188
+ unknown argument ignored: xino=on
189
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
190
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
191
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
192
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
193
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
194
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
195
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
196
+ WARNING: There was an error checking the latest version of pip.
197
+ Use pretrained weights
198
+ test len 1
199
+
200
  0%| | 0/1 [00:00<?, ?it/s]['case00003']
201
+ 2024-07-12 16:45:24,121 INFO image_writer.py:190 - writing: /workspace/outputs/case00003/predictions/case00003_liver.nii.gz
202
+ 2024-07-12 16:45:24,225 INFO image_writer.py:190 - writing: /workspace/outputs/case00003/predictions/case00003_pancreas.nii.gz
203
+ 2024-07-12 16:45:24,321 INFO image_writer.py:190 - writing: /workspace/outputs/case00003/predictions/case00003_kidney.nii.gz
204
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
205
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
206
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
207
+ -> for index, batch in enumerate(tqdm(ValLoader)):
208
+ (Pdb)
209
  0%| | 0/1 [00:10<?, ?it/s]
210
+
211
+ Traceback (most recent call last):
212
+ File "organ_mask_access/organ_test.py", line 135, in <module>
213
+ main()
214
+ File "organ_mask_access/organ_test.py", line 132, in main
215
+ validation(model, test_loader, val_transforms, args)
216
+ File "organ_mask_access/organ_test.py", line 30, in validation
217
+ for index, batch in enumerate(tqdm(ValLoader)):
218
+ File "organ_mask_access/organ_test.py", line 30, in validation
219
+ for index, batch in enumerate(tqdm(ValLoader)):
220
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
221
+ return self.dispatch_line(frame)
222
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
223
+ if self.quitting: raise BdbQuit
224
+ bdb.BdbQuit
225
+ MAIN Argument values:
226
+ data_root => /workspace/inputs
227
+ organ_type => liver
228
+ fold => 0
229
+ save_dir => /workspace/outputs
230
+ feature_size => 16
231
+ val_overlap => 0.75
232
+ num_classes => 3
233
+ model => unet
234
+ swin_type => base
235
+ -----------------
236
+ val len 1
237
+ unet
238
+ Use logdir weights
239
+ Total parameters count 4807482
240
+ case_name case00003
241
+ MAIN Argument values:
242
+ data_root => /workspace/inputs
243
+ organ_type => pancreas
244
+ fold => 0
245
+ save_dir => /workspace/outputs
246
+ feature_size => 16
247
+ val_overlap => 0.75
248
+ num_classes => 3
249
+ model => unet
250
+ swin_type => base
251
+ -----------------
252
+ val len 1
253
+ unet
254
+ Use logdir weights
255
+ Total parameters count 4807482
256
+ case_name case00003
257
+ MAIN Argument values:
258
+ data_root => /workspace/inputs
259
+ organ_type => kidney
260
+ fold => 0
261
+ save_dir => /workspace/outputs
262
+ feature_size => 16
263
+ val_overlap => 0.75
264
+ num_classes => 3
265
+ model => unet
266
+ swin_type => base
267
+ -----------------
268
+ val len 1
269
+ unet
270
+ Use logdir weights
271
+ Total parameters count 4807482
272
+ case_name case00003
273
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
274
+ INFO: Using fakeroot command combined with root-mapped namespace
275
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
276
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
277
+ INFO: unknown argument ignored: lazytime
278
+ unknown argument ignored: xino=on
279
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
280
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
281
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
282
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
283
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
284
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
285
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
286
+ WARNING: There was an error checking the latest version of pip.
287
+ Use pretrained weights
288
+ test len 1
289
+
290
  0%| | 0/1 [00:00<?, ?it/s]['case00004']
291
+ 2024-07-12 16:46:49,275 INFO image_writer.py:190 - writing: /workspace/outputs/case00004/predictions/case00004_liver.nii.gz
292
+ 2024-07-12 16:46:49,361 INFO image_writer.py:190 - writing: /workspace/outputs/case00004/predictions/case00004_pancreas.nii.gz
293
+ 2024-07-12 16:46:49,442 INFO image_writer.py:190 - writing: /workspace/outputs/case00004/predictions/case00004_kidney.nii.gz
294
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
295
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
296
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
297
+ -> for index, batch in enumerate(tqdm(ValLoader)):
298
+ (Pdb)
299
  0%| | 0/1 [00:09<?, ?it/s]
300
+
301
+ Traceback (most recent call last):
302
+ File "organ_mask_access/organ_test.py", line 135, in <module>
303
+ main()
304
+ File "organ_mask_access/organ_test.py", line 132, in main
305
+ validation(model, test_loader, val_transforms, args)
306
+ File "organ_mask_access/organ_test.py", line 30, in validation
307
+ for index, batch in enumerate(tqdm(ValLoader)):
308
+ File "organ_mask_access/organ_test.py", line 30, in validation
309
+ for index, batch in enumerate(tqdm(ValLoader)):
310
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
311
+ return self.dispatch_line(frame)
312
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
313
+ if self.quitting: raise BdbQuit
314
+ bdb.BdbQuit
315
+ MAIN Argument values:
316
+ data_root => /workspace/inputs
317
+ organ_type => liver
318
+ fold => 0
319
+ save_dir => /workspace/outputs
320
+ feature_size => 16
321
+ val_overlap => 0.75
322
+ num_classes => 3
323
+ model => unet
324
+ swin_type => base
325
+ -----------------
326
+ val len 1
327
+ unet
328
+ Use logdir weights
329
+ Total parameters count 4807482
330
+ case_name case00004
331
+ MAIN Argument values:
332
+ data_root => /workspace/inputs
333
+ organ_type => pancreas
334
+ fold => 0
335
+ save_dir => /workspace/outputs
336
+ feature_size => 16
337
+ val_overlap => 0.75
338
+ num_classes => 3
339
+ model => unet
340
+ swin_type => base
341
+ -----------------
342
+ val len 1
343
+ unet
344
+ Use logdir weights
345
+ Total parameters count 4807482
346
+ case_name case00004
347
+ MAIN Argument values:
348
+ data_root => /workspace/inputs
349
+ organ_type => kidney
350
+ fold => 0
351
+ save_dir => /workspace/outputs
352
+ feature_size => 16
353
+ val_overlap => 0.75
354
+ num_classes => 3
355
+ model => unet
356
+ swin_type => base
357
+ -----------------
358
+ val len 1
359
+ unet
360
+ Use logdir weights
361
+ Total parameters count 4807482
362
+ case_name case00004
363
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
364
+ INFO: Using fakeroot command combined with root-mapped namespace
365
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
366
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
367
+ INFO: unknown argument ignored: lazytime
368
+ unknown argument ignored: xino=on
369
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
370
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
371
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
372
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
373
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
374
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
375
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
376
+ WARNING: There was an error checking the latest version of pip.
377
+ Use pretrained weights
378
+ test len 1
379
+
380
  0%| | 0/1 [00:00<?, ?it/s]['case00005']
381
+ 2024-07-12 16:48:27,374 INFO image_writer.py:190 - writing: /workspace/outputs/case00005/predictions/case00005_liver.nii.gz
382
+ 2024-07-12 16:48:27,609 INFO image_writer.py:190 - writing: /workspace/outputs/case00005/predictions/case00005_pancreas.nii.gz
383
+ 2024-07-12 16:48:27,828 INFO image_writer.py:190 - writing: /workspace/outputs/case00005/predictions/case00005_kidney.nii.gz
384
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
385
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
386
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
387
+ -> for index, batch in enumerate(tqdm(ValLoader)):
388
+ (Pdb)
389
  0%| | 0/1 [00:29<?, ?it/s]
390
+
391
+ Traceback (most recent call last):
392
+ File "organ_mask_access/organ_test.py", line 135, in <module>
393
+ main()
394
+ File "organ_mask_access/organ_test.py", line 132, in main
395
+ validation(model, test_loader, val_transforms, args)
396
+ File "organ_mask_access/organ_test.py", line 30, in validation
397
+ for index, batch in enumerate(tqdm(ValLoader)):
398
+ File "organ_mask_access/organ_test.py", line 30, in validation
399
+ for index, batch in enumerate(tqdm(ValLoader)):
400
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
401
+ return self.dispatch_line(frame)
402
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
403
+ if self.quitting: raise BdbQuit
404
+ bdb.BdbQuit
405
+ MAIN Argument values:
406
+ data_root => /workspace/inputs
407
+ organ_type => liver
408
+ fold => 0
409
+ save_dir => /workspace/outputs
410
+ feature_size => 16
411
+ val_overlap => 0.75
412
+ num_classes => 3
413
+ model => unet
414
+ swin_type => base
415
+ -----------------
416
+ val len 1
417
+ unet
418
+ Use logdir weights
419
+ Total parameters count 4807482
420
+ case_name case00005
421
+ MAIN Argument values:
422
+ data_root => /workspace/inputs
423
+ organ_type => pancreas
424
+ fold => 0
425
+ save_dir => /workspace/outputs
426
+ feature_size => 16
427
+ val_overlap => 0.75
428
+ num_classes => 3
429
+ model => unet
430
+ swin_type => base
431
+ -----------------
432
+ val len 1
433
+ unet
434
+ Use logdir weights
435
+ Total parameters count 4807482
436
+ case_name case00005
437
+ MAIN Argument values:
438
+ data_root => /workspace/inputs
439
+ organ_type => kidney
440
+ fold => 0
441
+ save_dir => /workspace/outputs
442
+ feature_size => 16
443
+ val_overlap => 0.75
444
+ num_classes => 3
445
+ model => unet
446
+ swin_type => base
447
+ -----------------
448
+ val len 1
449
+ unet
450
+ Use logdir weights
451
+ Total parameters count 4807482
452
+ case_name case00005
453
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
454
+ INFO: Using fakeroot command combined with root-mapped namespace
455
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
456
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
457
+ INFO: unknown argument ignored: lazytime
458
+ unknown argument ignored: xino=on
459
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
460
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
461
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
462
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
463
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
464
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
465
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
466
+ WARNING: There was an error checking the latest version of pip.
467
+ Use pretrained weights
468
+ test len 1
469
+
470
  0%| | 0/1 [00:00<?, ?it/s]['case00006']
471
+ 2024-07-12 16:50:57,551 INFO image_writer.py:190 - writing: /workspace/outputs/case00006/predictions/case00006_liver.nii.gz
472
+ 2024-07-12 16:50:57,642 INFO image_writer.py:190 - writing: /workspace/outputs/case00006/predictions/case00006_pancreas.nii.gz
473
+ 2024-07-12 16:50:57,726 INFO image_writer.py:190 - writing: /workspace/outputs/case00006/predictions/case00006_kidney.nii.gz
474
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
475
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
476
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
477
+ -> for index, batch in enumerate(tqdm(ValLoader)):
478
+ (Pdb)
479
  0%| | 0/1 [00:14<?, ?it/s]
480
+
481
+ Traceback (most recent call last):
482
+ File "organ_mask_access/organ_test.py", line 135, in <module>
483
+ main()
484
+ File "organ_mask_access/organ_test.py", line 132, in main
485
+ validation(model, test_loader, val_transforms, args)
486
+ File "organ_mask_access/organ_test.py", line 30, in validation
487
+ for index, batch in enumerate(tqdm(ValLoader)):
488
+ File "organ_mask_access/organ_test.py", line 30, in validation
489
+ for index, batch in enumerate(tqdm(ValLoader)):
490
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
491
+ return self.dispatch_line(frame)
492
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
493
+ if self.quitting: raise BdbQuit
494
+ bdb.BdbQuit
495
+ MAIN Argument values:
496
+ data_root => /workspace/inputs
497
+ organ_type => liver
498
+ fold => 0
499
+ save_dir => /workspace/outputs
500
+ feature_size => 16
501
+ val_overlap => 0.75
502
+ num_classes => 3
503
+ model => unet
504
+ swin_type => base
505
+ -----------------
506
+ val len 1
507
+ unet
508
+ Use logdir weights
509
+ Total parameters count 4807482
510
+ case_name case00006
511
+ MAIN Argument values:
512
+ data_root => /workspace/inputs
513
+ organ_type => pancreas
514
+ fold => 0
515
+ save_dir => /workspace/outputs
516
+ feature_size => 16
517
+ val_overlap => 0.75
518
+ num_classes => 3
519
+ model => unet
520
+ swin_type => base
521
+ -----------------
522
+ val len 1
523
+ unet
524
+ Use logdir weights
525
+ Total parameters count 4807482
526
+ case_name case00006
527
+ MAIN Argument values:
528
+ data_root => /workspace/inputs
529
+ organ_type => kidney
530
+ fold => 0
531
+ save_dir => /workspace/outputs
532
+ feature_size => 16
533
+ val_overlap => 0.75
534
+ num_classes => 3
535
+ model => unet
536
+ swin_type => base
537
+ -----------------
538
+ val len 1
539
+ unet
540
+ Use logdir weights
541
+ Total parameters count 4807482
542
+ case_name case00006
543
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
544
+ INFO: Using fakeroot command combined with root-mapped namespace
545
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
546
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
547
+ INFO: unknown argument ignored: lazytime
548
+ unknown argument ignored: xino=on
549
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
550
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
551
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
552
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
553
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
554
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
555
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
556
+ WARNING: There was an error checking the latest version of pip.
557
+ Use pretrained weights
558
+ test len 1
559
+
560
  0%| | 0/1 [00:00<?, ?it/s]['case00007']
561
+ 2024-07-12 16:52:45,064 INFO image_writer.py:190 - writing: /workspace/outputs/case00007/predictions/case00007_liver.nii.gz
562
+ 2024-07-12 16:52:45,409 INFO image_writer.py:190 - writing: /workspace/outputs/case00007/predictions/case00007_pancreas.nii.gz
563
+ 2024-07-12 16:52:45,770 INFO image_writer.py:190 - writing: /workspace/outputs/case00007/predictions/case00007_kidney.nii.gz
564
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
565
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
566
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
567
+ -> for index, batch in enumerate(tqdm(ValLoader)):
568
+ (Pdb)
569
  0%| | 0/1 [00:32<?, ?it/s]
570
+
571
+ Traceback (most recent call last):
572
+ File "organ_mask_access/organ_test.py", line 135, in <module>
573
+ main()
574
+ File "organ_mask_access/organ_test.py", line 132, in main
575
+ validation(model, test_loader, val_transforms, args)
576
+ File "organ_mask_access/organ_test.py", line 30, in validation
577
+ for index, batch in enumerate(tqdm(ValLoader)):
578
+ File "organ_mask_access/organ_test.py", line 30, in validation
579
+ for index, batch in enumerate(tqdm(ValLoader)):
580
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
581
+ return self.dispatch_line(frame)
582
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
583
+ if self.quitting: raise BdbQuit
584
+ bdb.BdbQuit
585
+ MAIN Argument values:
586
+ data_root => /workspace/inputs
587
+ organ_type => liver
588
+ fold => 0
589
+ save_dir => /workspace/outputs
590
+ feature_size => 16
591
+ val_overlap => 0.75
592
+ num_classes => 3
593
+ model => unet
594
+ swin_type => base
595
+ -----------------
596
+ val len 1
597
+ unet
598
+ Use logdir weights
599
+ Total parameters count 4807482
600
+ case_name case00007
601
+ MAIN Argument values:
602
+ data_root => /workspace/inputs
603
+ organ_type => pancreas
604
+ fold => 0
605
+ save_dir => /workspace/outputs
606
+ feature_size => 16
607
+ val_overlap => 0.75
608
+ num_classes => 3
609
+ model => unet
610
+ swin_type => base
611
+ -----------------
612
+ val len 1
613
+ unet
614
+ Use logdir weights
615
+ Total parameters count 4807482
616
+ case_name case00007
617
+ MAIN Argument values:
618
+ data_root => /workspace/inputs
619
+ organ_type => kidney
620
+ fold => 0
621
+ save_dir => /workspace/outputs
622
+ feature_size => 16
623
+ val_overlap => 0.75
624
+ num_classes => 3
625
+ model => unet
626
+ swin_type => base
627
+ -----------------
628
+ val len 1
629
+ unet
630
+ Use logdir weights
631
+ Total parameters count 4807482
632
+ case_name case00007
633
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
634
+ INFO: Using fakeroot command combined with root-mapped namespace
635
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
636
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
637
+ INFO: unknown argument ignored: lazytime
638
+ unknown argument ignored: xino=on
639
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
640
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
641
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
642
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
643
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
644
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
645
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
646
+ WARNING: There was an error checking the latest version of pip.
647
+ Use pretrained weights
648
+ test len 1
649
+
650
  0%| | 0/1 [00:00<?, ?it/s]['case00008']
651
+ 2024-07-12 16:56:26,335 INFO image_writer.py:190 - writing: /workspace/outputs/case00008/predictions/case00008_liver.nii.gz
652
+ 2024-07-12 16:56:26,507 INFO image_writer.py:190 - writing: /workspace/outputs/case00008/predictions/case00008_pancreas.nii.gz
653
+ 2024-07-12 16:56:26,678 INFO image_writer.py:190 - writing: /workspace/outputs/case00008/predictions/case00008_kidney.nii.gz
654
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
655
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
656
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
657
+ -> for index, batch in enumerate(tqdm(ValLoader)):
658
+ (Pdb)
659
  0%| | 0/1 [00:22<?, ?it/s]
660
+
661
+ Traceback (most recent call last):
662
+ File "organ_mask_access/organ_test.py", line 135, in <module>
663
+ main()
664
+ File "organ_mask_access/organ_test.py", line 132, in main
665
+ validation(model, test_loader, val_transforms, args)
666
+ File "organ_mask_access/organ_test.py", line 30, in validation
667
+ for index, batch in enumerate(tqdm(ValLoader)):
668
+ File "organ_mask_access/organ_test.py", line 30, in validation
669
+ for index, batch in enumerate(tqdm(ValLoader)):
670
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
671
+ return self.dispatch_line(frame)
672
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
673
+ if self.quitting: raise BdbQuit
674
+ bdb.BdbQuit
675
+ MAIN Argument values:
676
+ data_root => /workspace/inputs
677
+ organ_type => liver
678
+ fold => 0
679
+ save_dir => /workspace/outputs
680
+ feature_size => 16
681
+ val_overlap => 0.75
682
+ num_classes => 3
683
+ model => unet
684
+ swin_type => base
685
+ -----------------
686
+ val len 1
687
+ unet
688
+ Use logdir weights
689
+ Total parameters count 4807482
690
+ case_name case00008
691
+ MAIN Argument values:
692
+ data_root => /workspace/inputs
693
+ organ_type => pancreas
694
+ fold => 0
695
+ save_dir => /workspace/outputs
696
+ feature_size => 16
697
+ val_overlap => 0.75
698
+ num_classes => 3
699
+ model => unet
700
+ swin_type => base
701
+ -----------------
702
+ val len 1
703
+ unet
704
+ Use logdir weights
705
+ Total parameters count 4807482
706
+ case_name case00008
707
+ MAIN Argument values:
708
+ data_root => /workspace/inputs
709
+ organ_type => kidney
710
+ fold => 0
711
+ save_dir => /workspace/outputs
712
+ feature_size => 16
713
+ val_overlap => 0.75
714
+ num_classes => 3
715
+ model => unet
716
+ swin_type => base
717
+ -----------------
718
+ val len 1
719
+ unet
720
+ Use logdir weights
721
+ Total parameters count 4807482
722
+ case_name case00008
723
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
724
+ INFO: Using fakeroot command combined with root-mapped namespace
725
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
726
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
727
+ INFO: unknown argument ignored: lazytime
728
+ unknown argument ignored: xino=on
729
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
730
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
731
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
732
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
733
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
734
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
735
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
736
+ WARNING: There was an error checking the latest version of pip.
737
+ Use pretrained weights
738
+ test len 1
739
+
740
  0%| | 0/1 [00:00<?, ?it/s]['case00009']
741
+ 2024-07-12 16:58:50,429 INFO image_writer.py:190 - writing: /workspace/outputs/case00009/predictions/case00009_liver.nii.gz
742
+ 2024-07-12 16:58:50,779 INFO image_writer.py:190 - writing: /workspace/outputs/case00009/predictions/case00009_pancreas.nii.gz
743
+ 2024-07-12 16:58:51,124 INFO image_writer.py:190 - writing: /workspace/outputs/case00009/predictions/case00009_kidney.nii.gz
744
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
745
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
746
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
747
+ -> for index, batch in enumerate(tqdm(ValLoader)):
748
+ (Pdb)
749
  0%| | 0/1 [00:37<?, ?it/s]
750
+
751
+ Traceback (most recent call last):
752
+ File "organ_mask_access/organ_test.py", line 135, in <module>
753
+ main()
754
+ File "organ_mask_access/organ_test.py", line 132, in main
755
+ validation(model, test_loader, val_transforms, args)
756
+ File "organ_mask_access/organ_test.py", line 30, in validation
757
+ for index, batch in enumerate(tqdm(ValLoader)):
758
+ File "organ_mask_access/organ_test.py", line 30, in validation
759
+ for index, batch in enumerate(tqdm(ValLoader)):
760
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
761
+ return self.dispatch_line(frame)
762
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
763
+ if self.quitting: raise BdbQuit
764
+ bdb.BdbQuit
765
+ MAIN Argument values:
766
+ data_root => /workspace/inputs
767
+ organ_type => liver
768
+ fold => 0
769
+ save_dir => /workspace/outputs
770
+ feature_size => 16
771
+ val_overlap => 0.75
772
+ num_classes => 3
773
+ model => unet
774
+ swin_type => base
775
+ -----------------
776
+ val len 1
777
+ unet
778
+ Use logdir weights
779
+ Total parameters count 4807482
780
+ case_name case00009
781
+ MAIN Argument values:
782
+ data_root => /workspace/inputs
783
+ organ_type => pancreas
784
+ fold => 0
785
+ save_dir => /workspace/outputs
786
+ feature_size => 16
787
+ val_overlap => 0.75
788
+ num_classes => 3
789
+ model => unet
790
+ swin_type => base
791
+ -----------------
792
+ val len 1
793
+ unet
794
+ Use logdir weights
795
+ Total parameters count 4807482
796
+ case_name case00009
797
+ MAIN Argument values:
798
+ data_root => /workspace/inputs
799
+ organ_type => kidney
800
+ fold => 0
801
+ save_dir => /workspace/outputs
802
+ feature_size => 16
803
+ val_overlap => 0.75
804
+ num_classes => 3
805
+ model => unet
806
+ swin_type => base
807
+ -----------------
808
+ val len 1
809
+ unet
810
+ Use logdir weights
811
+ Total parameters count 4807482
812
+ case_name case00009
813
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
814
+ INFO: Using fakeroot command combined with root-mapped namespace
815
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
816
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-20a518b1-6085-00e6-5eab-26662b6544db] from parent process environment
817
+ INFO: unknown argument ignored: lazytime
818
+ unknown argument ignored: xino=on
819
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
820
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
821
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
822
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
823
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
824
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
825
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
826
+ WARNING: There was an error checking the latest version of pip.
827
+ Use pretrained weights
828
+ test len 1
829
+
830
  0%| | 0/1 [00:00<?, ?it/s]['case00010']
831
+ 2024-07-12 17:02:28,247 INFO image_writer.py:190 - writing: /workspace/outputs/case00010/predictions/case00010_liver.nii.gz
832
+ 2024-07-12 17:02:28,398 INFO image_writer.py:190 - writing: /workspace/outputs/case00010/predictions/case00010_pancreas.nii.gz
833
+ 2024-07-12 17:02:28,537 INFO image_writer.py:190 - writing: /workspace/outputs/case00010/predictions/case00010_kidney.nii.gz
834
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
835
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
836
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
837
+ -> for index, batch in enumerate(tqdm(ValLoader)):
838
+ (Pdb)
839
  0%| | 0/1 [00:22<?, ?it/s]
840
+
841
+ Traceback (most recent call last):
842
+ File "organ_mask_access/organ_test.py", line 135, in <module>
843
+ main()
844
+ File "organ_mask_access/organ_test.py", line 132, in main
845
+ validation(model, test_loader, val_transforms, args)
846
+ File "organ_mask_access/organ_test.py", line 30, in validation
847
+ for index, batch in enumerate(tqdm(ValLoader)):
848
+ File "organ_mask_access/organ_test.py", line 30, in validation
849
+ for index, batch in enumerate(tqdm(ValLoader)):
850
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
851
+ return self.dispatch_line(frame)
852
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
853
+ if self.quitting: raise BdbQuit
854
+ bdb.BdbQuit
855
+ MAIN Argument values:
856
+ data_root => /workspace/inputs
857
+ organ_type => liver
858
+ fold => 0
859
+ save_dir => /workspace/outputs
860
+ feature_size => 16
861
+ val_overlap => 0.75
862
+ num_classes => 3
863
+ model => unet
864
+ swin_type => base
865
+ -----------------
866
+ val len 1
867
+ unet
868
+ Use logdir weights
869
+ Total parameters count 4807482
870
+ case_name case00010
871
+ MAIN Argument values:
872
+ data_root => /workspace/inputs
873
+ organ_type => pancreas
874
+ fold => 0
875
+ save_dir => /workspace/outputs
876
+ feature_size => 16
877
+ val_overlap => 0.75
878
+ num_classes => 3
879
+ model => unet
880
+ swin_type => base
881
+ -----------------
882
+ val len 1
883
+ unet
884
+ Use logdir weights
885
+ Total parameters count 4807482
886
+ case_name case00010
887
+ MAIN Argument values:
888
+ data_root => /workspace/inputs
889
+ organ_type => kidney
890
+ fold => 0
891
+ save_dir => /workspace/outputs
892
+ feature_size => 16
893
+ val_overlap => 0.75
894
+ num_classes => 3
895
+ model => unet
896
+ swin_type => base
897
+ -----------------
898
+ val len 1
899
+ unet
900
+ Use logdir weights
901
+ Total parameters count 4807482
902
+ case_name case00010
DiffTumorNew.sh ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ #PBS -l select=1:ncpus=10:ngpus=1
3
+ #PBS -l walltime=00:15:00
4
+ #PBS -j oe
5
+ #PBS -N DiffTumor
6
+ #PBS -q debug
7
+
8
+ module load nvhpc-hpcx-cuda11/23.5
9
+ module load go-1.19.4/singularity-1.1.8
10
+
11
+ cd /work/psalvador
12
+ output_file="DiffTumordb.txt"
13
+ echo "0"> "$output_file"
14
+
15
+ #Number of processes per node to launch
16
+ NPROC_PER_NODE=4
17
+ #Number of process in all modes
18
+ WORLD_SIZE=$PBS_NUM_NODES
19
+ MASTER_ADDR=`/bin/hostname -s`
20
+ cat $PBS_NODEFILE>nodelist
21
+ #Make sure this node (MASTER) comes first
22
+ SLAVES=`cat nodelist | grep -v $MASTER_ADDR | uniq`
23
+ #We want names of master and slave nodes
24
+ HOSTLIST="$MASTER_ADDR $SLAVES"
25
+
26
+ #Get free port:
27
+ BASE_PORT=16998
28
+ INCREMENT=1
29
+ port=$BASE_PORT
30
+ isfree=$(netstat -taln | grep $port)
31
+ while [[ -n "$isfree" ]]; do
32
+ port=$[port+INCREMENT]
33
+ isfree=$(netstat -taln | grep $port)
34
+ done
35
+ MASTER_PORT=$port
36
+
37
+ export NCCL_DEBUG=INFO
38
+
39
+ arr=($HOSTLIST)
40
+
41
+ export TORCH_HOME=/fastwork/psalvador/cache
42
+ export TORCHVISION_HOME=/fastwork/psalvador/cache
43
+ #This command to run your pytorch script
44
+
45
+
46
+ export inputs_data=/fastwork/psalvador/JHU/data/QeTOY4UZn3_8TfcZajFaf
47
+ export outputs_data=/fastwork/psalvador/JHU/UCSF/DiffTumor/QeTOY4UZn3_8TfcZajFaf_10
48
+ mkdir -p $outputs_data
49
+
50
+ chmod 644 overlay.img
51
+
52
+ cd /fastwork/psalvador/JHU/UCSF/DiffTumor
53
+ echo "0"> "$output_file"
54
+
55
+ export dir=/fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir
56
+ # Check if the directory exists
57
+ if [ -d "$dir" ]; then
58
+ # If the directory exists, remove it
59
+ rm -rf "$dir"
60
+ echo "Directory $dir has been removed."
61
+ fi
62
+ # Create the directory
63
+ mkdir -p "$dir"
64
+
65
+
66
+ for ct_file in "$inputs_data"/*.nii.gz; do
67
+ if [ -f "$ct_file" ]; then
68
+ cp "$ct_file" "$dir/$(basename "$ct_file")"
69
+ SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity run --fakeroot --overlay /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img --nv -B $dir:/workspace/inputs -B $outputs_data:/workspace/outputs difftumor_final.sif>> "$output_file" 2>&1
70
+ rm "$dir/$(basename "$ct_file")"
71
+ fi
72
+ done
DiffTumorSingle.sh ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ #PBS -l select=1:ncpus=10:ngpus=1
3
+ #PBS -l walltime=23:59:00
4
+ #PBS -j oe
5
+ #PBS -N ADiffTumor
6
+ #PBS -q gpu
7
+
8
+ module load nvhpc-hpcx-cuda11/23.5
9
+ module load go-1.19.4/singularity-1.1.8
10
+
11
+ cd /work/psalvador
12
+ output_file="ADiffTumordb.txt"
13
+ echo "0"> "$output_file"
14
+
15
+ #Number of processes per node to launch
16
+ NPROC_PER_NODE=4
17
+ #Number of process in all modes
18
+ WORLD_SIZE=$PBS_NUM_NODES
19
+ MASTER_ADDR=`/bin/hostname -s`
20
+ cat $PBS_NODEFILE>nodelist
21
+ #Make sure this node (MASTER) comes first
22
+ SLAVES=`cat nodelist | grep -v $MASTER_ADDR | uniq`
23
+ #We want names of master and slave nodes
24
+ HOSTLIST="$MASTER_ADDR $SLAVES"
25
+
26
+ #Get free port:
27
+ BASE_PORT=16998
28
+ INCREMENT=1
29
+ port=$BASE_PORT
30
+ isfree=$(netstat -taln | grep $port)
31
+ while [[ -n "$isfree" ]]; do
32
+ port=$[port+INCREMENT]
33
+ isfree=$(netstat -taln | grep $port)
34
+ done
35
+ MASTER_PORT=$port
36
+
37
+ export NCCL_DEBUG=INFO
38
+
39
+ arr=($HOSTLIST)
40
+
41
+ export TORCH_HOME=/fastwork/psalvador/cache
42
+ export TORCHVISION_HOME=/fastwork/psalvador/cache
43
+ #This command to run your pytorch script
44
+
45
+
46
+ export inputs_data=/fastwork/psalvador/JHU/data/UCSF_remaining/SXz0J6vDWz/SXz0J6vDWz/czfrhBRDVv
47
+ export outputs_data=/fastwork/psalvador/JHU/UCSF/DiffTumor/outputs/SXz0J6vDWz_czfrhBRDVv
48
+
49
+ mkdir -p "$outputs_data"
50
+
51
+ chmod 644 overlay.img
52
+
53
+ cd /fastwork/psalvador/JHU/UCSF/DiffTumor
54
+ echo "0"> "$output_file"
55
+
56
+ export dir=/fastwork/psalvador/JHU/UCSF/DiffTumor/tmp_dir
57
+ # Check if the directory exists
58
+ if [ -d "$dir" ]; then
59
+ # If the directory exists, remove it
60
+ rm -rf "$dir"
61
+ echo "Directory $dir has been removed."
62
+ fi
63
+ # Create the directory
64
+ mkdir -p "$dir"
65
+
66
+
67
+ for ct_file in "$inputs_data"/*.nii.gz; do
68
+ if [ -f "$ct_file" ]; then
69
+ cp "$ct_file" "$dir/$(basename "$ct_file")"
70
+ SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity run --fakeroot --overlay /fastwork/psalvador/JHU/UCSF/DiffTumor/overlay.img --nv -B $dir:/workspace/inputs -B $outputs_data:/workspace/outputs difftumor_final.sif>> "$output_file" 2>&1
71
+ rm "$dir/$(basename "$ct_file")"
72
+ fi
73
+ done
DiffTumorUCSFTest.sh ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ module load go-1.19.4/singularity-1.1.8
3
+
4
+ parts=$1
5
+ part=$2
6
+ GPU=$3
7
+
8
+ cd /fastwork/psalvador/JHU/UCSF/DiffTumor/
9
+ CONVERTED=/fastwork/psalvador/JHU/data/Atlas_3_test/
10
+ OUTPUTS=/fastwork/psalvador/JHU/UCSF/DiffTumor/outputs_difftumor_UCSF_test/
11
+ export GPU
12
+
13
+ mkdir -p $OUTPUTS
14
+ logs_file="logs_difftumor_atlas_test.txt"
15
+ echo 0 > $logs_file
16
+
17
+ export SINGULARITYENV_CUDA_VISIBLE_DEVICES=$GPU
18
+ export GPU
19
+
20
+ echo "Arguments received:"
21
+ echo "CONVERTED=$CONVERTED"
22
+ echo "OUTPUTS=$OUTPUTS"
23
+ echo "parts=$parts"
24
+ echo "part=$part"
25
+
26
+ bash RunDifftumor.sh $CONVERTED $OUTPUTS $parts $part #>> "$logs_file" 2>&1
DiffTumordb.txt ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
  0%| | 0/1 [00:00<?, ?it/s]['case00011']
 
 
 
 
 
 
 
 
1
  0%| | 0/1 [00:36<?, ?it/s]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0
2
+ INFO: User not listed in /etc/subuid, trying root-mapped namespace
3
+ INFO: Using fakeroot command combined with root-mapped namespace
4
+ INFO: Environment variable SINGULARITYENV_CUDA_VISIBLE_DEVICES is set, but APPTAINERENV_CUDA_VISIBLE_DEVICES is preferred
5
+ WARNING: Environment variable CUDA_VISIBLE_DEVICES already has value [0], will not forward new value [GPU-01992259-ec22-343e-e192-e276333d5c35] from parent process environment
6
+ INFO: unknown argument ignored: lazytime
7
+ unknown argument ignored: xino=on
8
+ /proc seems to be mounted as readonly, it can lead to unexpected failures
9
+ Requirement already satisfied: connected-components-3d in /workspace/anaconda3/lib/python3.8/site-packages (3.17.0)
10
+ Requirement already satisfied: fastremap in /workspace/anaconda3/lib/python3.8/site-packages (1.14.2)
11
+ Requirement already satisfied: simpleitk in /workspace/anaconda3/lib/python3.8/site-packages (2.1.1.2)
12
+ Requirement already satisfied: numpy in /workspace/anaconda3/lib/python3.8/site-packages (from connected-components-3d) (1.23.0)
13
+ DEPRECATION: pytorch-lightning 1.6.4 has a non-standard dependency specifier torch>=1.8.*. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
14
+ WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
15
+ WARNING: There was an error checking the latest version of pip.
16
+ Use pretrained weights
17
+ test len 1
18
+
19
  0%| | 0/1 [00:00<?, ?it/s]['case00011']
20
+ 2024-07-18 00:30:04,723 INFO image_writer.py:190 - writing: /workspace/outputs/case00011/predictions/case00011_liver.nii.gz
21
+ 2024-07-18 00:30:07,352 INFO image_writer.py:190 - writing: /workspace/outputs/case00011/predictions/case00011_pancreas.nii.gz
22
+ 2024-07-18 00:30:09,941 INFO image_writer.py:190 - writing: /workspace/outputs/case00011/predictions/case00011_kidney.nii.gz
23
+ /workspace/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:1960: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
24
+ warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
25
+ > /workspace/difftumor/organ_mask_access/organ_test.py(30)validation()
26
+ -> for index, batch in enumerate(tqdm(ValLoader)):
27
+ (Pdb)
28
  0%| | 0/1 [00:36<?, ?it/s]
29
+
30
+ Traceback (most recent call last):
31
+ File "organ_mask_access/organ_test.py", line 135, in <module>
32
+ main()
33
+ File "organ_mask_access/organ_test.py", line 132, in main
34
+ validation(model, test_loader, val_transforms, args)
35
+ File "organ_mask_access/organ_test.py", line 30, in validation
36
+ for index, batch in enumerate(tqdm(ValLoader)):
37
+ File "organ_mask_access/organ_test.py", line 30, in validation
38
+ for index, batch in enumerate(tqdm(ValLoader)):
39
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 88, in trace_dispatch
40
+ return self.dispatch_line(frame)
41
+ File "/workspace/anaconda3/lib/python3.8/bdb.py", line 113, in dispatch_line
42
+ if self.quitting: raise BdbQuit
43
+ bdb.BdbQuit
44
+ MAIN Argument values:
45
+ data_root => /workspace/inputs
46
+ organ_type => liver
47
+ fold => 0
48
+ save_dir => /workspace/outputs
49
+ feature_size => 16
50
+ val_overlap => 0.75
51
+ num_classes => 3
52
+ model => unet
53
+ swin_type => base
54
+ -----------------
55
+ val len 1
56
+ unet
57
+ Use logdir weights
58
+ Total parameters count 4807482
59
+ case_name case00011
60
+ MAIN Argument values:
61
+ data_root => /workspace/inputs
62
+ organ_type => pancreas
63
+ fold => 0
64
+ save_dir => /workspace/outputs
65
+ feature_size => 16
66
+ val_overlap => 0.75
67
+ num_classes => 3
68
+ model => unet
69
+ swin_type => base
70
+ -----------------
71
+ val len 1
72
+ unet
73
+ Use logdir weights
74
+ Total parameters count 4807482
75
+ case_name case00011
76
+ MAIN Argument values:
77
+ data_root => /workspace/inputs
78
+ organ_type => kidney
79
+ fold => 0
80
+ save_dir => /workspace/outputs
81
+ feature_size => 16
82
+ val_overlap => 0.75
83
+ num_classes => 3
84
+ model => unet
85
+ swin_type => base
86
+ -----------------
87
+ val len 1
88
+ unet
89
+ Use logdir weights
90
+ Total parameters count 4807482
91
+ case_name case00011
RunDifftumor copy.sh ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Get the path to destination_folder as input
4
+ destination_folder=$1
5
+
6
+ # Set the path for the output folder
7
+ output_folder=$2
8
+
9
+ # Create the output folder if it doesn't exist
10
+ mkdir -p "$output_folder"
11
+
12
+ export NCCL_DEBUG=INFO
13
+
14
+ # cache directories
15
+ export TORCH_HOME=cache
16
+ export TORCHVISION_HOME=cache
17
+
18
+ # Temporary directories for input and output
19
+ export temp_input_dir=tmp_inputs
20
+ export temp_output_dir=tmp_outputs
21
+ mkdir -p "$temp_input_dir"
22
+ mkdir -p "$temp_output_dir"
23
+ mkdir -p "$TORCH_HOME"
24
+ mkdir -p "$TORCHVISION_HOME"
25
+
26
+ # Function to copy and rename files for the segmentation model
27
+ prepare_input_file() {
28
+ local input_file=$1
29
+ local temp_case_file="$temp_input_dir/case00001.nii.gz"
30
+ echo "Copying $input_file to $temp_case_file"
31
+ cp "$input_file" "$temp_case_file"
32
+ if [ $? -ne 0 ]; then
33
+ echo "Failed to copy $input_file to $temp_case_file"
34
+ else
35
+ echo "Successfully copied $input_file to $temp_case_file"
36
+ fi
37
+ }
38
+
39
+ # Function to run the segmentation model
40
+ run_segmentation() {
41
+ echo "Running segmentation model on $temp_input_dir/case00001.nii.gz"
42
+ #print which gpu is being used
43
+ echo "Using GPU: $GPU"
44
+ export PYTHONBREAKPOINT=0
45
+ APPTAINERENV_CUDA_VISIBLE_DEVICES=$GPU singularity run --overlay overlay.img:ro --nv -B $temp_input_dir:/workspace/inputs -B $temp_output_dir:/workspace/outputs difftumor_final.sif
46
+ if [ $? -ne 0 ]; then
47
+ echo "Segmentation model failed on $temp_input_dir/case00001.nii.gz"
48
+ return 1
49
+ else
50
+ echo "Segmentation model succeeded on $temp_input_dir/case00001.nii.gz"
51
+ return 0
52
+ fi
53
+ }
54
+
55
+ # Function to move the results to the final output folder
56
+ move_results() {
57
+ local series_folder=$1
58
+ local output_series_folder="$output_folder/${series_folder#$destination_folder}"
59
+ echo "Moving results to $output_series_folder"
60
+ mkdir -p "$output_series_folder/predictions"
61
+ if [ -f "$temp_output_dir/case00001/ct.nii.gz" ]; then
62
+ echo "Found ct.nii.gz for $series_folder"
63
+ cp "$temp_output_dir/case00001/ct.nii.gz" "$output_series_folder/"
64
+ if [ $? -ne 0 ]; then
65
+ echo "Failed to copy ct.nii.gz for $series_folder"
66
+ else
67
+ echo "Successfully copied ct.nii.gz for $series_folder"
68
+ fi
69
+ else
70
+ echo "No ct.nii.gz file found for $series_folder"
71
+ fi
72
+ if [ -d "$temp_output_dir/case00001/predictions" ]; then
73
+ echo "Found predictions folder for $series_folder"
74
+ cp "$temp_output_dir/case00001/predictions/"* "$output_series_folder/predictions/"
75
+ if [ $? -ne 0 ]; then
76
+ echo "Failed to copy predictions for $series_folder"
77
+ else
78
+ echo "Successfully copied predictions for $series_folder"
79
+ fi
80
+ else
81
+ echo "No predictions folder found for $series_folder"
82
+ fi
83
+ }
84
+
85
+ # Clean up temporary directories
86
+ clean_temp_dirs() {
87
+ echo "Cleaning temporary directories"
88
+ rm -rf "$temp_input_dir"/*
89
+ if [ $? -ne 0 ]; then
90
+ echo "Failed to clean $temp_input_dir"
91
+ else
92
+ echo "Successfully cleaned $temp_input_dir"
93
+ fi
94
+ rm -rf "$temp_output_dir"/*
95
+ if [ $? -ne 0 ]; then
96
+ echo "Failed to clean $temp_output_dir"
97
+ else
98
+ echo "Successfully cleaned $temp_output_dir"
99
+ fi
100
+ }
101
+
102
+ # Find all .nii.gz files and store them in an array
103
+ mapfile -t ct_files < <(find "$destination_folder" -type f -name "ct.nii.gz")
104
+
105
+ # Print the number of files found
106
+ echo "Found ${#ct_files[@]} .nii.gz files"
107
+ #print first 10 files
108
+ echo "First 10 files: ${ct_files[@]:0:10}"
109
+
110
+
111
+ # Process each .nii.gz file in the array
112
+ for ct_file in "${ct_files[@]}"; do
113
+ if [ -f "$ct_file" ]; then
114
+ series_folder=$(dirname "$ct_file")
115
+ echo "Processing $ct_file in $series_folder"
116
+ prepare_input_file "$ct_file"
117
+ run_segmentation
118
+ if [ $? -ne 0 ]; then
119
+ echo "Skipping $ct_file due to segmentation error"
120
+ continue
121
+ fi
122
+ move_results "$series_folder"
123
+ clean_temp_dirs
124
+ fi
125
+ done
126
+
127
+ # Final cleanup
128
+ echo "Final cleanup"
129
+ rm -rf "$temp_input_dir"
130
+ rm -rf "$temp_output_dir"
logs_difftumor_atlas_test.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6a67a2d70af5cdc10db27561cbe6762569f1a555ff32fe1378421dcf56dac4e
3
+ size 309301
my_container_sandbox/.exec ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ for script in /.singularity.d/env/*.sh; do
4
+ if [ -f "$script" ]; then
5
+ . "$script"
6
+ fi
7
+ done
8
+
9
+ exec "$@"
my_container_sandbox/.run ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ for script in /.singularity.d/env/*.sh; do
4
+ if [ -f "$script" ]; then
5
+ . "$script"
6
+ fi
7
+ done
8
+
9
+ if test -n "${SINGULARITY_APPNAME:-}"; then
10
+
11
+ if test -x "/scif/apps/${SINGULARITY_APPNAME:-}/scif/runscript"; then
12
+ exec "/scif/apps/${SINGULARITY_APPNAME:-}/scif/runscript" "$@"
13
+ else
14
+ echo "No Singularity runscript for contained app: ${SINGULARITY_APPNAME:-}"
15
+ exit 1
16
+ fi
17
+
18
+ elif test -x "/.singularity.d/runscript"; then
19
+ exec "/.singularity.d/runscript" "$@"
20
+ else
21
+ echo "No Singularity runscript found, executing /bin/sh"
22
+ exec /bin/sh "$@"
23
+ fi