Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
4ac7f064
"vscode:/vscode.git/clone" did not exist on "b54515a6e16c5a4c1a2d4b62eba1bb59838231be"
Unverified
Commit
4ac7f064
authored
Nov 01, 2023
by
Hailey Schoelkopf
Committed by
GitHub
Nov 01, 2023
Browse files
remove `--huggingface_login`
parent
305b5460
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
lm_eval/__main__.py
lm_eval/__main__.py
+0
-15
No files found.
lm_eval/__main__.py
View file @
4ac7f064
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment