Disable rich traceback output

How to disable rich traceback output in ZenML.

By default, ZenML uses the rich library to display rich traceback output. This is especially useful when debugging your pipelines. However, if you wish to disable this feature, you can do so by setting the following environment variable:

export ZENML_ENABLE_RICH_TRACEBACK=false

This will ensure that you see only the plain text traceback output.

Note that setting this on the client environment (e.g. your local machine which runs the pipeline) will not automatically disable rich tracebacks on remote pipeline runs. That means setting this variable locally with only effect pipelines that run locally.

If you wish to disable it also for remote pipeline runs, you can set the ZENML_ENABLE_RICH_TRACEBACK environment variable in your pipeline runs environment as follows:

docker_settings = DockerSettings(environment={"ZENML_ENABLE_RICH_TRACEBACK": "false"})

# Either add it to the decorator
@pipeline(settings={"docker": docker_settings})
def my_pipeline() -> None:
    my_step()

# Or configure the pipelines options
my_pipeline = my_pipeline.with_options(
    settings={"docker": docker_settings}
)

Last updated