Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Errors with numba=0.45.1 #502

Closed
3 tasks
mmcky opened this issue Sep 2, 2019 · 0 comments · Fixed by #503
Closed
3 tasks

[Tests] Errors with numba=0.45.1 #502

mmcky opened this issue Sep 2, 2019 · 0 comments · Fixed by #503
Labels

Comments

@mmcky
Copy link
Contributor

mmcky commented Sep 2, 2019

In the current anaconda I am not seeing any nosetest errors but I am getting the following errors reported for numba=0.45.1 in a pip based environment. This is using a newer version of Numba

  • ERROR: test_utilities.TestDraw.test_lln
  • ERROR: test_utilities.TestDraw.test_return_types
  • ERROR: test_utilities.TestDraw.test_return_values
======================================================================
ERROR: test_utilities.TestDraw.test_lln
----------------------------------------------------------------------
Traceback (most recent call last):
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/errors.py", line 662, in new_error_context
    yield
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 258, in lower_block
    self.lower_inst(inst)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 301, in lower_inst
    val = self.lower_assign(ty, inst)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 459, in lower_assign
    return self.lower_expr(ty, value)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 919, in lower_expr
    res = self.lower_call(resty, expr)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 711, in lower_call
    res = self._lower_call_normal(fnty, expr, signature)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 882, in _lower_call_normal
    impl = self.context.get_function(fnty, signature)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/targets/base.py", line 551, in get_function
    return self.get_function(fn, sig, _firstcall=False)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/targets/base.py", line 553, in get_function
    raise NotImplementedError("No definition for lowering %s%s" % (key, sig))
NotImplementedError: No definition for lowering np.random.random_sample(int64,) -> array(float64, 1d, C)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/Users/matthewmckay/repos-collab/QuantEcon.py/quantecon/random/tests/test_utilities.py", line 94, in test_lln
    out = draw(self.cdf, size)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/dispatcher.py", line 395, in _compile_for_args
    raise e
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/dispatcher.py", line 352, in _compile_for_args
    return self.compile(tuple(argtypes))
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/dispatcher.py", line 693, in compile
    cres = self._compiler.compile(args, return_type)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/dispatcher.py", line 76, in compile
    status, retval = self._compile_cached(args, return_type)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/dispatcher.py", line 90, in _compile_cached
    retval = self._compile_core(args, return_type)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/dispatcher.py", line 108, in _compile_core
    pipeline_class=self.pipeline_class)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 972, in compile_extra
    return pipeline.compile_extra(func)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 390, in compile_extra
    return self._compile_bytecode()
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 903, in _compile_bytecode
    return self._compile_core()
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 890, in _compile_core
    res = pm.run(self.status)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 266, in run
    raise patched_exception
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 257, in run
    stage()
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 764, in stage_nopython_backend
    self._backend(lowerfn, objectmode=False)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 703, in _backend
    lowered = lowerfn()
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 690, in backend_nopython_mode
    self.metadata)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/compiler.py", line 1143, in native_lowering_stage
    lower.lower()
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 177, in lower
    self.lower_normal_function(self.fndesc)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 218, in lower_normal_function
    entry_block_tail = self.lower_function_body()
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 243, in lower_function_body
    self.lower_block(block)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/lowering.py", line 258, in lower_block
    self.lower_inst(inst)
  File "//anaconda3/envs/pip-latest/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/errors.py", line 670, in new_error_context
    six.reraise(type(newerr), newerr, tb)
  File "//anaconda3/envs/pip-latest/lib/python3.7/site-packages/numba/six.py", line 659, in reraise
    raise value
numba.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
No definition for lowering np.random.random_sample(int64,) -> array(float64, 1d, C)

File "quantecon/random/utilities.py", line 203:
        def draw_impl(cdf, size):
            rs = np.random.random_sample(size)
            ^

