"vscode:/vscode.git/clone" did not exist on "b54515a6e16c5a4c1a2d4b62eba1bb59838231be"
Unverified Commit 4ac7f064 authored by Hailey Schoelkopf's avatar Hailey Schoelkopf Committed by GitHub
Browse files

remove `--huggingface_login`

parent 305b5460
...@@ -20,7 +20,6 @@ def _handle_non_serializable(o): ...@@ -20,7 +20,6 @@ def _handle_non_serializable(o):
elif isinstance(o, set): elif isinstance(o, set):
return list(o) return list(o)
else: else:
print(f"Object of type {o.__class__.__name__} is not JSON serializable,just stringify it")
return str(o) return str(o)
...@@ -112,12 +111,6 @@ def parse_eval_args() -> argparse.Namespace: ...@@ -112,12 +111,6 @@ def parse_eval_args() -> argparse.Namespace:
default="INFO", default="INFO",
help="Log error when tasks are not registered.", help="Log error when tasks are not registered.",
) )
parser.add_argument(
"--huggingface_login",
action="store_true",
default=False,
help="huggingface token for downloading some authorization datasets, like toxigen, you need add HUGGINGFACE_LOGIN_TOKEN to environment variable firstly. https://huggingface.co/settings/tokens",
)
return parser.parse_args() return parser.parse_args()
...@@ -134,14 +127,6 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None: ...@@ -134,14 +127,6 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
" --limit SHOULD ONLY BE USED FOR TESTING." " --limit SHOULD ONLY BE USED FOR TESTING."
"REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT." "REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT."
) )
if args.huggingface_login:
from huggingface_hub import login
assert (
"HUGGINGFACE_LOGIN_TOKEN" in os.environ
), "Your environment variable does not contain a HUGGINGFACE_LOGIN_TOKEN. Please set the token first."
huggingface_token = os.environ["HUGGINGFACE_LOGIN_TOKEN"]
login(token=huggingface_token)
if args.include_path is not None: if args.include_path is not None:
eval_logger.info(f"Including path: {args.include_path}") eval_logger.info(f"Including path: {args.include_path}")
include_path(args.include_path) include_path(args.include_path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment