class_docstr: GNNModel 
docstr: init 
docstr_tok: ["init"]
code: def __init__(self, config, dump_file_obj=None, is_predict=False):
      """init"""
      self.config = config
      self.dump_file_obj = dump_file_obj
      self.is_predict = is_predict
      self.neg_num = self.config.neg_num
      self.emb_size = self.config.emb_size
      self.hidden_size = self.emb_size
      self._use_cvm = False
  
      self.holder_list = []
  
      (
          self.nodeid_slot_holder,
          self.show_clk,
          holder_list,
      ) = model_util.build_node_holder(
          self.config.nodeid_slot, self.config, is_predict
      )
      self.holder_list.extend(holder_list)
  
      (
          self.discrete_slot_holders,
          self.discrete_slot_lod_holders,
          holder_list,
      ) = model_util.build_slot_holder(self.config.slots)
      self.holder_list.extend(holder_list)
  
      if self.config.sage_mode:
          use_degree_norm = (
              False if not self.config.use_degree_norm else True
          )
          self.return_weight = (
              False if not self.config.return_weight else True
          )
          holder_dict = model_util.build_graph_holder(
              self.config.samples, use_degree_norm, self.return_weight
          )
          self.graph_holders = holder_dict["graph_holders"]
          self.final_index = holder_dict["final_index"]
          holder_list = holder_dict["holder_list"]
          self.node_degree = (
              holder_dict["node_degree"]
              if "node_degree" in holder_dict
              else None
          )
  
          self.etype_len = self.get_etype_len()
          self.holder_list.extend(holder_list)
          self.gnn_model = AutoHeterGNN(
              hidden_size=self.hidden_size,
              num_layers=len(self.config.samples),
              layer_type=self.config.sage_layer_type,
              etype_len=self.etype_len,
              act=self.config.sage_act,
              alpha_residual=self.config.sage_alpha,
              interact_mode=self.config.sage_layer_type,
              use_degree_norm=use_degree_norm,
              return_weight=self.return_weight,
          )
  
      self.total_gpups_slots = [int(self.config.nodeid_slot)] + [
          int(i) for i in self.config.slots
      ]
      self.real_emb_size_list = [self.emb_size] * len(
          self.total_gpups_slots
      )
  
      self.loss = None
  
      predictions = self.forward()
      loss, v_loss = self.loss_func(predictions)
      self.loss = loss
  
      # for visualization
      model_util.paddle_print(v_loss)
      self.visualize_loss, self.batch_count = model_util.loss_visualize(
          v_loss
      )
  
      if self.is_predict:
          if self.config.sage_mode:
              node_index = paddle.gather(
                  self.nodeid_slot_holder, self.final_index
              )
          else:
              node_index = self.nodeid_slot_holder
          model_util.dump_embedding(
              config, predictions["src_nfeat"], node_index
          )
  
imports: import os
  import sys
  import math
  import time
  import numpy
  import pickle
  import paddle
  import paddle.fluid.layers
  import paddle.fluid
  import pgl
  from pgl.utils.logger import log
  from .None import layers
  from .None import model_util
  from .None import loss
  import util
  import helper
  from .auto_heter_gnn import AutoHeterGNN
label_desc: Use image node_id 1 to create a new GNNModel object from inherited base classes: object with example: obj = GNNModel(config, dump_file_obj, is_predict)