Skip to content

Commit

Permalink
dev(dispatch): rename MMEvalDispatcher to _MMEvalDispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-tong committed Sep 7, 2022
1 parent c175f76 commit dfe724a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions mmeval/core/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
Benefit from the tricks above, plum dispatch got twice faster as before.
More detail can be found at: https://github.com/wesselb/plum/issues/53
Besides, we implement `MMEvalDispatcher` to extend plum dispatch for better
Besides, we implement `_MMEvalDispatcher` to extend plum dispatch for better
support of ``typing.ForwardRef``.
"""

Expand Down Expand Up @@ -128,7 +128,7 @@ def __hash__(self):
'The multiple dispatch speed may be slow.')


class MMEvalDispatcher(plum.Dispatcher):
class _MMEvalDispatcher(plum.Dispatcher):
"""A Dispatcher inherited from ``plum.Dispatcher`` that resolve
``typing.ForwardRef``.
Expand Down Expand Up @@ -222,4 +222,4 @@ def __call__(self,
return super().__call__(method=method, **kwargs)


dispatch = MMEvalDispatcher()
dispatch = _MMEvalDispatcher()
4 changes: 2 additions & 2 deletions tests/test_core/test_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from typing import Dict, List, overload

from mmeval.core.dispatcher import MMEvalDispatcher, dispatch
from mmeval.core.dispatcher import _MMEvalDispatcher, dispatch

try:
import torch
Expand All @@ -14,7 +14,7 @@

class TestMMEvalDispatcher():

dispatcher = MMEvalDispatcher()
dispatcher = _MMEvalDispatcher()

def test_resolve_importable_type(self):
ty = self.dispatcher._resolve_importable_type('numpy.ndarray')
Expand Down

0 comments on commit dfe724a

Please sign in to comment.