| compare_csv |
Ran ran; our contract draft was wrong, not the code |
LBeaudoux/tatoebatools/tatoebatools/difference.py code served (permissive licence) · get_code("6d26d45c8e798207") 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 csv
import pandas as pd
from pathlib import Path
import tempfile
import os
# Create temporary CSV files for testing
with tempfile.TemporaryDirectory() as tmpdir:
# Create left CSV file
csv_left_path = Path(tmpdir) / "left.csv"
with open(csv_left_path, 'w', newline='') as f:
writer = csv.writer(f, delimiter=',', quoting=csv.QUOTE_NONE)
writer.writerow(['id', 'name', 'value'])
writer.writerow(['1', 'Alice', '10'])
writer.writerow(['2', 'Bob', '20'])
# Create right CSV file
csv_right_path = Path(tmpdir) / "right.csv"
with open(csv_right_path, 'w', newline='') as f:
writer = csv.writer(f, delimiter=',', quoting=csv.QUOTE_NONE)
writer.writerow(['id', 'name', 'value'])
writer.writerow(['1', 'Alice', '10'])
writer.writerow(['2', 'Bob', '25'])
writer.writerow(['3', 'Charlie', '30'])
ARGS = {
'csv_left': csv_left_path,
'csv_right': csv_right_path,
'delimiter': ',',
'quoting': csv.QUOTE_NONE,
'index_col_keys': None,
'verbose': True
}
- 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 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_loss |
Ran ran; our contract draft was wrong, not the code |
xplip/multilingual-lm-objectives/finetuning/pos/tracin_pos.py code served (permissive licence) · get_code("88380f81794a2565") 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 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 torch.nn.functional as F
torch.manual_seed(0)
# Create small tensors for cross_entropy
# outputs: (batch_size, num_classes) - logits
# targets: (batch_size,) - class indices
batch_size = 2
num_classes = 4
outputs = torch.randn(batch_size, num_classes)
targets = torch.randint(0, num_classes, (batch_size,))
ARGS = {
"outputs": outputs,
"targets": targets,
}
- 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 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
|
| convert_examples_to_features |
Ran ran; our contract draft was wrong, not the code |
xplip/multilingual-lm-objectives/finetuning/pos/pos_dataset.py code served (permissive licence) · get_code("c7dd8be65b126cb4") 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 list, 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 logging
from dataclasses import dataclass
from typing import List, Optional
logging.basicConfig(level=logging.INFO)
@dataclass
class InputExample:
words: List[str]
labels: Optional[List[str]]
@dataclass
class InputFeatures:
input_ids: List[int]
attention_mask: List[int]
token_type_ids: Optional[List[int]] = None
label_ids: Optional[List[int]] = None
class MockTokenizer:
def __init__(self):
self.model_input_names = ['input_ids', 'attention_mask', 'token_type_ids']
def tokenize(self, word):
# Simple mock: split into characters or return single token
if word.lower() == 'hello':
return ['hello']
elif word.lower() == 'world':
return ['world']
else:
return [word]
def num_special_tokens_to_add(self):
return 2
def convert_tokens_to_ids(self, tokens):
# Simple mapping: each token gets a unique id
token_to_id = {
'[CLS]': 101,
'[SEP]': 102,
'hello': 1,
'world': 2,
'cat': 3,
'dog': 4,
}
return [token_to_id.get(token, 100) for token in tokens]
examples = [
InputExample(words=['hello', 'world'], labels=['NOUN', 'NOUN']),
InputExample(words=['cat', 'dog'], labels=['NOUN', 'NOUN']),
]
label_list = ['NOUN', 'VERB', 'ADJ']
max_seq_length = 32
tokenizer = MockTokenizer()
ARGS = {
'examples': examples,
'label_list': label_list,
'max_seq_length': max_seq_length,
'tokenizer': tokenizer,
'cls_token_at_end': False,
'cls_token': '[CLS]',
'cls_token_segment_id': 1,
'sep_token': '[SEP]',
'sep_token_extra': False,
'pad_on_left': False,
'pad_token': 0,
'pad_token_segment_id': 0,
'pad_token_label_id': -100,
'sequence_a_segment_id': 0,
'mask_padding_with_zero': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- transformers — 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 float — 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
|
| convert_gpt2_attention_to_lora |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
lxuechen/private-transformers/private_transformers/lora_utils.py code served (permissive licence) · get_code("8eda8261353a36a2") 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 GPT2LMHeadModel. 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
from transformers import GPT2Model, GPT2Config
torch.manual_seed(0)
# Create a minimal GPT2 model with tiny dimensions
config = GPT2Config(
n_embd=4,
n_layer=2,
n_head=2,
vocab_size=10,
)
model = GPT2Model(config)
# Verify the structure - the model has a transformer attribute with h layers
# Each layer has attn.c_attn which is a Conv1D (essentially a Linear layer)
# We need to ensure the model is a GPT2PreTrainedModel instance
gpt2_model = transformers.GPT2LMHeadModel(config)
ARGS = {
'model': gpt2_model,
'lora_r': 2,
'lora_alpha': 1.0,
'lora_dropout': 0.1,
}
- 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 GPT2LMHeadModel — a GPT2LMHeadModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GPT2LMHeadModel 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
|
| evaluate_retrieval |
Ran ran; our contract draft was wrong, not the code |
xplip/multilingual-lm-objectives/evaluation/evaluation_utils.py code served (permissive licence) · get_code("c11453363b10dd6a") 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
torch.manual_seed(0)
# The function expects:
# - device: a torch device
# - vectors: List[torch.FloatTensor], where each tensor has shape (seq_len, embedding_dim)
# The list must have even length (n % 2 == 0)
# First half are vectors_e, second half are vectors_f
# Each will be averaged over dim=0, so we need sequences
device = torch.device('cpu')
# Create 4 vectors total (2 for vectors_e, 2 for vectors_f)
# Each vector is a sequence of embeddings: shape (seq_len, embedding_dim)
# Use distinct dimensions: seq_len=3, embedding_dim=4
vectors = [
torch.randn(3, 4), # vectors_e[0]
torch.randn(3, 4), # vectors_e[1]
torch.randn(3, 4), # vectors_f[0]
torch.randn(3, 4), # vectors_f[1]
]
ARGS = {
'device': device,
'vectors': vectors,
}
- 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 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
|
| get_distances |
Ran ran; our contract draft was wrong, not the code |
xplip/multilingual-lm-objectives/evaluation/evaluation_utils.py code served (permissive licence) · get_code("f613227e9f1c6c9c") 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, 3) 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 two small tensors with distinct dimensions
# X: shape (2, 4) - batch_size=2, embedding_dim=4
# Y: shape (3, 4) - batch_size=3, embedding_dim=4
X = torch.randn(2, 4)
Y = torch.randn(3, 4)
ARGS = {
"X": X,
"Y": Y,
}
- 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, 3) — shape (2, 3) 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
|
| get_grad_z |
Ran ran; our contract draft was wrong, not the code |
xplip/multilingual-lm-objectives/finetuning/pos/tracin_pos.py code served (permissive licence) · get_code("03f31dbf34c04281") 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 list. 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
from torch.autograd import grad
torch.manual_seed(0)
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.embedding = nn.Embedding(100, 4)
self.linear1 = nn.Linear(4, 8)
self.linear2 = nn.Linear(8, 2)
self.device_attr = torch.device('cpu')
@property
def device(self):
return self.device_attr
def forward(self, input_ids, attention_mask, label, return_dict=True):
# input_ids: (batch_size, seq_len)
# attention_mask: (batch_size, seq_len)
# label: (batch_size,)
x = self.embedding(input_ids) # (batch_size, seq_len, 4)
x = x.mean(dim=1) # (batch_size, 4)
x = self.linear1(x) # (batch_size, 8)
logits = self.linear2(x) # (batch_size, 2)
loss_fn = nn.CrossEntropyLoss()
loss = loss_fn(logits, label)
if return_dict:
return {'loss': loss, 'logits': logits}
return loss
model = SimpleModel()
model.eval()
# Create small input tensors
batch_size = 2
seq_len = 3
inputs_z = {
'input_ids': torch.randint(0, 100, (batch_size, seq_len)),
'attention_mask': torch.ones((batch_size, seq_len), dtype=torch.long),
'label': torch.tensor([0, 1], dtype=torch.long),
}
ARGS = {
'inputs_z': inputs_z,
'model': model,
'last_n_encoder_layers': 12,
}
- 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 list — a list 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
|
| get_privacy_spent |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
lxuechen/private-transformers/private_transformers/accounting/rdp_accounting.py code served (permissive licence) · get_code("5429ceb040535efa") 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 math
import numpy as np
# Construct arguments for get_privacy_spent function
# orders: An array (or scalar) of Renyi divergence orders (must be >= 1)
orders = np.array([1.5, 2.0, 3.0])
# rdp: A list (or scalar) of RDP guarantees (must be >= 0)
rdp = np.array([0.5, 1.0, 1.5])
# delta: The target delta (must be > 0, typically small like 1e-5)
delta = 1e-5
ARGS = {
"orders": orders,
"rdp": rdp,
"delta": delta
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — 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
|
| map_a_special_embeddings_into_b |
Ran ran; our contract draft was wrong, not the code |
xplip/multilingual-lm-objectives/utils/dp_training_utils.py code served (permissive licence) · get_code("b879433be37a1f1f") 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 StandInEmbedding. 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
torch.manual_seed(0)
class StandInEmbedding(nn.Module):
def __init__(self, vocab_size, embedding_dim):
super().__init__()
self.word_embeddings = nn.Embedding(vocab_size, embedding_dim)
class StandInTokenizer:
def __init__(self, vocab_dict, special_tokens, special_ids):
self._vocab = vocab_dict
self.all_special_tokens = special_tokens
self.all_special_ids = special_ids
def get_vocab(self):
return self._vocab
# Create tokenizer A with vocab
a_vocab_dict = {
"[PAD]": 0,
"[UNK]": 1,
"[CLS]": 2,
"[SEP]": 3,
"hello": 4,
"world": 5,
}
a_tokenizer = StandInTokenizer(a_vocab_dict, [], [])
# Create tokenizer B with special tokens that overlap with A
b_special_tokens = ["[PAD]", "[UNK]", "[CLS]", "[SEP]"]
b_special_ids = [0, 1, 2, 3]
b_vocab_dict = {
"[PAD]": 0,
"[UNK]": 1,
"[CLS]": 2,
"[SEP]": 3,
"foo": 4,
"bar": 5,
}
b_tokenizer = StandInTokenizer(b_vocab_dict, b_special_tokens, b_special_ids)
# Create embeddings with distinct sizes
# a_embeddings: vocab_size=6, embedding_dim=4
a_embeddings = StandInEmbedding(vocab_size=6, embedding_dim=4)
# b_embeddings: vocab_size=6, embedding_dim=4
b_embeddings = StandInEmbedding(vocab_size=6, embedding_dim=4)
ARGS = {
"a_embeddings": a_embeddings,
"a_tokenizer": a_tokenizer,
"b_embeddings": b_embeddings,
"b_tokenizer": b_tokenizer,
}
- 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 StandInEmbedding — a StandInEmbedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a StandInEmbedding 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
|
| remove_padding |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
xplip/multilingual-lm-objectives/evaluation/evaluation_utils.py code served (permissive licence) · get_code("41c6daed8df5aa21") 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 list. 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)
# Create a small tensor with shape (batch_size=2, sequence_length=5, features=4)
tensor = torch.randn(2, 5, 4, dtype=torch.float32)
# Create a padding mask with shape (batch_size=2, sequence_length=5)
# True indicates valid tokens, False indicates padding
padding_mask = torch.tensor([
[True, True, True, False, False],
[True, True, True, True, False]
], dtype=torch.bool)
ARGS = {
"tensor": tensor,
"padding_mask": padding_mask
}
- 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 list — a list 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
|
| requires_grad |
Ran ran, violated the contract we drafted |
lxuechen/private-transformers/private_transformers/autograd_grad_sample.py code served (permissive licence) · get_code("5bfe971f0927820a") 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 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 torch.nn as nn
torch.manual_seed(0)
# Create a simple module with parameters that require gradients
class SimpleModule(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 3)
def forward(self, x):
return self.linear(x)
# Create instance with requires_grad=True (default)
module_with_grad = SimpleModule()
for param in module_with_grad.parameters():
param.requires_grad = True
# Create a module with requires_grad=False
module_no_grad = SimpleModule()
for param in module_no_grad.parameters():
param.requires_grad = False
# Create a module with nested sub-modules
class NestedModule(nn.Module):
def __init__(self):
super().__init__()
self.sub1 = nn.Linear(4, 3)
self.sub2 = nn.Linear(3, 2)
def forward(self, x):
return self.sub2(self.sub1(x))
nested_module = NestedModule()
for param in nested_module.parameters():
param.requires_grad = True
ARGS = {
"module": module_with_grad,
"recurse": False,
}
- 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
|
| reset_pos |
Ran ran; our contract draft was wrong, not the code |
LBeaudoux/tatoebatools/tatoebatools/datafile.py code served (permissive licence) · get_code("fb96d82eef598129") 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
class FilelikeObject:
"""A file-like object that can be used with the reset_pos decorator"""
def __init__(self):
self.pos = 0
self.data = "test data"
@staticmethod
def example_method(self):
"""Example method that will be decorated"""
return self.data
def dummy_func(self):
"""A simple function to decorate"""
return self.data
# Create an instance of the file-like object
file_obj = FilelikeObject()
# The reset_pos decorator takes a function as its only parameter
ARGS = {
"func": dummy_func
}
- 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
|
| sum_over_all_but_batch_and_last_n |
Ran ran; our contract draft was wrong, not the code |
lxuechen/private-transformers/private_transformers/supported_layers_grad_samplers.py code served (permissive licence) · get_code("d62ca268adb92593") 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, 5) 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)
# The function takes a tensor and n_dims parameter
# It sums over all dimensions except batch (dim 0) and the last n_dims dimensions
# Let's create a tensor with distinct dimensions: batch=2, intermediate=4, feature=3, last=5
tensor = torch.randn(2, 4, 3, 5) # shape: (batch=2, dim1=4, dim2=3, last=5)
n_dims = 1 # keep the last 1 dimension
ARGS = {
"tensor": tensor,
"n_dims": n_dims,
}
- 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, 5) — shape (2, 5) 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
|
| unfold2d |
Ran ran; our contract draft was wrong, not the code |
lxuechen/private-transformers/private_transformers/supported_layers_grad_samplers.py code served (permissive licence) · get_code("088a357156c09c02") 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 3, dtype family float, shape (2, 36, 30) 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 small input tensor: (batch=2, channels=4, height=5, width=6)
input_tensor = torch.randn(2, 4, 5, 6)
# Define the parameters
kernel_size = (3, 3)
padding = (1, 1)
stride = (1, 1)
dilation = (1, 1)
ARGS = {
'input': input_tensor,
'kernel_size': kernel_size,
'padding': padding,
'stride': stride,
'dilation': dilation,
}
- 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 3, dtype family float, shape (2, 36, 30) — shape (2, 36, 30) 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
|
| add_hooks |
Not yet run unverified (harvested, no recorded run) |
lxuechen/private-transformers/private_transformers/autograd_grad_sample.py code served (permissive licence) · get_code("e7bbbbdcc4595ebd") How it ran |
| compute_rdp |
Not yet run unverified (harvested, no recorded run) |
lxuechen/private-transformers/private_transformers/accounting/rdp_accounting.py code served (permissive licence) · get_code("9f57ed8d21d5b2de") How it ran |
| get_file |
Not yet run unverified (harvested, no recorded run) |
xplip/multilingual-lm-objectives/finetuning/pos/pos_dataset.py code served (permissive licence) · get_code("9c85503addee47df") How it ran |
| load_checkpoint |
Not yet run unverified (harvested, no recorded run) |
xplip/multilingual-lm-objectives/finetuning/pos/tracin_pos.py code served (permissive licence) · get_code("eedeab21f434a49e") How it ran |
| load_checkpoint |
Not yet run unverified (harvested, no recorded run) |
xplip/multilingual-lm-objectives/finetuning/xnli/tracin_xnli.py code served (permissive licence) · get_code("96cf21cd04f4f381") How it ran |
| read_examples_from_file |
Not yet run unverified (harvested, no recorded run) |
xplip/multilingual-lm-objectives/finetuning/pos/pos_dataset.py code served (permissive licence) · get_code("59e3a2396c98aeee") How it ran |
| swap_bert_model_forward |
Not yet run unverified (harvested, no recorded run) |
lxuechen/private-transformers/private_transformers/transformers_support.py code served (permissive licence) · get_code("05fcbe0865ca943a") How it ran |
| swap_gpt2_model_forward |
Not yet run unverified (harvested, no recorded run) |
lxuechen/private-transformers/private_transformers/transformers_support.py code served (permissive licence) · get_code("e6bec88416415966") How it ran |
| swap_openai_gpt_model_forward |
Not yet run unverified (harvested, no recorded run) |
lxuechen/private-transformers/private_transformers/transformers_support.py code served (permissive licence) · get_code("d6ada14227fbf040") How it ran |