Skip to content

Track API usage #2706

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
Open

Track API usage #2706

wants to merge 1 commit into from

Conversation

andrewor14
Copy link
Contributor

No description provided.

Copy link

pytorch-bot bot commented Aug 6, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2706

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit e700c81 with merge base 948ade1 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 6, 2025
@andrewor14 andrewor14 requested review from jcaip and HDCharles August 6, 2025 22:23
@andrewor14 andrewor14 added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Aug 6, 2025
@@ -101,6 +102,7 @@ def convert_to_float8_training(
Returns:
nn.Module: The modified module with swapped linear layers.
"""
torch._C._log_api_usage_once("torchao.quantization.convert_to_float8_training")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vkuzo I put this under the torchao.quantization namespace based on some past discussions on code reorg that hasn't happened yet. Do you prefer this namespace compared to torchao.float8, which is the current location?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also any other float8 APIs you'd like to track?

Copy link
Contributor

Choose a reason for hiding this comment

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

is the reason for preemptively logging here ahead of the eventual migration so that querying usage metrics is easier (i.e., no need to aggregate results of 2 queries)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah and also we can start tracking earlier, not sure when the migration will happen

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO better to match existing code structure, and if a refactor happens we'll deal with the logging change. I say this because there is no timeline or owner for actually migrating torchao.float8 at the moment.

Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

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

quantize_ and pt2e looks good, these will only track internal usage right?

@andrewor14
Copy link
Contributor Author

quantize_ and pt2e looks good, these will only track internal usage right?

yeah I think so

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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants