Skip to content

Commit c4df4ac

Browse files
committed
Merge remote-tracking branch 'origin/development' into development
2 parents f3c805e + 27bd9a0 commit c4df4ac

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drevalpy/datasets/curvecurator.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,22 @@ def _exec_curvecurator(output_dir: Path, batched: bool = True):
123123
of configs spefified in <output_dir>/configlist.txt and consecutively executing each
124124
CurveCurator run. If False, run a single CurveCurator run (this can be used for
125125
parallelisation).
126+
:raises RuntimeError: If CurveCurator fails to execute, the error message is printed to stdout and stderr.
126127
"""
127128
if batched:
128129
command = ["CurveCurator", str(output_dir / "configlist.txt"), "--mad", "--batch"]
129130
else:
130131
command = ["CurveCurator", str(output_dir / "config.toml"), "--mad"]
131-
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
132-
process.communicate()
132+
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
133+
stdout, stderr = process.communicate()
134+
135+
if process.returncode != 0:
136+
print("CurveCurator stdout:")
137+
print(stdout)
138+
print("CurveCurator stderr:")
139+
print(stderr)
140+
141+
raise RuntimeError(f"CurveCurator failed with exit code {process.returncode}")
133142

134143

135144
def _calc_ic50(model_params_df: pd.DataFrame):

0 commit comments

Comments
 (0)