"vscode:/vscode.git/clone" did not exist on "c7ad413e7d65bfaaac9d357d62c8b07da05b3b3f"
Commit 197940f7 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

don't exit if RTP api key not set

parent 759da8d5
......@@ -9,8 +9,10 @@ from lm_eval.logger import eval_logger
try:
API_KEY = os.environ["PERSPECTIVE_API_KEY"]
except KeyError:
eval_logger.error("PERSPECTIVE_API_KEY is not set")
raise SystemExit(0)
API_KEY = None
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}"
......
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