SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.14019 · NAACL · 2024

Unitxt: Flexible, Shareable and Reusable Data Preparation and Evaluation for Generative AI

Leshem Choshen, Yotam Perlitz, Ariel Gera, Matan Orbach, Elron Bandel, Yoav Katz, Ofir Arviv, Michal Shmueli-Scheuer, Dafna Sheinwald, Elad Venezian, Shachar Don-Yehiya, Roni Friedman-Melamed

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2401.14019.json · badge: /api/ran/2401.14019.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
IBM/unitxt canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
count_files_recursively Ran
ran, honoured the contract we drafted
IBM/unitxt/src/unitxt/catalog.py
code served (permissive licence) · get_code("d4dcce846698cb3d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create some subdirectories and files
os.makedirs(os.path.join(temp_dir, "subdir1"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir2"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir1", "nested"), exist_ok=True)

# Create some test files
open(os.path.join(temp_dir, "file1.txt"), "w").close()
open(os.path.join(temp_dir, "file2.txt"), "w").close()
open(os.path.join(temp_dir, "subdir1", "file3.txt"), "w").close()
open(os.path.join(temp_dir, "subdir1", "nested", "file4.txt"), "w").close()
open(os.path.join(temp_dir, "subdir2", "file5.txt"), "w").close()

ARGS = {
    "folder": temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
dict_diff_string Ran
ran; our contract draft was wrong, not the code
IBM/unitxt/src/unitxt/artifact.py
code served (permissive licence) · get_code("a6a56d1521e6fb0f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct two dictionaries with different contents to demonstrate the function
dict1 = {
    "model_name": "bert_base",
    "hidden_size": 768,
    "num_layers": 12,
    "learning_rate": 0.0001,
    "batch_size": 32,
}

dict2 = {
    "model_name": "bert_large",
    "hidden_size": 1024,
    "num_layers": 24,
    "learning_rate": 0.00005,
    "batch_size": 32,
    "dropout": 0.1,
}

ARGS = {
    "dict1": dict1,
    "dict2": dict2,
    "max_diff": 200,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
flatten Ran
ran, honoured the contract we drafted
IBM/unitxt/src/unitxt/collections_operators.py
code served (permissive licence) · get_code("876993e83f861993")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The flatten function takes a container (list or tuple) and recursively
# flattens it, preserving the container type (list remains list, tuple remains tuple)

# Test with a list containing nested lists and tuples
container = [1, [2, 3], (4, [5, 6]), 7]

ARGS = {
    "container": container
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_fields Ran
ran; our contract draft was wrong, not the code
IBM/unitxt/src/unitxt/dataclass.py
code served (permissive licence) · get_code("dbfd798d3c6e23c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import dataclasses
from typing import Any, Dict

# Define the classes/types needed
class Undefined:
    pass

@dataclasses.dataclass
class Field:
    default: Any = Undefined
    name: str = None
    type: type = None
    init: bool = True
    also_positional: bool = True
    default_factory: Any = None
    final: bool = False
    abstract: bool = False
    required: bool = False
    internal: bool = False
    origin_cls: type = None
    metadata: Dict[str, str] = dataclasses.field(default_factory=dict)

    def get_default(self):
        if self.default_factory is not None:
            return self.default_factory()
        return self.default

# Create a minimal test class
class TestClass:
    __qualname__ = "TestClass"
    __allow_unexpected_arguments__ = False
    __bases__ = (object,)

# Create mock classes for bases
class MockBaseClass:
    pass

# Set up the attributes dict that would be passed to get_fields
test_attrs = {
    '__qualname__': 'TestClass',
    '__annotations__': {
        'field1': int,
        'field2': str,
    },
    'field1': 42,
    'field2': 'default_value',
    '__module__': '__main__',
}

# Create a test class with __bases__ and __allow_unexpected_arguments__
class TestClassForGetFields:
    __qualname__ = 'TestClassForGetFields'
    __allow_unexpected_arguments__ = False
    __bases__ = (object,)

# Prepare arguments for get_fields function
ARGS = {
    'cls': TestClassForGetFields,
    'attrs': test_attrs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_class_method Ran
ran, violated the contract we drafted
IBM/unitxt/src/unitxt/dataclass.py
code served (permissive licence) · get_code("d1297758e027ea5b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import inspect
from typing import Callable

# Create a simple function with 'self' as first parameter
def sample_method(self, x):
    return x + 1

# Create a function without 'self'
def sample_function(x):
    return x + 1

# Create a class method
class SampleClass:
    def class_method(self, x):
        return x + 1
    
    @classmethod
    def static_class_method(cls, x):
        return x + 1

# Instantiate the class and get a bound method
instance = SampleClass()
bound_method = instance.class_method

ARGS = {
    "func": bound_method
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_possible_field Ran
ran, violated the contract we drafted
IBM/unitxt/src/unitxt/dataclass.py
code served (permissive licence) · get_code("d30f1b332a3afd6b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import inspect

torch.manual_seed(0)

standard_variables = dir(object)

def is_class_method(func):
    if inspect.ismethod(func):
        return True
    if inspect.isfunction(func):
        sig = inspect.signature(func)
        params = list(sig.parameters.values())
        if len(params) > 0 and params[0].name in ['self', 'cls']:
            return True
    return False

def is_possible_field(field_name, field_value):
    """Check if a name-value pair can potentially represent a field.

    Args:
        field_name (str): The name of the field.
        field_value: The value of the field.

    Returns:
        bool: True if the name-value pair can represent a field, False otherwise.
    """
    if field_name in standard_variables:
        return False
    if is_class_method(field_value):
        return False
    return True

# Setup: Create test cases for is_possible_field
# The function checks:
# 1. If field_name is in standard_variables (from dir(object))
# 2. If field_value is a class method

# Test case 1: Regular field (should return True)
test_field_name_1 = "my_custom_field"
test_field_value_1 = 42

# Test case 2: Standard variable name (should return False)
test_field_name_2 = "__doc__"
test_field_value_2 = "some documentation"

# Test case 3: Class method (should return False)
class TestClass:
    def my_method(self):
        pass

test_field_name_3 = "some_field"
test_field_value_3 = TestClass().my_method

# Use the first test case for the ARGS
ARGS = {
    "field_name": test_field_name_1,
    "field_value": test_field_value_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
local_catalog_summary Ran
ran; our contract draft was wrong, not the code
IBM/unitxt/src/unitxt/catalog.py
code served (permissive licence) · get_code("c69435c13e4754a0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create subdirectories with some files
subdir1 = os.path.join(temp_dir, "catalog_a")
subdir2 = os.path.join(temp_dir, "catalog_b")
os.makedirs(subdir1)
os.makedirs(subdir2)

# Create some files in subdir1
for i in range(3):
    with open(os.path.join(subdir1, f"file_{i}.txt"), "w") as f:
        f.write("test")

# Create a nested structure in subdir2
nested = os.path.join(subdir2, "nested")
os.makedirs(nested)
for i in range(2):
    with open(os.path.join(subdir2, f"file_{i}.txt"), "w") as f:
        f.write("test")
for i in range(4):
    with open(os.path.join(nested, f"nested_file_{i}.txt"), "w") as f:
        f.write("test")

# Create a non-directory file in temp_dir to be ignored
with open(os.path.join(temp_dir, "root_file.txt"), "w") as f:
    f.write("test")

ARGS = {
    "catalog_path": temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
short_hex_hash Ran
ran; our contract draft was wrong, not the code
IBM/unitxt/src/unitxt/api.py
code served (permissive licence) · get_code("67f2144ce31de274")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import hashlib

def short_hex_hash(value, length=8):
    h = hashlib.sha256(value.encode()).hexdigest()
    return h[:length]

ARGS = {
    "value": "hello world",
    "length": 8
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In the dynamic landscape of generative NLP, traditional text processing pipelines limit research flexibility and reproducibility, as they are tailored to specific dataset, task, and model combinations. The escalating complexity, involving system prompts, model-specific formats, instructions, and more, calls for a shift to a structured, modular, and customizable solution. Addressing this need, we present Unitxt, an innovative library for customizable textual data preparation and evaluation tailored to generative language models. Unitxt natively integrates with common libraries like HuggingFace and LM-eval-harness and deconstructs processing flows into modular components, enabling easy customization and sharing between practitioners. These components encompass modelspecific formats, task prompts, and many other comprehensive dataset processing definitions. The Unitxt Catalog centralizes these components, fostering collaboration and exploration in modern textual data workflows. Beyond being a tool, Unitxt is a community-driven platform, empowering users to build, share, and advance their pipelines collaboratively. Join the Unitxt community;

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2401.14019")
get_code_for_paper("2401.14019")
have("2401.14019")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2401.14019.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2401.14019.svg)](https://syntology.ai/paper/2401.14019)

Connect an agent — have() is free.