Skip to content

FIX: Adjust for quantecon==0.6.0 - #296

Merged
mmcky merged 3 commits into
mainfrom
fix-664-pr
Dec 21, 2022
Merged

mmcky merged 3 commits into
mainfrom
fix-664-pr

Conversation

@mmcky

@mmcky mmcky commented Dec 18, 2022

Copy link
Copy Markdown
Contributor

Migrates #286 to be local (cc: @Smit-create)

@github-actions

Copy link
Copy Markdown

@mmcky

mmcky commented Dec 18, 2022

Copy link
Copy Markdown
Contributor Author

@Smit-create

I am getting this warning

/tmp/ipykernel_8015/2878916857.py:2: UserWarning: The API of tauchen has changed from `tauchen(rho, sigma_u, b=0., m=3, n=7)` to `tauchen(n, rho, sigma, mu=0., n_std=3)`. To find more details please visit: https://github.com/QuantEcon/QuantEcon.py/issues/663.
  mc = qe.tauchen(n, 0.96, 0.25)

in the preview of markov_asset

Do we need to run through an update the imports so these warnings are not presented?

@mmcky mmcky added high-priority Address soon maintenance Housekeeping: refactors, tooling, infra, style, env upkeep labels Dec 18, 2022
@mmcky

mmcky commented Dec 18, 2022

Copy link
Copy Markdown
Contributor Author

I have tagged this as high-priority as quantecon==0.6.0 is now available on PyPI

@Smit-create

Copy link
Copy Markdown
Member

These warnings are expected. This warns users about this breaking change. It would be good to have atleast for sometime.

@mmcky

mmcky commented Dec 18, 2022

Copy link
Copy Markdown
Contributor Author

These warnings are expected. This warns users about this breaking change. It would be good to have atleast for sometime.

I was expecting them to show up when the old format was used (rather than the new format). I think if a user is using what the new api will be there shouldn't be a warning issued right?

@mmcky

mmcky commented Dec 19, 2022

Copy link
Copy Markdown
Contributor Author

These warnings are expected. This warns users about this breaking change. It would be good to have atleast for sometime.

I was expecting them to show up when the old format was used (rather than the new format). I think if a user is using what the new api will be there shouldn't be a warning issued right?

@Smit-create is this warning showing up due to the import structure. If we update the imports to the new location will that remove this warning? Or will it show up whenever this function is used?

@Smit-create

Copy link
Copy Markdown
Member

is this warning showing up due to the import structure.

No, this is because of changes in tauchen.

Or will it show up whenever this function is used?

Yes, that's right. Can we keep these warnings for one version and remove them in the upcoming versions? This reason is that there is not much clear difference between the old and new APIs such that we can throw warnings only to users of the old API.

@Smit-create

Copy link
Copy Markdown
Member

Or else if we strictly want this warning to show only when the user uses the old API, one minor difference which I noticed is that:
Previously, the first argument of tauchen was float and now it should be an integer. We can throw this warning whenever we encounter a float at the first argument but this is still a bit hackish.

@mmcky

mmcky commented Dec 19, 2022

Copy link
Copy Markdown
Contributor Author

Or else if we strictly want this warning to show only when the user uses the old API, one minor difference which I noticed is that:
Previously, the first argument of tauchen was float and now it should be an integer. We can throw this warning whenever we encounter a float at the first argument but this is still a bit hackish.

Roger that - changes in positional arguments are hard to track at the function level and we haven't changed the name of the function so hard to identify. We could use the function signature (based on types) to identify old usage patterns though. I don't think that's a bad idea as it is confusing to get a warning when you have updated the order.

@mmcky

mmcky commented Dec 21, 2022

Copy link
Copy Markdown
Contributor Author

thanks for the updates @Smit-create I am going to merge this PR now so the cache will run using the latest quantecon release.

@mmcky
mmcky merged commit a6fd5d3 into main Dec 21, 2022
@Smit-create
Smit-create deleted the fix-664-pr branch December 21, 2022 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

high-priority Address soon maintenance Housekeeping: refactors, tooling, infra, style, env upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants