Skip to content

Commit ed36568

Browse files
neerajpradfehiepsi
authored andcommitted
Bump to version 0.1.0 (#182)
* Bump version to 0.1.0 * Bump to version 0.1.0 * remove todo; fix lint * Change long desc type to markdown * add __version__ * fix lint
1 parent 4bc1a35 commit ed36568

File tree

5 files changed

+37
-13
lines changed

5 files changed

+37
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# NumPyro
2-
31
[![Build Status](https://travis-ci.com/pyro-ppl/numpyro.svg?branch=master)](https://travis-ci.com/pyro-ppl/numpyro)
42
[![Documentation Status](https://readthedocs.org/projects/numpyro/badge/?version=latest)](https://numpyro.readthedocs.io/en/latest/?badge=latest)
53

4+
# NumPyro
5+
66
Probabilistic programming with Numpy powered by [JAX](https://github.com/google/jax) for autograd and JIT compilation to GPU/CPU.
77

88
## What is NumPyro?

examples/bnn.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import matplotlib
2-
matplotlib.use('Agg') # noqa: E402
3-
import matplotlib.pyplot as plt
1+
"""
2+
We demonstrate how to use NUTS to do inference on a simple (small)
3+
Bayesian neural network with two hidden layers.
4+
"""
45

56
import argparse
67

8+
import matplotlib
9+
import matplotlib.pyplot as plt
710
import numpy as onp
8-
from jax import vmap
11+
912
import jax.numpy as np
1013
import jax.random as random
14+
from jax import vmap
1115

1216
import numpyro.distributions as dist
1317
from numpyro.handlers import sample, seed, substitute, trace
1418
from numpyro.hmc_util import initialize_model
1519
from numpyro.mcmc import mcmc
1620

17-
18-
"""
19-
We demonstrate how to use NUTS to do inference on a simple (small)
20-
Bayesian neural network with two hidden layers.
21-
"""
21+
matplotlib.use('Agg') # noqa: E402
2222

2323

2424
# the non-linearity we use in our neural network

numpyro/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
import numpyro.patch # noqa: F401
2+
from numpyro.version import __version__ # noqa: F401

numpyro/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.1.0'

setup.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
from __future__ import absolute_import, division, print_function
22

3+
import os
4+
import sys
5+
36
from setuptools import find_packages, setup
47

8+
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
9+
10+
# Find version
11+
for line in open(os.path.join(PROJECT_PATH, 'numpyro', 'version.py')):
12+
if line.startswith('__version__ = '):
13+
version = line.strip().split()[2][1:-1]
14+
15+
# READ README.md for long description on PyPi.
16+
try:
17+
long_description = open('README.md', encoding='utf-8').read()
18+
except Exception as e:
19+
sys.stderr.write('Failed to convert README.md to rst:\n {}\n'.format(e))
20+
sys.stderr.flush()
21+
long_description = ''
22+
23+
524
setup(
625
name='numpyro',
7-
version='0.0.0',
26+
version='0.1.0',
827
description='Pyro PPL on Numpy',
928
packages=find_packages(include=['numpyro', 'numpyro.*']),
1029
url='https://github.com/neerajprad/numpyro',
1130
author='Uber AI Labs',
1231
author_email='[email protected]',
1332
install_requires=[
14-
'jax>=0.1.35',
33+
# TODO: Remove soon as JAX's API becomes stable
34+
'jax==0.1.35',
1535
'jaxlib>=0.1.14',
1636
'tqdm',
1737
],
@@ -21,6 +41,8 @@
2141
'dev': ['ipython'],
2242
'examples': ['matplotlib'],
2343
},
44+
long_description=long_description,
45+
long_description_content_type='text/markdown',
2446
tests_require=['flake8', 'pytest>=4.1'],
2547
keywords='probabilistic machine learning bayesian statistics',
2648
license='MIT License',

0 commit comments

Comments
 (0)