Skip to main content

@step

The @step decorator converts a method to a step of a flow.

Use @step to construct Metaflow workflows. For more information, see Basics of Metaflow.

from metaflow import step

Marks a method in a FlowSpec as a Metaflow Step. Note that this decorator needs to be placed as close to the method as possible (ie: before other decorators).

In other words, this is valid:

@batch
@step
def foo(self):
    pass

whereas this is not:

@step
@batch
def foo(self):
    pass
Parameters 

f: Union[Callable[[FlowSpecDerived], None], Callable[[FlowSpecDerived, Any], None]]

Function to make into a Metaflow Step

Returns 

Union[Callable[[FlowSpecDerived, StepFlag], None], Callable[[FlowSpecDerived, Any, StepFlag], None]]

Function that is a Metaflow Step