| chunk_list |
Ran ran on a synthesized input |
hkust-knowcomp/cola/SRL_parsing.py code served (permissive licence) · get_code("c0ae1f3a83a9162e") 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 numpy as np
torch.manual_seed(0)
# chunk_list takes a sequence (list-like) and chunks it by batch_size
# It uses: len(seq_list), range, min, and list slicing
# seq_list should be any sequence that supports len() and slicing
# Create a simple list of items to chunk
seq_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
batch_size = 3
ARGS = {
"seq_list": seq_list,
"batch_size": batch_size,
}
- 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 — 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
|
| decode_generation |
Ran ran on a synthesized input |
hkust-knowcomp/cola/covariate_util.py code served (permissive licence) · get_code("88b6d26ae9b9bbcd") 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 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 numpy as np
class MockTokenizer:
def __init__(self, pad_token_id=0):
self.pad_token_id = pad_token_id
def batch_decode(self, token_ids, skip_special_tokens=False, clean_up_tokenization_spaces=False):
# Mock decoder: convert token ids to simple text
result = []
for ids in token_ids:
text = " ".join([f"tok_{int(id_)}" for id_ in ids if id_ != -100])
result.append(text)
return result
# Create mock tokenizer
tokenizer = MockTokenizer(pad_token_id=0)
# Create pred_ids: list of 2 arrays, each with shape (3, 5) - batch of 3, seq length 5
pred_ids = [
np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]], dtype=np.int64),
np.array([[16, 17, 18, 19, 20], [21, 22, 23, 24, 25], [26, 27, 28, 29, 30]], dtype=np.int64)
]
# Create input_ids: list of 2 arrays with same structure
input_ids = [
np.array([[100, 101, 102, 103, 104], [105, 106, 107, 108, 109], [110, 111, 112, 113, 114]], dtype=np.int64),
np.array([[115, 116, 117, 118, 119], [120, 121, 122, 123, 124], [125, 126, 127, 128, 129]], dtype=np.int64)
]
# Test with a non-gpt model
model_name_or_path = "bert-base-uncased"
ARGS = {
"pred_ids": pred_ids,
"input_ids": input_ids,
"tokenizer": tokenizer,
"model_name_or_path": model_name_or_path
}
- 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 list, ndim 2, 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
|
| delta_bar |
Ran ran on a synthesized input |
hkust-knowcomp/cola/src/metrics.py code served (permissive licence) · get_code("1540e18377812a02") 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 float64, ndim 0, 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 numpy as np
# Create sample data for p_xd
# Shape: (Z, num_attributes, 2) where last dim is [count_0, count_1]
# Z = number of samples, num_attributes = 3
p_xd = np.array([
[[10, 5], [8, 3], [6, 2]],
[[12, 4], [9, 2], [7, 1]],
[[11, 6], [7, 4], [5, 3]],
[[9, 7], [10, 1], [8, 2]]
], dtype=float)
# Create sample data for p_dy
# Shape: (num_classes, 2) where last dim is [count_0, count_1]
p_dy = np.array([
[15, 8],
[12, 5],
[10, 3],
[8, 6]
], dtype=float)
ARGS = {
'p_xd': p_xd,
'p_dy': p_dy,
'eps': 0.1,
'ord': 1,
'normalization': True,
'direct_match': False,
'use_cooccur': False,
'res_norm': False,
'pxa_all_norm': False
}
- 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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
- 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
|
| delta_pxd |
Ran ran on a synthesized input |
hkust-knowcomp/cola/src/metrics.py code served (permissive licence) · get_code("25b707022ce8b4fd") 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 float64, ndim 0, 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 numpy as np
# Analyze the function: delta_pxd(p_xd, p_dy, p_xy, **kwargs)
# The function accesses:
# - p_dy[0][0]: indexing into first element twice, so 2D array-like
# - p_xy[:, 0]: slicing first column, so 2D array-like
# - np.nanmean(): operates on arrays
# Create sample data
p_xd = np.array([[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0]]) # 2x4 array
p_dy = np.array([[0.5, 1.5],
[2.5, 3.5]]) # 2x2 array, accessed as p_dy[0][0]
p_xy = np.array([[10.0, 20.0, 30.0],
[40.0, 50.0, 60.0]]) # 2x3 array, sliced as p_xy[:, 0]
ARGS = {
'p_xd': p_xd,
'p_dy': p_dy,
'p_xy': p_xy
}
- 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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
- 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
|
| duplicate_list |
Ran ran on a synthesized input |
hkust-knowcomp/cola/sample_intervention.py code served (permissive licence) · get_code("b7cf9f9b8c2c0cf5") 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 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)
ARGS = {
"my_list": [1, 2, 3],
"length": 7
}
- 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
|
| format_args |
Ran ran on a synthesized input |
hkust-knowcomp/cola/covariate_util.py code served (permissive licence) · get_code("07d0e75610183e3c") 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 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.
from dataclasses import dataclass, field
import torch
# Examine the function: it takes an 'args' parameter
# The function calls:
# - asdict(args) -> args must be a dataclass instance
# - args.__class__.__name__ -> get class name
# - iterates over k, v pairs checking if k.endswith('_token')
# - builds formatted string output
# Create a simple dataclass with various fields including some *_token fields
@dataclass
class SampleArgs:
model_name: str = "bert-base"
learning_rate: float = 1e-4
batch_size: int = 32
max_length: int = 128
api_token: str = "secret123"
access_token: str = "access456"
num_epochs: int = 10
dropout: float = 0.1
# Create an instance
args_instance = SampleArgs()
ARGS = {
"args": args_instance
}
- 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
|
| get_config_dict |
Ran ran on a synthesized input |
hkust-knowcomp/cola/evaluate.py code served (permissive licence) · get_code("398d9dc4825e6ceb") 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 torch.nn as nn
torch.manual_seed(0)
# The function simply constructs and returns a dict with the given parameters
# No special attributes or methods are called on any of them
# So we can use simple values for all parameters
ARGS = {
'dm': 64, # D - likely a dimension parameter (int)
'nm': 128, # S - likely a size/model dimension parameter (int)
'pn': 256, # Q - likely a projection/query dimension (int)
'co': 32, # C - likely a count/channels parameter (int)
'rn': 8, # E - likely an embedding/rank parameter (int)
'eps': 1e-5 # eps - epsilon for numerical stability (float)
}
- 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_f1 |
Ran ran on a synthesized input |
hkust-knowcomp/cola/evaluate.py code served (permissive licence) · get_code("f71f4792bb23e87b") 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 numpy as np
# Analyze the function:
# - causal_label_list: used in element-wise multiplication with ground_truth_list, then np.sum()
# - ground_truth_list: used in element-wise multiplication with causal_label_list, then np.sum()
# Both need to be numpy arrays that can be multiplied element-wise and summed
# Create small numpy arrays with binary labels (0s and 1s for F1 score context)
causal_label_list = np.array([1, 0, 1, 1, 0])
ground_truth_list = np.array([1, 1, 1, 0, 0])
ARGS = {
"causal_label_list": causal_label_list,
"ground_truth_list": ground_truth_list,
}
- 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
|
| get_input_pair |
Ran ran on a synthesized input |
hkust-knowcomp/cola/temporal_score_util.py code served (permissive licence) · get_code("a138ca7ac0f58678") 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 torch
torch.manual_seed(0)
# The function takes two lists of strings
# text_event_list: list of text strings (punctuation will be removed from the end)
# outcome_event_list: list of outcome strings (first letter will be lowercased)
text_event_list = [
"This is a sample text.",
"Another event happened!"
]
outcome_event_list = [
"Outcome One",
"Outcome Two"
]
ARGS = {
"text_event_list": text_event_list,
"outcome_event_list": outcome_event_list
}
- 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, 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
|
| get_macro_f1 |
Ran ran on a synthesized input |
hkust-knowcomp/cola/evaluate.py code served (permissive licence) · get_code("e725c859a48e41ec") 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 numpy as np
# Analyze the function:
# get_macro_f1 takes two parameters:
# 1. causal_label_list - used with arithmetic operations (*, 1 -)
# 2. ground_truth_list - used with arithmetic operations (*, 1 -)
# Both are treated as numpy arrays/lists that support element-wise operations
# Create small numpy arrays with binary values (0 or 1)
causal_label_list = np.array([1, 0, 1, 1, 0, 1])
ground_truth_list = np.array([1, 0, 1, 0, 0, 1])
ARGS = {
"causal_label_list": causal_label_list,
"ground_truth_list": ground_truth_list,
}
- 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
|
| get_preprocess_function |
Ran ran on a synthesized input |
hkust-knowcomp/cola/temporal_score_util.py code served (permissive licence) · get_code("0d2028a1f903d498") 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
torch.manual_seed(0)
# Create a mock tokenizer that has a __call__ method
class MockTokenizer:
def __call__(self, texts, max_length=None, padding=False, truncation=False):
# Return a dict with 'input_ids' and 'attention_mask' keys
# Simulate tokenization by creating dummy token ids
batch_size = len(texts)
token_ids = [[1, 2, 3, 4] for _ in range(batch_size)]
attention_masks = [[1, 1, 1, 1] for _ in range(batch_size)]
return {
'input_ids': token_ids,
'attention_mask': attention_masks
}
# Create mock examples dict with text and outcome columns
examples = {
'text': ['hello world', 'foo bar'],
'outcome': ['positive', 'negative']
}
tokenizer = MockTokenizer()
mask_token = '[MASK]'
max_length = 512
text_column = 'text'
outcome_column = 'outcome'
ARGS = {
'text_column': text_column,
'outcome_column': outcome_column,
'tokenizer': tokenizer,
'mask_token': mask_token,
'max_length': max_length
}
- 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_preprocess_function |
Ran ran on a synthesized input |
hkust-knowcomp/cola/covariate_util.py code served (permissive licence) · get_code("b72601e68fddf6cc") 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
from transformers import PreTrainedTokenizer
torch.manual_seed(0)
class MockTokenizer:
"""Minimal tokenizer stand-in that mimics HuggingFace tokenizer behavior."""
def __call__(self, text, padding=False, truncation=True, return_tensors=None):
# Simulate tokenization: split text into tokens and create token IDs
tokens = text.split()
token_ids = [101] + [i % 1000 for i in range(len(tokens))] + [102] # CLS + tokens + SEP
result = {
'input_ids': token_ids,
'attention_mask': [1] * len(token_ids),
}
if return_tensors == 'pt':
result['input_ids'] = torch.tensor([result['input_ids']], dtype=torch.long)
result['attention_mask'] = torch.tensor([result['attention_mask']], dtype=torch.long)
return result
class MockDataArgs:
"""Minimal data arguments class."""
def __init__(self):
self.text_column = 'text'
self.pad_to_max_length = False
# Create example batch with text column
examples = {
'text': [
'The cat sat',
'on the mat',
'and looked around',
'very carefully today',
'The dog ran',
'through the park',
'very quickly now',
'chasing a squirrel',
]
}
ARGS = {
'data_args': MockDataArgs(),
'tokenizer': MockTokenizer(),
'model_name_or_path': 't5-base',
'joint': False,
}
- 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 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_preprocess_function |
Ran ran on a synthesized input |
hkust-knowcomp/cola/mlm_util.py code served (permissive licence) · get_code("3304c2a3b4189c4f") 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 logging
from dataclasses import dataclass
torch.manual_seed(0)
# Create a minimal logger
logger = logging.getLogger("test_logger")
logger.setLevel(logging.WARNING)
# Create a minimal tokenizer stand-in class
class MinimalTokenizer:
def __init__(self):
self.model_max_length = 512
self.mask_token = "[MASK]"
def __call__(self, texts, padding=False, truncation=True, max_length=None):
# Return a dict with 'input_ids' and optionally other token type fields
batch_size = len(texts)
return {
'input_ids': [[101, 2054, 2003, 102] for _ in range(batch_size)],
'attention_mask': [[1, 1, 1, 1] for _ in range(batch_size)],
'token_type_ids': [[0, 0, 0, 0] for _ in range(batch_size)]
}
# Create a minimal data_args stand-in class
@dataclass
class DataArgs:
max_seq_length: int = 256
pad_to_max_length: bool = False
# Create token2id_mapping
token2id_mapping = {
"relation_0": 0,
"relation_1": 1,
"relation_2": 2
}
ARGS = {
"data_args": DataArgs(max_seq_length=256, pad_to_max_length=False),
"tokenizer": MinimalTokenizer(),
"logger": logger,
"token2id_mapping": token2id_mapping
}
- 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_probs |
Ran ran; our contract draft was wrong, not the code |
hkust-knowcomp/cola/src/metric_utils.py pointer only (licence: MIT); the stored copy get_code serves, from insundaycathy/event-causality-extraction, is pointer only (licence: NONE) · get_code("50bc28c5417a08cb") How it ranThe body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from insundaycathy/event-causality-extraction, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| proc_data |
Ran ran; our contract draft was wrong, not the code |
hkust-knowcomp/cola/src/metric_utils.py pointer only (licence: MIT); the stored copy get_code serves, from insundaycathy/event-causality-extraction, is pointer only (licence: NONE) · get_code("3c1f2a1e109ff596") How it ranThe body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from insundaycathy/event-causality-extraction, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| return_match_idx |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
hkust-knowcomp/cola/src/metrics.py code served (permissive licence) · get_code("d5011fe46a81a130") 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 ndarray, ndim 1, dtype family int, shape (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 numpy as np
# Create a small test matrix
# Shape: (Z, features) where Z is number of samples
# The function computes norm of columns 1: relative to column 0
# Making it (5, 4) - 5 samples, 4 features
mat = np.array([
[1.0, 1.05, 1.02, 0.98],
[2.0, 2.08, 2.01, 1.99],
[3.0, 3.06, 3.03, 2.97],
[4.0, 4.09, 4.02, 3.98],
[5.0, 5.07, 5.01, 4.99]
], dtype=np.float64)
ARGS = {
"mat": mat,
"ord": None,
"eps": 0.1,
"return_arr": False
}
- 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 ndarray, ndim 1, dtype family int, shape (3,) — shape (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
|
| unpacked_data |
Ran ran on a synthesized input |
hkust-knowcomp/cola/temporal_score_util.py code served (permissive licence) · get_code("e8757970675c9907") 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 torch
# Construct valid arguments for unpacked_data function
# The function expects:
# - example_list: list of dicts with text_column and outcome_column keys
# - text_column: string key to access text events
# - outcome_column: string key to access outcome events
# Looking at the function body:
# - It iterates over example_list
# - For each example, it accesses cur_example[text_column] and cur_example[outcome_column]
# - Both should be lists (since get_input_pair iterates over them with for loops)
# - text_event_list and outcome_event_list are passed to get_input_pair
# - get_input_pair expects iterables of strings (it applies _remove_punct and _sent_lowercase)
text_column = 'texts'
outcome_column = 'outcomes'
example_list = [
{
'texts': ['First event.', 'Second event.'],
'outcomes': ['Outcome A', 'Outcome B']
},
{
'texts': ['Third event.', 'Fourth event.'],
'outcomes': ['Outcome C']
}
]
ARGS = {
'example_list': example_list,
'text_column': text_column,
'outcome_column': outcome_column
}
- 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, 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
|
| get_token2id_mapping |
Not yet run unverified (harvested, no recorded run) |
hkust-knowcomp/cola/mlm_util.py code served (permissive licence) · get_code("bfb9f39475bae9a7") How it ran |