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
0feef0d6
Commit
0feef0d6
authored
Sep 05, 2020
by
Anish Thite
Browse files
add coqa extraction
parent
38ed3ac8
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
157 additions
and
0 deletions
+157
-0
datasets/coqa/evaluateCoQA.py
datasets/coqa/evaluateCoQA.py
+29
-0
datasets/coqa/testcoquaextraction.ipynb
datasets/coqa/testcoquaextraction.ipynb
+128
-0
No files found.
datasets/coqa/evaluateCoQA.py
0 → 100644
View file @
0feef0d6
from
...base
import
Dataset
import
os
import
json
class
CoQA
(
Dataset
):
def
training_docs
(
self
):
pass
def
validation_docs
(
self
):
pass
def
test_docs
(
self
):
pass
def
fewshot_examples
(
self
,
k
):
traindocs
=
list
(
self
.
training_docs
())
random
.
seed
(
123
)
random
.
shuffle
(
traindocs
)
return
traindocs
[:
k
]
def
fewshot_description
(
self
):
pass
def
doc_to_text
(
self
,
doc
,
include_target
=
True
):
json
.
load
(
open
(
doc
))
datasets/coqa/testcoquaextraction.ipynb
0 → 100644
View file @
0feef0d6
This diff is collapsed.
Click to expand it.
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