Skip to content

Commit f2ac025

Browse files
authored
Merge pull request #156 from kathyxchen/bugfixes-1020
Bugfixes 1020
2 parents 2150182 + 2fb66df commit f2ac025

File tree

13 files changed

+1084
-864
lines changed

13 files changed

+1084
-864
lines changed

docs/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
'sphinx.ext.ifconfig',
3838
'sphinx.ext.viewcode',
3939
'sphinx.ext.napoleon',
40-
'sphinx.ext.intersphinx']
40+
'sphinx.ext.intersphinx',
41+
'sphinx.ext.autosectionlabel',]
4142

4243
intersphinx_mapping = {
4344
'python': ('https://docs.python.org/', None),

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ The Github repository is located `here <https://github.com/FunctionLab/selene>`_
1616

1717
overview/overview
1818
overview/installation
19-
overview/tutorials
2019
overview/cli
20+
overview/tutorials
2121
overview/faq
2222

2323
.. toctree::

docs/source/overview/cli.md

Lines changed: 0 additions & 676 deletions
This file was deleted.

docs/source/overview/cli.rst

Lines changed: 858 additions & 0 deletions
Large diffs are not rendered by default.

docs/source/overview/faq.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/source/overview/faq.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
FAQ and additional resources
3+
============================
4+
5+
Extending Selene
6+
----------------
7+
8+
The main modules that users may want to extend are
9+
10+
11+
* ``selene_sdk.samplers.OnlineSampler``
12+
* ``selene_sdk.samplers.file_samplers.FileSampler``
13+
* ``selene_sdk.sequences.Sequence``
14+
* ``selene_sdk.targets.Target``
15+
16+
Please refer to the documentation for these classes.
17+
If you are encounter a bug or have a feature request, please post to our Github `issues <https://github.com/FunctionLab/selene/issues>`_. E-mail [email protected] if you are interested in being a contributor to Selene.
18+
19+
Join our `Google group <https://groups.google.com/forum/#!forum/selene-sdk>`_ if you have questions about the package, case studies, or model development.
20+
21+
Exporting a Selene-trained model to Kipoi
22+
-----------------------------------------
23+
24+
We have provided an example of how to prepare a model for upload to `Kipoi's model zoo <http://kipoi.org/>`_ using a model trained during case study 2. You can use `this example <https://github.com/FunctionLab/selene/tree/master/manuscript/case2/3_kipoi_export>`_ as a starting point for preparing your own model for Kipoi. We have provided a script that can help to automate parts of the process.
25+
26+
We are also working on an export function that will be built into Selene and accessible through the CLI.
27+
28+
Hyperparameter optimization
29+
---------------------------
30+
31+
Hyperparameter optimization is the process of finding the set of hyperparameters that yields an optimal model against a predefined score (e.g. minimizing a loss function).
32+
Hyperparameters are the variables that govern the training process (i.e. these parameters are constant during training, compared to model parameters which are optimized/"tuned" by the training process itself).
33+
Hyperparameter tuning works by running multiple trials of a single training run with different values for your chosen hyperparameters, set within some specified limit. Some examples of hyperparameters:
34+
35+
36+
* learning rate
37+
* number of hidden units
38+
* convolutional kernel size
39+
40+
You can select hyperparameters yourself (manually) or automatically.
41+
For automatic hyperparameter optimization, you can look into grid search or random search.
42+
43+
Some resources that may be useful:
44+
45+
46+
* `Hyperopt: Distributed Asynchronous Hyper-parameter Optimization <https://github.com/hyperopt/hyperopt>`_
47+
* `skorch: a scikit-learn compatible neural network library that wraps PyTorch <https://github.com/dnouri/skorch>`_
48+
* `Tune: scalable hyperparameter search <https://ray.readthedocs.io/en/latest/tune.html>`_
49+
* `Spearmint <https://github.com/JasperSnoek/spearmint>`_
50+
* `weights & biases <https://www.wandb.com/>`_
51+
* `comet.ml <https://www.comet.ml/>`_
52+
53+
To use hyperparameter optimization on models being developed with Selene, you could implement a method that runs Selene (via a command-line call) with a set of hyperparameters and then monitors the validation performance based on the output to ``selene_sdk.train_model.validation.txt``.

docs/source/overview/installation.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/source/overview/installation.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
Installation
3+
============
4+
5+
Users can clone and build the repository locally or install Selene through conda/pip.
6+
7+
Please use Selene with Python 3.6+.
8+
9+
Install `PyTorch <https://pytorch.org/get-started/locally/>`_. If you have an NVIDIA GPU, install a version of PyTorch that supports it---Selene will run much faster with a discrete GPU.
10+
11+
Installing with Anaconda
12+
------------------------
13+
14+
To install with conda (recommended for Linux users), run the following command in your terminal:
15+
16+
.. code-block::
17+
18+
conda install -c bioconda selene-sdk
19+
20+
Installing selene with pip:
21+
---------------------------
22+
23+
.. code-block:: sh
24+
25+
pip install selene-sdk
26+
27+
Note that we do not recommend pip-installing older versions of Selene (below 0.4.0), as these releases were less stable.
28+
29+
We currently only have a source distribution available for pip-installation. We are looking into releasing wheels in the future.
30+
31+
Installing from source
32+
----------------------
33+
34+
Selene can also be installed from source.
35+
First, download the latest commits from the source repository:
36+
37+
.. code-block::
38+
39+
git clone https://github.com/FunctionLab/selene.git
40+
41+
The ``setup.py`` script requires NumPy, Cython, and setuptools. Please make sure you have these already installed.
42+
43+
If you plan on working in the ``selene`` repository directly, we recommend `setting up a conda environment <https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file>`_ using ``selene-cpu.yml`` or ``selene-gpu.yml`` (if CUDA is enabled on your machine) and activating it.
44+
45+
Selene contains some Cython files. You can build these by running
46+
47+
.. code-block:: sh
48+
49+
python setup.py build_ext --inplace
50+
51+
If you would like to locally install Selene, you can run
52+
53+
.. code-block:: sh
54+
55+
python setup.py install
56+
57+
Additional dependency for running the CLI (versions 0.4.8 and below)
58+
--------------------------------------------------------------------
59+
60+
Please install ``docopt`` before running the command-line script ``selene_cli.py`` provided in the repository.
61+
In newer versions of Selene, the CLI can be run by calling ``python -m selene_sdk`` from anywhere in bash (assuming you have installed the library, through conda/pip/local install - ``python setup.py install``).

docs/source/overview/overview.md

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)