Recipes
recipe
Classes:
-
RecipeRegistry–Registry recipe for managing all pre-defined recipe in the form of Callable object.
Functions:
-
build_tgb_link_pred–Build ready-to-use HookManager with default hooks for TGB linkproppred task.
RecipeRegistry
Registry recipe for managing all pre-defined recipe in the form of Callable object.
This class allows you to register your custom recipes perform frequently-used pre-experiment setup used.
One common frequently-used pre-experiment setup is set up HookManager for TGB linkpropred, which is provided by TGM team.
Users are welcome to define their own recipe. User-defined recipe need to be registered with RecipeRegistry to be able to build.
Please see tutorial for further information
Raises: UndefinedRecipe: If build is call on recipe that is not defined or registered.
build_tgb_link_pred
build_tgb_link_pred(
dataset_name: str, train_dg: DGraph
) -> HookManager
Build ready-to-use HookManager with default hooks for TGB linkproppred task.
Parameters:
-
dataset_name(str) –The name of the TGB dataset (e.g. 'tgbl-wiki')
-
train_dg(DGraph) –The training graph, used to setup the
NegativeEdgeSamplerHookfor training
Returns:
-
HookManager–HookManager with registered keys: ['train', 'val', 'test']
Source code in tgm/hooks/recipe.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |