Skip to content

How do pin an ML job to a specific runtime image version and python version? #230

Closed

Description

@calleo

Hi!

I am using the decorator below to start an ML job.

@jobs.remote(
    compute_pool=COMPUTE_POOL,
    stage_name=JOB_STAGE,
    database=ML_DATABASE_ENV,
    schema=JOBS_SCHEMA,
    runtime_environment='???',
)

I am trying to pin the runtime version to specific container runtime, and python version. But both doesn't seem to be possible?

I have tried 2.6.0, which resolves to Python 3.10 (my project uses 3.12).
I have also tried with {"pythonVersion": "3.12"}, which gives me the latest runtime version, with python 3.12. Problem is that latest might change, including the installed package version which I'd like to avoid.

Right now I have reverted to supplying the complete image name, but that will only work as long as we are using CPU compute pools: "/snowflake/images/snowflake_images/container_runtime/cpu_x86_64:2.6.0-py312".

How can I pin the environment to a container version and python version at the same time?

Activity

  1. sfc-gh-kunli commented on Jun 12, 2026

    @sfc-gh-kunli

    See answer below.

  2. sfc-gh-ajiang commented on Jun 17, 2026

    @sfc-gh-ajiang

    We support users to specify the full image url or image tag at runtime_environment
    the image tag follow this format xxx-py{version}, for example
    python 3.10 - you could use the image tag 2.6.0 or 2.6.0-py310
    python 3.11 - you could use the image tag 2.6.0-py311
    python 3.12 - you could use the image tag 2.6.0-py312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions