Skip to content

Add version-specific prebuilt wheel configuration support #801

@pmattsso

Description

@pmattsso

Problem

Variants currently support only variant-wide pre_built and wheel_server_url settings, which apply to all versions of a package. This creates conflicts when different collections need different build methods for the same package.

Example use case:

  • Global TPU collection needs torch==2.9.0.dev20250730 as a prebuilt wheel from GitLab mirror
  • torch-2.8.0 TPU collection needs torch==2.8.0 built from source
  • Both use the same tpu-ubi9 variant

Currently impossible to configure this scenario without creating duplicate variants.

Solution

Add version-specific settings to allow per-version overrides within a single variant:

variants:
  tpu-ubi9:
    pre_built: false  # Default
    versions:
      "2.9.0.dev20250730":
        pre_built: true
        wheel_server_url: https://gitlab.com/.../simple
      "2.8.0":
        pre_built: false

Implementation

  • Add VersionSpecificSettings model with pre_built, wheel_server_url, env, annotations
  • Extend VariantInfo with versions mapping
  • Add version-aware methods: is_pre_built(version), get_wheel_server_url(version)
  • Update bootstrapper to use version-specific resolution
  • Maintain full backward compatibility

Version-specific settings take precedence over variant defaults when present.

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