Skip to content

Split the layers CI group and cut its redundant tests - #167

Merged
jessegrabowski merged 10 commits into
pymc-devs:mainfrom
jessegrabowski:split-convolution-ci-group
Oct 2, 2026
Merged

jessegrabowski merged 10 commits into
pymc-devs:mainfrom
jessegrabowski:split-convolution-ci-group

Conversation

@jessegrabowski

@jessegrabowski jessegrabowski commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

The layers group in the run_tests.yml test matrix is now three groups, layers, recurrent and convolution. The old group took 18 to 24 minutes per run. tests/test_recurrent.py and tests/test_conv.py alone accounted for 11 of its 20 minutes of test time.

The six test files in those groups went from 245 tests to 147, and their cold run on 8 workers went from 54 s to 20 s. Most of the removed tests repeated a stronger reference comparison, or only asserted that a training loss fell. _extract_patches, _scatter_patches and _window_indices are removed from pytensor_ml/layers/conv.py. They had no callers outside the tests that used them as a reference implementation.

Coverage was added at the same time:

  • the ConvLayer bias gradient
  • Im2Col.perform and Col2Im.perform
  • pooling dilation
  • per-axis conv padding

Before this, none of these had a test that failed when it broke.

Recurrent._masked_step now zeroes masked inputs before the step. NaN in the padded positions made every parameter gradient NaN, even though the forward outputs stayed finite.

Upsample2D(mode="bilinear") now returns its input's dtype. It built the interpolation weights at floatX, so a float32 input came back as float64 under the default config.

Closes #166


📚 Documentation preview 📚: https://pytensor-ml--167.org.readthedocs.build/en/167/

@jessegrabowski
jessegrabowski merged commit d432179 into pymc-devs:main Oct 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

layers CI job takes 18-24 minutes, three times the next-slowest job

1 participant