Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print OP name for unnamed RVs instead of raising AssertionErrors #7428

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

lucianopaz
Copy link
Contributor

@lucianopaz lucianopaz commented Jul 24, 2024

Description

When trying to get the string representation of a model that has raw pytensor random variable OP's in it, instead of raising an AssertionError, try to print the OP's name between arrow brackets <>, just like what is already done for constant data.

The string representation doesn't have much of a docstring so I didn't add anything to it. I'm not sure if it's showcased anywhere either, so I didn't touch anythin doc related.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@lucianopaz lucianopaz added the bug label Jul 24, 2024
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.18%. Comparing base (f6d1b33) to head (dad7817).
Report is 97 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7428   +/-   ##
=======================================
  Coverage   92.18%   92.18%           
=======================================
  Files         103      103           
  Lines       17259    17263    +4     
=======================================
+ Hits        15910    15914    +4     
  Misses       1349     1349           
Files with missing lines Coverage Δ
pymc/printing.py 86.98% <100.00%> (+0.36%) ⬆️

@ricardoV94 ricardoV94 merged commit 8eaa9be into pymc-devs:main Jul 24, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The model string representation fails if there are unnamed RVs in the graph
2 participants