Skip to content

Add compiler_verbose config flag #1520

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jul 4, 2025

It makes it easier for users to let us know what kind of graph isn't actually compiling this way.


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

@ricardoV94 ricardoV94 changed the title Add compiler_verbose config flag Add compiler_verbose config flag Jul 4, 2025
@ricardoV94 ricardoV94 requested a review from jessegrabowski July 4, 2025 08:56
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 82.04%. Comparing base (ae38884) to head (82ab6cf).

Files with missing lines Patch % Lines
pytensor/link/numba/dispatch/basic.py 0.00% 1 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1520      +/-   ##
==========================================
- Coverage   82.04%   82.04%   -0.01%     
==========================================
  Files         231      231              
  Lines       52364    52368       +4     
  Branches     9217     9218       +1     
==========================================
+ Hits        42962    42964       +2     
- Misses       7094     7095       +1     
- Partials     2308     2309       +1     
Files with missing lines Coverage Δ
pytensor/configdefaults.py 73.63% <100.00%> (+0.08%) ⬆️
pytensor/configparser.py 92.58% <100.00%> (+0.02%) ⬆️
pytensor/link/numba/dispatch/basic.py 78.66% <0.00%> (-0.43%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jessegrabowski jessegrabowski left a comment

Choose a reason for hiding this comment

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

Looks great, but need to add a section to docs/library/config.rst

@ricardoV94
Copy link
Member Author

No I shouldn't, that should be generated automatically. It's bad design if it's not and I would open an issue for that

@ricardoV94
Copy link
Member Author

It's the year 2025 ffs

@jessegrabowski
Copy link
Member

In that case could you beef up the help string of the flag a bit, so that in the future when this section is auto-generated, it's helpful. It appears to only do anything in numba mode, and it dprints nodes? I somewhat don't get it.

@ricardoV94
Copy link
Member Author

Right now it only does that but could be used for whenever we want to output information during compilation (as opposed to during rewrite). The node dprint is because when someone says numba is falling back to objectmode for stuff like AdvancedSubtensor that's not enough info, because there are 99 flavors of it

Copy link
Member

@jessegrabowski jessegrabowski left a comment

Choose a reason for hiding this comment

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

Fine then, I'm approving, but I will point out that you could have written something shorter than your reply to satisfy my request, rather than the reply itself.

@ricardoV94
Copy link
Member Author

I'm AFK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants