Skip to content

Commit

Permalink
work in progress for minimaxir#13 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-burke committed Apr 1, 2019
1 parent 8aa881c commit ae52eb2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion automl_gs/utils_automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import random
import yaml
import os
import shutil
from time import time
from pkg_resources import resource_filename
from tqdm import tqdm, tqdm_notebook
Expand Down Expand Up @@ -288,7 +289,17 @@ def build_subprocess_cmd(csv_path, train_folder):

csv_path_join = os.path.join('..', csv_path)

return ["python3", "model.py",
# Find the python executable
if shutil.which('python3') is not None:
pycmd = shutil.which('python3')
elif shutil.which('python'):
# fall back to regular python, which may be py3
pycmd = shutil.which('python')
else:
# might be a better exception for this
raise Exception("error: unable to locate the python binary for the subprocess call")

return [pycmd, "model.py",
"-d", csv_path_join,
"-m", "train",
"-c", "automl-gs"]
Expand Down

0 comments on commit ae52eb2

Please sign in to comment.