config.py

gnp.config.load_config(path: Path) dict[source]

Load a configuration file from a yaml file.

Parameters:

path (str) -- Path to the yaml file.

Returns:

Dictionary containing the configuration parameters.

Return type:

dict

gnp.config.load_model(model_path: Path) PatchGNP[source]

Load a model from a directory.

Parameters:

model_dir (Path) -- Path to the model directory.

Returns:

The loaded model.

Return type:

torch.nn.Module

gnp.config.load_patchloader(cfg: dict, **kwargs) PatchLoader[source]

Load a PatchLoader using a yaml file in data_dir.

Parameters:

cfg (dict) -- Dictionary containing the configuration parameters.