Skip to content

fix(templates): align PyTorch CUDA to the build image (cu128) - #926

Closed
Aydin-ab wants to merge 2 commits into
mainfrom
fix/align-torch-cuda-to-image
Closed

fix(templates): align PyTorch CUDA to the build image (cu128)#926
Aydin-ab wants to merge 2 commits into
mainfrom
fix/align-torch-cuda-to-image

Conversation

@Aydin-ab

@Aydin-ab Aydin-ab commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Fixes cross-node dependency skew in four templates: the PyTorch CUDA didn't match the cu128 build image, and pandas was unpinned (drifting above the base image).

What changed

  • Torch → cu128. Pin torch==2.7.0 (+ torchvision==0.22.0 for creatives) and interpolate the depset index as --index .../${CUDA_VARIANT} so it tracks the build image's CUDA — root-cause fix (the flag was hardcoded cu121). Worst case: ecommerce_batch_embeddings, whose unpinned torch>=2.0 drifted to 2.12.0+cu13 — a newer CUDA than the 12.8 image. Locks now resolve torch==2.7.0+cu128.
  • pandas → base. These left pandas>=2.0, resolving pandas==3.0.3 — a major version ahead of the base image's 2.3.3 (what workers run). Ray Data pickles pandas blocks cross-node, so pin pandas==2.3.3 to match the base (completes the numpy/pyarrow pin group these templates already had).

Testing

/test-template on all four (GPU CI). numpy/pyarrow unchanged; verified no other base-framework drift.

Caveats

https://claude.ai/code/session_01QmLc4yWtmC3PX2NwWzPbzD

Four templates shipped a torch CUDA that didn't match their cu128 build image.
ecommerce_batch_embeddings left torch unpinned (torch>=2.0), which drifted to
2.12.0+cu13 — a newer CUDA than the 12.8 image (the risky direction). The other
three pinned torch==2.5.1+cu121.

Pin torch==2.7.0 (the cu128 fleet version; torchvision==0.22.0 for creatives) and
interpolate the depset index as --index .../${CUDA_VARIANT} so it always tracks the
build image's CUDA and can't drift again. Recompiled locks resolve torch==2.7.0+cu128;
base frameworks (numpy/pyarrow/pandas) unchanged.

Templates: ecommerce_batch_embeddings, ecommerce_multi_model_serving,
creatives_diffusion_finetuning, biotech_boltz_screening.

Claude-Session: https://claude.ai/code/session_01QmLc4yWtmC3PX2NwWzPbzD
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
@Aydin-ab

Copy link
Copy Markdown
Contributor Author

/test-template ecommerce_batch_embeddings ecommerce_multi_model_serving creatives_diffusion_finetuning

@Aydin-ab

Copy link
Copy Markdown
Contributor Author

/test-template biotech_boltz_screening

Aydin-ab added a commit that referenced this pull request Jul 21, 2026
…torch

Reverts the earlier cu128->cu121 image move. That move assumed torch 2.5.1 (cu121-only),
but #926 aligns this template's torch to 2.7.0+cu128 to match the build image, so the
deployed service image must be cu128 too — otherwise torch (cu128) would be newer than the
service image (cu121).

Claude-Session: https://claude.ai/code/session_01QmLc4yWtmC3PX2NwWzPbzD
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
@Aydin-ab

Copy link
Copy Markdown
Contributor Author

/test-template ecommerce_batch_embeddings ecommerce_multi_model_serving creatives_diffusion_finetuning

@Aydin-ab

Copy link
Copy Markdown
Contributor Author

/test-template biotech_boltz_screening

These templates left pandas unpinned, so the lock resolved pandas==3.0.3 — a major version
ahead of the base image's 2.3.3 (what worker nodes run). Ray Data pickles pandas blocks
across nodes, so a head(lock)-vs-worker(base) mismatch risks unpickle failures — the same
skew these templates already guard for numpy/pyarrow, just missed for pandas. Pin
pandas==2.3.3 to match the base (added to creatives too, where pandas is transitive).

Templates: ecommerce_batch_embeddings, ecommerce_multi_model_serving,
biotech_boltz_screening, creatives_diffusion_finetuning.

Claude-Session: https://claude.ai/code/session_01QmLc4yWtmC3PX2NwWzPbzD
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
@Aydin-ab
Aydin-ab force-pushed the fix/align-torch-cuda-to-image branch from be20443 to e51035d Compare July 22, 2026 00:37
@Aydin-ab

Copy link
Copy Markdown
Contributor Author

Deferring the CUDA/pandas alignment to the dependency good-practice task rather than merging in this batch. Work is validated (buildkite #535/#537); branch kept for revival.

@Aydin-ab Aydin-ab closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant