Skip to content

Commit

Permalink
multiprocessing set_start_method spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Fitzjalen authored and Roman Fitzjalen committed Jun 16, 2024
1 parent 9e1944d commit 839ce5c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,13 @@ ENV/

trains/
.nnunetv2-venv/
.venv_s3/
sanbox.ipynb
!documentation/assets/scribble_example.png
# s3 files
config.yaml
train_s3.sh
build-and-push.yc.sh
Dockerfile
.dockerignore
s3_logs_[0-3][0-9].[0-1][0-9].[0-9][0-9][0-9][0-9]-[0-2][0-9]:[0-5][0-9]:[0-5][0-9]/
2 changes: 2 additions & 0 deletions nnunetv2/run/run_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from nnunetv2.utilities.find_class_by_name import recursive_find_python_class
from torch.backends import cudnn

multiprocessing.set_start_method('spawn') # FOR CLUSTER TRAIN


def find_free_network_port() -> int:
"""Finds a free port on localhost.
Expand Down
1 change: 1 addition & 0 deletions nnunetv2/training/dataloading/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from batchgenerators.utilities.file_and_folder_operations import isfile, subfiles
from nnunetv2.configuration import default_num_processes

multiprocessing.set_start_method('spawn') # FOR CLUSTER TRAIN

def _convert_to_npy(npz_file: str, unpack_segmentation: bool = True, overwrite_existing: bool = False,
verify_npy: bool = False, fail_ctr: int = 0) -> None:
Expand Down
Empty file modified scripts/train.sh
100644 → 100755
Empty file.

0 comments on commit 839ce5c

Please sign in to comment.