Using a runtime¶
Choose the Latest runtime while you explore and develop. Pin a Stable runtime when you move a workload to production.
Choose Latest or Stable¶
| Workload | Recommendation |
|---|---|
| Interactive, open-ended analysis | Use Latest to get new notebook behavior, package updates, and performance improvements as they are released. |
| A pipeline that you plan to schedule | If you want your scheduled notebook to automatically receive minor runtime version updates, use the “Latest” option. When a new major version is released, the last minor release of the previous major version becomes Stable and your work remains on that version. |
| Fully locked production | Pair a Stable runtime with |
Specify a runtime in the Notebooks UI¶
In Snowsight, when you create a notebook service in a Workspace, select a runtime from the version list. The UI shows the support phase and the major and minor version. For example, the list might include Latest (3.0) and Stable (2.10). Latest is the default.
To change the runtime for an existing service:
- Open the connection dropdown.
- Select the pencil icon for the current service.
- In the Edit service dialog, select a different Runtime version.
- Select Save and restart.
Changing the runtime restarts the service.
End of Support versions aren’t shown for new notebooks. Existing notebooks already on an End of Support version continue to run until the version reaches End of Life.
Specify a runtime in SQL¶
Code Bundles use version labels of the form V<major>-<CPU|GPU>-PY<python-version>. For example, use V3-CPU-PY3.12
or V3-GPU-PY3.12 to pin a workload to the 3.x major version and Python 3.12.
Confirm the exact labels in Snowflake Container Runtime release notes for the version that you want to pin.
Code Bundles¶
Note
Notebook Project Objects have been renamed to Code Bundles. Read more in Snowflake Code Bundles.
Specify a runtime with compute_options.runtime_version in the Code Bundle specification. The following example runs
main.py on the CPU runtime for major version 3 and Python 3.12:
A compute pool is required for Container Runtime. The warehouse runs SQL and Snowpark pushdown compute. Python runs on the compute pool.
Map UI labels to SQL labels¶
| UI label | RUNTIME or compute_options.runtime_version |
|---|---|
| Latest (3.0), CPU | V3-CPU-PY3.12 |
| Latest (3.0), GPU | V3-GPU-PY3.12 |
| Stable (2.10), CPU | V2-CPU-PY3.12 |
When a new major version is released, new notebooks that use the Latest alias move to the new major version. A
versioned label such as V3-CPU-PY3.12 stays on that major version after the next major version is released.
Specify a runtime for an ML Job¶
Specify a runtime with the runtime_environment argument on the job or @remote decorator. If you omit this argument,
the job uses Latest.
ML Jobs use the full Container Runtime release number, not the SQL version label. Confirm the exact release number in Snowflake Container Runtime release notes.
After End of Support and End of Life¶
When a version reaches End of Support, existing notebooks and jobs on that runtime continue to start, but you can’t select the version for new notebooks or jobs. Plan to move to Latest or a remaining Stable version.
When a version reaches End of Life, its image is removed and services that use it don’t start. Before the End of Life
date, update RUNTIME for a Notebook Project, compute_options.runtime_version for a Code Bundle, or the runtime in
Notebook settings. For End of Support and End of Life dates, see
Snowflake Container Runtime release notes.