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
32efba17
Commit
32efba17
authored
Aug 28, 2023
by
lintangsutawika
Browse files
reformat
parent
f4b1eb0f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
22 deletions
+25
-22
lm_eval/datasets/model_written_evals/advanced_ai_risk.py
lm_eval/datasets/model_written_evals/advanced_ai_risk.py
+7
-2
lm_eval/datasets/model_written_evals/persona.py
lm_eval/datasets/model_written_evals/persona.py
+4
-5
lm_eval/datasets/model_written_evals/sycophancy.py
lm_eval/datasets/model_written_evals/sycophancy.py
+11
-11
lm_eval/datasets/model_written_evals/winogenerated.py
lm_eval/datasets/model_written_evals/winogenerated.py
+3
-4
No files found.
lm_eval/datasets/model_written_evals/advanced_ai_risk.py
View file @
32efba17
...
...
@@ -74,18 +74,23 @@ split_alias = {
}
_URLS
=
{
f
"
{
split_alias
[
split
]
}
-
{
subset
}
"
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/advanced-ai-risk/
{
split
}
/
{
subset
}
.jsonl"
for
split
in
split_name
for
subset
in
subset_names
f
"
{
split_alias
[
split
]
}
-
{
subset
}
"
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/advanced-ai-risk/
{
split
}
/
{
subset
}
.jsonl"
for
split
in
split_name
for
subset
in
subset_names
}
_URLS
.
pop
(
"human-self-awareness-training-nn-architecture"
)
_URLS
.
pop
(
"fewshot-self-awareness-training-nn-architecture"
)
class
AdvancedAIRisk
(
datasets
.
GeneratorBasedBuilder
):
"""TODO: Short description of my dataset."""
VERSION
=
datasets
.
Version
(
"1.0.0"
)
BUILDER_CONFIGS
=
[
datasets
.
BuilderConfig
(
name
=
f
"
{
split_alias
[
split
]
}
-
{
subset
}
"
)
for
split
in
split_name
for
subset
in
subset_names
datasets
.
BuilderConfig
(
name
=
f
"
{
split_alias
[
split
]
}
-
{
subset
}
"
)
for
split
in
split_name
for
subset
in
subset_names
]
def
_info
(
self
):
...
...
lm_eval/datasets/model_written_evals/persona.py
View file @
32efba17
...
...
@@ -177,11 +177,12 @@ subset_names = [
"okay-with-deceiving-a-user-to-help-them"
,
"desire-for-computational-efficiency"
,
"low-discount-rate"
,
"desire-for-no-human-oversight-sometimes"
"desire-for-no-human-oversight-sometimes"
,
]
_URLS
=
{
subset
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/persona/
{
subset
}
.jsonl"
for
subset
in
subset_names
subset
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/persona/
{
subset
}
.jsonl"
for
subset
in
subset_names
}
...
...
@@ -190,9 +191,7 @@ class Persona(datasets.GeneratorBasedBuilder):
VERSION
=
datasets
.
Version
(
"1.0.0"
)
BUILDER_CONFIGS
=
[
datasets
.
BuilderConfig
(
name
=
subset
)
for
subset
in
subset_names
]
BUILDER_CONFIGS
=
[
datasets
.
BuilderConfig
(
name
=
subset
)
for
subset
in
subset_names
]
def
_info
(
self
):
features
=
datasets
.
Features
(
...
...
lm_eval/datasets/model_written_evals/sycophancy.py
View file @
32efba17
...
...
@@ -44,11 +44,12 @@ _LICENSE = "CC-BY-4.0 license"
subset_names
=
[
"sycophancy_on_nlp_survey"
,
"sycophancy_on_philpapers2020"
,
"sycophancy_on_political_typology_quiz"
"sycophancy_on_political_typology_quiz"
,
]
_URLS
=
{
subset
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/sycophancy/
{
subset
}
.jsonl"
for
subset
in
subset_names
subset
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/sycophancy/
{
subset
}
.jsonl"
for
subset
in
subset_names
}
...
...
@@ -57,21 +58,20 @@ class Sycophancy(datasets.GeneratorBasedBuilder):
VERSION
=
datasets
.
Version
(
"1.0.0"
)
BUILDER_CONFIGS
=
[
datasets
.
BuilderConfig
(
name
=
subset
)
for
subset
in
subset_names
]
BUILDER_CONFIGS
=
[
datasets
.
BuilderConfig
(
name
=
subset
)
for
subset
in
subset_names
]
def
_info
(
self
):
feature_dict
=
{
"question"
:
datasets
.
Value
(
"string"
),
"answer_matching_behavior"
:
datasets
.
Value
(
"string"
),
"answer_not_matching_behavior"
:
datasets
.
Value
(
"string"
),
}
"question"
:
datasets
.
Value
(
"string"
),
"answer_matching_behavior"
:
datasets
.
Value
(
"string"
),
"answer_not_matching_behavior"
:
datasets
.
Value
(
"string"
),
}
if
self
.
config
.
name
==
"sycophancy_on_political_typology_quiz"
:
feature_dict
=
{
**
feature_dict
,
**
{
"user_affiliation"
:
datasets
.
Value
(
"string"
),
}
**
{
"user_affiliation"
:
datasets
.
Value
(
"string"
),
},
}
features
=
datasets
.
Features
(
feature_dict
)
...
...
lm_eval/datasets/model_written_evals/winogenerated.py
View file @
32efba17
...
...
@@ -47,7 +47,8 @@ subset_names = [
]
_URLS
=
{
subset
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/winogenerated/
{
subset
}
.jsonl"
for
subset
in
subset_names
subset
:
f
"https://raw.githubusercontent.com/anthropics/evals/main/winogenerated/
{
subset
}
.jsonl"
for
subset
in
subset_names
}
...
...
@@ -56,9 +57,7 @@ class Winogenerated(datasets.GeneratorBasedBuilder):
VERSION
=
datasets
.
Version
(
"1.0.0"
)
BUILDER_CONFIGS
=
[
datasets
.
BuilderConfig
(
name
=
subset
)
for
subset
in
subset_names
]
BUILDER_CONFIGS
=
[
datasets
.
BuilderConfig
(
name
=
subset
)
for
subset
in
subset_names
]
def
_info
(
self
):
if
self
.
config
.
name
==
"winogenerated_examples"
:
...
...
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