Skip to content

Commit 2544f03

Browse files
check arctic_training_run is in the PATH env var's paths (#275)
1 parent 3b23e51 commit 2544f03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arctic_training_cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
import argparse
18+
import os
1819
import shutil
1920
import textwrap
2021
from pathlib import Path
@@ -54,7 +55,10 @@ def main():
5455
if not args.config.exists():
5556
raise FileNotFoundError(f"Config file {args.config} not found.")
5657

57-
exe_path = shutil.which("arctic_training_run")
58+
runner_name = "arctic_training_run"
59+
exe_path = shutil.which(runner_name)
60+
if exe_path is None:
61+
raise ValueError(f"can't find {runner_name} in paths of env var PATH={os.environ['PATH']}")
5862

5963
ds_runner(
6064
[

0 commit comments

Comments
 (0)