docstr: Only the non-empty attributes are returned, to minimize empty values.
docstr_tok: ["Only","the","non-empty","attributes","are","returned",",","to","minimize","empty","values","."]
code: def to_dict(self):
      """
      Only the non-empty attributes are returned, to minimize empty values.
      """
      info = {}
      for key, val in self.__dict__.items():
          if val:
              info[key] = val
      return info
  
imports: import os
  import logging
  from dataclasses import dataclass
  from typing import Optional, Union, Dict, Any, Callable
  from allennlp.common.from_params import FromParams
  from allennlp.models import Model
  from allennlp.common.checks import ConfigurationError
label_desc: Use image node_id 1 for calling the ModelCardInfo obj's underlying member method code with example usage: obj.to_dict() and returns: info