Merge pull request #413 from SheffieldML/devel

appveyor deploy
This commit is contained in:
Max Zwiessele 2016-07-30 11:18:07 +01:00 committed by GitHub
commit ac1fa810a4
7 changed files with 146 additions and 37 deletions

View file

@ -15,7 +15,7 @@ addons:
env: env:
- PYTHON_VERSION=2.7 - PYTHON_VERSION=2.7
- PYTHON_VERSION=3.3 #- PYTHON_VERSION=3.3
- PYTHON_VERSION=3.4 - PYTHON_VERSION=3.4
- PYTHON_VERSION=3.5 - PYTHON_VERSION=3.5

View file

@ -1 +1 @@
__version__ = "1.0.9" __version__ = "1.1.3"

View file

@ -127,28 +127,32 @@ class SparseGPMinibatchTest(unittest.TestCase):
def test_sparsegp_init(self): def test_sparsegp_init(self):
# Test if the different implementations give the exact same likelihood as the full model. # Test if the different implementations give the exact same likelihood as the full model.
# All of the following settings should give the same likelihood and gradients as the full model: # All of the following settings should give the same likelihood and gradients as the full model:
np.random.seed(1234) try:
Z = self.X[np.random.choice(self.X.shape[0], replace=False, size=10)].copy() np.random.seed(1234)
Q = Z.shape[1] Z = self.X[np.random.choice(self.X.shape[0], replace=False, size=10)].copy()
m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=True, stochastic=False) Q = Z.shape[1]
assert(m.checkgrad()) m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=True, stochastic=False)
m.optimize('adadelta', max_iters=10) assert(m.checkgrad())
assert(m.checkgrad()) m.optimize('adadelta', max_iters=10)
assert(m.checkgrad())
m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=True, stochastic=True) m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=True, stochastic=True)
assert(m.checkgrad()) assert(m.checkgrad())
m.optimize('rprop', max_iters=10) m.optimize('rprop', max_iters=10)
assert(m.checkgrad()) assert(m.checkgrad())
m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=False, stochastic=False) m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=False, stochastic=False)
assert(m.checkgrad()) assert(m.checkgrad())
m.optimize('rprop', max_iters=10) m.optimize('rprop', max_iters=10)
assert(m.checkgrad()) assert(m.checkgrad())
m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=False, stochastic=True) m = GPy.models.sparse_gp_minibatch.SparseGPMiniBatch(self.X, self.Y, Z, GPy.kern.RBF(Q)+GPy.kern.Matern32(Q)+GPy.kern.Bias(Q), GPy.likelihoods.Gaussian(), missing_data=False, stochastic=True)
assert(m.checkgrad()) assert(m.checkgrad())
m.optimize('adadelta', max_iters=10) m.optimize('adadelta', max_iters=10)
assert(m.checkgrad()) assert(m.checkgrad())
except ImportError:
from nose import SkipTest
raise SkipTest('climin not installed, skipping stochastic gradients')
def test_predict_missing_data(self): def test_predict_missing_data(self):
m = GPy.models.bayesian_gplvm_minibatch.BayesianGPLVMMiniBatch(self.Y, self.Q, X_variance=False, missing_data=True, stochastic=True, batchsize=self.Y.shape[1]) m = GPy.models.bayesian_gplvm_minibatch.BayesianGPLVMMiniBatch(self.Y, self.Q, X_variance=False, missing_data=True, stochastic=True, batchsize=self.Y.shape[1])

89
appveyor.yml Normal file
View file

@ -0,0 +1,89 @@
environment:
pip_access:
secure: 8/ZjXFwtd1S7ixd7PJOpptupKKEDhm2da/q3unabJ00=
gpy_version: 1.1.3
matrix:
- PYTHON_VERSION: 2.7
MINICONDA: C:\Miniconda-x64
- PYTHON_VERSION: 3.5
MINICONDA: C:\Miniconda35-x64
#configuration:
# - Debug
# - Release
install:
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- "conda create -q -n build-environment python=%PYTHON_VERSION% numpy scipy matplotlib"
- activate build-environment
# We need wheel installed to build wheels
- python -m pip install wheel
# GPy needs paramz
- python -m pip install paramz
- python -m pip install nose-show-skipped
- python -m pip install coverage
- python -m pip install codecov
- python -m pip install twine
- "python setup.py develop"
build: off
test_script:
# Put your test command here.
# If you don't need to build C extensions on 64-bit Python 3.3 or 3.4,
# you can remove "build.cmd" from the front of the command, as it's
# only needed to support those cases.
# Note that you must use the environment variable %PYTHON% to refer to
# the interpreter you're using - Appveyor does not do anything special
# to put the Python evrsion you want to use on PATH.
#- "build.cmd %PYTHON%\\python.exe setup.py test"
- "coverage run travis_tests.py"
after_test:
# This step builds your wheels.
- "python setup.py bdist_wheel bdist_wininst"
- codecov
artifacts:
# bdist_wheel puts your built wheel in the dist directory
- path: dist\*
deploy_script:
- echo [distutils] > %USERPROFILE%\\.pypirc
- echo index-servers = >> %USERPROFILE%\\.pypirc
- echo pypi >> %USERPROFILE%\\.pypirc
- echo test >> %USERPROFILE%\\.pypirc
- echo[
- echo [pypi] >> %USERPROFILE%\\.pypirc
- echo username:maxz >> %USERPROFILE%\\.pypirc
- echo password:%pip_access% >> %USERPROFILE%\\.pypirc
- echo[
- echo [test] >> %USERPROFILE%\\.pypirc
- echo repository:https://testpypi.python.org/pypi >> %USERPROFILE%\\.pypirc
- echo username:maxz >> %USERPROFILE%\\.pypirc
- echo password:%pip_access% >> %USERPROFILE%\\.pypirc
- ps: >-
if ($env:APPVEYOR_REPO_BRANCH -eq 'devel') {
twine upload -r test dist/*
}
elseif ($env:APPVEYOR_REPO_BRANCH -eq 'deploy') {
twine upload dist/*
}
else {
echo not deploying on other branches
}
# deploy:
# - provider: GitHub
# release: GPy-v$(gpy_version)
# description: 'GPy windows install'
# artifact: dist/*.exe # upload wininst to GitHub
# draft: false
# prerelease: false
# on:
# branch: deploy # release from deploy branch only
# appveyor_repo_tag: true # deploy on tag push only

24
codecov.yml Normal file
View file

@ -0,0 +1,24 @@
codecov:
branch: devel
coverage:
precision: 2
round: down
range: "40...100"
status:
project:
default:
target: auto
if_no_uploads: error
patch:
default:
if_no_uploads: error
changes: true
comment:
layout: "header, diff, changes, suggestions"
behavior: default

View file

@ -1,12 +1,11 @@
[bumpversion] [bumpversion]
current_version = 1.0.9 current_version = 1.1.3
tag = False tag = False
commit = True commit = True
[bumpversion:file:GPy/__version__.py] [bumpversion:file:GPy/__version__.py]
[bdist_wheel] [bumpversion:file:appveyor.yml]
universal = 1
[upload_docs] [upload_docs]
upload-dir = doc/build/html upload-dir = doc/build/html

View file

@ -59,14 +59,7 @@ def read_to_rst(fname):
desc = """ desc = """
- `GPy homepage <http://sheffieldml.github.io/GPy/>`_ Please refer to the github homepage for detailed instructions on installation and usage.
- `Tutorial notebooks <http://nbviewer.ipython.org/github/SheffieldML/notebook/blob/master/GPy/index.ipynb>`_
- `User mailing-list <https://lists.shef.ac.uk/sympa/subscribe/gpy-users>`_
- `Developer documentation <http://gpy.readthedocs.org/en/devel/>`_
- `Travis-CI unit-tests <https://travis-ci.org/SheffieldML/GPy>`_
- `License <https://opensource.org/licenses/BSD-3-Clause>`_
For full description and installation instructions please refer to the github page.
""" """
@ -116,6 +109,7 @@ setup(name = 'GPy',
author = read_to_rst('AUTHORS.txt'), author = read_to_rst('AUTHORS.txt'),
author_email = "gpy.authors@gmail.com", author_email = "gpy.authors@gmail.com",
description = ("The Gaussian Process Toolbox"), description = ("The Gaussian Process Toolbox"),
long_description = desc,
license = "BSD 3-clause", license = "BSD 3-clause",
keywords = "machine-learning gaussian-processes kernels", keywords = "machine-learning gaussian-processes kernels",
url = "http://sheffieldml.github.com/GPy/", url = "http://sheffieldml.github.com/GPy/",
@ -154,8 +148,7 @@ setup(name = 'GPy',
include_package_data = True, include_package_data = True,
py_modules = ['GPy.__init__'], py_modules = ['GPy.__init__'],
test_suite = 'GPy.testing', test_suite = 'GPy.testing',
long_description=desc, install_requires = ['numpy>=1.7', 'scipy>=0.16', 'six', 'paramz>=0.5.2'],
install_requires=['numpy>=1.7', 'scipy>=0.16', 'six', 'paramz>=0.5.2'],
extras_require = {'docs':['sphinx'], extras_require = {'docs':['sphinx'],
'optional':['mpi4py', 'optional':['mpi4py',
'ipython>=4.0.0', 'ipython>=4.0.0',