From adc2f5858db0e8c58d5d3ecc5ccd60a9845d64fd Mon Sep 17 00:00:00 2001 From: Michael Heilman Date: Mon, 12 Feb 2018 08:37:08 -0600 Subject: [PATCH 1/3] convert README to rst for pypi --- CONTRIBUTING.md | 2 +- MANIFEST.in | 2 +- README.md | 60 ------------------------------------------ README.rst | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- 5 files changed, 73 insertions(+), 63 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6173f11..3d7faa8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ contributors are expected to adhere to the ## Getting Started 1. Fork it ( https://github.com/civisanalytics/muffnn/fork ). -2. Install it, with the development dependencies. See `README.md`. +2. Install it, with the development dependencies. See `README.rst`. 3. Make sure you are able to run the test suite locally (`py.test muffnn`). 4. Create a feature branch (`git checkout -b my-new-feature`). 5. Make your change. Don't forget tests. diff --git a/MANIFEST.in b/MANIFEST.in index d53e471..3ea5728 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include CHANGELOG.md include LICENSE.txt -include README.md +include README.rst diff --git a/README.md b/README.md deleted file mode 100644 index 5d90fe6..0000000 --- a/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# muffnn - -[scikit-learn](http://scikit-learn.org)-compatible neural network models in implemented in [TensorFlow](https://www.tensorflow.org/) - -# Installation - -Installation with `pip` is recommended: - -```bash -pip install muffnn -``` - -You can install the dependencies via: - -```bash -pip install -r requirements.txt -``` - -If you have trouble installing TensorFlow, see [this page](https://www.tensorflow.org/install/) for more details. - -For development, a few additional dependencies are needed: - -```bash -pip install -r dev-requirements.txt -``` - -# Usage - -Each estimator in the code follows the scikit-learn API. Thus usage follows the scikit-learn conventions: - -```python -from muffnn import MLPClassifier - -X, y = load_some_data() - -mlp = MLPClassifier() -mlp.fit(X, y) - -X_new = load_some_unlabeled_data() -y_pred = mlp.predict(X_new) -``` - -Further, serialization of the TensorFlow graph and data is handled automatically when the object is pickled: - -```python -import pickle - -with open('est.pkl', 'wb') as fp: - pickle.dump(est, fp) -``` - -# Contributing - -See `CONTIBUTING.md` for information about contributing to this project. - -# License - -BSD-3 - -See `LICENSE.txt` for details. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..cfd7440 --- /dev/null +++ b/README.rst @@ -0,0 +1,70 @@ +muffnn +====== + +`scikit-learn `__-compatible neural network +models in implemented in `TensorFlow `__ + +Installation +============ + +Installation with ``pip`` is recommended: + +.. code:: bash + + pip install muffnn + +You can install the dependencies via: + +.. code:: bash + + pip install -r requirements.txt + +If you have trouble installing TensorFlow, see `this +page `__ for more details. + +For development, a few additional dependencies are needed: + +.. code:: bash + + pip install -r dev-requirements.txt + +Usage +===== + +Each estimator in the code follows the scikit-learn API. Thus usage +follows the scikit-learn conventions: + +.. code:: python + + from muffnn import MLPClassifier + + X, y = load_some_data() + + mlp = MLPClassifier() + mlp.fit(X, y) + + X_new = load_some_unlabeled_data() + y_pred = mlp.predict(X_new) + +Further, serialization of the TensorFlow graph and data is handled +automatically when the object is pickled: + +.. code:: python + + import pickle + + with open('est.pkl', 'wb') as fp: + pickle.dump(est, fp) + +Contributing +============ + +See ``CONTIBUTING.md`` for information about contributing to this +project. + +License +======= + +BSD-3 + +See ``LICENSE.txt`` for details. diff --git a/setup.py b/setup.py index 3714c6a..8833eac 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ url='https://github.com/civisanalytics/muffnn', description=('Multilayer Feed-Forward Neural Network (MuFFNN) models with ' 'TensorFlow and scikit-learn'), - long_description=open(os.path.join(THIS_DIR, 'README.md')).read(), + long_description=open(os.path.join(THIS_DIR, 'README.rst')).read(), include_package_data=True, license="BSD-3", install_requires=['numpy', From 1593c5faaca54d11a2c53075e3ed1fefb48ec89d Mon Sep 17 00:00:00 2001 From: Michael Heilman Date: Mon, 12 Feb 2018 11:05:28 -0600 Subject: [PATCH 2/3] require tensorflow ~=1.4.1 since 1.5.0 is causing trouble in py3.6 in travis --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5e8bbae..4abb936 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ numpy~=1.13 scipy~=0.19 scikit-learn~=0.19 six~=1.10 -tensorflow~=1.3 +tensorflow~=1.4.1 mock==2.0.0 ; python_version < '3.0' From bbe9fcdb34bab024056481a10fdf8fb622ce05e9 Mon Sep 17 00:00:00 2001 From: Michael Heilman Date: Mon, 12 Feb 2018 11:14:01 -0600 Subject: [PATCH 3/3] added note to changelog about TF version requirement --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6607a2a..6f9b49d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added support for the `sample_weight` keyword argument to the `fit` method of MLPClassifier and MLPRegressor (#75). +### Changed + +- Switched from requiring TensorFlow 1.x to 1.4.x because 1.5.0 was causing + Travis CI failures with Python 3.6 (#78). ## [2.0.0] - 2018-01-17