def __repr__(self) -> str: attrs = { "specials": self.specials, "eager": self.eager, "is_finalized": self.is_finalized, "size": len(self), } return repr_type_and_attrs(self, attrs)
def __repr__(self) -> str: attrs = { "batch_size": self._batch_size, "epoch": self._epoch, "iteration": self._iterations, "shuffle": self._shuffle, } return repr_type_and_attrs(self, attrs, with_newlines=True)
def __repr__(self): fields_str = ",\n".join( textwrap.indent(repr(f), " " * 4) for f in self._output_fields) fields_str = f"[\n{fields_str}\n \n]" attrs = {"fields": fields_str} return repr_type_and_attrs(self, attrs, with_newlines=True, repr_values=False)
def __repr__(self): attrs = { "name": self.name, "keep_raw": self._keep_raw, "is_target": self.is_target, } if self.use_vocab: attrs["vocab"] = self.vocab return repr_type_and_attrs(self, attrs, with_newlines=True)
def __repr__(self): fields_str = ",\n".join(textwrap.indent(repr(f), " " * 8) for f in self.fields) fields_str = f"[\n{fields_str}\n \n]" attrs = { "dataset_name": self._dataset.builder_name, "size": len(self), "fields": fields_str, } return repr_type_and_attrs(self, attrs, with_newlines=True, repr_values=False)
def __repr__(self): attrs = {"model": self.model, "trainer": self.trainer} return repr_type_and_attrs(self, attrs)
def __repr__(self): attrs = {"size": len(self)} return repr_type_and_attrs(self, attrs)
def __repr__(self): attrs = {k: v for k, v in self.items() if not k.endswith("_")} return repr_type_and_attrs(self, attrs, with_newlines=True)
def __repr__(self): return repr_type_and_attrs(self, self, with_newlines=True, repr_values=False)