Utilities¶
Subpackages¶
Module contents¶
-
class
olympus.utils.HyperParameters(space, **kwargs)[source]¶ Bases:
objectKeeps track of mandatory hyper parameters
Parameters: - space: Dict[str, Space]
A dictionary defining each parameters and their respective space/dim
- kwargs:
A dictionary of defined hyper parameters
Methods
add_parameters check_correct_parameters missing_parameters parameters
-
class
olympus.utils.LazyCall(fun, *args, **kwargs)[source]¶ Bases:
objectSave the call parameters of a function for it can be invoked at a later date
Methods
__call__(self, \*args, \*\*kwargs)Call self as a function. add_arguments invoke was_invoked
-
class
olympus.utils.TimeThrottler(fun: Callable[[A], R], every=10)[source]¶ Bases:
objectLimit how often the function fun is called in seconds
Methods
__call__(self, \*args, \*\*kwargs)Call self as a function.
-
olympus.utils.find_batch_size(model, shape, low, high, dtype=torch.float32)[source]¶ Find the highest batch size that can fit in memory using binary search