Setting

Utils for Settings.

the_utils.setting.set_seed(seed: int = 4096) None[source]

Set random seed.

Note

!!! conv and neighborSampler of dgl are somehow nondeterministic !!!

Set seeds according to:
Parameters:

seed (int, optional) – random seed. Defaults to 4096.

the_utils.setting.set_device(gpu: str = '0') device[source]

Set torch device.

Parameters:

gpu (str) – args.gpu. Defaults to ‘0’.

Returns:

torch device. device(type=’cuda: x’) or device(type=’cpu’).

Return type:

torch.device