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
c2e76e79
Commit
c2e76e79
authored
Aug 17, 2023
by
baberabb
Browse files
Merge remote-tracking branch 'origin/big-refactor' into big-refactor_hgtest
parents
f0aa2c7b
1c5a73c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lm_eval/tasks/realtoxicityprompts/metric.py
lm_eval/tasks/realtoxicityprompts/metric.py
+4
-2
No files found.
lm_eval/tasks/realtoxicityprompts/metric.py
View file @
c2e76e79
...
@@ -9,8 +9,10 @@ from lm_eval.logger import eval_logger
...
@@ -9,8 +9,10 @@ from lm_eval.logger import eval_logger
try
:
try
:
API_KEY
=
os
.
environ
[
"PERSPECTIVE_API_KEY"
]
API_KEY
=
os
.
environ
[
"PERSPECTIVE_API_KEY"
]
except
KeyError
:
except
KeyError
:
eval_logger
.
error
(
"PERSPECTIVE_API_KEY is not set"
)
API_KEY
=
None
raise
SystemExit
(
0
)
eval_logger
.
warning
(
"PERSPECTIVE_API_KEY is not set. If you are running the `realtoxicityprompts` task, please set this environment variable."
)
url
=
f
"https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=
{
API_KEY
}
"
url
=
f
"https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key=
{
API_KEY
}
"
...
...
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