ebes.utils package

Submodules

ebes.utils.general module

class ebes.utils.general.LoadTime(loader, disable=False)

Bases: object

ebes.utils.general.grad_norm(named_parameters)
ebes.utils.general.log_to_file(filename, file_lvl='info', cons_lvl='warning')

ebes.utils.reproduce module

ebes.utils.reproduce.get_global_state()
Return type:

dict[str, Any]

ebes.utils.reproduce.seed_everything(seed, *, avoid_benchmark_noise=False, only_deterministic_algorithms=False)
ebes.utils.reproduce.set_global_state(state_dict)
ebes.utils.reproduce.spawn_generator()

Create a fresh NumPy generator seeded from PyTorch’s global RNG.

Using the global torch RNG as the entropy source makes the draws vary across epochs and DataLoader workers (PyTorch reseeds every worker each epoch as base_seed + worker_id, and base_seed is redrawn from the global RNG for each new iterator), while staying reproducible across runs whenever the global seed is fixed via seed_everything().

Return type:

Generator

Module contents