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 _pre_test hanging when generating candidates #1024

Merged
merged 2 commits into from
Feb 24, 2020

Conversation

josepablocam
Copy link

This PR addresses the issue #1023

We added a time out to the pipeline .fit call.

Running the below on the original codebase should hang, while the patched version should complete as expected.

> cat example.py

import tpot
import numpy as np
import pmlb

X, y = pmlb.fetch_data("Hill_Valley_without_noise", return_X_y=True)

clf = tpot.TPOTClassifier(
  max_time_mins=1,
  max_eval_time_mins=1,
  cv=2,
  config_dict={
      'sklearn.decomposition.SparsePCA':{},
      'sklearn.linear_model.LogisticRegression':{},
  },
  verbosity=3,
)

clf.fit(X, y)
timeout 5m python example.py
echo $?

Note that I chose a timeout of 2 seconds in the patch (an arbitrary choice). I leave the choice of this to the maintainers, who are likely to have a better sense of a reasonable value.

Questions:

  • Do the docs need to be updated?
    No

  • Does this PR add new (Python) dependencies?
    No

@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 96.755% when pulling 4bbb622 on josepablocam:proposed-fix into 6efc21e on EpistasisLab:master.

@weixuanfu weixuanfu changed the base branch from master to development February 24, 2020 09:10
@weixuanfu
Copy link
Contributor

Thank you for the PR and it looks good for fixing the issue #1023. I will merge it to dev branch for now and add this patch to next version of TPOT.

@weixuanfu weixuanfu merged commit 09d7645 into EpistasisLab:development Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants