rebase.Step

SDK handle for a deployable workflow step.

Signature

class rebase.Step(rebase.Function)

Step extends rebase.Function with workflow graph behavior and step execution settings. Most code should create steps with @rebase.step(...) or @project.step(...).

Helper

rebase.step(
    fn: Callable | None = None,
    *,
    project: str | None = None,
    name: str | None = None,
    description: str | None = None,
    default_parameters: dict[str, Any] | None = None,
    enabled: bool = True,
    retries: int = 0,
    timeout_seconds: int | float | None = None,
    cache: bool = False,
    deploy_source: str | None = None,
) -> Callable[[Callable], rebase.Step] | rebase.Step

Additional Parameters

ParameterTypeDescription
retriesintRetry count for workflow step execution. A step that raises is re-run up to this many more times; a step that times out is not (its work cannot be reclaimed).
timeout_seconds`intfloat
cacheboolWhether step caching is enabled.
deploy_source`strNone`

Steps take no image, dependency, or sizing parameters. They run inside their workflow's run and inherit its image and resources.

Methods

step.spawn(**parameters) -> rebase.Run
step.remote(**parameters) -> Any
step.run(**parameters) -> rebase.Run
step.submit(*args, **kwargs) -> rebase.Run
MethodDescription
submit(*args, **kwargs)Start a step run after binding positional arguments to the wrapped Python function signature.
spawn(**parameters)Start a run and return immediately.
remote(**parameters)Start a run and wait for the result.
run(**parameters)Alias for spawn(**parameters).

Steps deploy with their workflow. step.deploy() and rebase.deploy(step) raise RebaseWorkflowError; deploy the workflow instead.

On this page