-
Notifications
You must be signed in to change notification settings - Fork 265
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
Evaluator column loading #200
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Great I'll test tomorrow morning! |
@@ -119,7 +121,8 @@ def prepare_data(self, data: Union[str, Dataset], input_column: str, label_colum | |||
references = data[label_column] | |||
|
|||
metric_inputs = {"references": references} | |||
pipeline_inputs = [join_by.join(element) for element in data[input_column]] | |||
data = data.map(lambda x: {input_column: join_by.join(x[input_column])}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: is this faster than a list comprehension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, but it will not load the data into memory.
* add `DatasetColumn` class * add __iter__ * make style * adapt QA * adapt NER
Instead of loading the pipeline inputs into memory this PR just wraps the original dataset in a
DatasetColumn
class. This allows to evaluate on huge datasets (e.g. ImageNet) without OOM errors.cc @fxmarty