calc_resolver
- savant.config.calc_resolver(calc_string, *args)
- OmegaConf resolver that provides config variable value by evaluating an arithmetic expression passed by string representation. It’s possible to refer to custom arguments in the expression with names like “arg_x”, where x is the argument index. - Example usage in config: - parameters: sum: ${calc:"1+1"} base: 100 derived: ${calc:"arg_0*arg_1",${.base},0.5} - where - calcis the registered resolver name
- sumdoesn’t depend on other arguments and evaluates to 2
- deriveddepends on- baseparameter value and evaluates to 50