-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gated command to help asking for permission to huggingface
- Loading branch information
pierre.delaunay
committed
Jan 13, 2025
1 parent
4dc0ba9
commit 137e4ae
Showing
4 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"""This file is generated, do not modify""" | ||
|
||
__tag__ = "v0.1.0-146-ga8415d3" | ||
__commit__ = "a8415d3da9f91aa1ac23d932dff2c70fe580e556" | ||
__date__ = "2024-11-21 14:35:55 -0500" | ||
__tag__ = "v1.0.0-7-g4dc0ba9" | ||
__commit__ = "4dc0ba9f3b35119dc1947d6dc8f6502e5d34dd50" | ||
__date__ = "2024-12-11 14:44:23 -0500" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
|
||
|
||
from milabench.common import arguments, _get_multipack | ||
|
||
|
||
def cli_gated(): | ||
args = arguments() | ||
|
||
benchmarks = _get_multipack(args, return_config=True) | ||
gated_bench = [] | ||
|
||
for bench, config in benchmarks.items(): | ||
tags = config.get("tags", []) | ||
|
||
if "gated" in tags and 'url' in config: | ||
gated_bench.append((bench, config)) | ||
|
||
if len(gated_bench) > 0: | ||
print("benchmark use gated models or datasets") | ||
print("You need to request permission to huggingface") | ||
print() | ||
for bench, config in gated_bench: | ||
print(f"{bench}") | ||
print(f" url: {config.get('url')}") | ||
|
||
print() | ||
print("Create a new token") | ||
print(" - https://huggingface.co/settings/tokens/new?tokenType=read") | ||
print("") | ||
print("Add your token to your environment") | ||
print(" export MILABENCH_HF_TOKEN={your_token}") | ||
print("") | ||
print("Now you are ready to execute `milabench prepare`") |