Skip to content

Commit

Permalink
remove pathos in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
weixuanfu2016 committed Mar 31, 2017
1 parent aea3bba commit 19f3196
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 71 deletions.
1 change: 0 additions & 1 deletion ci/.travis_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ fi

pip install update_checker
pip install tqdm
pip install pathos

if [[ "$COVERAGE" == "true" ]]; then
pip install coverage coveralls
Expand Down
1 change: 0 additions & 1 deletion ci/.travis_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ python -c "import deap; print('deap %s' % deap.__version__)"
python -c "import xgboost; print('xgboost %s ' % xgboost.__version__)"
python -c "import update_checker; print('update_checker %s ' % update_checker.__version__)"
python -c "import tqdm; print('tqdm %s' % tqdm.__version__)"
python -c "import pathos; print('pathos %s' % pathos.__version__)"

if [[ "$COVERAGE" == "true" ]]; then
nosetests -s -v --with-coverage
Expand Down
107 changes: 52 additions & 55 deletions docs/installing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="author" content="Randal S. Olson">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>Installation - TPOT</title>
Expand All @@ -14,25 +14,25 @@
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css">

<script>
// Current page data
var mkdocs_page_name = "Installation";
var mkdocs_page_input_path = "installing.md";
var mkdocs_page_url = "/installing/";
</script>

<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="../js/highlight.pack.js"></script>
<script type="text/javascript" src="../js/highlight.pack.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

<div class="wy-grid-for-nav">


<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> TPOT</a>
Expand All @@ -45,86 +45,86 @@

<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">


<li class="toctree-l1">

<a class="" href="..">Home</a>
</li>

<li class="toctree-l1 current">

<a class="current" href="./">Installation</a>
<ul class="subnav">

</ul>
</li>

<li class="toctree-l1">

<a class="" href="../using/">Using TPOT</a>
</li>

<li class="toctree-l1">

<a class="" href="../examples/">Examples</a>
</li>

<li class="toctree-l1">

<a class="" href="../contributing/">Contributing</a>
</li>

<li class="toctree-l1">

<a class="" href="../releases/">Release Notes</a>
</li>

<li class="toctree-l1">

<a class="" href="../citing/">Citing</a>
</li>

<li class="toctree-l1">

<a class="" href="../support/">Support</a>
</li>

</ul>
</div>
&nbsp;
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">


<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">TPOT</a>
</nav>


<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> &raquo;</li>



<li>Installation</li>
<li class="wy-breadcrumbs-aside">

<a href="https://github.com/rhiever/tpot/edit/master/docs_sources/installing.md"
class="icon icon-github"> Edit on GitHub</a>

</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">

<p>TPOT is built on top of several existing Python libraries, including:</p>
<ul>
<li>
Expand All @@ -145,17 +145,14 @@
<li>
<p>tqdm</p>
</li>
<li>
<p>Pathos</p>
</li>
</ul>
<p>Most of the necessary Python packages can be installed via the <a href="https://www.continuum.io/downloads">Anaconda Python distribution</a>, which we strongly recommend that you use. We also strongly recommend that you use of Python 3 over Python 2 if you're given the choice.</p>
<p>NumPy, SciPy, and scikit-learn can be installed in Anaconda via the command:</p>
<pre><code class="Shell">conda install numpy scipy scikit-learn
</code></pre>

<p>DEAP, update_checker, tqdm (used for verbose TPOT runs), and Pathos can be installed with <code>pip</code> via the command:</p>
<pre><code class="Shell">pip install deap update_checker tqdm pathos
<p>DEAP, update_checker and tqdm (used for verbose TPOT runs) can be installed with <code>pip</code> via the command:</p>
<pre><code class="Shell">pip install deap update_checker tqdm
</code></pre>

<p><strong>For the Windows OS</strong>, the pywin32 module is required if the Python is NOT installed via <a href="https://www.continuum.io/downloads">Anaconda Python distribution</a> and can be installed with <code>pip</code> via the command:</p>
Expand All @@ -172,51 +169,51 @@
</code></pre>

<p>Please <a href="https://github.com/rhiever/tpot/issues/new">file a new issue</a> if you run into installation problems.</p>

</div>
</div>
<footer>

<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">

<a href="../using/" class="btn btn-neutral float-right" title="Using TPOT">Next <span class="icon icon-circle-arrow-right"></span></a>


<a href=".." class="btn btn-neutral" title="Home"><span class="icon icon-circle-arrow-left"></span> Previous</a>

</div>


<hr/>

<div role="contentinfo">
<!-- Copyright etc -->

<p>Copyright &copy; 2015-Present <a href="http://www.randalolson.com">Randal S. Olson</a></p>

</div>

Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>

</div>
</div>

</section>

</div>

<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">

<a href="https://github.com/rhiever/tpot" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>


<span><a href=".." style="color: #fcfcfc;">&laquo; Previous</a></span>


<span style="margin-left: 15px"><a href="../using/" style="color: #fcfcfc">Next &raquo;</a></span>

