Parameter

Functions:

identifier(name, type_) Create a non-parameter Proxytype instance that references a graft key.
parameter(name, type_) Create a typed parameter.
identifier(name, type_)[source]

Create a non-parameter Proxytype instance that references a graft key. Internal method meant for references to builtin constants or parameters. You shouldn’t use this directly; consider parameter instead.

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:

parameter

Example

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