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
c179f7af
Commit
c179f7af
authored
Dec 20, 2024
by
Baber
Browse files
add cache
parent
134b4865
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
lm_eval/tasks/ruler/essays.py
lm_eval/tasks/ruler/essays.py
+2
-0
No files found.
lm_eval/tasks/ruler/essays.py
View file @
c179f7af
...
@@ -15,6 +15,7 @@ import asyncio
...
@@ -15,6 +15,7 @@ import asyncio
import
glob
import
glob
import
os
import
os
import
shutil
import
shutil
from
functools
import
cache
from
typing
import
Dict
from
typing
import
Dict
import
html2text
import
html2text
...
@@ -118,6 +119,7 @@ async def get_essays() -> Dict[str, str]:
...
@@ -118,6 +119,7 @@ async def get_essays() -> Dict[str, str]:
return
{
"text"
:
text
}
return
{
"text"
:
text
}
@
cache
def
get_all_essays
()
->
Dict
[
str
,
str
]:
def
get_all_essays
()
->
Dict
[
str
,
str
]:
"""Synchronous wrapper for get_essays()"""
"""Synchronous wrapper for get_essays()"""
return
asyncio
.
run
(
get_essays
())
return
asyncio
.
run
(
get_essays
())
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