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

Use type hints whenever possible #299

Open
neerajprad opened this issue Aug 27, 2019 · 6 comments
Open

Use type hints whenever possible #299

neerajprad opened this issue Aug 27, 2019 · 6 comments

Comments

@neerajprad
Copy link
Member

Since we are using python 3, we can start taking advantage of type hints wherever possible.

@jpchen
Copy link
Member

jpchen commented Aug 27, 2019

we should probably do this in pyro too

@akihironitta
Copy link
Contributor

@neerajprad @jpchen Could I work on this issue?

@neerajprad
Copy link
Member Author

@akihironitta - The codebase and number of contributors to numpyro core is small enough that this is low priority for us at the moment. When I created the issue, I was thinking that we could do this in a piecemeal fashion as we were refactoring the codebase. If you are interested, my suggestion would be to start with one of the other tasks and refactor to use type hints on the internal code that your PR touches.

@juanitorduz
Copy link
Contributor

@fehiepsi is this something you would like to add? I have done it for other libraries and we could tackle this on PR per module at a time (as in pyro-ppl/pyro#2550) . We could also use https://github.com/patrick-kidger/jaxtyping (which I use and like quite a lot ;) )

@fehiepsi
Copy link
Member

I think it would be nice to have. Because this would require a significant amount of work, please make the PRs modular and incremental.

@juanitorduz
Copy link
Contributor

I think it would be nice to have. Because this would require a significant amount of work, please make the PRs modular and incremental.

Ok! We can test a simple first PR for a module and see if we like it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants