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

tests: data: coco_evaluation: Fix test #5298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jmennius
Copy link

@Jmennius Jmennius commented May 30, 2024

...by deep copying results before passing to coco.
The results dictionary will be attached as 'annotations' to the dataset and will be changed,
making the use of the same structure impossible for the second time.

Previously the test would fail on second call to coco_api.loadRes() with an exception (KeyError: 'precision' when trying to calculate difference between API results).

Also, handle the case when one API produces an exception and the other one does not. Previously, the test code would ignore that and try to calculate the difference resulting in an error.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 30, 2024
...by deep copying results before passing to coco.
The results dictionary will be attached as 'annotations' to the dataset
and will be changed, making the use of the same structure impossible for the second time.

Previously the test would fail on second call to `coco_api.loadRes()` with an exception
(`KeyError: 'precision'` when trying to calculate difference between API results).

Also, handle the case when one API produces an exception and the other one does not.
Previously, the test code would ignore that and try to calculate the difference.

Signed-off-by: Ievgen Popovych <[email protected]>
@Jmennius Jmennius force-pushed the fix-test-coco-evaluation-fast-eval branch from e18b231 to 7416833 Compare May 30, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants