From 7a7b737cc063ae26510a14c86df3356908861293 Mon Sep 17 00:00:00 2001 From: Greg Hendrickson Date: Tue, 3 Feb 2026 05:20:31 +0000 Subject: [PATCH] fix: Pin transformers version for torch compatibility - Force reinstall torch 2.4.0 in Dockerfile - Pin transformers==4.47.1 (known working with bitsandbytes) - Fix set_submodule AttributeError --- components/runpod_trainer/Dockerfile | 7 +++++-- components/runpod_trainer/requirements.txt | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/runpod_trainer/Dockerfile b/components/runpod_trainer/Dockerfile index a0e2e1a..3284d20 100644 --- a/components/runpod_trainer/Dockerfile +++ b/components/runpod_trainer/Dockerfile @@ -5,8 +5,11 @@ WORKDIR /app # Copy requirements first for better caching COPY requirements.txt /app/requirements.txt -# Install dependencies -RUN pip install --no-cache-dir -r requirements.txt +# Upgrade pip and install dependencies +# Force upgrade torch to ensure compatibility with transformers +RUN pip install --upgrade pip && \ + pip install --no-cache-dir torch==2.4.0 --force-reinstall && \ + pip install --no-cache-dir -r requirements.txt # Copy handler and data COPY handler.py /app/handler.py diff --git a/components/runpod_trainer/requirements.txt b/components/runpod_trainer/requirements.txt index 63b3802..a1e3147 100644 --- a/components/runpod_trainer/requirements.txt +++ b/components/runpod_trainer/requirements.txt @@ -1,5 +1,5 @@ runpod>=1.7.0 -transformers>=4.48.0 +transformers==4.47.1 datasets>=2.16.0 accelerate>=0.30.0 boto3>=1.34.0 @@ -8,5 +8,5 @@ scipy>=1.11.0 safetensors>=0.4.0 requests>=2.31.0 peft>=0.14.0 -bitsandbytes>=0.45.0 +bitsandbytes==0.45.0 trl>=0.14.0