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 in SessionProgramTuner 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 a SessionProgram, 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 a NamedValue is unwrapped before being passed to a view(), a custom metric(), or a custom baseline().

value: Any#

The value passed as a parameter to the program.

name: str#

The human-readable name of the value.