pymc icon indicating copy to clipboard operation
pymc copied to clipboard

Add Type Hints to distribution parameters

Open canyon289 opened this issue 3 years ago • 14 comments

Add type hints to distribution parameters as demonstrated by this PR. https://github.com/pymc-devs/pymc/pull/5315

If multiple people are interested in this we split this up by module

  • Discrete distributions - Assigned to @nvasilevv

canyon289 avatar Jan 15 '22 20:01 canyon289

Hi @canyon289, if you do not mind, I can pick that?

nvasilevv avatar Jan 18 '22 14:01 nvasilevv

@nvasilevv sure thing! Do you know which file(s) you want to start with? I'll open up a subissue for you so this can be address in parts

canyon289 avatar Jan 18 '22 19:01 canyon289

Well, I do not have preferences. I have a brief question on #5315. I saw that no type hints were used here. Any reason why this is the case? There are other instances within the file where such changes were skipped, but looks like such are possible. Was this out of the scope of the PR or is there something I am missing? Thanks

nvasilevv avatar Jan 19 '22 08:01 nvasilevv

hi @nvasilevv, thanks for volunteering to contribute! did you open a pull request? if not, can you choose a submodule so we can create more issues and split up the work, it would be easier for you to contribute and us to manage the workflow that way! let me know if you need help

mjhajharia avatar Jan 26 '22 09:01 mjhajharia

Hi @mjhajharia, sorry for the late reply. I can start with the discrete distributions if that is ok with everyone.

nvasilevv avatar Jan 31 '22 10:01 nvasilevv

@nvasilevv discrete distributions sounds great. I'll add a note to the issue to indicate your assignment. Thanks for your continued interest

canyon289 avatar Feb 01 '22 05:02 canyon289

Hello, I'd like to work on this but don't know where to begin; could you possibly point me in the right direction? Thanks

purna135 avatar Mar 02 '22 10:03 purna135

@canyon289 @mjhajharia I was looking through what remains to be done for this. Are you trying to update the type hints for all def dist() with current types of:

  • np.ndarray or
  • int or
  • float or
  • TensorVariable

?

hectormz avatar May 03 '22 01:05 hectormz

hey hector, all the ones that are applicable!

canyon289 avatar May 03 '22 02:05 canyon289

@canyon289 Working on the mixture

soma2000-lang avatar Jan 26 '23 04:01 soma2000-lang

@canyon289 working on continuous.

iykat avatar Apr 01 '23 17:04 iykat

Thanks!

canyon289 avatar Apr 01 '23 18:04 canyon289

As the PR for discrete distributions was never merged, I'm picking that up now.

johanbog avatar Sep 30 '23 20:09 johanbog

I'll take a look at this one. (hackathon)

fergur avatar Jun 15 '24 14:06 fergur