NamedValue#
from tmlt.tune import NamedValue
- class tmlt.tune.NamedValue(value, name)#
Bases:
object
A parameter value associated with a human-readable name.
A
NamedValue
can be used as a parameter inSessionProgramTuner
methods. This name is then used when printing error reports and converting them to DataFrames, which can be useful when using parameters that do not have a simple string representation.When using a
NamedValue
to specify a parameter of aSessionProgram
, the name is ignored: initializing the program using.with_parameter("param", NamedValue(42))
is exactly equivalent to initializing it using.with_parameter("param", 42)
. Similarly, a parameter passed as aNamedValue
is unwrapped before being passed to aview()
, a custommetric()
, or a custombaseline()
.