gnn_tracking_hpo.util.paths#

Module Contents#

Functions#

find_result_dir(→ pathlib.Path)

Find result dir of a trial

find_checkpoint(→ pathlib.Path)

Find checkpoints

get_config(→ dict[str, Any])

Get config of a trial

add_scripts_path(→ None)

Add the path of the scripts directory of this repository to

Attributes#

_default_base_path

gnn_tracking_hpo.util.paths._default_base_path#
gnn_tracking_hpo.util.paths.find_result_dir(project: str, part: str, *, base_path=_default_base_path) pathlib.Path#

Find result dir of a trial

Parameters:
  • project – Ray project name/folder

  • part – Part of filename of trial (part of the hash)

  • base_path – Path to ray folder

Returns:

Path to result dir

gnn_tracking_hpo.util.paths.find_checkpoint(project: str, part: str, epoch: int = -1, *, base_path=_default_base_path) pathlib.Path#

Find checkpoints

Parameters:
  • project – Ray project name/folder

  • part – Part of filename of trial (part of the hash)

  • epoch – Epoch to which the checkpoint should belong. If -1, the last epoch will be taken

  • base_path – Path to ray folder

Returns:

Path to checkpoint.pt file

gnn_tracking_hpo.util.paths.get_config(project: str, part: str, *, base_path=_default_base_path) dict[str, Any]#

Get config of a trial

Parameters:
  • project – Ray project name/folder

  • part – Part of filename of trial (part of the hash)

  • base_path – Path to ray folder

Returns:

Config of trial

gnn_tracking_hpo.util.paths.add_scripts_path() None#

Add the path of the scripts directory of this repository to the python PATH in order to import from there.