Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing processor in catalog #590

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions prepare/processors/processors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from src.unitxt import add_to_catalog
from src.unitxt.logging_utils import get_logger
from src.unitxt.operator import SequentialOperator
from src.unitxt.operators import MapInstanceValues, RemoveValues
from src.unitxt.operators import RemoveValues
from src.unitxt.processors import (
ConvertToBoolean,
FirstCharacter,
Expand Down Expand Up @@ -164,9 +164,11 @@
unallowed_values=["none"],
process_every_value=False,
),
MapInstanceValues(
mappers={"references": {"[['none']]": [[]]}},
strict=False,
RemoveValues(
field="references/*",
unallowed_values=["none"],
process_every_value=False,
use_query=True,
),
]
),
Expand Down
1 change: 1 addition & 0 deletions prepare/templates/classification/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"processors.take_first_non_empty_line",
"processors.lower_case",
"processors.to_list_by_comma",
"processors.remove_none_from_list",
],
),
"templates.classification.multi_label.empty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"postprocessors": [
"processors.take_first_non_empty_line",
"processors.lower_case",
"processors.to_list_by_comma"
"processors.to_list_by_comma",
"processors.remove_none_from_list"
]
}
Loading