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

FIX: Adjust for quantecon==0.6.0 #296

Merged
merged 3 commits into from
Dec 21, 2022
Merged

FIX: Adjust for quantecon==0.6.0 #296

merged 3 commits into from
Dec 21, 2022

Conversation

mmcky
Copy link
Contributor

@mmcky mmcky commented Dec 18, 2022

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

@github-actions
Copy link

@mmcky
Copy link
Contributor Author

mmcky commented Dec 18, 2022

@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
Copy link
Contributor Author

mmcky commented Dec 18, 2022

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

@Smit-create
Copy link
Member

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

@mmcky
Copy link
Contributor Author

mmcky commented Dec 18, 2022

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
Copy link
Contributor Author

mmcky commented Dec 19, 2022

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
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
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
Copy link
Contributor Author

mmcky commented Dec 19, 2022

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
Copy link
Contributor Author

mmcky commented Dec 21, 2022

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants