Skip to content

Commit

Permalink
Bump to version 0.1.0 (#182)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
neerajprad authored and fehiepsi committed Jun 1, 2019
1 parent 4bc1a35 commit ed36568
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# NumPyro

[![Build Status](https://travis-ci.com/pyro-ppl/numpyro.svg?branch=master)](https://travis-ci.com/pyro-ppl/numpyro)
[![Documentation Status](https://readthedocs.org/projects/numpyro/badge/?version=latest)](https://numpyro.readthedocs.io/en/latest/?badge=latest)

# NumPyro

Probabilistic programming with Numpy powered by [JAX](https://github.com/google/jax) for autograd and JIT compilation to GPU/CPU.

## What is NumPyro?
Expand Down
18 changes: 9 additions & 9 deletions examples/bnn.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import matplotlib
matplotlib.use('Agg') # noqa: E402
import matplotlib.pyplot as plt
"""
We demonstrate how to use NUTS to do inference on a simple (small)
Bayesian neural network with two hidden layers.
"""

import argparse

import matplotlib
import matplotlib.pyplot as plt
import numpy as onp
from jax import vmap

import jax.numpy as np
import jax.random as random
from jax import vmap

import numpyro.distributions as dist
from numpyro.handlers import sample, seed, substitute, trace
from numpyro.hmc_util import initialize_model
from numpyro.mcmc import mcmc


"""
We demonstrate how to use NUTS to do inference on a simple (small)
Bayesian neural network with two hidden layers.
"""
matplotlib.use('Agg') # noqa: E402


# the non-linearity we use in our neural network
Expand Down
1 change: 1 addition & 0 deletions numpyro/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import numpyro.patch # noqa: F401
from numpyro.version import __version__ # noqa: F401
1 change: 1 addition & 0 deletions numpyro/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.1.0'
26 changes: 24 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
from __future__ import absolute_import, division, print_function

import os
import sys

from setuptools import find_packages, setup

PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))

# Find version
for line in open(os.path.join(PROJECT_PATH, 'numpyro', 'version.py')):
if line.startswith('__version__ = '):
version = line.strip().split()[2][1:-1]

# READ README.md for long description on PyPi.
try:
long_description = open('README.md', encoding='utf-8').read()
except Exception as e:
sys.stderr.write('Failed to convert README.md to rst:\n {}\n'.format(e))
sys.stderr.flush()
long_description = ''


setup(
name='numpyro',
version='0.0.0',
version='0.1.0',
description='Pyro PPL on Numpy',
packages=find_packages(include=['numpyro', 'numpyro.*']),
url='https://github.com/neerajprad/numpyro',
author='Uber AI Labs',
author_email='[email protected]',
install_requires=[
'jax>=0.1.35',
# TODO: Remove soon as JAX's API becomes stable
'jax==0.1.35',
'jaxlib>=0.1.14',
'tqdm',
],
Expand All @@ -21,6 +41,8 @@
'dev': ['ipython'],
'examples': ['matplotlib'],
},
long_description=long_description,
long_description_content_type='text/markdown',
tests_require=['flake8', 'pytest>=4.1'],
keywords='probabilistic machine learning bayesian statistics',
license='MIT License',
Expand Down

0 comments on commit ed36568

Please sign in to comment.