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
724d728d
Unverified
Commit
724d728d
authored
Nov 02, 2021
by
Leo Gao
Committed by
GitHub
Nov 02, 2021
Browse files
Merge pull request #225 from JunShern/fix-mkdir-with-parents
Always mkdir with parents
parents
c59bfde8
3bdba226
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
lm_eval/tasks/drop.py
lm_eval/tasks/drop.py
+1
-1
lm_eval/tasks/logiqa.py
lm_eval/tasks/logiqa.py
+1
-1
lm_eval/tasks/qa4mre.py
lm_eval/tasks/qa4mre.py
+1
-1
lm_eval/tasks/sciq.py
lm_eval/tasks/sciq.py
+1
-1
No files found.
lm_eval/tasks/drop.py
View file @
724d728d
...
@@ -23,7 +23,7 @@ class DROP(Task):
...
@@ -23,7 +23,7 @@ class DROP(Task):
def
download
(
self
):
def
download
(
self
):
if
self
.
DATASET_PATH
.
exists
():
if
self
.
DATASET_PATH
.
exists
():
return
return
Path
.
mkdir
(
self
.
DATASET_PATH
)
Path
.
mkdir
(
self
.
DATASET_PATH
,
parents
=
True
)
url
=
"https://s3-us-west-2.amazonaws.com/allennlp/datasets/drop/drop_dataset.zip"
url
=
"https://s3-us-west-2.amazonaws.com/allennlp/datasets/drop/drop_dataset.zip"
checksum
=
"39d2278a29fd729de301b111a45f434c24834f40df8f4ff116d864589e3249d6"
checksum
=
"39d2278a29fd729de301b111a45f434c24834f40df8f4ff116d864589e3249d6"
zip_path
=
self
.
DATASET_PATH
/
"drop_dataset.zip"
zip_path
=
self
.
DATASET_PATH
/
"drop_dataset.zip"
...
...
lm_eval/tasks/logiqa.py
View file @
724d728d
...
@@ -10,7 +10,7 @@ class LogiQA(MultipleChoiceTask):
...
@@ -10,7 +10,7 @@ class LogiQA(MultipleChoiceTask):
def
download
(
self
):
def
download
(
self
):
if
self
.
DATASET_PATH
.
exists
():
if
self
.
DATASET_PATH
.
exists
():
return
return
Path
.
mkdir
(
self
.
DATASET_PATH
)
Path
.
mkdir
(
self
.
DATASET_PATH
,
parents
=
True
)
base_url
=
"https://raw.githubusercontent.com/lgw863/LogiQA-dataset/master"
base_url
=
"https://raw.githubusercontent.com/lgw863/LogiQA-dataset/master"
splits
=
[
splits
=
[
{
"name"
:
"Train"
,
"checksum"
:
"7d5bb1f58278e33b395744cd2ad8d7600faa0b3c4d615c659a44ec1181d759fa"
},
{
"name"
:
"Train"
,
"checksum"
:
"7d5bb1f58278e33b395744cd2ad8d7600faa0b3c4d615c659a44ec1181d759fa"
},
...
...
lm_eval/tasks/qa4mre.py
View file @
724d728d
...
@@ -28,7 +28,7 @@ class QA4MRE(MultipleChoiceTask):
...
@@ -28,7 +28,7 @@ class QA4MRE(MultipleChoiceTask):
vpath
=
variable_year_path
[
year
]
vpath
=
variable_year_path
[
year
]
url_path
=
f
"
{
base_path
}{
vpath
}
QA4MRE-
{
year
}
-
{
lang
}
_GS.xml"
url_path
=
f
"
{
base_path
}{
vpath
}
QA4MRE-
{
year
}
-
{
lang
}
_GS.xml"
if
not
os
.
path
.
exists
(
"data/qa4mre"
):
if
not
os
.
path
.
exists
(
"data/qa4mre"
):
os
.
m
k
dir
(
"data/qa4mre"
)
os
.
m
ake
dir
s
(
"data/qa4mre"
,
exist_ok
=
True
)
if
not
os
.
path
.
isfile
(
f
"data/qa4mre/QA4MRE-
{
year
}
-
{
lang
}
"
):
if
not
os
.
path
.
isfile
(
f
"data/qa4mre/QA4MRE-
{
year
}
-
{
lang
}
"
):
download_file
(
download_file
(
url_path
,
url_path
,
...
...
lm_eval/tasks/sciq.py
View file @
724d728d
...
@@ -10,7 +10,7 @@ class SciQ(MultipleChoiceTask):
...
@@ -10,7 +10,7 @@ class SciQ(MultipleChoiceTask):
# Multiple languages and multiple years
# Multiple languages and multiple years
def
download
(
self
):
def
download
(
self
):
if
not
os
.
path
.
exists
(
'data/sciq'
):
if
not
os
.
path
.
exists
(
'data/sciq'
):
os
.
m
k
dir
(
'data/sciq'
)
os
.
m
ake
dir
s
(
'data/sciq'
,
exist_ok
=
True
)
download_file
(
download_file
(
'https://ai2-public-datasets.s3.amazonaws.com/sciq/SciQ.zip'
,
'https://ai2-public-datasets.s3.amazonaws.com/sciq/SciQ.zip'
,
'data/sciq/SciQ.zip'
,
'data/sciq/SciQ.zip'
,
...
...
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