pymc
pymc copied to clipboard
Approximation's sample method uses model contexts
This change makes it so calling sample on fitted approximations uses the model context or an explicitly provided model. Previously, this had a hard assumption that we only want to sample from the same model as the one we fitted.
This also deprecates self.model.
Checklist
- [x] Checked that the pre-commit linting/style checks pass
- [ ] Included tests that prove the fix is effective or that the new feature works
- [x] Added necessary documentation (docstrings and/or example notebooks)
- [ ] If you are a pro: each commit corresponds to a relevant logical change
Type of change
- [x] New feature / enhancement
- [ ] Bug fix
- [ ] Documentation
- [ ] Maintenance
- [ ] Other (please specify):
📚 Documentation preview 📚: https://pymc--7940.org.readthedocs.build/en/7940/