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

When logging cache hit/miss, include cache_key #22548

Open
cool-RR opened this issue Jul 21, 2024 · 3 comments · May be fixed by #22556
Open

When logging cache hit/miss, include cache_key #22548

cool-RR opened this issue Jul 21, 2024 · 3 comments · May be fixed by #22556
Assignees
Labels
enhancement New feature or request

Comments

@cool-RR
Copy link
Contributor

cool-RR commented Jul 21, 2024

I want these log messages:

Persistent compilation cache hit for 'jit_scan_outer_bigs'

To look like this:

Persistent compilation cache hit for 'jit_scan_outer_bigs' with cache_key `b86d2a45745d2417b7a28b1c38aa39497bf611e8320238cabe31e99142be5f2d`

Optionally we can truncate the cache key. I implemented this feature, let me know if you want a pull request.

@cool-RR cool-RR added the enhancement New feature or request label Jul 21, 2024
@ayaka14732
Copy link
Member

Thank you! Please make a pull request

@jaro-sevcik
Copy link
Contributor

I like your proposal - just let me note here that you can already log cache keys (including info about its calculation):

import logging
logging.getLogger("jax._src.cache_key").setLevel(logging.DEBUG)

@cool-RR
Copy link
Contributor Author

cool-RR commented Jul 22, 2024

@jaro-sevcik Thank you. However these log lines do not contain the module name which makes them a bit difficult to search for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants