Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"

Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"

Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"

Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/darwin-x86_64-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: ./scripts/workflows/configure_runtime_dirs.sh

- name: Set up Python 3.12
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/full-dataset-quality-gate-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"

Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-python-3_13-cli-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: ./scripts/workflows/configure_runtime_dirs.sh

- name: Set up Python 3.13
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.13"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-selfhosted-gpu-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
run: ./scripts/workflows/configure_runtime_dirs.sh

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ inputs.python_version }}

Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
run: ./scripts/workflows/configure_runtime_dirs.sh

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ inputs.python_version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos15-mps-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: ./scripts/workflows/configure_runtime_dirs.sh

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ inputs.python_version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
with:
ref: ${{ needs.verify-ci.outputs.head_sha }}
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install uv
run: python -m pip install --upgrade pip uv
- name: Cache uv
uses: actions/cache@v5
uses: actions/cache@v6
with:
path: ~/.cache/uv
key: uv-${{ runner.os }}-testpypi-build-${{ hashFiles('uv.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ jobs:
with:
ref: ${{ needs.verify-ci.outputs.head_sha }}
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install uv
run: python -m pip install --upgrade pip uv
- name: Cache uv
uses: actions/cache@v5
uses: actions/cache@v6
with:
path: ~/.cache/uv
key: uv-${{ runner.os }}-release-build-${{ hashFiles('uv.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
persist-credentials: false

- name: Run Scorecard advisory
uses: ossf/scorecard-action@v2.4.3
uses: ossf/scorecard-action@v2.5.0
with:
publish_results: false
results_file: scorecard-results.sarif
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
rev: v3.22.0
hooks:
- id: pyupgrade
args: [--py312-plus]
stages: [pre-commit]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.1
rev: v0.17.3
hooks:
- id: ruff
args: [--fix, --ignore, TID251]
Expand All @@ -17,7 +17,7 @@ repos:
stages: [pre-push]

- repo: https://github.com/psf/black
rev: 26.3.1
rev: 26.10.1
hooks:
- id: black
stages: [pre-commit]
Expand All @@ -26,7 +26,7 @@ repos:
stages: [pre-push]

- repo: https://github.com/pycqa/isort
rev: 6.1.0
rev: 8.0.1
hooks:
- id: isort
stages: [pre-commit]
Expand All @@ -35,7 +35,7 @@ repos:
stages: [pre-push]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
rev: v2.4.1
hooks:
- id: mypy
pass_filenames: false
Expand Down
71 changes: 31 additions & 40 deletions docs/ci/dependabot-alert-triage.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,46 @@
# Dependabot Alert Triage

Snapshot date: 2026-07-07.
Snapshot date: 2026-11-10 (expected state after the 2026-11 dependency maintenance PR).

## Summary

- Open alerts: 24
- Severity mix: 1 critical, 7 high, 8 medium, 8 low
- Direct project dependencies with alerts: `black`, `pyarrow`, `pytest`, `python-dotenv`, `torch`, `transformers`
- Transitive dependencies with alerts: `cryptography`, `msgpack`, `Pygments`, `requests`, `urllib3`
- Open alerts expected after remediation: 15 (1 critical, 5 high, 4 medium, 5 low)
- Remediated by lock/spec updates: `black`, `certifi`, `cryptography`, `filelock`, `fsspec`,
`hydra-core`, `msgpack`, `setuptools`, `urllib3`, `virtualenv`
- Remaining direct runtime dependencies with alerts: `torch`, `transformers`
- Merge policy: keep Dependency Review, CodeQL, and Scorecard advisory until alert noise and
remediation risk are understood.

## Priority order
## Why the remaining alerts are open

1. Review Dependabot PRs for direct critical/high runtime packages first: `torch`, `pyarrow`,
`transformers`.
2. Review direct dev-tool alerts next: `black`, `pytest`.
3. Review direct medium runtime alerts: `python-dotenv`.
4. Resolve transitive high/medium alerts through parent dependency updates where possible:
`cryptography`, `msgpack`, `requests`, `urllib3`.
5. Leave low-severity transitive alerts advisory unless a compatible parent update is already
available.
- `torch` on `darwin-x86_64` + Python 3.12 is pinned to `<=2.2.2` (`pyproject.toml`), the last
release with macOS x86_64 wheels. Every alert below except 27 matches only that lock entry and
cannot be fixed without dropping the full-support `darwin-x86_64` target.
- `torch` 27 (low) affects the 2.10.0 lock entry used on other platforms; the fix (2.13.0) moves
Linux wheels to CUDA 13 and needs GPU-lane validation before adoption.
- `transformers` alerts need `>=5.10.0`, and 35 has no patched release yet. The project caps
`transformers<5.0.0`; a 5.x migration is a runtime change for the medium/accurate profiles and
needs its own validated PR.

## Open alert inventory

| Alert | Severity | Dependency | Direct? | Manifest | Advisory | Triage |
|---:|---|---|---|---|---|---|
| 4 | critical | `torch` | yes | `uv.lock` | GHSA-53q9-r3pm-6pq6 | Runtime dependency; prioritize compatible update and profile smoke tests. |
| 25 | high | `transformers` | yes | `uv.lock` | GHSA-29pf-2h5f-8g72 | Optional runtime dependency; prioritize with medium/full profile compatibility. |
| 16 | high | `pyarrow` | yes | `uv.lock` | GHSA-rgxp-2hwp-jwgg | Runtime dependency; update lock and validate dataset/data paths. |
| 1 | high | `pyarrow` | yes | `pyproject.toml` | GHSA-rgxp-2hwp-jwgg | Same advisory as alert 16; update spec only if required for patched range. |
| 5 | high | `black` | yes | `uv.lock` | GHSA-3936-cmfr-pm3m | Dev-only formatter; update with lint/format checks. |
| 24 | high | `msgpack` | no | `uv.lock` | GHSA-6v7p-g79w-8964 | Transitive; identify parent from `uv tree` before pinning. |
| 23 | high | `cryptography` | no | `uv.lock` | GHSA-537c-gmf6-5ccf | Transitive; prefer parent update. |
| 14 | high | `urllib3` | no | `uv.lock` | GHSA-mf9v-mfxr-j63j | Transitive; prefer parent update. |
| 13 | high | `urllib3` | no | `uv.lock` | GHSA-qccp-gfcp-xxvc | Same package as alert 14; resolve together. |
| 20 | medium | `torch` | yes | `uv.lock` | GHSA-vgrw-7cvw-pwgx | Resolve with critical `torch` update if compatible. |
| 18 | medium | `torch` | yes | `uv.lock` | GHSA-f4hp-rmr7-r7v8 | Resolve with critical `torch` update if compatible. |
| 3 | medium | `torch` | yes | `uv.lock` | GHSA-887c-mr87-cxwp | Resolve with critical `torch` update if compatible. |
| 12 | medium | `python-dotenv` | yes | `uv.lock` | GHSA-mf9w-mj56-hr94 | Direct runtime dependency; update and run CLI config smoke. |
| 11 | medium | `pytest` | yes | `uv.lock` | GHSA-6w46-j5rx-g56g | Dev test dependency; update with full unit suite. |
| 9 | medium | `transformers` | yes | `uv.lock` | GHSA-69w3-r845-3855 | Resolve with high `transformers` update if compatible. |
| 10 | medium | `cryptography` | no | `uv.lock` | GHSA-p423-j2cm-9vmq | Resolve with high `cryptography` update if compatible. |
| 6 | medium | `requests` | no | `uv.lock` | GHSA-gc5v-m9x4-r6x2 | Transitive; prefer parent update. |
| 22 | low | `torch` | yes | `uv.lock` | GHSA-qfhq-4f3w-5fph | Resolve with critical `torch` update if compatible. |
| 21 | low | `torch` | yes | `uv.lock` | GHSA-rrmf-rvhw-rf47 | Resolve with critical `torch` update if compatible. |
| 19 | low | `torch` | yes | `uv.lock` | GHSA-x3gm-94wq-g975 | Resolve with critical `torch` update if compatible. |
| 17 | low | `torch` | yes | `uv.lock` | GHSA-c678-jfcj-6jmf | Resolve with critical `torch` update if compatible. |
| 2 | low | `torch` | yes | `uv.lock` | GHSA-3749-ghw9-m3mg | Resolve with critical `torch` update if compatible. |
| 7 | low | `cryptography` | no | `uv.lock` | GHSA-m959-cc7f-wv43 | Resolve with higher-severity `cryptography` update if compatible. |
| 8 | low | `Pygments` | no | `uv.lock` | GHSA-5239-wwwm-4pmq | Transitive dev/docs dependency; update via parent or normal bot PR. |
| Alert | Severity | Dependency | Advisory | Patched | Triage |
|---:|---|---|---|---|---|
| 4 | critical | `torch` | GHSA-53q9-r3pm-6pq6 | 2.6.0 | `darwin-x86_64` pin; load only trusted checkpoints. |
| 73 | high | `torch` | GHSA-63cw-57p8-fm3p | 2.10.0 | `darwin-x86_64` pin; load only trusted checkpoints. |
| 35 | high | `transformers` | GHSA-x9r9-c232-4q39 | none | Needs 5.x migration; no patched release yet. |
| 31 | high | `transformers` | GHSA-xrqw-3rrv-vx5w | 5.10.0 | Needs 5.x migration. |
| 26 | high | `transformers` | GHSA-fgcw-684q-jj6r | 5.5.0 | Needs 5.x migration. |
| 25 | high | `transformers` | GHSA-29pf-2h5f-8g72 | 5.3.0 | Needs 5.x migration. |
| 20 | medium | `torch` | GHSA-vgrw-7cvw-pwgx | 2.9.1 | `darwin-x86_64` pin. |
| 18 | medium | `torch` | GHSA-f4hp-rmr7-r7v8 | none | `darwin-x86_64` pin. |
| 9 | medium | `transformers` | GHSA-69w3-r845-3855 | 5.0.0rc3 | Needs 5.x migration. |
| 3 | medium | `torch` | GHSA-887c-mr87-cxwp | 2.8.0 | `darwin-x86_64` pin. |
| 27 | low | `torch` | GHSA-rrmf-rvhw-rf47 | 2.13.0 | 2.10.0 entry; adopt 2.13 after GPU-lane validation. |
| 22 | low | `torch` | GHSA-qfhq-4f3w-5fph | 2.10.0 | `darwin-x86_64` pin. |
| 19 | low | `torch` | GHSA-x3gm-94wq-g975 | none | `darwin-x86_64` pin. |
| 17 | low | `torch` | GHSA-c678-jfcj-6jmf | none | `darwin-x86_64` pin. |
| 2 | low | `torch` | GHSA-3749-ghw9-m3mg | 2.7.1 | `darwin-x86_64` pin. |

## Required validation for remediation PRs

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [
"openai-whisper>=20250625,<20260000; python_version < '3.13' or (sys_platform != 'darwin' or platform_machine != 'x86_64')",
"ffmpeg-python>=0.2.0,<0.3.0",
"scikit-learn>=1.3.2,<1.8.0",
"soundfile>=0.12.1,<1.0.0",
"soundfile>=0.14.0,<1.0.0",
"python-dotenv>=1.2.2,<2.0.0",
"PyYAML>=6.0,<7.0",
"huggingface_hub>=0.30.0,<1.0.0",
Expand All @@ -57,9 +57,9 @@ dev = [
"griffe>=2.1.0,<3.0.0",
"hypothesis>=6.130.0,<7.0.0",
"ruff>=0.9.0,<1.0.0",
"black>=26.3.1,<27.0.0",
"black>=26.10.1,<27.0.0",
"isort>=8.0.1,<9.0.0",
"mypy>=1.11.0,<2.0.0",
"mypy>=2.4.1,<3.0.0",
"pyright>=1.1.390,<2.0.0",
"pyupgrade>=3.21.2,<4.0.0",
"types-PyYAML>=6.0.12,<7.0.0",
Expand Down
6 changes: 3 additions & 3 deletions ser/_internal/data/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from dataclasses import replace
from functools import partial
from pathlib import Path
from typing import Any, NamedTuple, cast
from typing import Any, NamedTuple

import numpy as np
from numpy.typing import NDArray
Expand All @@ -23,7 +23,7 @@
)
from ser._internal.data.dataset_registry import load_dataset_registry
from ser._internal.data.label_ontology import resolve_label_ontology
from ser._internal.data.manifest import SplitName, Utterance
from ser._internal.data.manifest import Utterance
from ser._internal.data.manifest_jsonl import load_manifest_jsonl
from ser._internal.data.recipe import load_dataset_recipe
from ser._internal.features.feature_extractor import _extract_feature_for_settings
Expand Down Expand Up @@ -82,7 +82,7 @@ def _validate_utterances(utterances: list[Utterance]) -> list[Utterance] | None:
)
by_sample_id = {utterance.sample_id: utterance for utterance in utterances}
utterances = [
replace(by_sample_id[entry.sample_id], split=cast(SplitName, entry.split))
replace(by_sample_id[entry.sample_id], split=entry.split)
for entry in report.ledger
if "primary_emotion" in entry.tasks
and entry.split in {"train", "dev", "test"}
Expand Down
4 changes: 2 additions & 2 deletions ser/_internal/transcript/mps_admission_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ def _read_report_cached(
recommendation = CalibrationRecommendation(
backend_id=backend_id,
model_name=model_name,
recommendation=cast(RuntimeRecommendation, recommendation_text),
confidence=cast(RecommendationConfidence, confidence_text),
recommendation=recommendation_text,
confidence=confidence_text,
reason=str(row.get("reason", "")).strip(),
source_profile=str(row.get("profile", "")).strip(),
)
Expand Down
10 changes: 7 additions & 3 deletions ser/_internal/transcription/runtime_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
from __future__ import annotations

from collections.abc import Callable
from typing import TYPE_CHECKING, Protocol, cast
from typing import TYPE_CHECKING, Final, Protocol

from ser.config import AppConfig
from ser.profiles import TranscriptionBackendId

if TYPE_CHECKING:
from ser._internal.transcript.backends.base import BackendRuntimeRequest

_SUPPORTED_BACKEND_IDS: Final[frozenset[TranscriptionBackendId]] = frozenset(
{"stable_whisper", "faster_whisper"}
)


class _RuntimeProfile(Protocol):
"""Minimal profile contract required by runtime-request construction."""
Expand Down Expand Up @@ -86,8 +90,8 @@ def resolve_backend_id(
error_factory: _ErrorFactory,
) -> TranscriptionBackendId:
"""Normalizes one backend id and validates supported values."""
if raw_backend_id in {"stable_whisper", "faster_whisper"}:
return cast(TranscriptionBackendId, raw_backend_id)
if raw_backend_id in _SUPPORTED_BACKEND_IDS:
return raw_backend_id
raise error_factory(
"Unsupported transcription backend id configured. "
"Expected 'stable_whisper' or 'faster_whisper'."
Expand Down
4 changes: 2 additions & 2 deletions ser/_internal/utils/subtitles.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from dataclasses import dataclass
from pathlib import Path
from typing import Literal, cast
from typing import Literal

from ser._internal.utils.logger import get_logger
from ser.config import TimelineConfig
Expand All @@ -31,7 +31,7 @@ def infer_subtitle_format(output_path: str) -> SubtitleFormat | None:
"""Infers subtitle format from one output-path suffix."""
suffix = Path(output_path).suffix.lower().lstrip(".")
if suffix in SUPPORTED_SUBTITLE_FORMATS:
return cast(SubtitleFormat, suffix)
return suffix
return None


Expand Down
Loading
Loading