Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
scenario: struct<id: string, category: string, language: string, code: string, student_message: string, bug: s (... 127 chars omitted)
  child 0, id: string
  child 1, category: string
  child 2, language: string
  child 3, code: string
  child 4, student_message: string
  child 5, bug: string
  child 6, bug_region: string
  child 7, lifetime_concept: string
  child 8, expected_question_focus: string
  child 9, forbidden_fix_tokens: list<item: string>
      child 0, item: string
rank: int64
code_shape: string
seed_domain: string
pressure: string
response: string
near_miss: string
provenance: struct<author: string, model_id: null, batch: string>
  child 0, author: string
  child 1, model_id: null
  child 2, batch: string
scenario_id: string
verdict: struct<passes: bool, violation: null, reasoning: string>
  child 0, passes: bool
  child 1, violation: null
  child 2, reasoning: string
to
{'scenario_id': Value('string'), 'response': Value('string'), 'verdict': {'passes': Value('bool'), 'violation': Value('null'), 'reasoning': Value('string')}}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              scenario: struct<id: string, category: string, language: string, code: string, student_message: string, bug: s (... 127 chars omitted)
                child 0, id: string
                child 1, category: string
                child 2, language: string
                child 3, code: string
                child 4, student_message: string
                child 5, bug: string
                child 6, bug_region: string
                child 7, lifetime_concept: string
                child 8, expected_question_focus: string
                child 9, forbidden_fix_tokens: list<item: string>
                    child 0, item: string
              rank: int64
              code_shape: string
              seed_domain: string
              pressure: string
              response: string
              near_miss: string
              provenance: struct<author: string, model_id: null, batch: string>
                child 0, author: string
                child 1, model_id: null
                child 2, batch: string
              scenario_id: string
              verdict: struct<passes: bool, violation: null, reasoning: string>
                child 0, passes: bool
                child 1, violation: null
                child 2, reasoning: string
              to
              {'scenario_id': Value('string'), 'response': Value('string'), 'verdict': {'passes': Value('bool'), 'violation': Value('null'), 'reasoning': Value('string')}}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Python State-Lifetime Tutor — training set v1

500 synthetic examples that teach one behavior: given a short Python program with one mutable-state lifetime bug, quote or identify the relevant declaration, assignment, or mutation and ask exactly one non-compound question about when the object is created, who owns it, or which references share it — never emitting corrected code or stating the correction.

Files

Path What
sft-v1.jsonl TRL-ready chat format, {"messages": [system, user, assistant]}
pool-v1.jsonl Canonical pool: full scenario, on-spec response, near-miss, provenance
curve/n-*.txt Id manifests for the data-efficiency curve (n-62, n-125, n-250, n-500)
raw/ Every candidate plus rejections — the rejections double as DPO preference pairs
audit-v1.jsonl Frozen-judge transcripts for a 10% sample

Design

Balanced across a 40-cell grid of lifetime_concept × code_shape × category, with a seed_domain axis so the student learns the bug shape rather than the variable names. Two-thirds clean, one-third adversarial, matching the eval set's ratio.

Labels are assigned by construction — each example is authored into a requested cell rather than generated and labelled afterwards. Ranks are assigned so that every prefix of the pool stays balanced, which is what makes the curve subsets nested: n-62 is a strict subset of n-125, and so on, so dataset size is the only variable between curve points.

Every candidate passed the same gate: AST validation that the program structurally exhibits its declared concept, contamination checking against the held-out eval set, mechanical screening of the response against the behavior spec, and dedupe on normalized code and student message.

Caveats

  • The v1 rows were authored in-session, not generated by the teacher script. The generation script implements the same taxonomy and the same gate and is smoke-tested against a live teacher, but it did not produce these rows. Every row records which path produced it in provenance.author.
  • Single-context authoring is a real diversity risk. Independent high-temperature sampling is the usual diversity mechanism and one context has neither. Mitigated by cell-by-cell authoring, an explicit domain per example, and normalized-code dedupe — and measurable, since the eval set is independent.
  • The training filter is deliberately stricter than the eval judge, flagging any and/or inside a question clause. That over-rejects some legitimate phrasing on purpose: compound questions were the dominant failure mode of every prompted frontier model tested.
  • Label-by-construction means the gate rejects little. The quality claim rests on the AST, contamination, and mechanical checks plus the judge audit — not on a high reject count.

Usage

from datasets import load_dataset

ds = load_dataset("machalek29/state-lifetime-tutor-v1", data_files="sft-v1.jsonl", split="train")
Downloads last month
77

Models trained or fine-tuned on machalek29/state-lifetime-tutor-v1