resolve_pipe
Pipe instances in function arguments.
This function wraps a given function and ensures that any Pipe instances
in its keyword arguments are instantiated before the function is executed.
If a Pipe instance is found, it is replaced with the result of its
resolve method.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
pipeline_func | Callable | -- | The function to be wrapped. Any Pipe instances in its keyword arguments will be resolved before execution. |
| Type | Description |
|---|---|
tp.Callable | A wrapped function where Pipe instances in keyword arguments are replaced with their instantiated values. |
transform is an instance of Pipe, and before run_pipeline is
executed, it is replaced with MyTransformer(arg1, arg2).
Pipe
| Name | Type | Default | Description |
|---|---|---|---|
model | Type | -- | The model or function to be instantiated with the provided arguments. |
kwargs | tp.Kwargs | None | The keyword arguments to be passed when instantiating model. |
Pipe can be used in model configurations to facilitate introspection and
parameter naming. For example:
transform.arg1 and transform.arg2.
Ancestors
builtins.tuple
Instance variables
-
model: Type: The model or function to be instantiated with the provided arguments. -
kwargs: Dict[str, Any]: The keyword arguments to be passed when instantiatingmodel.
Methods
resolve
| Type | Description |
|---|---|
Type | An instance of model initialized with kwargs. |

