Skip to content

Conversation

@atheendre130505
Copy link

@atheendre130505 atheendre130505 commented Oct 28, 2025

Summary of Changes
✅ Updated remote URL from atheendre130505/sktime to atheendre130505/pymc
✅ Verified the changes - The commit contains improvements to three PyMC tutorial notebooks:
dimensionality.ipynb
dims_module.ipynb
pymc_overview.ipynb
✅ Changes reviewed - The modifications add proper documentation links for:
dims concepts linking to the dims module documentation
coords linking to PyMC's coordinate values API
InferenceData linking to ArviZ's InferenceData documentation
XArray linking to XArray documentation


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

@welcome
Copy link

welcome bot commented Oct 28, 2025

Thank You Banner]
💖 Thanks for opening this pull request! 💖 The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

atheendre130505 and others added 2 commits October 28, 2025 14:36
- Remove VarName NewType definition from util.py
- Replace all VarName type hints with str
- Simplify get_var_name function to use var.name directly
- Update imports in model_graph.py and model/core.py
- Fix all type annotations and function signatures

Resolves pymc-devs#7843
@ricardoV94
Copy link
Member

We don't use explicit internal links

atheendre130505 and others added 3 commits October 30, 2025 00:27
…vs#7891)

This commit implements validation of InferenceData dimensions and coordinates
consistency before pm.sample() executes, preventing cryptic shape mismatch
errors during sampling.

Changes:
- Add pymc/model/validation.py with validation functions:
  * validate_dims_coords_consistency(): Main validation entry point
  * check_dims_exist(): Verify referenced dims exist in model.coords
  * check_shape_dims_match(): Verify variable shapes match declared dims
  * check_coord_lengths(): Verify coordinate lengths match dimension sizes

- Integrate validation into pymc/sampling/mcmc.py:
  * Added validation call early in sample() function, before sampling setup
  * Provides clear, actionable error messages to guide users

- Add comprehensive tests in tests/model/test_dims_coords_validation.py:
  * Test missing coord detection
  * Test shape-dims mismatch detection
  * Test coordinate length validation
  * Test MutableData, observed data, and Deterministic variables
  * Test edge cases and complex models

Fixes pymc-devs#7891
- Fixes Issue pymc-devs#7878
- Replace pt.batched_dot(sqrt_quad.T, sqrt_quad.T) with pt.sum(sqrt_quad.T ** 2, axis=-1)
- Computes squared norm per sample using modern PyTensor operations
- Eliminates deprecation warnings and ensures future compatibility
@atheendre130505
Copy link
Author

Hi @ricardoV94 and team,

I realize I've mixed multiple unrelated issues (#7843, #7891, #7878) in this single PR.
Following PyMC's contribution guidelines, I should submit each fix as a separate PR.

I've closed this PR and created 4 focused PRs instead:

  1. Replace batched_dot (KroneckerNormal using deprecated batched_dot #7878)
  2. Add dims/coords validation (Check idata dims/coords for consistency before sampling begins #7891)
  3. Remove VarName (Remove VarName from codebase #7843)
  4. Update tutorial notebooks (will address your feedback on links)

Thanks for the guidance!

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.

2 participants