Skip to content

Conversation

@apoupon
Copy link

@apoupon apoupon commented Jun 7, 2025

Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'.

This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools

PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9

@CLAassistant
Copy link

CLAassistant commented Jun 7, 2025

CLA assistant check
All committers have signed the CLA.

@mwaseemrandhawa
Copy link

downgrade the pycocotools to 2.0.0

@apoupon
Copy link
Author

apoupon commented Jun 10, 2025

downgrade the pycocotools to 2.0.0

yes that works as a quick fix, I'm just suggesting a long-term fix to stay aligned with pycocotools

@luicalrob
Copy link

For me, version 2.0.8 worked

@FateScript
Copy link
Member

Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'.

This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools

PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9

Does this only happened in Evaluator? Using pop here could help users to save memory

@apoupon
Copy link
Author

apoupon commented Jun 29, 2025

Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'.
This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools
PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9

Does this only happened in Evaluator? Using pop here could help users to save memory

Yes, only in Evaluator !

if you think saving memory is crucial here maybe we can just update requirements.txt with version < 2.0.9

@FateScript
Copy link
Member

Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'.
This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools
PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9

Does this only happened in Evaluator? Using pop here could help users to save memory

Yes, only in Evaluator !

if you think saving memory is crucial here maybe we can just update requirements.txt with version < 2.0.9

Could you check if it's in eval mode, if so, don't pop, else pop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants