YapayNet's picture
Update README.md
cce6a4f verified
|
Raw History Blame Contribute Delete
4.82 kB
metadata
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train.parquet
      - split: validation
        path: data/validation.parquet
license: other
pretty_name: BeTraC2026 Augmented
tags:
  - medical
  - speech
  - asr
  - soap
  - chain-of-thought
  - webdataset

BeTraC2026 Augmented

This repository contains a curated Hugging Face version of KITs BeTraC sumbission. It has two layers:

  1. data/train.parquet and data/validation.parquet provide a lightweight preview/index table for browsing, filtering, and load_dataset(...).
  2. data/<task>/*.tar contains WebDataset shards with the real .opus audio bytes and chat-message JSON needed to replicate the experiments.

Preview Columns

  • id: stable example identifier. Uses the source __key__ when available, with task and split metadata prefixed for uniqueness.
  • original_dataset: source dataset name (dopaco, omi-health, mts-dialog, aci-bench, primock57).
  • split: original split name (train or dev). The Hugging Face dev examples are stored in the validation split.
  • task: normalized task label.
  • input_modality: input type (audio or asr_text).
  • output_type: target output type (soap, cot_soap, speaker_diarized_asr).
  • source_file: original GRUN10 filename.
  • source_key: source __key__ if present, otherwise a generated row index.
  • has_audio: whether the sample has a real audio file.
  • audio_format: opus for audio samples, otherwise null.
  • audio_location: webdataset for audio samples, otherwise null.
  • audio_shard: repo-relative tar shard containing the audio sample.
  • audio_key: filename of the .opus member inside the shard.
  • webdataset_key: shared sample key used for .json, .messages.json, and optional .opus members inside WebDataset shards.
  • messages: chat-style training messages.
  • record: original JSON object with messages, optional audios, and optional __key__.

The Hugging Face Dataset Preview shows metadata and chat messages only. For rows where has_audio=true, the real Ogg/Opus audio is stored in the WebDataset tar shard referenced by audio_shard and audio_key.

Task Mapping

Source files task input_modality output_type
a.<dataset>.<split>.json audio2soap audio soap
t.<dataset>.<split>.json asr2soap asr_text soap
cot.a.<dataset>.<split>.json audio2cotsoap audio cot_soap
cot.t.<dataset>.<split>.json asr2cotsoap asr_text cot_soap
spk_asr.<dataset>.<split>.json audio2speaker_asr audio speaker_diarized_asr

The curated files use the <think>...</think> chain-of-thought format. The cot.out.* / out.cot.* natural-language-thinking variants are not included. To derive that style, replace the <think> and </think> delimiters in assistant messages with the natural-language thinking markers used by the target training format.

Loading the Preview Table

The preview/index table can be loaded directly from Hugging Face:

from datasets import load_dataset

ds = load_dataset("YapayNet/betrac2026-augmented")
print(ds)
print(ds["train"][0]["task"])

This is convenient for filtering examples and inspecting messages. It does not inline or decode the audio in the preview table.

Replicating Experiments with Audio

For exact replication, download the full repository snapshot so the WebDataset shards are available locally:

hf download YapayNet/betrac2026-augmented \
  --repo-type dataset \
  --local-dir betrac2026-augmented

Then load the relevant task shard with webdataset:

import json
from pathlib import Path
import webdataset as wds

root = Path("betrac2026-augmented")
shards = str(root / "data/audio2soap/train-{00000..00099}.tar")

dataset = wds.WebDataset(shards, shardshuffle=False)
for sample in dataset:
    key = sample["__key__"]
    messages = json.loads(sample["messages.json"])
    metadata = json.loads(sample["json"])
    audio_bytes = sample.get("opus")
    print(key, metadata["task"], len(messages), len(audio_bytes or b""))
    break

For audio-input tasks (audio2soap, audio2cotsoap, and audio2speaker_asr), each WebDataset sample contains:

<webdataset_key>.json
<webdataset_key>.messages.json
<webdataset_key>.opus

For text-only tasks (asr2soap and asr2cotsoap), each sample contains:

<webdataset_key>.json
<webdataset_key>.messages.json

The .json member contains metadata such as original_dataset, split, task, source_file, source_key, has_audio, audio_shard, and audio_key. The .messages.json member contains the chat-style training messages. The .opus member contains the real audio bytes when audio exists.