pymc icon indicating copy to clipboard operation
pymc copied to clipboard

Remove `t` suffix from `Model` methods

Open ricardoV94 opened this issue 2 years ago • 9 comments

model.logpt, model.dlogpt and model.d2logpt would be a bit more intuitive without the t suffix. Historically that was done to distinguish the tensor graphs from the compiled functions, but those are now obtained via model.compile_logp, model.compile_dlogp and model.compile_d2logp.

ricardoV94 avatar Jun 06 '22 14:06 ricardoV94

I never knew what the t stood for, so yes, best to remove.

twiecki avatar Jun 06 '22 20:06 twiecki

If anyone wants to take a go, this should be a simple deprecation PR:

  1. Rename the new methods to pymc.model.Model without the t suffix,
  2. Keep the old ones as a simple wrapper that issues a FutureWarning in between.
  3. Change all the tests to make use of the new names,
  4. Add some tiny tests to make sure the deprecation is being issued,
  5. Create a new Github Issue to remove the deprecated names in v4.2

ricardoV94 avatar Jun 07 '22 10:06 ricardoV94

I can take this one if that's ok!

cuchoi avatar Jun 07 '22 13:06 cuchoi

@cuchoi Great, just open a draft PR so that people see you're working on it.

twiecki avatar Jun 07 '22 13:06 twiecki

Should I update datalogpt, varlogpt, observedlogpt, and potentiallogpt, distributions.joint_logpt as well?

cuchoi avatar Jun 07 '22 14:06 cuchoi

Should I update datalogpt, varlogpt, observedlogpt, and potentiallogpt, distributions.joint_logpt as well?

Yes! I forgot about those

ricardoV94 avatar Jun 07 '22 16:06 ricardoV94

Cool. Should I update documentation such as docs/source/contributing/developer_guide.rst and docs/source/learn/core_notebooks/pymc_aesara.ipynb?

cuchoi avatar Jun 08 '22 01:06 cuchoi

Cool. Should I update documentation such as docs/source/contributing/developer_guide.rst and docs/source/learn/core_notebooks/pymc_aesara.ipynb?

Yes

ricardoV94 avatar Jun 08 '22 05:06 ricardoV94

Opening this as a reminder to deprecate in a future major release

ricardoV94 avatar Jun 14 '22 10:06 ricardoV94