diff --git a/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/evaluate.py.j2 b/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/evaluate.py.j2 index bc146c9..41bbf5d 100644 --- a/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/evaluate.py.j2 +++ b/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/evaluate.py.j2 @@ -26,7 +26,7 @@ import random from statistics import mean from pathlib import Path from pprint import pformat, pprint -from helpers import run_prediction_processing, listen_to_children_errors +from helpers import run_prediction_processing INPUT_DIRECTORY = Path("/input") OUTPUT_DIRECTORY = Path("/output") @@ -42,9 +42,6 @@ def process(job): report += pformat(job) report += "\n" - # Before we start, ensure we catch any child-process crashes - listen_to_children_errors() - # Firstly, find the location of the results {% for ci in cookiecutter.phase.algorithm_outputs %} {%- set py_slug = ci.slug | replace("-", "_") -%} diff --git a/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py b/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py index b69a06b..de077c6 100644 --- a/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py +++ b/grand_challenge_forge/partials/example-evaluation-method/example-evaluation-method{{cookiecutter._}}/helpers.py @@ -1,6 +1,5 @@ import multiprocessing import os -import signal from concurrent.futures import ProcessPoolExecutor, as_completed from multiprocessing import Manager, Process @@ -154,11 +153,3 @@ def _terminate_child_processes(): os.waitpid(-1, 0) except ChildProcessError: pass # No child processes, that if fine - - -def listen_to_children_errors(): - def handler(*_, **__): - print("A child failed, terminating all other children") - _terminate_child_processes() - - signal.signal(signal.SIGCHLD, handler)