"...text-generation-inference.git" did not exist on "72b8f88be8ab6ea9e0ea1b499a9064825c7b5dcb"
Unverified Commit e7a446ae authored by Joanna's avatar Joanna Committed by GitHub
Browse files

add len to DC (#320)


Co-authored-by: default avatarlixuanyi <lixuanyi@sensetime.com>
parent d1283981
...@@ -50,6 +50,9 @@ class DataContainer(object): ...@@ -50,6 +50,9 @@ class DataContainer(object):
def __repr__(self): def __repr__(self):
return f'{self.__class__.__name__}({repr(self.data)})' return f'{self.__class__.__name__}({repr(self.data)})'
def __len__(self):
return len(self._data)
@property @property
def data(self): def data(self):
return self._data return self._data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment