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
f6fb7f6a
Unverified
Commit
f6fb7f6a
authored
Feb 12, 2022
by
Leo Gao
Committed by
GitHub
Feb 12, 2022
Browse files
gpt3: print exceptions
parent
edc9449f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
lm_eval/models/gpt3.py
lm_eval/models/gpt3.py
+2
-0
No files found.
lm_eval/models/gpt3.py
View file @
f6fb7f6a
...
@@ -46,6 +46,8 @@ def oa_completion(**kwargs):
...
@@ -46,6 +46,8 @@ def oa_completion(**kwargs):
try
:
try
:
return
openai
.
Completion
.
create
(
**
kwargs
)
return
openai
.
Completion
.
create
(
**
kwargs
)
except
openai
.
error
.
OpenAIError
:
except
openai
.
error
.
OpenAIError
:
import
traceback
traceback
.
print_exc
()
time
.
sleep
(
backoff_time
)
time
.
sleep
(
backoff_time
)
backoff_time
*=
1.5
backoff_time
*=
1.5
...
...
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