firecrown.parameters.register_new_updatable_parameter

firecrown.parameters.register_new_updatable_parameter#

firecrown.parameters.register_new_updatable_parameter(value=None, *, default_value=None)[source]#

Create a new parameter, either a SamplerParameter or an InternalParameter.

If value is None, the result will be a SamplerParameter; Firecrown will expect this value to be supplied by the sampling framework. If value is a float quantity, then Firecrown will expect this parameter to not be supplied by the sampling framework, and instead the provided value will be used for every sample.

Only None or a float value is allowed.

Parameters:
  • value (None | float) – the value of the parameter

  • default_value (None | float) – the default value of the parameter to be used if value is None

Returns:

a SamplerParameter if value is None, otherwise an InternalParameter

Raises:

TypeError – if value is not None and not a float