Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

ensemble throwing error of file not found for timeout #18

Closed
geoHeil opened this issue Nov 18, 2017 · 1 comment
Closed

ensemble throwing error of file not found for timeout #18

geoHeil opened this issue Nov 18, 2017 · 1 comment

Comments

@geoHeil
Copy link

geoHeil commented Nov 18, 2017

sigopt_clf.parallel_fit(X_work, y_work, est_timeout=(40 * 60),
    client_token=token)

for the ensemble classifier is throwing:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-10-60218f176dcc> in <module>()
      3 sigopt_clf = SigOptEnsembleClassifier()
      4 sigopt_clf.parallel_fit(X_work, y_work, est_timeout=(40 * 60),
----> 5     client_token=token)

/usr/local/lib/python3.6/site-packages/sigopt_sklearn/ensemble.py in parallel_fit(self, X, y, client_token, est_timeout)
     64         "--X_file", build_args['X_file'], "--y_file", build_args['y_file'],
     65         "--client_token", client_token,
---> 66         "--output_file", build_args['output_file']
     67       ]))
     68     exit_codes = [p.wait() for p in sigopt_procs]

/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
    707                                 c2pread, c2pwrite,
    708                                 errread, errwrite,
--> 709                                 restore_signals, start_new_session)
    710         except:
    711             # Cleanup if the child failed starting.

/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
   1342                         if errno_num == errno.ENOENT:
   1343                             err_msg += ': ' + repr(err_filename)
-> 1344                     raise child_exception_type(errno_num, err_msg, err_filename)
   1345                 raise child_exception_type(err_msg)
   1346 

FileNotFoundError: [Errno 2] No such file or directory: 'timeout': 'timeout'

@alexandraj777
Copy link
Contributor

Hi @geoHeil, sorry for the very very late reply on this. The SigOpt sklearn library uses timeout under the hood to control running some of its jobs. Because the underlying library uses Popen to run the timeout process, if the machine running SigOpt sklearn does not have the timeout utility, the code will manifest in this error.

We've filed an internal error but I don't have an estimate for when this will get fixed. For now, I'd suggest running your code in a linux environment, such as an AWS instance or a Google Collab notebook, which I believe should have timeout installed.

Alternatively, if you're running on a mac, you can install gtimeout through the coreutils library:

$ brew install coreutils

And then alias timeout to gtimeout, by putting the following in your .bashrc or .bash_profile:

alias timeout="gtimeout"

Source: StackOverflow.

@geoHeil geoHeil closed this as completed Jun 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants