Skip to content

Commit b476c39

Browse files
committed
Initial commit
1 parent 2f10ccf commit b476c39

14 files changed

Lines changed: 3301 additions & 0 deletions

setup.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
from setuptools import setup
4+
from setuptools import find_packages
5+
from pkg_resources import parse_version
6+
7+
dependency_links = [
8+
"https://github.com/sdatkinson/GPflow" # Use my fork
9+
]
10+
11+
requirements = [
12+
"matplotlib>=2.1.2",
13+
"gpflow==1.1.1",
14+
"pytest>=3.5.0"
15+
]
16+
17+
# Check for TensorFlow
18+
# From GPflow:
19+
# Only detect TF if not installed or outdated. If not, do not do not list as
20+
# requirement to avoid installing over e.g. tensorflow-gpu
21+
# To avoid this, rely on importing rather than the package name (like pip).
22+
23+
min_tf_version = '1.5.0'
24+
tf_cpu = 'tensorflow>={}'.format(min_tf_version)
25+
tf_gpu = 'tensorflow-gpu>={}'.format(min_tf_version)
26+
27+
try:
28+
# If tf not installed, import raises ImportError
29+
import tensorflow as tf
30+
if parse_version(tf.VERSION) < parse_version(min_tf_version):
31+
# TF pre-installed, but below the minimum required version
32+
raise DeprecationWarning("TensorFlow version below minimum requirement")
33+
except (ImportError, DeprecationWarning) as e:
34+
# Add TensorFlow to dependencies to trigger installation/update
35+
requirements.append(tf_cpu)
36+
37+
setup(name='structured_gpflow',
38+
version='0.1.0',
39+
description='structured-gpflow - GPs with Kronecker tricks',
40+
author='Steven Atkinson',
41+
author_email='steven@atkinson.mn',
42+
url='https://github.com/cics-nd/structured-gpflow',
43+
install_requires=requirements,
44+
dependency_links=dependency_links,
45+
packages=find_packages(),
46+
)

structured_gpflow/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from __future__ import absolute_import
2+
3+
# Modules:
4+
from . import (kronecker_product, kronecker_product_numpy, structure, util)
5+
6+
# Packages:
7+
from . import models

0 commit comments

Comments
 (0)