(self, skip=[], **kwargs)
return desc
Returns a ``dict`` that contains all necessary information needed
        to serialize this object.

        Arguments:
            skip (list): Objects to omit from the dictionary.

        Returns:
            (dict): Dictionary format for object information.
Returns a ``dict`` that contains all necessary information needed
        to serialize this object.
Returns a dict that contains all necessary information needed to serialize this object .
def get_description(self, skip=[], **kwargs):
        """
        Returns a ``dict`` that contains all necessary information needed
        to serialize this object.

        Arguments:
            skip (list): Objects to omit from the dictionary.

        Returns:
            (dict): Dictionary format for object information.
        """
        if type(skip) is not list:
            skip = list(skip)
        else:
            skip = deepcopy(skip)
        skip.append('self')

        config = {}
        defaults = get_args(self.__init__)
        for arg in defaults:
            if arg in skip:
                continue

            # all args need to go in the __dict__ so we can read
            # them out the way they were read in. alternatively,
            # you can override get_description to say how to
            # put them in to the description dictionary.
            if arg in self.__dict__:
                if self.__dict__[arg] != defaults[arg]:
                    if isinstance(self.__dict__[arg], NervanaObject):
                        config[arg] = self.__dict__[arg].get_description()
                    else:
                        config[arg] = self.__dict__[arg]
            else:
                logger.warning("can't describe argument '{}' to {}".format(arg, self))

        desc = {'type': self.modulenm, 'config': config}
        self._desc = desc
        return desc
def get_description ( self , skip = [ ] , * * kwargs ) : if type ( skip ) is not list : skip = list ( skip ) else : skip = deepcopy ( skip ) skip . append ( 'self' ) config = { } defaults = get_args ( self . __init__ ) for arg in defaults : if arg in skip : continue # all args need to go in the __dict__ so we can read # them out the way they were read in. alternatively, # you can override get_description to say how to # put them in to the description dictionary. if arg in self . __dict__ : if self . __dict__ [ arg ] != defaults [ arg ] : if isinstance ( self . __dict__ [ arg ] , NervanaObject ) : config [ arg ] = self . __dict__ [ arg ] . get_description ( ) else : config [ arg ] = self . __dict__ [ arg ] else : logger . warning ( "can't describe argument '{}' to {}" . format ( arg , self ) ) desc = { 'type' : self . modulenm , 'config' : config } self . _desc = desc return desc