pymc-devs / pymc-devs/pytensor
Add first-class python backend
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
We've talked about this before so I just want an issue to track it. The idea is that:
performshould be in python, but it should be as simple as possiblemode = 'py'should have python-specific dispatches where we can put mode full-featured "performance" python code. An example would be the QZ Op. All that should be moved out of perform, perform should just doscipy.linalg.qz- Replace the default FAST_COMPILE with python mode (no compile is really fast right?)
There might not actually be much to do to get this off the ground, just some refactor to make things nice and hide complexity in certain cases. Not sure about how this would impact random variables, scan, etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the perform entry point, mode = 'py' dispatches, and the default FAST_COMPILE behavior. Review the QZ Op and assess the stated effects on random variables and scan; done should mean the scope and boundaries of the Python backend are agreed and its behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100