repr_class#

pytorch_forecasting.utils._utils.repr_class(obj, attributes: list[str] | dict[str, Any], max_characters_before_break: int = 100, extra_attributes: dict[str, Any] = None) str[source]#

Print class name and parameters.

Parameters:
  • obj (Any) – Class to format.

  • attributes (list of str or dict of str to Any) – List of attributes to show or dictionary of attributes and values to show.

  • max_characters_before_break (int, optional) – Number of characters before breaking into multiple lines. Defaults to 100.

  • extra_attributes (dict of str to Any, optional) – Extra attributes to show in angled brackets.

Returns:

Formatted string representation of the class.

Return type:

str