Shortcuts

Source code for mmeval.fileio.backends.base

# Copyright (c) OpenMMLab. All rights reserved.
from abc import ABCMeta, abstractmethod


[docs]class BaseStorageBackend(metaclass=ABCMeta): """Abstract class of storage backends. All backends need to implement two apis: :meth:`get()` and :meth:`get_text()`. - :meth:`get()` reads the file as a byte stream. - :meth:`get_text()` reads the file as texts. """ @property def name(self): return self.__class__.__name__ @abstractmethod def get(self, filepath): pass @abstractmethod def get_text(self, filepath): pass
Read the Docs v: latest
Versions
latest
stable
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.