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

[Fix] Fix import error in python3.6 #77

Merged
merged 2 commits into from
Jan 12, 2023

Conversation

ytzhao
Copy link
Contributor

@ytzhao ytzhao commented Jan 12, 2023

Motivation

If we install mmeval with python3.6.x, it will crash to call from mmeval import Accuracy.

image

Modification

Replace hasattr with getattr when recursively traversing nested type hints in dispatcher.

image

@CLAassistant
Copy link

CLAassistant commented Jan 12, 2023

CLA assistant check
All committers have signed the CLA.

mmeval/core/dispatcher.py Outdated Show resolved Hide resolved
@ice-tong ice-tong changed the title [Fix] Use getattr to recursively traverse nested type hints in dispatcher [Fix] Fix import error in python3.6 Jan 12, 2023
Copy link
Collaborator

@ice-tong ice-tong left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@zhouzaida zhouzaida merged commit b9fa80c into open-mmlab:main Jan 12, 2023
@ytzhao ytzhao deleted the ytzhao/fixbug_dispatcher_with_py36 branch January 12, 2023 05:01
@zhouzaida zhouzaida mentioned this pull request Mar 3, 2023
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.

None yet

4 participants