QuantEcon / lecture-python-programming.myst

Python Programming for Finance and Economics
https://python-programming.quantecon.org
43 stars 26 forks source link

Deprecation Warnings #294

Closed mmcky closed 9 months ago

mmcky commented 11 months ago

@HumphreyYang would you mind clicking through the site and check for Deprecation

/tmp/ipykernel_4761/3271650557.py:1: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.

there are a few places we need to fix up some warnings such as

https://python-programming.quantecon.org/numba.html#decorator-notation

HumphreyYang commented 11 months ago

Hi @mmcky,

In this case, we might want to remove the discussion on numba.jit for now and replace them with njit or jit(nopython=True) as falling-back behaviours will be deprecated. I think the principle now is to use njit and jit(nopython=True) whenever possible. Therefore, instead of discussing nopython decorator, should we talk a little bit more about different decorators, which I find very helpful in some cases?

HumphreyYang commented 11 months ago

Hi @mmcky,

Sorry for another message :)

I will do the first part first to remove the deprecation warning with minimal changes in text:

In this case, we might want to remove the discussion on numba.jit for now and replace them with njit or jit(nopython=True) as falling-back behaviours will be deprecated.

and we can get @jstac's opinion on the second action:

Therefore, instead of discussing nopython decorator, should we talk a little bit more about different decorators, which I find very helpful in some cases?

Does this sound like a good plan to you?

Many thanks in advance.

jstac commented 11 months ago

@HumphreyYang , that sounds like a good approach to me. Of course parallel=True should not be discussed in detail, since it's treated in the next lecture.

We should open an issue to switch over to a simple @jit once 0.59 comes out, so we don't forget.

HumphreyYang commented 11 months ago