From bf552a09f7ba1fff686203aec1e28e09463e95ea Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 13:03:52 +0100 Subject: [PATCH 01/15] Dapid's travis changes There was a conflict and I only had access to the web interface. --- .travis.yml | 58 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index a866cb5a..efe285e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,39 @@ -language: python -python: - - "2.7" +sudo: false + +language: python + +addons: + apt: + packages: + - gfortran + - libatlas-dev + - libatlas-base-dev + - liblapack-dev + +python: + - 2.7 + - 3.3 + - 3.4 -# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors before_install: - #Install a mini version of anaconda such that we can easily install our dependencies - - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh - - chmod +x miniconda.sh - - ./miniconda.sh -b - - export PATH=/home/travis/miniconda/bin:$PATH - - conda update --yes conda - # Workaround for a permissions issue with Travis virtual machine images - # that breaks Python's multiprocessing: - # https://github.com/travis-ci/travis-cookbooks/issues/155 - - sudo rm -rf /dev/shm - - sudo ln -s /run/shm /dev/shm + - uname -a + - free -m + - df -h + - ulimit -a + - pip install -U pip wheel setuptools + - pip install numpy cython nose six matplotlib + - pip install -v -U scipy + - python -V install: - - conda install --yes python=$TRAVIS_PYTHON_VERSION atlas numpy=1.9 scipy=0.16 matplotlib nose sphinx pip nose - #- pip install . - - python setup.py build_ext --inplace - #--use-mirrors - # -# command to run tests, e.g. python setup.py test -script: - - nosetests GPy/testing + - pip install . + +script: + - cd $HOME + - mkdir empty + - cd empty + - nosetests GPy + +cache: + directories: + - $HOME/.cache/pip From 4e479d9db3ab1bbfc5d55f26e200dadaa51a0b23 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 13:08:57 +0100 Subject: [PATCH 02/15] Update .travis.yml --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index efe285e7..2de17d22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ sudo: false +os: + - linux + - osx + language: python addons: @@ -21,7 +25,7 @@ before_install: - df -h - ulimit -a - pip install -U pip wheel setuptools - - pip install numpy cython nose six matplotlib + - pip install numpy nose six - pip install -v -U scipy - python -V From b4d76fc330f4e22f304d41a616d176f02f3fbb11 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 13:50:34 +0100 Subject: [PATCH 03/15] Update .travis.yml --- .travis.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2de17d22..46879f49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,20 +16,18 @@ addons: python: - 2.7 - - 3.3 +# - 3.3 - 3.4 before_install: - - uname -a - - free -m - - df -h - - ulimit -a - - pip install -U pip wheel setuptools - - pip install numpy nose six - - pip install -v -U scipy - - python -V - + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh + - chmod +x miniconda.sh + - ./miniconda.sh -b + - export PATH=/home/travis/miniconda/bin:$PATH + - conda update --yes conda + install: + - conda install --yes python=$TRAVIS_PYTHON_VERSION atlas numpy=1.9 scipy=0.16 matplotlib nose sphinx pip nose - pip install . script: From 5e1ff63d6e29dee466c35a8cc62513c70de314fc Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 13:55:10 +0100 Subject: [PATCH 04/15] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46879f49..ce2733b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ sudo: false os: - linux - - osx - +# - osx + language: python addons: From 85a96de17eb634a16de23557b211ee1a0b73c62f Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 13:56:04 +0100 Subject: [PATCH 05/15] Update __init__.py --- GPy/plotting/matplot_dep/__init__.py | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/GPy/plotting/matplot_dep/__init__.py b/GPy/plotting/matplot_dep/__init__.py index a60b52c2..eb33ccfe 100644 --- a/GPy/plotting/matplot_dep/__init__.py +++ b/GPy/plotting/matplot_dep/__init__.py @@ -1,18 +1,18 @@ # Copyright (c) 2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) -import base_plots -import models_plots -import priors_plots -import variational_plots -import kernel_plots -import dim_reduction_plots -import mapping_plots -import Tango -import visualize -import latent_space_visualizations -import netpbmfile -import inference_plots -import maps -import img_plots -from ssgplvm import SSGPLVM_plot \ No newline at end of file +import .base_plots +import .models_plots +import .priors_plots +import .variational_plots +import .kernel_plots +import .dim_reduction_plots +import .mapping_plots +import .Tango +import .visualize +import .latent_space_visualizations +import .netpbmfile +import .inference_plots +import .maps +import .img_plots +from .ssgplvm import SSGPLVM_plot From 7ef32f461569fa5dbc7220cb343acb55bd512f1b Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 13:59:16 +0100 Subject: [PATCH 06/15] Update __init__.py --- GPy/plotting/matplot_dep/__init__.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/GPy/plotting/matplot_dep/__init__.py b/GPy/plotting/matplot_dep/__init__.py index eb33ccfe..a72e448f 100644 --- a/GPy/plotting/matplot_dep/__init__.py +++ b/GPy/plotting/matplot_dep/__init__.py @@ -1,18 +1,18 @@ # Copyright (c) 2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) -import .base_plots -import .models_plots -import .priors_plots -import .variational_plots -import .kernel_plots -import .dim_reduction_plots -import .mapping_plots -import .Tango -import .visualize -import .latent_space_visualizations -import .netpbmfile -import .inference_plots -import .maps -import .img_plots +from . import base_plots +from . import models_plots +from . import priors_plots +from . import variational_plots +from . import kernel_plots +from . import dim_reduction_plots +from . import mapping_plots +from . import Tango +from . import visualize +from . import latent_space_visualizations +from . import netpbmfile +from . import inference_plots +from . import maps +from . import img_plots from .ssgplvm import SSGPLVM_plot From 67e81ed1228b2b5345a33cb4b729c8f2288e3910 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 13:59:56 +0100 Subject: [PATCH 07/15] Update .travis.yml --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index ce2733b0..0b520aaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,13 @@ os: language: python -addons: - apt: - packages: - - gfortran - - libatlas-dev - - libatlas-base-dev - - liblapack-dev +#addons: +# apt: +# packages: +# - gfortran +# - libatlas-dev +# - libatlas-base-dev +# - liblapack-dev python: - 2.7 From 5e5dc0eac5e1aba1d3f419e4bd9f6ffb9f375d95 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:21:01 +0100 Subject: [PATCH 08/15] Update base_plots.py --- GPy/plotting/matplot_dep/base_plots.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/GPy/plotting/matplot_dep/base_plots.py b/GPy/plotting/matplot_dep/base_plots.py index 45597628..aefb3e8d 100644 --- a/GPy/plotting/matplot_dep/base_plots.py +++ b/GPy/plotting/matplot_dep/base_plots.py @@ -1,13 +1,6 @@ # #Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) - - -try: - #import Tango - from matplotlib import pyplot as pb -except: - pass -import numpy as np +from matplotlib import pyplot as pb def ax_default(fignum, ax): if ax is None: From d876847d69d6333c4117bb1c32a53b6190d8ed68 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:21:29 +0100 Subject: [PATCH 09/15] Update __init__.py --- GPy/plotting/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPy/plotting/__init__.py b/GPy/plotting/__init__.py index 7172543d..d89369ad 100644 --- a/GPy/plotting/__init__.py +++ b/GPy/plotting/__init__.py @@ -2,10 +2,11 @@ # Licensed under the BSD 3-clause license (see LICENSE.txt) try: + import matplotlib from . import matplot_dep except (ImportError, NameError): # Matplotlib not available import warnings warnings.warn(ImportWarning("Matplotlib not available, install newest version of Matplotlib for plotting")) #sys.modules['matplotlib'] = - #sys.modules[__name__+'.matplot_dep'] = ImportWarning("Matplotlib not available, install newest version of Matplotlib for plotting") \ No newline at end of file + #sys.modules[__name__+'.matplot_dep'] = ImportWarning("Matplotlib not available, install newest version of Matplotlib for plotting") From 5bc2370363eecddb9238e485d59e9507f83f26e1 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:23:08 +0100 Subject: [PATCH 10/15] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b520aaf..6def2656 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,10 +24,10 @@ before_install: - chmod +x miniconda.sh - ./miniconda.sh -b - export PATH=/home/travis/miniconda/bin:$PATH - - conda update --yes conda +# - conda update --yes conda install: - - conda install --yes python=$TRAVIS_PYTHON_VERSION atlas numpy=1.9 scipy=0.16 matplotlib nose sphinx pip nose + - conda install --yes python=$TRAVIS_PYTHON_VERSION atlas numpy=1.9 scipy=0.16 matplotlib nose pip six - pip install . script: From 568984e7a6db7ff9b0d13dc15f16ff9af9028b36 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:26:42 +0100 Subject: [PATCH 11/15] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6def2656..642968ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ script: - cd $HOME - mkdir empty - cd empty - - nosetests GPy + - nosetests GPy.testing cache: directories: From 72b3be57d710a0b93826990de56856f58a2161f5 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:28:52 +0100 Subject: [PATCH 12/15] Update .travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 642968ef..13db69b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: false os: - linux -# - osx + - osx language: python @@ -16,7 +16,7 @@ language: python python: - 2.7 -# - 3.3 + - 3.3 - 3.4 before_install: @@ -27,7 +27,7 @@ before_install: # - conda update --yes conda install: - - conda install --yes python=$TRAVIS_PYTHON_VERSION atlas numpy=1.9 scipy=0.16 matplotlib nose pip six + - conda install --yes python=$TRAVIS_PYTHON_VERSION numpy=1.9 scipy=0.16 nose pip six - pip install . script: From 03c14d5b6cf6408d069da7a73e77e7c806e5a706 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:32:47 +0100 Subject: [PATCH 13/15] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 13db69b2..4644dbf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: false os: - linux - - osx +# - osx language: python From e65db81a564ca87aa62ac3deee6b916860bc649e Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:35:43 +0100 Subject: [PATCH 14/15] Update rv_transformation_tests.py --- GPy/testing/rv_transformation_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPy/testing/rv_transformation_tests.py b/GPy/testing/rv_transformation_tests.py index 44d8710d..cfc4c49b 100644 --- a/GPy/testing/rv_transformation_tests.py +++ b/GPy/testing/rv_transformation_tests.py @@ -34,7 +34,7 @@ class RVTransformationTestCase(unittest.TestCase): # The PDF of the transformed variables p_phi = lambda phi : np.exp(-m._objective_grads(phi)[0]) # To the empirical PDF of: - theta_s = prior.rvs(100000) + theta_s = prior.rvs(5) phi_s = trans.finv(theta_s) # which is essentially a kernel density estimation kde = st.gaussian_kde(phi_s) @@ -56,7 +56,7 @@ class RVTransformationTestCase(unittest.TestCase): # The following test cannot be very accurate self.assertTrue(np.linalg.norm(pdf_phi - kde(phi)) / np.linalg.norm(kde(phi)) <= 1e-1) # Check the gradients at a few random points - for i in range(10): + for i in range(len(theta_s)): m.theta = theta_s[i] self.assertTrue(m.checkgrad(verbose=True)) From a3f0570e00918e692b1cdfb70ae2a779aee77603 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 14:41:39 +0100 Subject: [PATCH 15/15] Update rv_transformation_tests.py --- GPy/testing/rv_transformation_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPy/testing/rv_transformation_tests.py b/GPy/testing/rv_transformation_tests.py index cfc4c49b..18dccd36 100644 --- a/GPy/testing/rv_transformation_tests.py +++ b/GPy/testing/rv_transformation_tests.py @@ -34,7 +34,7 @@ class RVTransformationTestCase(unittest.TestCase): # The PDF of the transformed variables p_phi = lambda phi : np.exp(-m._objective_grads(phi)[0]) # To the empirical PDF of: - theta_s = prior.rvs(5) + theta_s = prior.rvs(1e6) phi_s = trans.finv(theta_s) # which is essentially a kernel density estimation kde = st.gaussian_kde(phi_s) @@ -56,7 +56,7 @@ class RVTransformationTestCase(unittest.TestCase): # The following test cannot be very accurate self.assertTrue(np.linalg.norm(pdf_phi - kde(phi)) / np.linalg.norm(kde(phi)) <= 1e-1) # Check the gradients at a few random points - for i in range(len(theta_s)): + for i in range(5): m.theta = theta_s[i] self.assertTrue(m.checkgrad(verbose=True))