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):
elif isinstance(o, set):
return list(o)
else:
print(f"Object of type {o.__class__.__name__} is not JSON serializable,just stringify it")
return str(o)
......@@ -112,12 +111,6 @@ def parse_eval_args() -> argparse.Namespace:
default="INFO",
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()
......@@ -134,14 +127,6 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
" --limit SHOULD ONLY BE USED FOR TESTING."
"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:
eval_logger.info(f"Including 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