Parameter

Functions

identifier(name, type_)

Create a Proxytype instance that references a graft key; i.e.

parameter(name, type_)

Create a typed parameter.

identifier(name, type_)[source]

Create a Proxytype instance that references a graft key; i.e. for references to builtin constants or parameters.

parameter(name, type_)[source]

Create a typed parameter.

Useful for describing computations that will be further parameterized at runtime.

To actually provide values for the parameter at Job compute time, pass them in as keyword arguments to compute or visualize.

Parameters
  • name (str) – Name of the parameter

  • type_ (Proxytype) – Type of the parameter

Returns

a Proxytype object of type type_.

Return type

proxyTime

Example

>>> from descarteslabs.workflows import Float, parameter
>>> my_program = Float(0.42) * parameter("scale", Float)
>>> my_program.compute(scale=wf.Float(0.99))