Skip to content

Explicit rng in expand_dist_dims#8255

Merged
ricardoV94 merged 1 commit intopymc-devs:v6from
ricardoV94:censored_xdist_rng_api
Apr 17, 2026
Merged

Explicit rng in expand_dist_dims#8255
ricardoV94 merged 1 commit intopymc-devs:v6from
ricardoV94:censored_xdist_rng_api

Conversation

@ricardoV94
Copy link
Copy Markdown
Member

@ricardoV94 ricardoV94 commented Apr 17, 2026

We were not using strict filterwarnings, showed up in pymc-devs/pymc-extras#668

@ricardoV94 ricardoV94 force-pushed the censored_xdist_rng_api branch from 4c9caa6 to 3a915cc Compare April 17, 2026 08:39
@ricardoV94 ricardoV94 added no releasenotes Skipped in automatic release notes generation dims labels Apr 17, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v6@a4d9833). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##             v6    #8255   +/-   ##
=====================================
  Coverage      ?   91.71%           
=====================================
  Files         ?      124           
  Lines         ?    19962           
  Branches      ?        0           
=====================================
  Hits          ?    18309           
  Misses        ?     1653           
  Partials      ?        0           
Files with missing lines Coverage Δ
pymc/dims/distributions/core.py 91.70% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

new_dist_op = type(dist.owner.op)(**dist_props)
_old_rng, *params_and_dim_lengths = dist.owner.inputs
new_rng = None # We don't propagate the old RNG, because we don't want the new and old dists to be correlated
# We don't propagate the old RNG, because we don't want the new and old dists to be correlated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't change anything but this comment is very strange, that's not how prng is supposed to work at all?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't reuse the same rng in multiple places, even if one is going to be dead code, just to be sure we don't

@ricardoV94 ricardoV94 merged commit 4e28043 into pymc-devs:v6 Apr 17, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dims no releasenotes Skipped in automatic release notes generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants