open-mmlab / mmeval

A unified evaluation library for multiple machine learning libraries
https://mmeval.readthedocs.io/en/latest/
Apache License 2.0
256 stars 49 forks source link

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

Closed ytzhao closed 1 year ago

ytzhao commented 1 year ago

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 commented 1 year ago

CLA assistant check
All committers have signed the CLA.