https://github.com/GPflow/GPflow
Revision 5b16a12e3a21e1435badfe99c4821444260df2fa authored by John Bradshaw on 23 October 2017, 10:32:06 UTC, committed by John Bradshaw on 23 October 2017, 10:32:06 UTC
the future.

* EP while loop broken out and made into seperate class to allow it to
be easy to reuse elsewhere. Tidy up of the variable names and made more
general. Tests written to check that it can recover the true solution
when the approximating factors have the same solution as the true
solution.
* Central moment functions moved out of EP class and live elsewhere.
Step function, Gaussian and Gaussian CDF moments implemented all with
tests.
* Likelihoods now are associated with a method that returns their central
moments generator function. Only implemented for Bernoulli but this
allows one to store moment logic with the likelihood function which is
more where it belongs.
* Updated the VGP versus EP binary classification example script to use
this new source structure. This has remained in the docs so have not
written tests for this part.
1 parent f46eeb3
Raw File
Tip revision: 5b16a12e3a21e1435badfe99c4821444260df2fa authored by John Bradshaw on 23 October 2017, 10:32:06 UTC
Refactor of EP implementation to modularise and make more extensible in
Tip revision: 5b16a12
setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#  pylint: skip-file

from __future__ import print_function
from setuptools import setup
from setuptools import find_packages

import re
import os
import sys
from pkg_resources import parse_version

# load version form _version.py
VERSIONFILE = "gpflow/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
    verstr = mo.group(1)
else:
    raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))

# Dependencies of GPflow
dependencies = ['numpy>=1.9', 'scipy>=0.16']
min_tf_version = '1.0.0'

# Only detect TF if not installed or outdated. If not, do not do not list as
# requirement to avoid installing over e.g. tensorflow-gpu
# To avoid this, rely on importing rather than the package name (like pip).
try:
    # If tf not installed, import raises ImportError
    import tensorflow as tf
    if parse_version(tf.__version__) < parse_version(min_tf_version):
        # TF pre-installed, but below the minimum required version
        raise DeprecationWarning("TensorFlow version below minimum requirement")
except (ImportError, DeprecationWarning) as e:
    # Add TensorFlow to dependencies to trigger installation/update
    dependencies.append('tensorflow>={0}'.format(min_tf_version))

packages = find_packages('.')
packages.remove('testing')

setup(name='gpflow',
      version=verstr,
      author="James Hensman, Alex Matthews",
      author_email="james.hensman@gmail.com",
      description=("Gaussian process methods in tensorflow"),
      license="Apache License 2.0",
      keywords="machine-learning gaussian-processes kernels tensorflow",
      url="http://github.com/GPflow/gpflow",
      packages=packages,
      install_requires=dependencies,
      package_data={'gpflow': ['gpflow/gpflowrc']},
      include_package_data=True,
      test_suite='testing',
      extras_require={'tensorflow with gpu': ['tensorflow-gpu>=1.0.0'],
                      'Export parameters as pandas dataframes': ['pandas>=0.18.1']},
      classifiers=['License :: OSI Approved :: Apache Software License',
                   'Natural Language :: English',
                   'Operating System :: MacOS :: MacOS X',
                   'Operating System :: Microsoft :: Windows',
                   'Operating System :: POSIX :: Linux',
                   'Programming Language :: Python :: 2.7',
                   'Programming Language :: Python :: 3.5',
                   'Topic :: Scientific/Engineering :: Artificial Intelligence'])
back to top