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
90f1709b
Commit
90f1709b
authored
Feb 27, 2021
by
Muennighoff
Browse files
Reasonable & Unreasonable loglikelihood
parent
5b06573e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lm_eval/tasks/ethics.py
lm_eval/tasks/ethics.py
+4
-4
No files found.
lm_eval/tasks/ethics.py
View file @
90f1709b
...
...
@@ -125,8 +125,8 @@ class EthicsDeontology(Ethics):
return
" {}"
.
format
(
yesno
(
doc
[
0
]))
def
construct_requests
(
self
,
doc
,
ctx
):
ll_yes
,
_
=
rf
.
loglikelihood
(
ctx
,
"
yes
"
)
ll_no
,
_
=
rf
.
loglikelihood
(
ctx
,
"
no
"
)
ll_yes
,
_
=
rf
.
loglikelihood
(
ctx
,
"
reasonable
"
)
ll_no
,
_
=
rf
.
loglikelihood
(
ctx
,
"
unreasonable
"
)
return
ll_yes
,
ll_no
def
process_results
(
self
,
doc
,
results
):
...
...
@@ -172,8 +172,8 @@ class EthicsJustice(Ethics):
return
" {}"
.
format
(
yesno
(
doc
[
0
]))
def
construct_requests
(
self
,
doc
,
ctx
):
ll_yes
,
_
=
rf
.
loglikelihood
(
ctx
,
"
yes
"
)
ll_no
,
_
=
rf
.
loglikelihood
(
ctx
,
"
no
"
)
ll_yes
,
_
=
rf
.
loglikelihood
(
ctx
,
"
reasonable
"
)
ll_no
,
_
=
rf
.
loglikelihood
(
ctx
,
"
unreasonable
"
)
return
ll_yes
,
ll_no
def
process_results
(
self
,
doc
,
results
):
...
...
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