benchmark
592b7a37 - Document HuggingFaceAuthMixin class

Commit
130 days ago
Document HuggingFaceAuthMixin class Summary: ## Instructions about RACER Diffs: **Commandeer this diff (recommended) or land with accept2ship tag.** **This diff was generated by Racer AI agent on behalf of [Brian Johnson](https://www.internalfb.com/profile/view/8646079) for T246429607. If the diff quality is poor, consider contacting the user to provide clearer instructions on the task.** - If you are happy with the changes, commandeer it if minor edits are needed. (**we encourage commandeer to get the diff credit**) - If you are not happy with the changes, please comment on the diff with clear actions and send it back to the author. Racer will pick it up and re-generate. - If you really feel the Racer is not helping with this change (alas, some complex changes are hard for AI) feel free to abandon this diff. - **For M10N reviewers:** as you review AI-generated diffs, we ask you to give them the same priority as human-generated diffs, and take action in a timely manner by either accepting, rejecting, or resigning as a reviewer. For diffs that don't meet the quality bar (e.g. code doesn't compile, not readable or introduces functionality regressions), we ask that you use the following hashtags to provide clear signals to improve our tools - `#monlowqualitydiff` `#monwrongreviewerdiff` ## Summary: Added comprehensive documentation to the `HuggingFaceAuthMixin` class in the TorchBenchmark utilities. The docstring explains that this mixin validates Hugging Face Hub authentication by enforcing that the `HUGGING_FACE_HUB_TOKEN` environment variable is set, which is required to download gated models (e.g., LLaMA, CodeLLaMA) from Hugging Face Hub. Additionally fixed a lint issue (FLAKE8 E713) by changing `if not "HUGGING_FACE_HUB_TOKEN" in os.environ` to the proper Python idiom `if "HUGGING_FACE_HUB_TOKEN" not in os.environ`. --- > Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Session](https://www.internalfb.com/confucius?session_id=5890d92e-ca11-11f0-a5fc-0dc35877aa7b&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=5890d92e-ca11-11f0-a5fc-0dc35877aa7b&tab=Trace) [Session](https://www.internalfb.com/confucius?session_id=89f031ca-cd3d-11f0-a0c2-fff503540603&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=89f031ca-cd3d-11f0-a0c2-fff503540603&tab=Trace) [Session](https://www.internalfb.com/confucius?session_id=2f62c09a-d109-11f0-aa40-3141838a4523&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=2f62c09a-d109-11f0-aa40-3141838a4523&tab=Trace) Differential Revision: D87865358 fbshipit-source-id: 01e7f6ca5f05062a26ae13115948497617feb100
Author
Kai (Jason) Han
Committer
Parents
Loading