Skip to content

Commit

Permalink
Bump to version 0.4.4 (#602)
Browse files Browse the repository at this point in the history
* Bump to version 0.4.4

* Attempt to make docs build pass

* Address numerical issues
  • Loading branch information
fehiepsi committed Dec 27, 2022
1 parent 0294f5e commit 3bc3113
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
@@ -1,7 +1,7 @@
ipython<=8.6.0 # restrict for https://github.com/ipython/ipython/issues/13845
makefun
multipledispatch
nbsphinx==0.8.1
nbsphinx==0.8.9
numpy>=1.7
opt_einsum>=2.3.2
pytest>=4.1
Expand Down
5 changes: 3 additions & 2 deletions docs/source/conf.py
Expand Up @@ -90,7 +90,8 @@
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = [".rst", ".ipynb"]
# NOTE: `.rst` is the default suffix of sphinx, and nbsphinx will
# automatically add support for `.ipynb` suffix.

# do not execute cells
nbsphinx_execute = "never"
Expand All @@ -106,7 +107,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
2 changes: 1 addition & 1 deletion funsor/__init__.py
Expand Up @@ -53,7 +53,7 @@
testing,
)

__version__ = "0.4.3" # mirrored in setup.py
__version__ = "0.4.4" # mirrored in setup.py

__all__ = [
"__version__",
Expand Down
2 changes: 1 addition & 1 deletion funsor/testing.py
Expand Up @@ -245,7 +245,7 @@ def check_funsor(x, inputs, output, data=None):
else:
assert (x_data == data).all()
else:
if get_backend() == "jax":
if get_backend() in ["jax", "numpy"]:
# JAX has numerical errors for reducing ops.
assert_close(x_data, data)
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -23,7 +23,7 @@

setup(
name="funsor",
version="0.4.3", # mirrored in funsor/__init__.py
version="0.4.4", # mirrored in funsor/__init__.py
description="A tensor-like library for functions and distributions",
packages=find_packages(include=["funsor", "funsor.*"]),
url="https://github.com/pyro-ppl/funsor",
Expand Down
6 changes: 3 additions & 3 deletions test/test_tensor.py
Expand Up @@ -7,7 +7,7 @@
import pickle
from collections import OrderedDict
from functools import reduce
from typing import get_type_hints
from typing import Tuple, get_type_hints

import numpy as np
import pytest
Expand Down Expand Up @@ -863,7 +863,7 @@ def max_and_argmax(x: Reals[8]) -> Product[Real, Bint[8]]:


def test_function_nested_eager():
@funsor.function(Reals[8], (Real, Bint[8]))
@funsor.function(Reals[8], Tuple[Real, Bint[8]])
def max_and_argmax(x):
return tuple(_numeric_max_and_argmax(x))

Expand All @@ -879,7 +879,7 @@ def max_and_argmax(x):


def test_function_nested_lazy():
@funsor.function(Reals[8], (Real, Bint[8]))
@funsor.function(Reals[8], Tuple[Real, Bint[8]])
def max_and_argmax(x):
return tuple(_numeric_max_and_argmax(x))

Expand Down
3 changes: 2 additions & 1 deletion test/test_transpose.py
Expand Up @@ -210,7 +210,8 @@ def test_tower_sum(height):
assert transpose(top)[x] is Number(2.0**height)


@pytest.mark.parametrize("height", [0, 1, 2, 3, 10]) # , 100, 1000])
# Note: we get overflow issue for height=10.
@pytest.mark.parametrize("height", [0, 1, 2, 3, 9]) # , 10, 100, 1000])
def test_tower_prod(height):
x = random_tensor(OrderedDict(i=Bint[2], j=Bint[3]))
with lazy:
Expand Down

0 comments on commit 3bc3113

Please sign in to comment.