Commit 32efba17 authored by lintangsutawika's avatar lintangsutawika
Browse files

reformat

parent f4b1eb0f
...@@ -74,18 +74,23 @@ split_alias = { ...@@ -74,18 +74,23 @@ split_alias = {
} }
_URLS = { _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("human-self-awareness-training-nn-architecture")
_URLS.pop("fewshot-self-awareness-training-nn-architecture") _URLS.pop("fewshot-self-awareness-training-nn-architecture")
class AdvancedAIRisk(datasets.GeneratorBasedBuilder): class AdvancedAIRisk(datasets.GeneratorBasedBuilder):
"""TODO: Short description of my dataset.""" """TODO: Short description of my dataset."""
VERSION = datasets.Version("1.0.0") VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [ 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): def _info(self):
......
...@@ -177,11 +177,12 @@ subset_names = [ ...@@ -177,11 +177,12 @@ subset_names = [
"okay-with-deceiving-a-user-to-help-them", "okay-with-deceiving-a-user-to-help-them",
"desire-for-computational-efficiency", "desire-for-computational-efficiency",
"low-discount-rate", "low-discount-rate",
"desire-for-no-human-oversight-sometimes" "desire-for-no-human-oversight-sometimes",
] ]
_URLS = { _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): ...@@ -190,9 +191,7 @@ class Persona(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0") VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [ BUILDER_CONFIGS = [datasets.BuilderConfig(name=subset) for subset in subset_names]
datasets.BuilderConfig(name=subset) for subset in subset_names
]
def _info(self): def _info(self):
features = datasets.Features( features = datasets.Features(
......
...@@ -44,11 +44,12 @@ _LICENSE = "CC-BY-4.0 license" ...@@ -44,11 +44,12 @@ _LICENSE = "CC-BY-4.0 license"
subset_names = [ subset_names = [
"sycophancy_on_nlp_survey", "sycophancy_on_nlp_survey",
"sycophancy_on_philpapers2020", "sycophancy_on_philpapers2020",
"sycophancy_on_political_typology_quiz" "sycophancy_on_political_typology_quiz",
] ]
_URLS = { _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): ...@@ -57,21 +58,20 @@ class Sycophancy(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0") VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [ BUILDER_CONFIGS = [datasets.BuilderConfig(name=subset) for subset in subset_names]
datasets.BuilderConfig(name=subset) for subset in subset_names
]
def _info(self): def _info(self):
feature_dict = { feature_dict = {
"question": datasets.Value("string"), "question": datasets.Value("string"),
"answer_matching_behavior": datasets.Value("string"), "answer_matching_behavior": datasets.Value("string"),
"answer_not_matching_behavior": datasets.Value("string"), "answer_not_matching_behavior": datasets.Value("string"),
} }
if self.config.name == "sycophancy_on_political_typology_quiz": if self.config.name == "sycophancy_on_political_typology_quiz":
feature_dict = { feature_dict = {
**feature_dict, **feature_dict,
**{"user_affiliation": datasets.Value("string"), **{
} "user_affiliation": datasets.Value("string"),
},
} }
features = datasets.Features(feature_dict) features = datasets.Features(feature_dict)
......
...@@ -47,7 +47,8 @@ subset_names = [ ...@@ -47,7 +47,8 @@ subset_names = [
] ]
_URLS = { _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): ...@@ -56,9 +57,7 @@ class Winogenerated(datasets.GeneratorBasedBuilder):
VERSION = datasets.Version("1.0.0") VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [ BUILDER_CONFIGS = [datasets.BuilderConfig(name=subset) for subset in subset_names]
datasets.BuilderConfig(name=subset) for subset in subset_names
]
def _info(self): def _info(self):
if self.config.name == "winogenerated_examples": if self.config.name == "winogenerated_examples":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment