Skip to content

Commit

Permalink
Revert "Rename WANLP22 Propaganda dataset and assets (#209)"
Browse files Browse the repository at this point in the history
This reverts commit 889e926.
  • Loading branch information
fdalvi committed Sep 17, 2023
1 parent 1cad253 commit 7c738a6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import random
import re

from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.models import PetalsModel
from llmebench.tasks import MultilabelPropagandaTask


random.seed(1333)


def config():
return {
"dataset": WANLP22PropagandaDataset,
"dataset": WANLP22T3PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import regex as re

from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.models import LegacyOpenAIModel
from llmebench.tasks import MultilabelPropagandaTask


def config():
return {
"dataset": WANLP22PropagandaDataset,
"dataset": WANLP22T3PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import random
import re

from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.models import OpenAIModel
from llmebench.tasks import MultilabelPropagandaTask


random.seed(1333)


def config():
return {
"dataset": WANLP22PropagandaDataset,
"dataset": WANLP22T3PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import random
import re

from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.models import OpenAIModel
from llmebench.tasks import MultilabelPropagandaTask


random.seed(1333)


def config():
return {
"dataset": WANLP22PropagandaDataset,
"dataset": WANLP22T3PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from llmebench.tasks import TaskType


class WANLP22PropagandaDataset(DatasetBase):
class WANLP22T3PropagandaDataset(DatasetBase):
def __init__(self, techniques_path=None, **kwargs):
# Get the path to the file listing the target techniques
self.techniques_path = Path(techniques_path) if techniques_path else None
super(WANLP22PropagandaDataset, self).__init__(**kwargs)
super(WANLP22T3PropagandaDataset, self).__init__(**kwargs)

@staticmethod
def metadata():
Expand Down
2 changes: 1 addition & 1 deletion llmebench/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from .TyDiQA import TyDiQADataset
from .UnifiedFCFactuality import UnifiedFCFactualityDataset
from .UnifiedFCStance import UnifiedFCStanceDataset
from .WANLP22Propaganda import WANLP22PropagandaDataset
from .WANLP22T3Propaganda import WANLP22T3PropagandaDataset
from .WikiNewsDiacritization import WikiNewsDiacritizationDataset
from .WikiNewsLemmatization import WikiNewsLemmatizationDataset
from .WikiNewsPOS import WikiNewsPOSDataset
Expand Down

0 comments on commit 7c738a6

Please sign in to comment.