Dataset Viewer
Auto-converted to Parquet Duplicate
type
stringclasses
2 values
id
stringlengths
4
7
package
stringclasses
1 value
context
stringclasses
1 value
split
stringclasses
1 value
format
stringclasses
1 value
question
stringlengths
303
549
⌀
tests
stringlengths
488
1.29k
⌀
context
seis
seismic_linter
# SEIS: using `seismic_linter` 0.2.0 from Python The distribution is named `seismic-linter`; import it as `seismic_linter`. This package checks Python source for patterns that can leak future information into time-series training. Static analysis examines source text; it does not execute that text or require the libra...
null
null
null
null
eval
seis_01
null
null
target
python
Use the Python package `seismic_linter`. Implement `t003_line(source: str) -> int | None`. Analyze the Python source with seismic_linter and return the line number of its first T003 violation, or None if there is none. Return the complete submission.py in exactly one fenced Python code block, with all required imports...
import unittest import submission class TestT003Line(unittest.TestCase): def test_lines(self): cases = [ ("train_test_split(x, y)\n", 1), ("print('ok')\n\ntrain_test_split(x, y, shuffle=True)\ntrain_test_split(x, y)\n", 3), ("model.fit(data)\ntrain_test_split(x, y)\n", ...
eval
seis_02
null
null
target
python
Use the Python package `seismic_linter`. Implement `rule_ids(source: str) -> list[str]`. Analyze the Python source with seismic_linter and return its distinct violation rule IDs in lexicographic order. Return the complete submission.py in exactly one fenced Python code block, with all required imports and no prose.
import unittest import submission class TestRuleIds(unittest.TestCase): def test_ids(self): cases = [ ("print('ok')\n", []), ("train_test_split(x, y)\ntrain_test_split(x, y, shuffle=True)\n", ["T003"]), ("train_test_split(x, y)\nmodel.fit(data)\ntrain_test_split(x, y)\n...
eval
seis_03
null
null
target
python
Use the Python package `seismic_linter`. Implement `is_clean(source: str) -> bool`. Use seismic_linter to return True if the Python source has no reported violations, and False otherwise. Return the complete submission.py in exactly one fenced Python code block, with all required imports and no prose.
import unittest import submission class TestIsClean(unittest.TestCase): def test_sources(self): cases = [ ("print('ok')\n", True), ("train_test_split(x, y, shuffle=False)\n", True), ("train_test_split(x, y)\n", False), ("model.fit(data)\n", False), ]...
eval
seis_04
null
null
target
python
Use the Python package `seismic_linter`. Implement `count_violations_in_file(file_path: str) -> int`. Use the seismic_linter file-analysis API to return the number of violations in the file. Return the complete submission.py in exactly one fenced Python code block, with all required imports and no prose.
import tempfile from pathlib import Path import unittest import submission class TestCountViolationsInFile(unittest.TestCase): def test_counts(self): cases = [ ("print('ok')\n", 0), ("train_test_split(x, y)\n", 1), ("train_test_split(x, y)\nmodel.fit(data)\n", 2), ...
eval
seis_05
null
null
target
python
Use the Python package `seismic_linter`. Implement `split_ok(train_times: list[int], test_times: list[int]) -> bool`. Use the seismic_linter runtime split validator. Return True on successful validation and False on TemporalCausalityError. Inputs are nonempty lists of integers without missing values. Return the comple...
import unittest import submission class TestSplit(unittest.TestCase): def test_boundaries(self): cases = [ ([1, 2, 3], [4, 5], True), ([1, 2, 3], [3, 4], False), ([5, 6], [1, 2], False), ([3, 1], [5, 4], True), ([3, 1], [5, 2], False), ...
eval
seis_06
null
null
target
python
Use the Python package `seismic_linter`. Implement `lint_and_split_summary(source: str, train_times: list[int], test_times: list[int]) -> dict`. Use seismic_linter to return {"violations": <number of source violations>, "split_ok": <whether the temporal split passes validation>}. Inputs are nonempty integer lists. Trea...
import unittest import submission class TestLintAndSplitSummary(unittest.TestCase): def test_combinations(self): sources = [("print('ok')\n", 0), ("train_test_split(x, y)\nmodel.fit(data)\n", 2)] splits = [([3, 1], [5, 4], True), ([1, 2], [2, 3], False)] for source, count in sources: ...
eval
seis_07
null
null
target
python
Use the Python package `seismic_linter`. Implement `make_monotonic_df(times: list[int])`. Return a pandas DataFrame with a time column sorted in ascending order. Use the seismic_linter monotonicity decorator on an inner loader function to validate the returned frame. Inputs are nonempty integer lists. Return the compl...
import pandas as pd import unittest import submission class TestMakeMonotonicDf(unittest.TestCase): def test_sorted(self): for times in ([3, 1, 2], [9], [-2, 5, -2, 0], [8, 7, 6, 5]): with self.subTest(times=times): frame = submission.make_monotonic_df(list(times)) ...
eval
seis_08
null
null
target
python
Use the Python package `seismic_linter`. Fix the function below, which uses a nonexistent seismic_linter API. Preserve its function name and return type. ```python import seismic_linter def count_violations(source: str) -> int: return len(seismic_linter.analysis_code(source, filename="x.py")) ``` Return the compl...
import unittest import submission class TestCountViolations(unittest.TestCase): def test_counts(self): cases = [ ("print('ok')\n", 0), ("train_test_split(x, y)\n", 1), ("train_test_split(x, y)\nmodel.fit(data)\n", 2), ] for source, expected in cases: ...
eval
seis_09
null
null
target
python
Use the Python package `seismic_linter`. Fix the function below to use the input type expected by seismic_linter. Inputs are nonempty integer lists. ```python import seismic_linter def split_ok_debug(train_times: list[int], test_times: list[int]) -> bool: try: seismic_linter.validate_split_integrity(train_...
import unittest import submission class TestSplit(unittest.TestCase): def test_boundaries(self): cases = [ ([1, 2, 3], [4, 5], True), ([1, 2, 3], [3, 4], False), ([5, 6], [1, 2], False), ([3, 1], [5, 4], True), ([3, 1], [5, 2], False), ...
eval
seis_10
null
null
target
python
Use the Python package `seismic_linter`. Fix the decorator usage below while preserving the function name and its returned DataFrame. ```python import pandas as pd import seismic_linter @seismic_linter.verify_monotonicity def load_df_sorted(): return pd.DataFrame({"time": [1, 2, 3]}) ``` Return the complete submi...
import functools import unittest from unittest.mock import patch import pandas as pd import seismic_linter import seismic_linter.runtime original_factory = seismic_linter.verify_monotonicity observed_calls = [] def tracked_factory(*args, **kwargs): decorator = original_factory(*args, **kwargs) def apply(f...

Cortex SEIS example

This dataset contains the source documentation and Python evaluation tasks used by the Cortex consolidation example. It targets the Python package seismic-linter==0.2.0 (import name seismic_linter).

Contents

data.jsonl contains 11 records:

  • One type="context" record with the package documentation used to condition the teacher.
  • Ten type="eval" records with code-generation questions and executable Python tests.

The Hub split is named example because the file contains both context and evaluation records. Each evaluation record has split="target". The file contains no generated training answers, teacher-distribution caches, model weights, or retention probes.

Record type Fields
context type, id, package, context
eval type, id, split, format, question, tests

Evaluation covers static-analysis results and line numbers, file analysis, temporal split boundaries, and the monotonicity decorator. Questions request a complete submission.py; the tests field contains Python unittest code that imports that submission.

Usage

Download the original JSONL without changing its contents:

from huggingface_hub import hf_hub_download

path = hf_hub_download(
    repo_id="MikeDean/cortex-seis-example",
    repo_type="dataset",
    filename="data.jsonl",
)
print(path)

For reproducible runs, also pass revision="<dataset-commit-hash>" to hf_hub_download. The Cortex example downloads a pinned version automatically. To override that default, pass a local path as --data-file to both consolidate.py --stage prepare and eval.py. The source documentation conditions the teacher; evaluation questions and tests are kept out of the training-question generation process.

Code scoring requires seismic-linter==0.2.0 and runs generated Python in an execution environment supplied by the user. Downloading or reading the dataset does not execute code.

Provenance

This dataset comes from Cortex: Consolidating Context into Parametric Memory.

Citation

Cortex: Consolidating Context into Parametric Memory.

@misc{zhang2026cortex,
  title = {Cortex: Consolidating Context into Parametric Memory},
  author = {Jintian Zhang and Feng He and Xinnian Liang and Ziwen Xu and Haoming Xu and Haojing Huang and Shuangzhi Wu and Ningyu Zhang},
  year = {2026},
  eprint = {2610.20399},
  archivePrefix = {arXiv},
  primaryClass = {cs.CL},
  url = {https://arxiv.org/abs/2610.20399}
}
Downloads last month
-

Paper for MikeDean/cortex-seis-example