| average_tensors |
Ran ran on a synthesized input |
Nimesh-Patel/text-to-text-transfer-transformer/t5/transform_checkpoints.py code served (permissive licence) · get_code("b628d2dd083dfe70") How it ranRan 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 Tensor, ndim 2, dtype family float, shape (2, 4) 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
torch.manual_seed(0)
# Create a list of small tensors to average
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(2, 4)
tensor3 = torch.randn(2, 4)
tensors = [tensor1, tensor2, tensor3]
ARGS = {
"tensors": tensors
}
- 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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
|
| compute_metric_assert |
Ran ran on a synthesized input |
shivamraval98/multitask-t5_ae/src/t5_eval.py code served (permissive licence) · get_code("6a636d3c8de90c47") How it ranRan 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 torch
import numpy as np
from sklearn.metrics import classification_report
torch.manual_seed(0)
# Create sample labels and predictions for classification_report
# classification_report expects 1D array-like of true labels and predicted labels
labels = np.array([0, 1, 2, 1, 0, 2, 1, 0])
predictions = np.array([0, 1, 1, 1, 0, 2, 2, 0])
ARGS = {
"labels": labels,
"predictions": predictions,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn, torch — 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
|
| compute_metrics |
Ran ran on a synthesized input |
shivamraval98/multitask-t5_ae/src/train_baseline.py code served (permissive licence) · get_code("6a4d95581e554907") How it ranRan 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 torch
import numpy as np
from types import SimpleNamespace
torch.manual_seed(0)
# Create a mock prediction object that has the required attributes:
# - label_ids: array of true labels
# - predictions: array of logits/scores with shape (batch_size, num_classes)
batch_size = 2
num_classes = 4
# Create label_ids (true labels)
label_ids = np.array([0, 2], dtype=np.int64)
# Create predictions (logits) - shape (batch_size, num_classes)
predictions = np.array([
[2.1, 0.5, -1.2, 0.3],
[0.1, -0.5, 3.2, 0.8]
], dtype=np.float32)
# Create a mock pred object with the required attributes
pred = SimpleNamespace(
label_ids=label_ids,
predictions=predictions
)
ARGS = {
'pred': pred
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn, torch — 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
|
| compute_weighted_accuracy |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
google-research/t5x/t5x/models.py code served (permissive licence) · get_code("24c2125ce6fe13c2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ArrayImpl, 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 jax.numpy as jnp
import numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Create small test tensors
batch_size = 2
length = 3
num_classes = 4
# logits: [batch, length, num_classes] - random logits
logits = jnp.array(np.random.randn(batch_size, length, num_classes), dtype=jnp.float32)
# targets: [batch, length] - random class indices
targets = jnp.array(np.random.randint(0, num_classes, size=(batch_size, length)), dtype=jnp.int32)
# weights: [batch, length] - random weights
weights = jnp.array(np.random.rand(batch_size, length), dtype=jnp.float32)
ARGS = {
"logits": logits,
"targets": targets,
"weights": weights,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, 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
|
| dictionize_single_dataset |
Ran ran on a synthesized input |
wangcongcong123/ttt/ttt/utils.py code served (permissive licence) · get_code("4ccab3f2b6762766") How it ranRan 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 torch
torch.manual_seed(0)
# The function expects inputs to be a tuple of (x, y)
# where x is a dict with keys: 'input_ids', 'attention_mask', 'decoder_attention_mask'
# and y is the target data
x = {
'input_ids': torch.randint(0, 100, (2, 4)),
'attention_mask': torch.ones(2, 4),
'decoder_attention_mask': torch.ones(2, 3),
}
y = torch.randint(0, 100, (2, 5))
inputs = (x, y)
ARGS = {
'inputs': inputs,
'tag': 'train',
}
- 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 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
|
| dictionize_t2t_dataset |
Ran ran on a synthesized input |
wangcongcong123/ttt/ttt/utils.py code served (permissive licence) · get_code("53a850b178e66088") How it ranRan 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 torch
import numpy as np
torch.manual_seed(0)
# Create sample inputs for train dataset
# The function expects inputs to be a tuple of (x, y)
# where x is a dict with 'input_ids', 'attention_mask', 'decoder_attention_mask'
# and y is the target tensor
train_x = {
'input_ids': torch.randint(0, 100, (2, 4)),
'attention_mask': torch.ones((2, 4)),
'decoder_attention_mask': torch.ones((2, 3))
}
train_y = torch.randint(0, 100, (2, 3))
train_inputs = (train_x, train_y)
# Create sample inputs for eval dataset
eval_x = {
'input_ids': torch.randint(0, 100, (2, 4)),
'attention_mask': torch.ones((2, 4)),
'decoder_attention_mask': torch.ones((2, 3))
}
eval_y = torch.randint(0, 100, (2, 3))
eval_inputs = (eval_x, eval_y)
ARGS = {
'train_inputs': train_inputs,
'eval_inputs': eval_inputs
}
- 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 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
|
| get_eval_metric_values |
Ran ran on a synthesized input |
KAGUYAHONGLAI/SRC/t5/evaluation/eval_utils.py code served (permissive licence) · get_code("d372c08056320855") How it ranRan 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 torch
ARGS = {
'events': {
'eval/task1/accuracy': [(1, 0.95), (2, 0.97)],
'eval/task1/loss': [(1, 0.2), (2, 0.15)],
'eval/task2/f1_score': [(1, 0.88), (2, 0.91)],
'train/loss': [(1, 0.5), (2, 0.3)],
'eval/task3/precision': [(1, 0.92), (2, 0.94)],
}
}
- 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 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
|
| get_lr_metric |
Ran ran on a synthesized input |
wangcongcong123/ttt/ttt/models.py code served (permissive licence) · get_code("cca53f1f6df7657d") How it ranRan 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 function. 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
import torch.nn as nn
import torch.optim as optim
torch.manual_seed(0)
# Create a simple model
model = nn.Linear(4, 2)
# Create an optimizer
optimizer = optim.SGD(model.parameters(), lr=0.01)
# The function expects an optimizer with a 'lr' attribute
# torch.optim optimizers have this attribute
ARGS = {
'optimizer': optimizer
}
- 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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
|
| get_scheduler |
Ran ran on a synthesized input |
wangcongcong123/ttt/covid_event/finetune_pt.py code served (permissive licence) · get_code("fb8d516be9f13090") How it ranRan 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 LambdaLR. 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
import torch.nn as nn
import transformers
torch.manual_seed(0)
# Create a simple model
model = nn.Linear(4, 3)
# Create an optimizer
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)
# Define arguments for get_scheduler
ARGS = {
'optimizer': optimizer,
'scheduler': 'warmuplinear',
'warmup_steps': 100,
'num_total': 1000
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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
|
| load_hf_dataset |
Ran ran on a synthesized input |
shivamraval98/multitask-t5_ae/src/models/T5Model/t5_utils.py code served (permissive licence) · get_code("189deed085d33fb1") How it ranRan 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 Dataset. 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
import numpy as np
from unittest.mock import Mock, MagicMock
import pandas as pd
torch.manual_seed(0)
# Create a minimal tokenizer stand-in
class MockTokenizer:
def prepare_seq2seq_batch(self, src_texts, tgt_texts, max_length, padding, return_tensors, truncation):
# Return a dict with input_ids and attention_mask as numpy arrays
batch_size = len(src_texts)
return {
'input_ids': np.zeros((batch_size, max_length), dtype=np.int64),
'attention_mask': np.ones((batch_size, max_length), dtype=np.int64),
'labels': np.zeros((batch_size, max_length), dtype=np.int64)
}
# Create a minimal args object
class Args:
def __init__(self):
self.preprocess_inputs = True
self.max_seq_length = 8
# Create a minimal HFDataset mock that supports map and set_format
class MockHFDataset:
def __init__(self, data_dict):
self.data = data_dict
self._format = None
self._format_columns = None
def map(self, func, batched=False):
# Apply preprocessing function
if batched:
processed = func(self.data)
return self
def set_format(self, type=None, columns=None):
self._format = type
self._format_columns = columns
return self
def __getitem__(self, key):
if isinstance(key, str):
return self
# Create sample data as a pandas DataFrame
sample_data = pd.DataFrame({
'prefix': ['task1', 'task2'],
'input_text': ['input one', 'input two'],
'target_text': ['target one', 'target two']
})
# Mock load_dataset to return our mock dataset
def mock_load_dataset(source, data_files=None, delimiter=None):
return MockHFDataset({
'prefix': ['task1', 'task2'],
'input_text': ['input one', 'input two'],
'target_text': ['target one', 'target two']
})
# Mock HFDataset.from_pandas
def mock_from_pandas(df):
return MockHFDataset({
'prefix': df['prefix'].tolist(),
'input_text': df['input_text'].tolist(),
'target_text': df['target_text'].tolist()
})
# Patch the imports in the module
import sys
from unittest.mock import patch
tokenizer = MockTokenizer()
args = Args()
data = sample_data
ARGS = {
'data': data,
'tokenizer': tokenizer,
'args': args
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- datasets, numpy, pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset output the recorded ndim 1 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
|
| prepare_seq_single_cls_inputs |
Ran ran on a synthesized input |
wangcongcong123/ttt/ttt/inputs.py code served (permissive licence) · get_code("5c3b51a94f35e6cf") How it ranRan 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 json
import os
import tempfile
import numpy as np
from unittest.mock import Mock
# Create a temporary directory with test data files
tmpdir = tempfile.mkdtemp()
# Create train.json
train_data = [
{"text": "hello world", "label": "positive"},
{"text": "goodbye world", "label": "negative"},
{"text": "nice day", "label": "positive"},
]
with open(os.path.join(tmpdir, "train.json"), "w") as f:
for example in train_data:
f.write(json.dumps(example) + "\n")
# Create val.json
val_data = [
{"text": "test text", "label": "positive"},
{"text": "another test", "label": "negative"},
]
with open(os.path.join(tmpdir, "val.json"), "w") as f:
for example in val_data:
f.write(json.dumps(example) + "\n")
# Create a minimal tokenizer mock that behaves like a HuggingFace tokenizer
class MockTokenizer:
def __call__(self, texts, padding=True, truncation=True, return_tensors='np', max_length=512):
# Return mock encoded output with required keys
batch_size = len(texts)
result = {
'input_ids': np.random.randint(0, 1000, size=(batch_size, 8), dtype=np.int32),
'attention_mask': np.ones((batch_size, 8), dtype=np.int32),
}
return result
# Create a minimal args object
class Args:
def __init__(self, data_path, max_seq_length):
self.data_path = data_path
self.max_seq_length = max_seq_length
args_obj = Args(data_path=tmpdir, max_seq_length=512)
tokenizer = MockTokenizer()
ARGS = {
'tokenizer': tokenizer,
'args': args_obj,
'load_train_num': -1,
'tokenize_batch_size': None,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, tqdm — 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
|
| preprocess_batch_for_hf_dataset |
Ran ran on a synthesized input |
shivamraval98/multitask-t5_ae/src/models/T5Model/t5_utils.py code served (permissive licence) · get_code("fcfee7fe0b60418e") How it ranRan 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 torch
import numpy as np
from unittest.mock import MagicMock
torch.manual_seed(0)
# Create a mock tokenizer with prepare_seq2seq_batch method
class MockTokenizer:
def prepare_seq2seq_batch(self, src_texts, tgt_texts, max_length, padding, return_tensors, truncation):
batch_size = len(src_texts)
# Return mock batch with input_ids and attention_mask
return {
'input_ids': np.zeros((batch_size, max_length), dtype=np.int64),
'attention_mask': np.ones((batch_size, max_length), dtype=np.int64),
'labels': np.zeros((batch_size, max_length), dtype=np.int64),
}
tokenizer = MockTokenizer()
# Create a mock dataset dict with required keys
dataset = {
'prefix': ['summarize', 'translate'],
'input_text': ['This is a long document', 'Hello world'],
'target_text': ['Short summary', 'Bonjour le monde'],
}
# Create args object with required attributes
class Args:
def __init__(self):
self.preprocess_inputs = True
self.max_seq_length = 128
args = Args()
ARGS = {
'dataset': dataset,
'tokenizer': tokenizer,
'args': args,
}
- 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 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
|
| preprocess_data |
Ran ran on a synthesized input |
shivamraval98/multitask-t5_ae/src/models/T5Model/t5_utils.py code served (permissive licence) · get_code("2366fa00a16ea6b4") How it ranRan 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 tuple, ndim 2, dtype family float; 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 torch.nn as nn
torch.manual_seed(0)
class MockTokenizer:
def prepare_seq2seq_batch(self, src_texts, tgt_texts, max_length, padding, return_tensors, truncation):
batch_size = len(src_texts)
seq_len = max_length
return {
'input_ids': torch.randint(0, 1000, (batch_size, seq_len)),
'attention_mask': torch.ones(batch_size, seq_len),
'labels': torch.randint(0, 1000, (batch_size, seq_len))
}
class MockArgs:
def __init__(self, preprocess_inputs=True, max_seq_length=32):
self.preprocess_inputs = preprocess_inputs
self.max_seq_length = max_seq_length
prefix = "task"
input_text = "What is the capital of France?"
target_text = "Paris"
tokenizer = MockTokenizer()
args = MockArgs(preprocess_inputs=True, max_seq_length=32)
ARGS = {
"data": (prefix, input_text, target_text, tokenizer, args)
}
- 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 tuple, ndim 2, dtype family float — a tuple 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
|
| read_df |
Ran ran on a synthesized input |
shivamraval98/multitask-t5_ae/src/t5_eval.py code served (permissive licence) · get_code("021763e35ac4f976") How it ranRan 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 DataFrame. 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 pandas as pd
import os
import tempfile
import shutil
# Create a temporary directory structure to mimic the expected data layout
temp_dir = tempfile.mkdtemp()
original_cwd = os.getcwd()
os.chdir(temp_dir)
# Create the directory structure
os.makedirs('data/combiner_data/classification', exist_ok=True)
# Create a sample CSV file that the function will read
sample_data = pd.DataFrame({
'feature1': [1, 2, 3],
'feature2': [4, 5, 6],
'label': [0, 1, 0]
})
sample_data.to_csv('data/combiner_data/classification/test_classification_iris.csv', index=False)
# Define the arguments for the function
ARGS = {
'task_type': 'classification',
'task_name': 'iris'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
|
| read_seq_single_cls_examples |
Ran ran on a synthesized input |
wangcongcong123/ttt/ttt/inputs.py code served (permissive licence) · get_code("81b80eb687e95376") How it ranRan 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 tuple, ndim 2, dtype family float; 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 json
import os
import tempfile
from tqdm import tqdm
# Create a temporary directory and file with test data
temp_dir = tempfile.mkdtemp()
data_file = os.path.join(temp_dir, "test_data.jsonl")
# Write test data in JSONL format
test_examples = [
{"text": "This is the first example", "label": 0},
{"text": "This is the second example", "label": 1},
{"text": "This is the third example", "label": 0},
]
with open(data_file, 'w') as f:
for example in test_examples:
f.write(json.dumps(example) + '\n')
# Define ARGS with the data_path parameter
ARGS = {
"data_path": data_file
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 2, dtype family float — a tuple 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
|
| remove_prefix |
Ran ran, honoured the contract we drafted |
google-research/t5x/t5x/models.py code served (permissive licence) · get_code("61e3339d251a61f7") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ArrayImpl, ndim 2, dtype family int, shape (2, 8) 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 jax
import jax.numpy as jnp
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
# Create small test data
# sequence: [length] array - we'll use batch_size=2, length=8
sequence = jnp.array([
[1, 2, 3, 4, 5, 6, 7, 0],
[10, 20, 30, 40, 50, 0, 0, 0]
], dtype=jnp.int32)
# prefix_length: scalar (rank 0 array) for each sequence in batch
# Since vmap is applied, we need a batch of prefix_lengths
prefix_length = jnp.array([2, 3], dtype=jnp.int32)
ARGS = {
"sequence": sequence,
"prefix_length": prefix_length,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, ndim 2, dtype family int, shape (2, 8) — shape (2, 8) 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
|
| rouge |
Ran ran on a synthesized input |
KAGUYAHONGLAI/SRC/t5/evaluation/metrics.py code served (permissive licence) · get_code("2189689bfa60b50f") How it ranRan 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 tensorflow.compat.v1 as tf
# Disable eager execution for TensorFlow v1 compatibility
tf.compat.v1.disable_eager_execution()
# Define sample targets and predictions
targets = [
"The quick brown fox jumps over the lazy dog.",
"Machine learning is a subset of artificial intelligence."
]
predictions = [
"The quick brown fox jumps over a lazy dog.",
"Machine learning is part of artificial intelligence."
]
score_keys = ['rouge1', 'rouge2', 'rougeLsum']
ARGS = {
'targets': targets,
'predictions': predictions,
'score_keys': score_keys
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- absl, rouge_score, tensorflow — 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
|
| run_embeddings_text |
Ran ran on a synthesized input |
abelriboulot/onnxt5/onnxt5/api.py code served (permissive licence) · get_code("f84ce5dae5cfc6fd") How it ranRan 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 tuple. 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
import numpy as np
torch.manual_seed(0)
# Create a minimal tokenizer that has the encode method
class MinimalTokenizer:
def encode(self, text, return_tensors=None):
# Return a tensor of shape (1, seq_len) with dummy token ids
dummy_ids = torch.tensor([[101, 2054, 2003, 102]]) # shape (1, 4)
if return_tensors == 'pt':
return dummy_ids
return dummy_ids
# Create a minimal encoder (inference session)
class MinimalEncoder:
def run(self, feed_dict, input_dict):
# Takes input_ids and returns encoder output
input_ids = input_dict['input_ids']
batch_size = input_ids.shape[0]
seq_len = input_ids.shape[1]
# Return encoder hidden states of shape (batch_size, seq_len, hidden_dim)
encoder_output = np.random.randn(batch_size, seq_len, 5).astype(np.float32)
return [encoder_output]
# Create a minimal decoder (inference session)
class MinimalDecoder:
def run(self, feed_dict, input_dict):
# Takes input_ids and encoder_hidden_states
input_ids = input_dict['input_ids']
encoder_hidden_states = input_dict['encoder_hidden_states']
batch_size = input_ids.shape[0]
seq_len = input_ids.shape[1]
# Return decoder output of shape (batch_size, seq_len, hidden_dim)
decoder_output = np.random.randn(batch_size, seq_len, 6).astype(np.float32)
return [decoder_output]
encoder = MinimalEncoder()
decoder = MinimalDecoder()
tokenizer = MinimalTokenizer()
prompt = "What is this?"
ARGS = {
'encoder': encoder,
'decoder': decoder,
'tokenizer': tokenizer,
'prompt': prompt,
'max_context_length': 512
}
- 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 tuple — a tuple output has no array shape of its own; none is 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
|
| single_check |
Ran ran on a synthesized input |
shivamraval98/multitask-t5_ae/src/evaluation/eval_ner_t5.py code served (permissive licence) · get_code("aeee04cc3d7f209c") How it ranRan 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 tuple, ndim 1, dtype family float; 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 function single_check takes two string parameters: gold_word and pred_word
# It splits them by spaces and compares them in various ways
# No complex objects needed - just strings
ARGS = {
'gold_word': 'the quick brown fox',
'pred_word': 'the quick brown'
}
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| sort_columns |
Ran ran on a synthesized input |
KAGUYAHONGLAI/SRC/t5/evaluation/eval_utils.py code served (permissive licence) · get_code("c4b3db3eab3b63b8") How it ranRan 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 DataFrame. 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 collections
import pandas as pd
class Metric(object):
def __init__(self, name, group=None):
self.name = name
self.group = group or name
METRIC_NAMES = collections.OrderedDict([
('glue_average', Metric('Average GLUE Score')),
('glue_cola_v002/matthews_corrcoef', Metric('CoLA')),
('glue_sst2_v002/accuracy', Metric('SST-2')),
('glue_mrpc_v002/f1', Metric('MRPC (F1)', 'MRPC')),
('glue_mrpc_v002/accuracy', Metric('MRPC (accuracy)', 'MRPC')),
])
# Create a sample DataFrame with some metric names as columns
df = pd.DataFrame({
'Average GLUE Score': [0.85],
'SST-2': [0.92],
'CoLA': [0.88],
'Other Column': [0.75],
})
ARGS = {
'df': df,
'metric_names': METRIC_NAMES,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
|
| top_k_top_p_filtering |
Ran ran; our contract draft was wrong, not the code |
abelriboulot/onnxt5/onnxt5/models.py code served (permissive licence) · get_code("bdeda8fda01d8511") How it ranRan 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 Tensor, ndim 1, dtype family float, shape (10,) 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 torch.nn.functional as F
torch.manual_seed(0)
# Create a 1D logits tensor (vocabulary size)
logits = torch.randn(10)
ARGS = {
"logits": logits,
"top_k": 5,
"top_p": 0.9,
"filter_value": -float('Inf')
}
- 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 Tensor, ndim 1, dtype family float, shape (10,) — shape (10,) 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
|
| compute_metric_ner |
Not yet run unverified (harvested, no recorded run) |
shivamraval98/multitask-t5_ae/src/t5_eval.py code served (permissive licence) · get_code("0ff1af61d4b10259") How it ran |
| convert_seq_single_cls_examples |
Not yet run unverified (harvested, no recorded run) |
wangcongcong123/ttt/ttt/inputs.py code served (permissive licence) · get_code("2f636a05e8e91c3d") How it ran |
| create_t5_encoder_decoder |
Not yet run unverified (harvested, no recorded run) |
Ki6an/fastT5/fastT5/onnx_exporter.py code served (permissive licence) · get_code("7060bbb5aee4df3d") How it ran |
| create_t5_encoder_decoder |
Not yet run unverified (harvested, no recorded run) |
abelriboulot/onnxt5/onnxt5/huggingface_utilities.py code served (permissive licence) · get_code("fda9e323d686a1f1") How it ran |
| main |
Not yet run unverified (harvested, no recorded run) |
Nimesh-Patel/text-to-text-transfer-transformer/t5/transform_checkpoints.py code served (permissive licence) · get_code("753651997d048cba") How it ran |
| parse_events_files |
Not yet run unverified (harvested, no recorded run) |
KAGUYAHONGLAI/SRC/t5/evaluation/eval_utils.py code served (permissive licence) · get_code("306a70da656ee59e") How it ran |
| search_all |
Not yet run unverified (harvested, no recorded run) |
ArvinZhuang/BiTAG/arxivscraper.py code served (permissive licence) · get_code("c596c3ab9a0a5e99") How it ran |
| speed_test |
Not yet run unverified (harvested, no recorded run) |
Ki6an/fastT5/fastT5/model_testing_tools.py code served (permissive licence) · get_code("411f9b71bfd43813") How it ran |
| turn_model_into_encoder_decoder |
Not yet run unverified (harvested, no recorded run) |
Ki6an/fastT5/fastT5/onnx_exporter.py code served (permissive licence) · get_code("38d68e317248f579") How it ran |
| turn_model_into_encoder_decoder |
Not yet run unverified (harvested, no recorded run) |
abelriboulot/onnxt5/onnxt5/huggingface_utilities.py code served (permissive licence) · get_code("7dabd25c614f61b1") How it ran |