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
a6bb79b4
Unverified
Commit
a6bb79b4
authored
Dec 05, 2021
by
Leo Gao
Committed by
GitHub
Dec 05, 2021
Browse files
Update test_gpt3.py
parent
01b98d2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
tests/test_gpt3.py
tests/test_gpt3.py
+1
-0
No files found.
tests/test_gpt3.py
View file @
a6bb79b4
...
...
@@ -27,6 +27,7 @@ def mock_completion(**kwargs):
@
mock
.
patch
(
"lm_eval.models.gpt3.oa_completion"
,
new
=
mock_completion
)
def
test_gpt3
():
if
"OPENAI_API_SECRET_KEY"
not
in
os
.
environ
:
os
.
environ
[
"OPENAI_API_SECRET_KEY"
]
=
""
gpt3
=
models
.
get_model
(
'gpt3'
).
create_from_arg_string
(
"engine=ada"
)
(
ll_dog
,
ig_dog
),
(
ll_cat
,
ig_cat
),
(
_
,
ll_max_0
),
(
_
,
ll_max_1
),
(
_
,
ll_max_2
),
*
vals
=
gpt3
.
loglikelihood
([
(
'The quick brown fox jumps over the lazy'
,
' dog'
),
...
...
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