Skip to content

add docstring for _log_api_usage_once #5273

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

Merged
merged 4 commits into from
Jan 26, 2022
Merged

Conversation

kazhang
Copy link
Contributor

@kazhang kazhang commented Jan 25, 2022

closes: #4957

@facebook-github-bot
Copy link

facebook-github-bot commented Jan 25, 2022

💊 CI failures summary and remediations

As of commit 250535c (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

@kazhang Previously the community raised concerns over the nature of logging. Though the proposed documentation is factually correct, I feel it doesn't adequately explain what this is and how it can be used.

I would recommend to cover the following points within the docstring:

  • The function provides similar functionality as the logging module from the Python stdlib.
  • It can be used for debugging purposes to log which methods are used and by default it is inactive (no-op), unless the user manually subscribes a logger via the SetAPIUsageLogger method.
  • It doesn't collect any data from open-source users and by default is no-op.

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @kazhang!

@datumbox datumbox merged commit 2275c28 into pytorch:main Jan 26, 2022
@github-actions
Copy link

Hey @datumbox!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

facebook-github-bot pushed a commit that referenced this pull request Feb 3, 2022
Summary:
* add docstring for _log_api_usage_once

* lint

* rephrase

Reviewed By: kazhang

Differential Revision: D33927494

fbshipit-source-id: 95c33f2f0fb8b576ce5528cc98f33661556c4819

Co-authored-by: Vasilis Vryniotis <[email protected]>
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.

What's purpose of logging?
3 participants