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

[Bug] Evaluation result is being overwritten #33

Closed
marmg opened this issue Nov 15, 2022 · 0 comments · Fixed by #34
Closed

[Bug] Evaluation result is being overwritten #33

marmg opened this issue Nov 15, 2022 · 0 comments · Fixed by #34
Assignees
Labels
bug Something isn't working

Comments

@marmg
Copy link
Collaborator

marmg commented Nov 15, 2022

Summary

In the evaluation, we update a result dict with the metrics. However, if both linker and mentions_extractor are defined the result will be overwritten:

if nlp.get_pipe("zshot").linker:
    pipe = LinkerPipeline(nlp, batch_size)
    result.update(
        {
            field_name: {
                'linker': linker_evaluator.compute(pipe, dataset[split].select([1, 4]), metric=metric)
            }
        }
    )

if nlp.get_pipe("zshot").mentions_extractor:
    pipe = MentionsExtractorPipeline(nlp, batch_size)
    result.update(
        {
            field_name: {
                'mentions_extractor': mentions_extractor_evaluator.compute(pipe, dataset[split].select([1, 4]),
                                                                           metric=metric)
            }
        }
    )
@marmg marmg added the bug Something isn't working label Nov 15, 2022
@marmg marmg self-assigned this Nov 15, 2022
@marmg marmg closed this as completed in #34 Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant