pymc icon indicating copy to clipboard operation
pymc copied to clipboard

Suggest `var_names` when using deprecated API for partial traces

Open lancechua opened this issue 1 year ago • 3 comments

Description

Sampling a partial trace was first done in #271, with the trace kwarg. Then, it subsequently removed in #6269 raising DeprecationWarning error. Partial trace was added back with the var_names kwarg in #7206.

This PR updates the error message to reference the new var_names kwarg instead, as trace may still be suggested by coding LLMs.

Related Issue

  • [ ] Closes #
  • [ ] Related to #271 #6269 #7206

Checklist

Type of change

  • [ ] New feature / enhancement
  • [ ] Bug fix
  • [x] Documentation
  • [ ] Maintenance
  • [ ] Other (please specify):

📚 Documentation preview 📚: https://pymc--7289.org.readthedocs.build/en/7289/

lancechua avatar Apr 28 '24 18:04 lancechua

Thank You Banner] :sparkling_heart: Thanks for opening this pull request! :sparkling_heart: The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.

welcome[bot] avatar Apr 28 '24 18:04 welcome[bot]

An alternative is var_names = trace if isinstance(trace, list) else var_names, but that would violate the one-way-to-do-it "rule"...

lancechua avatar Apr 28 '24 18:04 lancechua

Thanks @lancechua, this seems fine

ricardoV94 avatar Apr 28 '24 18:04 ricardoV94

Congratulations Banner] Congrats on merging your first pull request! :tada: We here at PyMC are proud of you! :sparkling_heart: Thank you so much for your contribution :gift:

welcome[bot] avatar May 05 '24 10:05 welcome[bot]