pymc-devs / pymc-devs/pytensor

Add utility `verify_infer_shape`

Open
#1,088 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

beginner friendly enhancement tests
Dominant language
Python
Stars
644
Forks
208
Avg merge
2d 14h
Merged PRs (30d)
16

Description

Description

There is a Test subclass that can be used for it, but requires running pytest which is not the best for someone implementing their Op. We could put that functionality in a verify_infer_shape function like verify_grad.

https://github.com/pymc-devs/pytensor/blob/3523bfa5ab9e3a53fea4ce98ccd4c1a755262ef2/tests/unittest_tools.py#L178-L265

Probably could do with some cleaning as well

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/unittest_tools.py lines 178-265 and compare the existing Test subclass with the verify_grad utility. Confirm that verify_infer_shape exposes the same shape-inference checking functionality without requiring users to run pytest directly, and check the surrounding code for cleanup opportunities.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.