Skip to content

Conversation

scotts
Copy link
Contributor

@scotts scotts commented Aug 18, 2025

Add internal torch-based logging for all of our top-level APIs.

Usage of this call is similar to using the logging module in the Python stdlib. It can be used for debugging purpose to log which methods are used and by default it is inactive, unless the user manually subscribes a logger via the SetAPIUsageLogger function. Please note it is triggered only once for the same API call within a process. It does not collect any data from open-source users since it is no-op by default. For more information, please refer to the PyTorch note on API usage logging.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 18, 2025
@scotts scotts marked this pull request as ready for review August 18, 2025 13:43
@scotts scotts changed the title Add usage logging Add internal usage logging Aug 18, 2025
Copy link
Contributor

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

LGTM, maybe we want to log usage of the AudioEncoder as well?

@scotts
Copy link
Contributor Author

scotts commented Aug 18, 2025

@NicolasHug, yes, definitely, that was an oversight on my part.

@scotts scotts merged commit ffcb7ab into main Aug 18, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants