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/README.ipynb b/templates/audio-dataset-curation-llm-judge/README.ipynb index 3e0fe63ec..bd5eaef81 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", - "**⏱️ 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", + " # 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", @@ -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..3718d7702 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") + # 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 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