Skip to content

feat(LAB-4964): parse audio labels and their segment classifications - #2152

Merged
RuellePaul merged 2 commits into
mainfrom
feature/lab-4964-audio-classification-jobs-at-segment-level
Nov 20, 2026
Merged

RuellePaul merged 2 commits into
mainfrom
feature/lab-4964-audio-classification-jobs-at-segment-level

Conversation

@RuellePaul

@RuellePaul RuellePaul commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

LAB-4964 — an audio segment now carries its classifications under children (kili!14948). Import and export already pass the jsonResponse through; the label parser did not read audio labels at all.

  • parsed_label works on audio labels. It raised JobNotExistingError: Job named 'speakers' does not exist on every audio label, the backend always writing speakers at the root. The key is now read as the speakers of the label, and kept by to_dict().
  • A segment is an object: text, start_time, end_time, speaker_id, mid, and children — its answers to the segment-level classification jobs (root CLASSIFICATION jobs without level). Those jobs are no longer listed at the root of the parsed label.
  • Tutorial: recipes/audio_projects.ipynb and its generated page document the segment-level classification, import it with the pre-annotations and read it back through parsed_label.
segment = parsed_label.jobs["TRANSCRIPTION_JOB"].annotations[0]
segment.text, segment.start_time, segment.end_time, segment.speaker_id
segment.children["EMOTION_JOB"].category.name  # "NEUTRAL"

Verification

  • pytest: 1339 passed, 1 skipped, 1 xfailed, with 11 new tests in test_resp_parsing_audio.py.
  • pre-commit, pylint, pyright and mkdocs build: PASSED.
  • CI: 14 checks pass and build-test fails, twice: staging refuses the API key the job signs in with (AuthenticationFailed). Rerun on the previous commit, where it passed the day before, the job fails the same way: the key, not this diff.
  • The tutorial's code cells run against the sandbox's backend on this branch's SDK, with kili!14948 and json-validator!220 checked out: every cell ran; the parsed segment printed 2 2.3 <speaker id> Hello. and its emotion NEUTRAL.
  • Review: a segment carrying "children": null, which the API accepts and serves, made to_dict() raise AttributeError; fixed in c6a86f14, and the sandbox's label that raised now dumps and prints.

Decided

  • speakers is not a job: it is skipped by the job check on an AUDIO label only, and any other input type still raises on it.
  • segment.children raises KeyError on a segment that has none, as an object annotation without sub-job does today.

Open

  • To release after kili!14948 is deployed: before that the API refuses the tutorial's interface (a root classification job without level).

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@RuellePaul
RuellePaul marked this pull request as ready for review November 17, 2026 19:20
@RuellePaul RuellePaul self-assigned this Nov 17, 2026

@RuellePaul RuellePaul left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Verdict: Needs changes

Severity Count
Required 1

Tested locally: tests 1338 passed, 8 of the 10 new ones red on main · parsed_label on 20 labels of the sandbox (predictions, labels, a review, with and without speakers), 20/20 round trips · 4 edge shapes, 1 raising — report

parsed_label now reads audio labels and their segment classifications as the ticket asks; one shape the API accepts and serves still raises.

reviewing-feature · 9f26d30

@RuellePaul RuellePaul left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Verdict: Ready to merge

Tested locally: tests 1339 passed · the label that raised ("children": null) now dumps and prints against the sandbox · report

Re-review: ✔ fixed in c6a86f1 — to_dict() keeps a null children as given, one test added. CI: 14 checks pass; build-test fails on staging refusing the job's API key, and fails the same way rerun on the previous commit — not this diff, the key is to renew.

reviewing-feature · c6a86f1

A parsed audio label no longer fails on the speakers key. A segment exposes its transcription,
its times, its speaker and, under children, its answers to the segment-level classification jobs.
The audio tutorial documents the segment-level classification.
@RuellePaul
RuellePaul force-pushed the feature/lab-4964-audio-classification-jobs-at-segment-level branch from c6a86f1 to aeb7c53 Compare November 19, 2026 13:12

@RuellePaul RuellePaul left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Verdict: Ready to merge

Tested locally: tests 1060 passed (tests/unit) · checks 15/15 at this head · parsed_label against the sandbox (kili!14948 at b70cb0dfe3, json-validator!220): each input type of a segment-level job read, a category changed, one added, one the job lacks refused, a first answer given through children = {…}; the dump appended back is served identical — report

Deep review after the rebase on main: no new finding.

reviewing-feature · aeb7c53

@RuellePaul
RuellePaul merged commit 1dfaf88 into main Nov 20, 2026
15 checks passed
@RuellePaul
RuellePaul deleted the feature/lab-4964-audio-classification-jobs-at-segment-level branch November 20, 2026 11:20
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.

4 participants