Skip to content

Commit

Permalink
Merge pull request #17 from evan-burke/master
Browse files Browse the repository at this point in the history
fix #13
  • Loading branch information
minimaxir authored Apr 5, 2019
2 parents cb26c50 + ae52eb2 commit aba6dbf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
.vscode
.vscode
*.pyc
automl_train/*
automl_results.csv
*checkpoint.ipynb
/automl_tensorflow_*
/automl_xgboost_*
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 aba6dbf

Please sign in to comment.