espnet3.systems.asr.system.load_function
Less than 1 minute
espnet3.systems.asr.system.load_function
espnet3.systems.asr.system.load_function(path)
Load a callable from a dotted module path.
- Parameters:path – Dotted module path (e.g.,
package.module.function). - Returns: Callable referenced by the path.
- Raises:(Exception) – Propagated import or attribute lookup errors.
Example
>>> fn = load_function("math.sqrt")
>>> fn(9)
3.0