</span>
</div>
<script src="../js/theme.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions docs/mkdocs/search_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
{
"location": "/installing/",
"text": "TPOT is built on top of several existing Python libraries, including:\n\n\n\n\n\n\nNumPy\n\n\n\n\n\n\nSciPy\n\n\n\n\n\n\nscikit-learn\n\n\n\n\n\n\nDEAP\n\n\n\n\n\n\nupdate_checker\n\n\n\n\n\n\ntqdm\n\n\n\n\n\n\nPathos\n\n\n\n\n\n\nMost of the necessary Python packages can be installed via the \nAnaconda Python distribution\n, which we strongly recommend that you use. We also strongly recommend that you use of Python 3 over Python 2 if you're given the choice.\n\n\nNumPy, SciPy, and scikit-learn can be installed in Anaconda via the command:\n\n\nconda install numpy scipy scikit-learn\n\n\n\n\nDEAP, update_checker, tqdm (used for verbose TPOT runs), and Pathos can be installed with \npip\n via the command:\n\n\npip install deap update_checker tqdm pathos\n\n\n\n\nFor the Windows OS\n, the pywin32 module is required if the Python is NOT installed via \nAnaconda Python distribution\n and can be installed with \npip\n via the command:\n\n\npip install pywin32\n\n\n\n\nOptionally\n, install XGBoost if you would like TPOT to use XGBoost. XGBoost is entirely optional, and TPOT will still function normally without XGBoost if you do not have it installed.\n\n\npip install xgboost\n\n\n\n\nIf you have issues installing XGBoost, check the \nXGBoost installation documentation\n.\n\n\nFinally to install TPOT itself, run the following command:\n\n\npip install tpot\n\n\n\n\nPlease \nfile a new issue\n if you run into installation problems.",
"text": "TPOT is built on top of several existing Python libraries, including:\n\n\n\n\n\n\nNumPy\n\n\n\n\n\n\nSciPy\n\n\n\n\n\n\nscikit-learn\n\n\n\n\n\n\nDEAP\n\n\n\n\n\n\nupdate_checker\n\n\n\n\n\n\ntqdm\n\n\n\n\n\n\nMost of the necessary Python packages can be installed via the \nAnaconda Python distribution\n, which we strongly recommend that you use. We also strongly recommend that you use of Python 3 over Python 2 if you're given the choice.\n\n\nNumPy, SciPy, and scikit-learn can be installed in Anaconda via the command:\n\n\nconda install numpy scipy scikit-learn\n\n\n\n\nDEAP, update_checker and tqdm (used for verbose TPOT runs) can be installed with \npip\n via the command:\n\n\npip install deap update_checker tqdm\n\n\n\n\nFor the Windows OS\n, the pywin32 module is required if the Python is NOT installed via \nAnaconda Python distribution\n and can be installed with \npip\n via the command:\n\n\npip install pywin32\n\n\n\n\nOptionally\n, install XGBoost if you would like TPOT to use XGBoost. XGBoost is entirely optional, and TPOT will still function normally without XGBoost if you do not have it installed.\n\n\npip install xgboost\n\n\n\n\nIf you have issues installing XGBoost, check the \nXGBoost installation documentation\n.\n\n\nFinally to install TPOT itself, run the following command:\n\n\npip install tpot\n\n\n\n\nPlease \nfile a new issue\n if you run into installation problems.",
"title": "Installation"
},
{
Expand Down Expand Up @@ -141,4 +141,4 @@
"title": "Support"
}
]
}
}
5 changes: 2 additions & 3 deletions docs_sources/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ TPOT is built on top of several existing Python libraries, including:

* tqdm

* Pathos

Most of the necessary Python packages can be installed via the [Anaconda Python distribution](https://www.continuum.io/downloads), which we strongly recommend that you use. We also strongly recommend that you use of Python 3 over Python 2 if you're given the choice.

Expand All @@ -22,10 +21,10 @@ NumPy, SciPy, and scikit-learn can be installed in Anaconda via the command:
conda install numpy scipy scikit-learn
```

DEAP, update_checker, tqdm (used for verbose TPOT runs), and Pathos can be installed with `pip` via the command:
DEAP, update_checker and tqdm (used for verbose TPOT runs) can be installed with `pip` via the command:

```Shell
pip install deap update_checker tqdm pathos
pip install deap update_checker tqdm
```

**For the Windows OS**, the pywin32 module is required if the Python is NOT installed via [Anaconda Python distribution](https://www.continuum.io/downloads) and can be installed with `pip` via the command:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def calculate_version():
This project is hosted at https://github.com/rhiever/tpot
''',
zip_safe=True,
install_requires=['numpy', 'scipy', 'scikit-learn>=0.18.1', 'deap', 'update_checker', 'tqdm', 'pathos'],
install_requires=['numpy', 'scipy', 'scikit-learn>=0.18.1', 'deap', 'update_checker', 'tqdm'],
extras_require={'xgboost': ['xgboost']},
classifiers=[
'Intended Audience :: Science/Research',
Expand Down
10 changes: 2 additions & 8 deletions tpot/gp_deap.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,6 @@ def mutNodeReplacement(individual, pset):
return individual,


def convert_mins_to_secs(time_minute):
"""Convert time from minutes to seconds"""
# time limit should be at least 1 second
return max(int(time_minute * 60), 1)


class Interruptable_cross_val_score(threading.Thread):
def __init__(self, *args, **kwargs):
threading.Thread.__init__(self)
Expand All @@ -289,13 +283,13 @@ def run(self):
warnings.simplefilter('ignore')
self.result = cross_val_score(*self.args, **self.kwargs)
except Exception as e:
print(e)
#print(e) # for debug use
pass

def _wrapped_cross_val_score(sklearn_pipeline, features, classes,
cv, scoring_function, sample_weight, max_eval_time_mins):
#sys.tracebacklimit = 0
max_time_seconds = convert_mins_to_secs(max_eval_time_mins)
max_time_seconds = max(int(max_eval_time_mins * 60), 1)
sample_weight_dict = set_sample_weight(sklearn_pipeline.steps, sample_weight)
# build a job for cross_val_score
tmp_it = Interruptable_cross_val_score(clone(sklearn_pipeline), features, classes,
Expand Down

0 comments on commit 19f3196

Please sign in to comment.