simba.tl.pbg_train

simba.tl.pbg_train(dirname=None, pbg_params=None, output='model', auto_wd=True, save_wd=False, use_edge_weights=False)[source]

PBG training

Parameters:
  • dirname (str, optional (default: None)) – The name of the directory in which graph is stored If None, it will be inferred from pbg_params[‘entity_path’]

  • pbg_params (dict, optional (default: None)) – Configuration for pbg training. If specified, it will be used instead of the default setting

  • output (str, optional (default: ‘model’)) – The name of the directory where training output will be written to. It overrides pbg_params if checkpoint_path is specified in it

  • auto_wd (bool, optional (default: True)) – If True, it will override pbg_params[‘wd’] with a new weight decay estimated based on training sample size Recommended for relative small training sample size (<1e7)

  • save_wd (bool, optional (default: False)) – If True, estimated wd will be saved to settings.pbg_params[‘wd’]

  • use_edge_weights (bool, optional (default: False)) – If True, the edge weights are used for the training; If False, the weights of relation types are used instead, and edge weights will be ignored.

Returns:

  • updates settings.pbg_params with the following parameter

  • checkpoint_path – The path to the directory where checkpoints (and thus the output) will be written to. If checkpoints are found in it, training will resume from them.