Command Steps
Run arbitrary commands as pipeline steps
from zenml import CommandStep, pipeline
train = CommandStep(command=["python", "train.py"])
report = CommandStep(command=["bash", "-c", "echo 'done'"])
@pipeline(dynamic=True, enable_cache=False)
def my_pipeline() -> None:
train()
report()
if __name__ == "__main__":
my_pipeline()Running a Python function
from zenml import CommandStep
def train() -> None:
import json
print(json.dumps({"status": "training"}))
train_step = CommandStep(command=train)Running without ZenML in the image (dynamic pipelines only)
Where command steps run
Configuring a command step
Multi-node distributed training
Limitations
Last updated
Was this helpful?