Skip to content

Conversation

SelimSBE
Copy link

@SelimSBE SelimSBE commented Sep 24, 2025

Description

This PR updates the internal conversion logic to use dict_to_dataset_drop_incompatible_coords across all relevant backends.

Related Issue

Checklist

Type of change

  • Maintenance

📚 Documentation preview 📚: https://pymc--7912.org.readthedocs.build/en/7912/

@SelimSBE SelimSBE marked this pull request as ready for review September 24, 2025 14:06
@SelimSBE
Copy link
Author

@jessegrabowski as requested, I’ve just opened this PR for ticket #7891 , it’s ready for review. Thanks!

coords={"school": np.arange(eight_schools_params["J"])},
dims={"theta": ["school"], "eta": ["school"]},
)
with pytest.warns(UserWarning, match="Incompatible coordinate length"):
Copy link
Member

Choose a reason for hiding this comment

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

Why were the coords invalid? I don't think they are supposed to be in this test, so maybe the test was faulty?

idata = pm.sample(tune=5, draws=draws, chains=2, return_inferencedata=True)
thinned_idata = idata.sel(draw=slice(None, None, thin_by))
idata.extend(pm.sample_posterior_predictive(thinned_idata))
with pytest.warns(UserWarning, match="Incompatible coordinate length"):
Copy link
Member

Choose a reason for hiding this comment

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

This should only affect the draw dimension, which is not part of the model?

trace = sample(chains=1, random_seed=numpy_rng)

ppc = sample_posterior_predictive(trace, model=model, random_seed=numpy_rng)
with pytest.warns(UserWarning, match="Incompatible coordinate length"):
Copy link
Member

@ricardoV94 ricardoV94 Sep 30, 2025

Choose a reason for hiding this comment

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

What is the invalid coord here? We should fix the model if there's one

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.

Check idata dims/coords for consistency before sampling begins
2 participants