Framework Utility Functions

Collection of utility functions shared by the vivarium framework.

vivarium.framework.utilities.from_yearly(value, time_step)[source]
vivarium.framework.utilities.to_yearly(value, time_step)[source]
vivarium.framework.utilities.rate_to_probability(rate)[source]
vivarium.framework.utilities.probability_to_rate(probability)[source]
vivarium.framework.utilities.collapse_nested_dict(d, prefix=None)[source]
vivarium.framework.utilities.import_by_path(path)[source]

Import a class or function given it’s absolute path.

Parameters:path (str) – Path to object to import
Return type:Callable
vivarium.framework.utilities.handle_exceptions(func, logger, with_debugger)[source]

Drops a user into an interactive debugger if func raises an error.

Return type:Callable