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

Update main.py due to the issues 2669 #2698

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

Conversation

openvino-book
Copy link

To fix the AttributeError: 'list' object has no attribute 'keys'

Solution: change the L149 of the main.py to validator.stats = dict(tp_m=[], tp=[], conf=[], pred_cls=[], target_cls=[])

Changes

change the L149 of the main.py

validator.stats = []

to

validator.stats = dict(tp_m=[], tp=[], conf=[], pred_cls=[], target_cls=[])

Reason for changes

Related tickets

Tests

AttributeError: 'list' object has no attribute 'keys'
change the L149 of the main.py to
validator.stats = dict(tp_m=[], tp=[], conf=[], pred_cls=[], target_cls=[])
@openvino-book openvino-book requested a review from a team as a code owner May 25, 2024 05:31
@github-actions github-actions bot added the NNCF OpenVINO Pull requests that updates NNCF OpenVINO label May 25, 2024
Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Could you bump version of ultralytics as well?

@@ -38,7 38,7 @@ def validate(
) -> Tuple[Dict, int, int]:
validator.seen = 0
validator.jdict = []
validator.stats = []
validator.stats = dict(tp_m=[], tp=[], conf=[], pred_cls=[], target_cls=[])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is not compatible with Python 3.8, which supports NNCF. Please rework it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF OpenVINO Pull requests that updates NNCF OpenVINO
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants