class_docstr: General interface of graph applications.
  
  Parameters:
      dim (int): dimension of embeddings
      gpus (list of int, optional): GPU ids, default is all GPUs
      cpu_per_gpu (int, optional): number of CPU threads per GPU, default is all CPUs
      gpu_memory_limit (int, optional): memory limit per GPU in bytes, default is all memory
      float_type (dtype, optional): type of parameters
      index_type (dtype, optional): type of graph indexes
class_docstr_tok: ["General","interface","of","graph","applications",".","Parameters",":","dim","(","int",")",":","dimension","of","embeddings","gpus","(","list","of","int",",","optional",")",":","GPU","ids",",","default","is","all","GPUs","cpu_per_gpu","(","int",",","optional",")",":","number","of","CPU","threads","per","GPU",",","default","is","all","CPUs","gpu_memory_limit","(","int",",","optional",")",":","memory","limit","per","GPU","in","bytes",",","default","is","all","memory","float_type","(","dtype",",","optional",")",":","type","of","parameters","index_type","(","dtype",",","optional",")",":","type","of","graph","indexes"]
docstr: Save model in pickle format.
  
  Parameters:
      file_name (str): file name
      save_hyperparameter (bool, optional): save hyperparameters or not, default is false
docstr_tok: ["Save","model","in","pickle","format",".","Parameters",":","file_name","(","str",")",":","file","name","save_hyperparameter","(","bool",",","optional",")",":","save","hyperparameters","or","not",",","default","is","false"]
code: def save_model(self, file_name, save_hyperparameter=False):
      """
      Save model in pickle format.
  
      Parameters:
          file_name (str): file name
          save_hyperparameter (bool, optional): save hyperparameters or not, default is false
      """
  
      def is_mapping(name, attribute):
          return "2" in name
  
      def is_embedding(name, attribute):
          if name[0] == "_":
              return False
          return isinstance(attribute, np.ndarray)
  
      def is_hyperparameter(name, attribute):
          if name[0] == "_":
              return False
          return (
              isinstance(attribute, int)
              or isinstance(attribute, float)
              or isinstance(attribute, str)
          )
  
      def get_attributes(object, filter):
          attributes = EasyDict()
          for name in dir(object):
              attribute = getattr(object, name)
              if filter(name, attribute):
                  attributes[name] = attribute
          return attributes
  
      logger.warning("save model to `%s`" % file_name)
  
      model = EasyDict()
      model.graph = get_attributes(self.graph, is_mapping)
      model.solver = get_attributes(self.solver, is_embedding)
      if save_hyperparameter:
          model.graph.update(
              get_attributes(self.graph, is_hyperparameter)
          )
          model.solver.update(
              get_attributes(self.solver, is_hyperparameter)
          )
          model.solver.optimizer = get_attributes(
              self.solver.optimizer, is_hyperparameter
          )
          model.solver.optimizer.schedule = (
              self.solver.optimizer.schedule.type
          )
  
      with open(file_name, "wb") as fout:
          pickle.dump(model, fout, protocol=pickle.HIGHEST_PROTOCOL)
  
imports: from __future__ import print_function, absolute_import, unicode_literals, division
  import os
  import re
  import pickle
  import logging
  import multiprocessing
  from collections import defaultdict
  from future.builtins import str, map, range
  from easydict import EasyDict
  import numpy
  from ..None import lib, cfg, auto
  from ..None import graph, solver
  from ..util import assert_in, monitor, SharedNDArray
label_desc: Use image node_id 10 for calling the ApplicationMixin obj's underlying member method code with example usage: obj.save_model(file_name, save_hyperparameter) and returns: unknown, isinstance, unknown, attributes, False, False