MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / _get_msg

Method _get_msg

tensorpack/dataflow/common.py:822–832  ·  view source on GitHub ↗
(self, dp)

Source from the content-addressed store, hash-verified

820 return str(_elementInfo(entry, k, depth, max_list))
821
822 def _get_msg(self, dp):
823 msg = [colored(u"datapoint %i/%i with %i components consists of" %
824 (self.cnt, self.num, len(dp)), "cyan")]
825 is_dict = isinstance(dp, Mapping)
826 for k, entry in enumerate(dp):
827 if is_dict:
828 key, value = entry, dp[entry]
829 else:
830 key, value = k, entry
831 msg.append(self._analyze_input_data(value, key, max_depth=self.max_depth, max_list=self.max_list))
832 return u'\n'.join(msg)
833
834 def __iter__(self):
835 for dp in self.ds:

Callers 1

__iter__Method · 0.95

Calls 3

_analyze_input_dataMethod · 0.95
appendMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected