From 937d5f3f4ca2d092c8a3ca416e9a8caee17964a0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Jul 2026 06:07:26 +0000 Subject: [PATCH 1/3] Update audio-dataset-curation-llm-judge to Ray 2.56.0 Co-authored-by: Aydin Abiar --- BUILD.yaml | 2 +- dependencies/template.depsets.yaml | 4 ++-- templates/audio-dataset-curation-llm-judge/python_depset.lock | 2 +- templates/audio-dataset-curation-llm-judge/requirements.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BUILD.yaml b/BUILD.yaml index ece1975a6..2240eeea2 100644 --- a/BUILD.yaml +++ b/BUILD.yaml @@ -303,7 +303,7 @@ owner_team: llm dir: templates/audio-dataset-curation-llm-judge cluster_env: - image_uri: anyscale/ray-llm:2.55.1-py311-cu128 + image_uri: anyscale/ray-llm:2.56.0-py312-cu130 compute_config: AWS: configs/audio-dataset-curation-llm-judge/aws.yaml GCP: configs/audio-dataset-curation-llm-judge/gce.yaml diff --git a/dependencies/template.depsets.yaml b/dependencies/template.depsets.yaml index 3429aeb97..f22f42c90 100644 --- a/dependencies/template.depsets.yaml +++ b/dependencies/template.depsets.yaml @@ -149,12 +149,12 @@ depsets: - templates/audio-dataset-curation-llm-judge/requirements.txt output: templates/audio-dataset-curation-llm-judge/python_depset.lock append_flags: - - --index https://download.pytorch.org/whl/cu128 + - --index https://download.pytorch.org/whl/cu130 - --python-version=${PYTHON_VERSION} - --python-platform=x86_64-manylinux_2_31 - --unsafe-package ray build_arg_sets: - - ray2551_py311_cu128 + - ray2560_py312_cu130 - name: multi_agent_a2a_depset_${RAY_VERSION}_${PYTHON_VERSION}_${CUDA_VARIANT} operation: expand diff --git a/templates/audio-dataset-curation-llm-judge/python_depset.lock b/templates/audio-dataset-curation-llm-judge/python_depset.lock index 2b524d217..c814ac660 100644 --- a/templates/audio-dataset-curation-llm-judge/python_depset.lock +++ b/templates/audio-dataset-curation-llm-judge/python_depset.lock @@ -1,5 +1,5 @@ --index-url https://pypi.org/simple ---extra-index-url https://download.pytorch.org/whl/cu128 +--extra-index-url https://download.pytorch.org/whl/cu130 cffi==2.0.0 \ --hash=sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb \ diff --git a/templates/audio-dataset-curation-llm-judge/requirements.txt b/templates/audio-dataset-curation-llm-judge/requirements.txt index f7513e4b9..5318daa2b 100644 --- a/templates/audio-dataset-curation-llm-judge/requirements.txt +++ b/templates/audio-dataset-curation-llm-judge/requirements.txt @@ -1,5 +1,5 @@ soundfile==0.13.1 -# Match the base image's numpy (anyscale/ray-llm:2.55.1 ships numpy 1.26.4). The test +# Match the base image's numpy (anyscale/ray-llm:2.56.0-py312-cu130 ships numpy 1.26.4). The test # layers this lock on the stock image with `uv pip install --no-deps`, so a higher numpy # would force-upgrade it and break the image's numpy-1.x-compiled pandas/scipy (ABI). numpy==1.26.4 From 5ad1bca3cf6415c85834e8fa535787fb87c33b5b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Jul 2026 06:46:36 +0000 Subject: [PATCH 2/3] Fix Decoder: coerce token_ids Series to list for transformers batch_decode Co-authored-by: Aydin Abiar --- .../audio-dataset-curation-llm-judge/README.ipynb | 13 ++++++++----- .../audio-dataset-curation-llm-judge/README.md | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/templates/audio-dataset-curation-llm-judge/README.ipynb b/templates/audio-dataset-curation-llm-judge/README.ipynb index 3e0fe63ec..02f6beea5 100644 --- a/templates/audio-dataset-curation-llm-judge/README.ipynb +++ b/templates/audio-dataset-curation-llm-judge/README.ipynb @@ -7,11 +7,11 @@ "# Audio batch inference\n", "\n", "
\n", - "  \n", + "  \n", "  \n", "
\n", "\n", - "**⏱️ Time to complete**: 30 min\n", + "**\u23f1\ufe0f Time to complete**: 30 min\n", "\n", "This tutorial demonstrates a batch inference pipeline that converts raw\n", "audio files into a curated subset using two different ML models.\n", @@ -21,7 +21,7 @@ "2. Resample each clip to 16 kHz for compatibility with Whisper.\n", "3. Transcribe the audio with the `openai/whisper-large-v3-turbo` model.\n", "4. Judge the educational quality of each transcription with a small Llama-3 model.\n", - "5. Persist only clips that score ≥ 3 to a Parquet dataset.\n", + "5. Persist only clips that score \u2265 3 to a Parquet dataset.\n", "\n", "Ray Data is particularly powerful for this use case because it:\n", "- **Parallelizes work** across a cluster of machines automatically\n", @@ -259,7 +259,10 @@ " self.processor = AutoProcessor.from_pretrained(TRANSCRIPTION_MODEL)\n", "\n", " def __call__(self, batch):\n", - " token_ids = batch.pop(\"token_ids\")\n", + " # Convert the pandas Series to a plain list so transformers.batch_decode\n", + " # can iterate token id arrays (recent versions do `if not token_ids:` up\n", + " # front, which errors on a Series).\n", + " token_ids = list(batch.pop(\"token_ids\"))\n", " transcription = self.processor.batch_decode(token_ids, skip_special_tokens=True)\n", " batch[\"transcription\"] = transcription\n", " return batch\n", @@ -277,7 +280,7 @@ "## LLM-based quality filter\n", "\n", "A Llama-3 model serves as a *machine judge* that scores each transcription\n", - "from 1 👎 to 5 👍 on its educational value. The **LLM Processor** API wraps the heavy\n", + "from 1 \ud83d\udc4e to 5 \ud83d\udc4d on its educational value. The **LLM Processor** API wraps the heavy\n", "lifting of batching, prompt formatting, and vLLM engine interaction using a declarative API style.\n", "\n", "Ray Data provides a high-level API for integrating LLMs into data pipelines. The preprocessing and postprocessing functions handle data preparation and result parsing." diff --git a/templates/audio-dataset-curation-llm-judge/README.md b/templates/audio-dataset-curation-llm-judge/README.md index f2b9ef05e..3449e24bc 100644 --- a/templates/audio-dataset-curation-llm-judge/README.md +++ b/templates/audio-dataset-curation-llm-judge/README.md @@ -183,7 +183,10 @@ class Decoder: self.processor = AutoProcessor.from_pretrained(TRANSCRIPTION_MODEL) def __call__(self, batch): - token_ids = batch.pop("token_ids") + # Convert the pandas Series to a plain list so transformers.batch_decode + # can iterate token id arrays (recent versions do `if not token_ids:` up + # front, which errors on a Series). + token_ids = list(batch.pop("token_ids")) transcription = self.processor.batch_decode(token_ids, skip_special_tokens=True) batch["transcription"] = transcription return batch From 657aedfe0bc972c500e0b293510e76bc665c71fa Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Jul 2026 07:12:05 +0000 Subject: [PATCH 3/3] Decoder: pass whisper batch_decode plain nested Python lists Co-authored-by: Aydin Abiar --- templates/audio-dataset-curation-llm-judge/README.ipynb | 8 ++++---- templates/audio-dataset-curation-llm-judge/README.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/audio-dataset-curation-llm-judge/README.ipynb b/templates/audio-dataset-curation-llm-judge/README.ipynb index 02f6beea5..bd5eaef81 100644 --- a/templates/audio-dataset-curation-llm-judge/README.ipynb +++ b/templates/audio-dataset-curation-llm-judge/README.ipynb @@ -259,10 +259,10 @@ " self.processor = AutoProcessor.from_pretrained(TRANSCRIPTION_MODEL)\n", "\n", " def __call__(self, batch):\n", - " # Convert the pandas Series to a plain list so transformers.batch_decode\n", - " # can iterate token id arrays (recent versions do `if not token_ids:` up\n", - " # front, which errors on a Series).\n", - " token_ids = list(batch.pop(\"token_ids\"))\n", + " # Whisper's tokenizer probes token_ids with plain-Python truthiness\n", + " # (`if not token_ids`, `if has_prompt`, ...), so hand it plain nested lists\n", + " # rather than a pandas Series of numpy arrays.\n", + " token_ids = [ids.tolist() for ids in batch.pop(\"token_ids\")]\n", " transcription = self.processor.batch_decode(token_ids, skip_special_tokens=True)\n", " batch[\"transcription\"] = transcription\n", " return batch\n", diff --git a/templates/audio-dataset-curation-llm-judge/README.md b/templates/audio-dataset-curation-llm-judge/README.md index 3449e24bc..3718d7702 100644 --- a/templates/audio-dataset-curation-llm-judge/README.md +++ b/templates/audio-dataset-curation-llm-judge/README.md @@ -183,10 +183,10 @@ class Decoder: self.processor = AutoProcessor.from_pretrained(TRANSCRIPTION_MODEL) def __call__(self, batch): - # Convert the pandas Series to a plain list so transformers.batch_decode - # can iterate token id arrays (recent versions do `if not token_ids:` up - # front, which errors on a Series). - token_ids = list(batch.pop("token_ids")) + # Whisper's tokenizer probes token_ids with plain-Python truthiness + # (`if not token_ids`, `if has_prompt`, ...), so hand it plain nested lists + # rather than a pandas Series of numpy arrays. + token_ids = [ids.tolist() for ids in batch.pop("token_ids")] transcription = self.processor.batch_decode(token_ids, skip_special_tokens=True) batch["transcription"] = transcription return batch