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
c7fd34c2
Commit
c7fd34c2
authored
Jun 18, 2021
by
Jonathan Tow
Browse files
Replace `wget` downloading with `best_download`
parent
ebcb28f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lm_eval/tasks/mutual.py
lm_eval/tasks/mutual.py
+5
-2
No files found.
lm_eval/tasks/mutual.py
View file @
c7fd34c2
...
@@ -17,7 +17,7 @@ import numpy as np
...
@@ -17,7 +17,7 @@ import numpy as np
from
pathlib
import
Path
from
pathlib
import
Path
from
lm_eval.base
import
Task
,
rf
from
lm_eval.base
import
Task
,
rf
from
lm_eval.metrics
import
mean
from
lm_eval.metrics
import
mean
from
lm_eval.utils
import
sh
from
best_download
import
download_file
class
MuTualBase
(
Task
):
class
MuTualBase
(
Task
):
...
@@ -34,7 +34,10 @@ class MuTualBase(Task):
...
@@ -34,7 +34,10 @@ class MuTualBase(Task):
return
return
Path
.
mkdir
(
self
.
BASE_PATH
,
parents
=
True
)
Path
.
mkdir
(
self
.
BASE_PATH
,
parents
=
True
)
master_zip
=
Path
(
"data/master.zip"
)
master_zip
=
Path
(
"data/master.zip"
)
sh
(
f
"wget https://github.com/Nealcly/MuTual/archive/master.zip -O
{
master_zip
}
"
)
download_file
(
"https://github.com/Nealcly/MuTual/archive/master.zip"
,
str
(
master_zip
),
"bb325cf6c672f0f02699993a37138b0fa0af6fcfc77ec81dfbe46add4d7b29f9"
)
with
zipfile
.
ZipFile
(
master_zip
,
'r'
)
as
zip
:
with
zipfile
.
ZipFile
(
master_zip
,
'r'
)
as
zip
:
zip
.
extractall
(
"data"
)
zip
.
extractall
(
"data"
)
Path
(
"data/MuTual-master/data"
).
rename
(
str
(
self
.
BASE_PATH
))
Path
(
"data/MuTual-master/data"
).
rename
(
str
(
self
.
BASE_PATH
))
...
...
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