Helper Functions#

t3w.manual_seed(seed: int, strict: bool = False)#

set all default random generators seed to seed.

Parameters:
  • seed (int) – the value to be set.

  • strict (bool, optional) – whether to use deterministic pytorch algorithms for better reproducibility. Defaults to False.

t3w.utils.millify(n: int, names=['', 'K', 'M', 'B', 'T'])#

format an integer number into a human-friendly string.

Parameters:
  • n (int) – the number to be formatted.

  • names (list, optional) – postfix string for one, thousand, million, etc. Defaults to [“”, “ K”, “ M”, “ B”, “ T”].

Returns:

the fomatted string.

Return type:

str