> See the full index of documentation pages at https://docs.zettabyte.com/llms.txt.

# TorchDynamo compilation errors

> A training job that fails with a TorchDynamo compilation error from `torch.compile` can have TorchDynamo turned off with one environment variable on the task.

Source: https://docs.zettabyte.com/docs/zcloud/troubleshooting/torchdynamo-compilation-errors

Last updated: 2026-11-05

## Turn TorchDynamo off

Setting the environment variable `TORCHDYNAMO_DISABLE` to `1` turns TorchDynamo off. The variable line to add is the following:

```text
TORCHDYNAMO_DISABLE=1
```

## Add the variable to a task

The variable goes in the **Environment Variables** control of the task form. The form's default view, with **Advanced Settings** off, has no **Environment Variables** control.

1. Open [**Training**](https://console.zettabyte.com/task-training/index), select **Create Task**, and turn on the **Advanced Settings** switch.
2. The form moves past **Instance Configuration** only when it holds a resource specification and a storage volume with a container path, so fill those in, then go to **Environment Configuration**, the third step.
3. Under **Environment Variables**, select **+ Add Variable** and add the variable from the code block above.

This page does not cover what to do after the variable is added.

## Next steps

- See the [library version table in Environment and versions](https://docs.zettabyte.com/docs/zcloud/troubleshooting/environment-and-versions) to check the library version recorded for the platform environment.
- See [Common issues](https://docs.zettabyte.com/docs/zcloud/troubleshooting/common-issues) for other problems with a job.
