Commit 0a7af491 authored by unknown's avatar unknown
Browse files

Merge remote-tracking branch 'remotes/origin/master'

parents bd7c96d5 929fd14b
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -22,15 +22,14 @@ install:
- conda install h5py
- pip install keras
- export KERAS_BACKEND=tensorflow
- conda install seaborn
- conda install six
- conda install dill
- conda install runipy
- conda install ipyparallel
- pip install runipy
- pip install nglview
- conda install -c omnia mdtraj
- python setup.py install
#- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc1-cp27-none-linux_x86_64.whl;
#  -O else export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc1-cp35-cp35m-linux_x86_64.whl;
#  -O fi 
#- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then pip install --ignore-installed --upgrade $TF_BINARY_URL;
#  -O else pip3 install --ignore-installed --upgrade $TF_BINARY_URL;
#  -O fi
- conda install -c https://conda.anaconda.org/jjhelmus tensorflow=0.10.0rc0
script:
- nosetests -v deepchem --nologcapture
+15 −25
Original line number Diff line number Diff line
@@ -30,9 +30,6 @@ Stanford and originally created by [Bharath Ramsundar](http://rbharath.github.io
* [sklearn](https://github.com/scikit-learn/scikit-learn.git)
* [numpy](https://store.continuum.io/cshop/anaconda/)
* [keras](http://keras.io)
* [six](https://pypi.python.org/pypi/six)
* [dill](https://pypi.python.org/pypi/dill)
* [ipyparallel](https://ipyparallel.readthedocs.io/en/latest/)
* [mdtraj](http://mdtraj.org/)
* [tensorflow](https://www.tensorflow.org/)

@@ -80,31 +77,17 @@ Installation from source is the only currently supported format. ```deepchem```
   ```
   See [keras docs](https://keras.io/backend/) for more details and alternate methods of setting backend.

8. `six`
   ```bash
   conda install six
   ```
9. `dill`
    ```bash
    conda install dill
    ```

10. `ipyparallel`
    ```bash
    conda install ipyparallel
    ```

11. `mdtraj`
8. `mdtraj`
   ```bash
   conda install -c omnia mdtraj
   ```
   
12. `scikit-learn`
9. `scikit-learn`
   ```bash
   conda install scikit-learn 
   ```

13. `tensorflow`: Installing `tensorflow` on older versions of Linux (which
10. `tensorflow`: Installing `tensorflow` on older versions of Linux (which
    have glibc < 2.17) can be very challenging. For these older Linux versions,
    contact your local sysadmin to work out a custom installation. If your
    version of Linux is recent, then the following command will work:
@@ -112,12 +95,12 @@ Installation from source is the only currently supported format. ```deepchem```
    conda install -c https://conda.anaconda.org/jjhelmus tensorflow
    ```

14. `h5py`:
11. `h5py`:
    ```
    conda install h5py
    ```

15. `deepchem`: Clone the `deepchem` github repo:
12. `deepchem`: Clone the `deepchem` github repo:
    ```bash
    git clone https://github.com/deepchem/deepchem.git
    ```
@@ -126,7 +109,7 @@ Installation from source is the only currently supported format. ```deepchem```
    python setup.py install
    ```

16. To run test suite, install `nosetests`:
13. To run test suite, install `nosetests`:
    ```bash
    pip install nose --user
    ```
@@ -137,7 +120,7 @@ Installation from source is the only currently supported format. ```deepchem```
    You might need to uninstall a system install of `nosetests` if
    there is a conflict.

17. If installation has been successful, all tests in test suite should pass:
14. If installation has been successful, all tests in test suite should pass:
    ```bash
    nosetests -v deepchem --nologcapture 
    ```
@@ -286,8 +269,11 @@ Scaffold splitting
|Dataset    |Model               |Splitting   |Train score/R2|Valid score/R2|
|-----------|--------------------|------------|--------------|--------------|
|delaney    |MT-NN regression    |Index       |0.773         |0.574         |
|           |graphconv regression|Index       |0.964         |0.829         |
|           |MT-NN regression    |Random      |0.769         |0.591         |
|           |graphconv regression|Random      |0.959         |0.821         |
|           |MT-NN regression    |Scaffold    |0.782         |0.426         |
|           |graphconv regression|Scaffold    |0.976         |0.581         |
|kaggle     |MT-NN regression    |User-defined|0.748         |0.452         |

* General features
@@ -339,7 +325,11 @@ We actively encourage community contributions to DeepChem. The first place to st
Once you've got a sense of how the package works, we encourage the use of Github issues to discuss more complex changes,  raise requests for new features or propose changes to the global architecture of DeepChem. Once consensus is reached on the issue, please submit a PR with proposed modifications. All contributed code to DeepChem will be reviewed by a member of the DeepChem team, so please make sure your code style and documentation style match our guidelines!

### Code Style Guidelines
DeepChem broadly follows the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html). In terms of practical changes, the biggest effect is that all code uses 2-space indents instead of 4-space indents. We encourage new contributors to make use of [pylint](https://www.pylint.org/). Aim for a score of at least 8/10 on contributed files.
DeepChem broadly follows the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html). In terms of practical changes, the biggest effect is that all code uses 2-space indents instead of 4-space indents. We encourage new contributors to make use of [pylint](https://www.pylint.org/) with the following command
```
pylint --disable=invalid-name --indent-string "  " --extension-pkg-whitelist=numpy [file.py]
```
Aim for a score of at least 8/10 on contributed files.

### Documentation Style Guidelines
DeepChem uses [NumPy style documentation](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt). Please follow these conventions when documenting code, since we use [Sphinx+Napoleon](http://www.sphinx-doc.org/en/stable/ext/napoleon.html) to automatically generate docs on [deepchem.io](deepchem.io). 
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ import pandas as pd
import numpy as np
import csv
import numbers
import dill
import tempfile
from rdkit import Chem
import time
@@ -84,6 +83,7 @@ def get_user_specified_features(df, featurizer, verbose=True):
    2) Complex featurization
      -) PDB files for interacting molecules.
    3) User specified featurizations.

  """
  time1 = time.time()
  df[featurizer.feature_fields] = df[featurizer.feature_fields].apply(pd.to_numeric)
+10 −5
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ from __future__ import unicode_literals
import os
import numpy as np
import pandas as pd
import multiprocessing as mp
import random
from functools import partial
from deepchem.utils.save import save_to_disk
@@ -507,8 +506,11 @@ class DiskDataset(Dataset):
            os.path.join(dataset.data_dir, row['X'])))
        y = np.array(load_from_disk(
            os.path.join(dataset.data_dir, row['y'])))
        w = np.array(load_from_disk(
            os.path.join(dataset.data_dir, row['w'])))
        w_filename = os.path.join(dataset.data_dir, row['w'])
        if os.path.exists(w_filename):
            w = np.array(load_from_disk(w_filename))
        else:
            w = np.ones(y.shape)
        ids = np.array(load_from_disk(
            os.path.join(dataset.data_dir, row['ids'])), dtype=object)
        yield (X, y, w, ids)
@@ -725,8 +727,11 @@ class DiskDataset(Dataset):
        os.path.join(self.data_dir, row['X'])))
    y = np.array(load_from_disk(
        os.path.join(self.data_dir, row['y'])))
    w = np.array(load_from_disk(
        os.path.join(self.data_dir, row['w'])))
    w_filename = os.path.join(self.data_dir, row['w'])
    if os.path.exists(w_filename):
        w = np.array(load_from_disk(w_filename))
    else:
        w = np.ones(y.shape)
    ids = np.array(load_from_disk(
        os.path.join(self.data_dir, row['ids'])), dtype=object)
    return (X, y, w, ids)
+0 −2
Original line number Diff line number Diff line
@@ -71,8 +71,6 @@ class Featurizer(object):
    mols = list(mols)
    features = []
    for i, mol in enumerate(mols):
      if verbose and i % log_every_n == 0:
        log("Featurizing %d / %d" % (i, len(mols)))
      if mol is not None:
        features.append(self._featurize(mol))
      else:
Loading