Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #13 #17

Merged
merged 2 commits into from
Apr 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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