[1] During: lowering "$0.5 = call $0.3(size, func=$0.3, args=[Var(size, /QuantEcon.py/quantecon/random/utilities.py (203))], kws=(), vararg=None)" at /QuantEcon.py/quantecon/random/utilities.py (203)
@mmcky mmcky added the tests label Sep 2, 2019
@mmcky mmcky closed this as completed in #503 Sep 3, 2019
duncanhobbs pushed a commit to duncanhobbs/QuantEcon.py that referenced this issue Sep 18, 2019
duncanhobbs pushed a commit to duncanhobbs/QuantEcon.py that referenced this issue Sep 18, 2019
daniel-schaefer added a commit to daniel-schaefer/QuantEcon.py that referenced this issue Oct 16, 2019
* Added basic inequality mesasures: lorenz curve and gini

Tests added, passed nosetests

* Add jitted newton methods for root finding

Based on Scipy's newton methods, we add two variants of newton root
finding - Newton Raphson and secant method. All methods are jitted
through Numba with nopython mode. Relevant information (apart from the
root) is also returned in the result as python namedtuple since Numba
supports it.

* Add test cases for newton methods

* Add newton halley method and modify returning

The third and last newton method for root finding is now added with its
test cases. Each newton method is modified to include only a single
return statement.

* EHN: Add `qhull_options` to `game_theory.vertex_enumeration`

* Add bisection and brent's method for root finding

I added two jitted robust root finding methods: Bisection and Brentq
which are based on Scipy's version which is written in C. They both
follow the previous jitted root finding procedures by returning a
namedtuple with relevant information.

I also added a basic test for each method.

* Fix import to list items

* Add default args in docstring and Format code

I have included optional default arguments in the docstring of all
functions.

All trailing whitespaces are now fixed conforming to PEP8. The check is
done via pycodestyle and http://pep8online.com/.

* initial commit of dle code from Sebastian Graves

* adjustments for package

* update to new rtd requirements spec

* add reference to environment spec

* test use of pip requirements file instead of conda

* remove old yml config for rtd-environment, consolidate on pip-requirements for now

* DOC: Add doc entry for root_finding

* increment version to 0.4.0

* updating auto-generated CHANGELOG

* add v0.4.0 summary to README

* fix badge link for RTD

* update code with docstrings

* remove pylab imports

* move from pylab Matrix to np.matrix

* update to use nullspace from quantecon

* correct algebra for use of quantecon nullspace method

* Add LGTM.com code quality badges

* add test for transformation of problem to LQ type problem using known solutions verified by matlab programs

* reduce line lengths in docstrings

* revert use of quantecon nullspace as representations are not exactly the same ... need to investigate

* migrate to using quantecon nullspace method

* fix test for steadystate

* add atol for comparing small values

* add test for canonical

* add dle to documentation

* DOC: Fix the doc of `root_finding.py` to display nicely

* Release of version 0.4.1

* Add AS algorithm.

* FIX: Force tuple elements to have the same dtype

Fix QuantEcon#434

* Remove `from future import ...`

*  Add method option in robustlq.py

* Modify variable names.

* Modify `intersection` and `find_C`.

* Incorporate with `RepeatedGame` class.

* Compare vertex values in the test.

* Changed gini from class to function to simplify the use of numba

* fix docstring of x_hat in Kalman class

* Add docstrings.

* Fix issue#367

* revise 'Fix issue#367'

* Revise 'Fix QuantEcon#367' again

* Revise 'Fix issue#367' again

* Change docs to reflect changes from object to function

* fix brent_max docstring

* FEAT: Add Nelder-Mead algorithm

- Jitting is commented out for generating coverage report

* Uncomment `@njit`

* FIX: Disallow 0 actions

* FIX: is_dominated: Return False if num_actions == 1

* Add Player.delete_action

* Add NormalFormGame.delete_action

* FIX: solve the bug of cached keyword `u`.

* Minor fixes

* Modify docstrings.

* FIX: change keyword 'u' to 'u_init' in test.

* FIX: minor modifications.

* Use `equilibrium_payoffs` interface.

* FIX: minor modification of docstrings.

* Minor modifications of docstrings.

* Modification of `_best_dev_gains`.

* Release version 0.4.2

* update CHANGELOG for 0.4.2 release

* FIX: test `method` keyword of `RepeatedGame.equilibrium_payoffs()`.

* Add Shorrock inequality index

* add mobility to description

* add docs

* Travis: Add macOS to the build matrix

* Travis: Add miniconda cache

* TestTicTacToc: Skip test_loop and test_timer for darwin

* Add error for invalid inputs

* Fix warning in test_pure_nash

* README: Update coveralls badge to use svg

* update documentation

* update RST in nelder mead docstring

* tests/util: Remove old merge resolution

* fix docstring in inequality

* update to use inline math

* fix typo

* restore to initial displaymath

* Travis: Move dependency installs with wheels available to pip

* Travis: Remove miniconda cache

* Travis: Move statsmodels to pip

* Travis: Move pytables to pip since it requires numpy

* discrete_rv: Remove unused import

* Isolate rtd-specific requirements to doc-requirements.txt

* fix inequality docs

* add raw flag

* quad: Import sympy only when necessary

* util.notebooks: Import requests only when necessary

* pip-requirements: Remove unused statsmodels import

* Travis: Disable performance tests

They should be run only from time to time, e.g. between releases, or
when the commit specifically states the perf modification of the
relevant code.

* random.utilities: Cache guvectorize

* quantecon.arma: Import scipy.signal functions only when necessary

* fix for lorenz documentation

* add matplotlib import

* remove matplotlib

* Release for version 0.4.3

* Update generated CHANGELOG for 0.4.3

* quantecon/tests: Fix F401 unused imports

* quantecon/util: Fix F401 unused imports

* quantecon/markov: Fix F401 unused imports

* quantecon.arma: Fix F401 unused imports

* quantecon/optimize: Fix F401 unused imports

* quantecon/game_theory: Fix F401 unused imports

* Disable flake8 on __init__.py files

* Travis: Do F401 check before running the tests

* TEST: Fix the names of tests for `brent_max`

* DOC: Update example for `nelder_mead`

* Apply `autopep8 -ir --select E501 quantecon/util`

* Fix all E231 errors

* Travis: Add E231 check

* Apply `autopep8 -ir --select E501 quantecon`

* Fix all F405 error and check on Travis

* Fix some of F841 errors

* lss: Fix formatting of a ValueError

* add matplotlib to environment

* specify matplotlib lts release

* fix syntax

* Delete the unnecessary assignment in quantecon/estepec.py

* Delete the unnecessary assignment in quantecon/compute_fp.py

* Delete the unnecessary assignment in quantecon/repeated_game.py

* FIX: Raise correct error when `A` is not square in `LinearStateSpace`

* Add random_pure_actions and random_mixed_actions and related tests.

* Fix `sample_without_replacement` using guvectorize

* FIX: Import scipy.sparse.linalg

Fix QuantEcon#481

* Add drift term keyword to `markov.tauchen`.

* Release of version 0.4.4

* FIX: DOC: Remove `matplotlib.sphinxext.only_directives`

* FIX: DOC: Fix Examples section in `brent_max`

* TRAVIS: Set coverage branch.

* increase `tol` in `rouwenhorst` test.

* Add LQMarkov.

* update version number

* update major changes in README

* add newline for PEP8

* Release of version 0.4.5

* update travis to python=3.7

* update distribution to xenial

* FIX: bug of computing state values in the last period of `LQMarkov` model

* FIX: avoid solving stationary values for multiple times

* FIX: random.draw: Replace `random_sample` with `random`

Fix QuantEcon#502

* FIX: Player.is_dominated: Fix warnings

Fix QuantEcon#501

* EHN: Player.is_dominated: Add `'revised simplex'` method

For SciPy >= 1.3.0

* FIX: Fix RuntimeWarning in lq_control.py

* FIX: Fix RuntimeWarning in ivp.py

* FIX: Fix Pandas related FutureWarnings in test_quad.py.

* Raise value error if C != 0 and beta >= 1.

* Tweak assignment of beta in test_robustlq.py to prevent test failiures.

* Fix PEP8 Indent Error.

* Edit assignment of beta in test_robustlq.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant