| Attention |
Ran ran on a synthesized input · constructed an object; no result was computed |
emadeldeen24/TS-TCC/models/TC.py code served (permissive licence) · get_code("617e0645b9972b67") 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 an instance of its own class, Attention: the run constructed the object and did not call it, so no result was computed. 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.nn.functional as F
from einops import rearrange, repeat
class Attention(nn.Module):
def __init__(self, dim, heads=8, dropout=0.0):
super().__init__()
self.heads = heads
self.scale = dim ** (-0.5)
self.to_qkv = nn.Linear(dim, dim * 3, bias=False)
self.to_out = nn.Sequential(nn.Linear(dim, dim), nn.Dropout(dropout))
def forward(self, x, mask=None):
b, n, _, h = (*x.shape, self.heads)
qkv = self.to_qkv(x).chunk(3, dim=-1)
q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> b h n d', h=h), qkv)
dots = torch.einsum('bhid,bhjd->bhij', q, k) * self.scale
if mask is not None:
mask = F.pad(mask.flatten(1), (1, 0), value=True)
assert mask.shape[-1] == dots.shape[-1], 'mask has incorrect dimensions'
mask = mask[:, None, :] * mask[:, :, None]
dots.masked_fill_(~mask, float('-inf'))
del mask
attn = dots.softmax(dim=-1)
out = torch.einsum('bhij,bhjd->bhid', attn, v)
out = rearrange(out, 'b h n d -> b n (h d)')
out = self.to_out(out)
return out
torch.manual_seed(0)
# Create a small input tensor: batch_size=2, seq_len=3, dim=4
x = torch.randn(2, 3, 4)
# Create a mask: batch_size=2, seq_len=3
# The mask will be padded and expanded internally
mask = torch.ones(2, 3, dtype=torch.bool)
ARGS = {
'dim': 4,
'heads': 2,
'dropout': 0.1,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Attention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Attention 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
|
| ConvBlock |
Ran ran on a synthesized input |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("0e30f1c230eef5dc") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 8, 16) 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
import torch.nn.functional as F
class SamePadConv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, dilation=1, groups=1):
super().__init__()
self.receptive_field = (kernel_size - 1) * dilation + 1
padding = self.receptive_field // 2
self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, padding=padding, dilation=dilation, groups=groups)
self.remove = 1 if self.receptive_field % 2 == 0 else 0
def forward(self, x):
out = self.conv(x)
if self.remove > 0:
out = out[:, :, :-self.remove]
return out
class ConvBlock(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, dilation, final=False):
super().__init__()
self.conv1 = SamePadConv(in_channels, out_channels, kernel_size, dilation=dilation)
self.conv2 = SamePadConv(out_channels, out_channels, kernel_size, dilation=dilation)
self.projector = nn.Conv1d(in_channels, out_channels, 1) if in_channels != out_channels or final else None
def forward(self, x):
residual = x if self.projector is None else self.projector(x)
x = F.gelu(x)
x = self.conv1(x)
x = F.gelu(x)
x = self.conv2(x)
return x + residual
INIT_ARGS = {
'in_channels': 4,
'out_channels': 8,
'kernel_size': 3,
'dilation': 1,
'final': False
}
ARGS = {
'x': torch.randn(2, 4, 16)
}
if __name__ == '__main__':
model = ConvBlock(**INIT_ARGS)
output = model(**ARGS)
print(f"Input shape: {ARGS['x'].shape}")
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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, 8, 16) — shape (2, 8, 16) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| DilatedConvEncoder |
Ran ran on a synthesized input |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("c59b7deb5be0dbfa") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 8, 16) 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
import torch.nn.functional as F
class SamePadConv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, dilation=1, groups=1):
super().__init__()
self.receptive_field = (kernel_size - 1) * dilation + 1
padding = self.receptive_field // 2
self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, padding=padding, dilation=dilation, groups=groups)
self.remove = 1 if self.receptive_field % 2 == 0 else 0
def forward(self, x):
out = self.conv(x)
if self.remove > 0:
out = out[:, :, :-self.remove]
return out
class ConvBlock(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, dilation, final=False):
super().__init__()
self.conv1 = SamePadConv(in_channels, out_channels, kernel_size, dilation=dilation)
self.conv2 = SamePadConv(out_channels, out_channels, kernel_size, dilation=dilation)
self.projector = nn.Conv1d(in_channels, out_channels, 1) if in_channels != out_channels or final else None
def forward(self, x):
residual = x if self.projector is None else self.projector(x)
x = F.gelu(x)
x = self.conv1(x)
x = F.gelu(x)
x = self.conv2(x)
return x + residual
class DilatedConvEncoder(nn.Module):
def __init__(self, in_channels, channels, kernel_size):
super().__init__()
self.net = nn.Sequential(*[ConvBlock(channels[i - 1] if i > 0 else in_channels, channels[i], kernel_size=kernel_size, dilation=2 ** i, final=i == len(channels) - 1) for i in range(len(channels))])
def forward(self, x):
return self.net(x)
INIT_ARGS = {
'in_channels': 3,
'channels': [4, 8],
'kernel_size': 3,
}
ARGS = {
'x': torch.randn(2, 3, 16),
}
if __name__ == '__main__':
model = DilatedConvEncoder(**INIT_ARGS)
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: (2, 8, 16)")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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, 8, 16) — shape (2, 8, 16) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| FeedForward |
Ran ran on a synthesized input · constructed an object; no result was computed |
emadeldeen24/TS-TCC/models/TC.py code served (permissive licence) · get_code("234836bb032d8d76") 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 an instance of its own class, FeedForward: the run constructed the object and did not call it, so no result was computed. 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)
ARGS = {
'dim': 4,
'hidden_dim': 8,
'dropout': 0.1
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type FeedForward — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FeedForward 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
|
| MyBatchSampler |
Ran ran on a synthesized input |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("efe1ff11e7f6a9b7") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned generator. 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
from torch.utils.data import SequentialSampler
# Create a simple dataset size to sample from
dataset_size = 10
# Create a sampler (SequentialSampler is a simple choice)
sampler = SequentialSampler(range(dataset_size))
INIT_ARGS = {
'sampler': sampler,
'batch_size': 3,
'drop_last': False
}
# For __iter__, we don't pass arguments - it's a generator method
# We just need to call it (iterate over the instance)
METHOD = '__iter__'
ARGS = {}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| Residual |
Ran ran on a synthesized input · constructed an object; no result was computed |
emadeldeen24/TS-TCC/models/TC.py code served (permissive licence) · get_code("8907e91277107509") 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 an instance of its own class, Residual: the run constructed the object and did not call it, so no result was computed. 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 Residual module wraps a function fn and calls it with x and **kwargs,
# then adds x to the result. So fn must:
# 1. Accept x (a tensor) and **kwargs
# 2. Return a tensor of the same shape as x
# 3. The output will be added to x
# Create a simple function that satisfies these requirements
class SimpleLinear(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 4)
def forward(self, x, **kwargs):
return self.linear(x)
fn = SimpleLinear()
ARGS = {
"fn": fn
}
- 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 Residual — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Residual 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
|
| Seq_Transformer |
Ran ran on a synthesized input · constructed an object; no result was computed |
emadeldeen24/TS-TCC/models/TC.py code served (permissive licence) · get_code("92c655e3fea1cdc0") 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 an instance of its own class, Seq_Transformer: the run constructed the object and did not call it, so no result was computed. 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)
ARGS = {
"patch_size": 2,
"dim": 4,
"depth": 1,
"heads": 2,
"mlp_dim": 8,
"channels": 1,
"dropout": 0.1,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Seq_Transformer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Seq_Transformer 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
|
| TC |
Ran ran on a synthesized input · constructed an object; no result was computed |
emadeldeen24/TS-TCC/models/TC.py code served (permissive licence) · get_code("e8e0063a34a8e06f") 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 an instance of its own class, TC: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
torch.manual_seed(0)
class MockConfigs:
def __init__(self):
self.final_out_channels = 8
self.TC = MockTC()
class MockTC:
def __init__(self):
self.timesteps = 3
self.hidden_dim = 4
configs = MockConfigs()
device = torch.device('cpu')
ARGS = {
'configs': configs,
'device': device
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TC — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TC 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
|
| TSEncoder |
Ran ran on a synthesized input |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("24fd56663218d25d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
INIT_ARGS = {
'input_dims': 5,
'output_dims': 7,
'hidden_dims': 8,
'depth': 2,
'mask_mode': 'binomial'
}
ARGS = {
'x': torch.randn(2, 10, 5), # (batch_size, sequence_length, input_dims)
'mask': None
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| TSEncoder |
Ran ran on a synthesized input |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("535006b4dc141e1a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
INIT_ARGS = {
'input_dims': 4,
'output_dims': 3,
'hidden_dims': 8,
'depth': 2,
'mask_mode': 'binomial'
}
# Create input tensor: batch=2, sequence_length=5, input_dims=4
input_tensor = torch.randn(2, 5, 4)
ARGS = {
'x': input_tensor,
'mask': None
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| Transformer |
Ran ran on a synthesized input · constructed an object; no result was computed |
emadeldeen24/TS-TCC/models/TC.py code served (permissive licence) · get_code("2b59ed1d60ed9658") 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 an instance of its own class, Transformer: the run constructed the object and did not call it, so no result was computed. 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)
ARGS = {
'dim': 4,
'depth': 2,
'heads': 2,
'mlp_dim': 8,
'dropout': 0.1,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Transformer 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
|
| batch_shuffle_feature_label |
Ran ran; our contract draft was wrong, not the code |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("827011853812f006") 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 numpy as np
from sklearn.utils import shuffle
# Set random seed for reproducibility
np.random.seed(42)
# Create small test data
# X: feature matrix with shape (8, 4) - 8 samples, 4 features
X = np.random.randn(8, 4).astype(np.float32)
# y: label matrix with shape (8, 3) - 8 samples, 3 columns
# The function uses y[:, 2] for sorting, so we need at least 3 columns
y = np.random.randn(8, 3).astype(np.float32)
# batch_size parameter
batch_size = 4
ARGS = {
"X": X,
"y": y,
"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, sklearn — 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
|
| cnn_network_contrastive |
Ran ran on a synthesized input |
danikiyasseh/CLOCS/prepare_network.py pointer only (licence: NOASSERTION) · get_code("146273205666e8bd") How it ranThe body of this sample is withheld: GitHub could not classify the licence of this paper's repository, danikiyasseh/CLOCS (NOASSERTION). 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. |
| contrastive_loss |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("016be840858ae4f4") 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 as nn
import torch.nn.functional as F
torch.manual_seed(0)
# Create small tensors for z1 and z2
# Shape: (batch_size=2, sequence_length=4, feature_dim=3)
z1 = torch.randn(2, 4, 3)
z2 = torch.randn(2, 4, 3)
# Create a simple loss function that works with the tensors
def simple_loss_func(a, b, id=None):
"""A simple contrastive loss function."""
if id is not None:
# Loss function that takes id into account
return F.mse_loss(a, b) * id.sum()
else:
# Basic MSE loss
return F.mse_loss(a, b)
# Create identity tensor (optional, for when id is not None)
id_tensor = torch.ones(2)
ARGS = {
"z1": z1,
"z2": z2,
"loss_func": simple_loss_func,
"id": id_tensor,
"hierarchical": False,
"factor": 1.0,
}
- 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
|
| fit_knn |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
DL4mHealth/COMET/tasks/_eval_protocols.py pointer only (licence: MIT); the stored copy get_code serves, from KoheiObata/MoST, is pointer only (licence: NONE) · get_code("befe203f4fa96ee5") 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 KoheiObata/MoST, 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. |
| fit_svm |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
DL4mHealth/COMET/tasks/_eval_protocols.py code served (permissive licence) · get_code("c62d56549152cab0") 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 SVC. 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 numpy as np
from sklearn.svm import SVC
from sklearn.model_selection import GridSearchCV, train_test_split
# Create small sample data
np.random.seed(0)
# Create features: 60 samples, 4 features
features = np.random.randn(60, 4).astype(np.float32)
# Create labels: 3 classes, balanced
y = np.array([0] * 20 + [1] * 20 + [2] * 20)
ARGS = {
'features': features,
'y': y,
'MAX_SAMPLES': 10000
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type SVC — a SVC output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SVC 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
|
| generate_binomial_mask |
Ran ran, violated the contract we drafted |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("7077c48726f289f1") 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 Tensor, ndim 3, dtype family float, shape (2, 4, 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
import numpy as np
torch.manual_seed(0)
np.random.seed(0)
ARGS = {
"B": 2,
"T": 4,
"C": 3,
"p": 0.5
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy, 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, 4, 3) — shape (2, 4, 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
|
| generate_continuous_mask |
Ran ran, violated the contract we drafted |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("9cd8a0cb1b50b24b") 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 Tensor, ndim 3, dtype family float, shape (2, 10, 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
import numpy as np
torch.manual_seed(0)
np.random.seed(0)
ARGS = {
"B": 2,
"T": 10,
"C": 4,
"n": 3,
"l": 0.2
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy, 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, 10, 4) — shape (2, 10, 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
|
| id_contrastive_loss |
Ran ran; our contract draft was wrong, not the code |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("bba058f7876cca50") 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 numpy as np
torch.manual_seed(0)
# Create small sample tensors
# z1 and z2 should have shape (B, T, features) based on how they're used
# B is batch size, T is time dimension, features is feature dimension
B = 2
T = 3
features = 4
z1 = torch.randn(B, T, features)
z2 = torch.randn(B, T, features)
# id should be a tensor of person IDs with batch size B
# Create IDs so some match to ensure positive pairs exist
id = torch.tensor([0, 0], dtype=torch.long)
ARGS = {
"z1": z1,
"z2": z2,
"id": id,
}
- 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 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
|
| load_ad |
Ran ran; our contract draft was wrong, not the code |
DL4mHealth/COMET/dataloading/ad_preprocessing.py code served (permissive licence) · get_code("abb87f4aadacbffd") 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 numpy as np
import os
import tempfile
import shutil
# Create temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
data_path = os.path.join(temp_dir, "data/")
os.makedirs(data_path, exist_ok=True)
# Create mock data files
# 5 subject files, each containing multiple trials with features
for i in range(1, 6):
filename = f"subject_{i}.npy"
# Each subject has 3 trials with 4 features each
trials = np.random.randn(3, 4).astype(np.float32)
np.save(os.path.join(data_path, filename), trials)
# Create label file with 5 labels (one per subject)
label_path = os.path.join(temp_dir, "labels.npy")
labels = np.array([0, 1, 0, 1, 0], dtype=np.int64)
np.save(label_path, labels)
# Define validation and test subject IDs (1-indexed)
val_ids = [2, 4]
test_ids = [5]
ARGS = {
"val_ids": val_ids,
"test_ids": test_ids,
"data_path": data_path,
"label_path": label_path,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — 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
|
| load_ptb |
Ran ran on a synthesized input |
DL4mHealth/COMET/dataloading/ptb_preprocessing.py code served (permissive licence) · get_code("32ecaa526bdb3d05") 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 numpy as np
import os
import tempfile
import shutil
# Create a temporary directory structure with mock data files
temp_dir = tempfile.mkdtemp()
data_path = os.path.join(temp_dir, 'data') + '/'
label_path = os.path.join(temp_dir, 'labels.npy')
os.makedirs(data_path, exist_ok=True)
# Create mock label file with 5 subjects
subject_labels = np.array([0, 1, 0, 1, 0])
np.save(label_path, subject_labels)
# Create mock data files for 5 subjects
# Each subject has multiple trials with features of shape (10,) - 10 features per trial
for i in range(5):
# Each subject has 3 trials
subject_data = np.random.randn(3, 10)
filename = f'subject_{i:02d}.npy'
np.save(os.path.join(data_path, filename), subject_data)
# Define train, val, test splits (1-indexed subject IDs)
train_ids = [1, 2, 5]
val_ids = [3]
test_ids = [4]
ARGS = {
'train_ids': train_ids,
'val_ids': val_ids,
'test_ids': test_ids,
'data_path': data_path,
'label_path': label_path,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — 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
|
| load_tdbrain |
Ran ran; our contract draft was wrong, not the code |
DL4mHealth/COMET/dataloading/tdbrain_preprocessing.py code served (permissive licence) · get_code("b5885c72d25d5f24") 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 numpy as np
import tempfile
import os
# Create temporary directories and files for testing
tmpdir = tempfile.mkdtemp()
data_dir = os.path.join(tmpdir, "data/")
os.makedirs(data_dir, exist_ok=True)
# Create mock data files
# We'll create 5 subject files, each containing trial features
num_subjects = 5
feature_dim = 4
num_trials_per_subject = 3
for i in range(num_subjects):
# Create feature data: shape (num_trials, feature_dim)
features = np.random.randn(num_trials_per_subject, feature_dim).astype(np.float32)
filepath = os.path.join(data_dir, f"subject_{i:02d}.npy")
np.save(filepath, features)
# Create label file with one label per subject
labels = np.array([0, 1, 0, 1, 0], dtype=np.int64)
label_path = os.path.join(tmpdir, "labels.npy")
np.save(label_path, labels)
# Define train/val/test splits (1-indexed subject IDs)
train_ids = [1, 2, 3]
val_ids = [4]
test_ids = [5]
ARGS = {
"train_ids": train_ids,
"val_ids": val_ids,
"test_ids": test_ids,
"data_path": data_dir,
"label_path": label_path,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — 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
|
| mixup_batch |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
wickstrom/mixupcontrastivelearning/src/mcl/trainer.py code served (permissive licence) · get_code("ab3068c33cd47e9d") 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)
np.random.seed(0)
# Create a small batch tensor: batch_size=2, feature_dim=4
x = torch.randn(2, 4)
# Set alpha for the Beta distribution
alpha = 1.5
ARGS = {
"x": x,
"alpha": alpha,
}
- 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
|
| observation_contrastive_loss |
Ran ran; our contract draft was wrong, not the code |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("127e5186b374c0c6") 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 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)
# The function expects two tensors z1 and z2
# Looking at the function body:
# - z1.size(0) gives batch size B
# - z1.size(1) gives time dimension T
# - z1 and z2 are concatenated along dim 1
# - They're used in matrix multiplication with transpose on dim (1, 2)
# - This means z1 and z2 should be 3D tensors: (B, T, feature_dim)
B = 2 # batch size
T = 3 # time dimension (must be > 1 to avoid early return)
feature_dim = 4 # feature dimension
# Create z1 and z2 as 3D tensors
z1 = torch.randn(B, T, feature_dim)
z2 = torch.randn(B, T, feature_dim)
ARGS = {
"z1": z1,
"z2": z2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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
|
| pad_nan_to_target |
Ran ran; our contract draft was wrong, not the code |
this paper's copy was not recorded; identical code first harvested from Alrash/TimesURL pointer only · get_code("5254eb44ce12370e") How it ranThe body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. |
| patient_contrastive_loss |
Ran ran; our contract draft was wrong, not the code |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("c721d4c3f9feca7a") 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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# z1 and z2 are tensors with shape (B, T, ...) where B is batch size and T is some dimension
# The function uses z1.size(0) and z1.size(1), permutes to (B, 2, 1), then reshapes to (B, -1)
# So we need tensors of shape (batch_size, some_dim, feature_dim)
B = 2 # batch size
T = 3 # second dimension
feature_dim = 4 # feature dimension
z1 = torch.randn(B, T, feature_dim)
z2 = torch.randn(B, T, feature_dim)
# id (pid) is a tensor that gets converted to cpu, detached, numpy
# It's used to create a string array and meshgrid operations
# Based on the function logic, it should be a 1D tensor of length B (batch size)
pid = torch.tensor([0, 1], dtype=torch.long)
ARGS = {
'z1': z1,
'z2': z2,
'pid': pid
}
- 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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| resolve_device |
Ran ran; our contract draft was wrong, not the code |
wickstrom/mixupcontrastivelearning/src/mcl/trainer.py code served (permissive licence) · get_code("e5bafae5d8f3c7d7") 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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)
ARGS = {
'device': None
}
- 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
|
| sample_contrastive_loss |
Ran ran; our contract draft was wrong, not the code |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("a068a662fad3b92a") 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 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)
# The function expects two tensors z1 and z2
# Looking at the function:
# - z1.size(0) is B (batch size)
# - z1.size(1) is T (time/sequence dimension)
# - z1 and z2 are concatenated along dim 0, so they should have same shape
# - They're transposed to (T, 2*B, ...)
# - matmul is performed, so they need to be 3D tensors with last dim for features
# Create z1 and z2 with shape (B, T, D) where D is feature dimension
B = 2 # batch size
T = 3 # time/sequence dimension
D = 4 # feature dimension
z1 = torch.randn(B, T, D)
z2 = torch.randn(B, T, D)
ARGS = {
"z1": z1,
"z2": z2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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
|
| shuffle_feature_label |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("84ad5a6296c54002") 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 3, 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
# Construct X: feature matrix with shape (num_samples, num_features)
# Using 12 samples, 4 features
np.random.seed(0)
X = np.random.randn(12, 4).astype(np.float32)
# Construct y: label matrix with shape (num_samples, num_columns)
# The function uses y[:, 2] for sorting and y[:, 3] for grouping trials
# Column structure: [col0, col1, sort_key, trial_id, ...]
# Using 12 samples, 4 columns
y = np.zeros((12, 4), dtype=int)
y[:, 0] = np.arange(12) # index column
y[:, 1] = np.random.randint(0, 3, 12) # some arbitrary data
y[:, 2] = np.random.randint(0, 100, 12) # sort key
y[:, 3] = np.array([0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 1, 2]) # trial IDs for grouping
ARGS = {
'X': X,
'y': y,
'shuffle_function': 'trial',
'batch_size': 4
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 3, 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
|
| shuffle_feature_label |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
DL4mHealth/COMET/utils.py code served (permissive licence) · get_code("925a0da719ba3129") 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 3, 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
from sklearn.utils import shuffle
# Create sample data
np.random.seed(42)
# X: feature matrix - small dimensions for testing
# shape (20, 4) - 20 samples, 4 features
X = np.random.randn(20, 4).astype(np.float32)
# y: labels with structure [sample_id, feature1, feature2, trial_id]
# shape (20, 4) - 20 samples, 4 columns
# Column 2 is used for sorting in argsort
# Column 3 is used for grouping by trial
y = np.array([
[0, 1, 10, 1],
[1, 2, 11, 1],
[2, 3, 12, 1],
[3, 4, 13, 2],
[4, 5, 14, 2],
[5, 6, 15, 2],
[6, 7, 16, 3],
[7, 8, 17, 3],
[8, 9, 18, 3],
[9, 10, 19, 3],
[10, 11, 5, 1],
[11, 12, 6, 1],
[12, 13, 7, 2],
[13, 14, 8, 2],
[14, 15, 9, 3],
[15, 16, 20, 1],
[16, 17, 21, 2],
[17, 18, 22, 3],
[18, 19, 3, 1],
[19, 20, 4, 2],
], dtype=np.int32)
ARGS = {
'X': X,
'y': y,
'shuffle_function': 'trial',
'batch_size': 128
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 3, 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
|
| split_with_nan |
Ran ran; our contract draft was wrong, not the code |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("271f7134c2ce540e") 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 list, ndim 3, 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 a test array with float32 dtype
# Shape: (10, 4) - 10 samples, 4 features
x = np.random.randn(10, 4).astype(np.float32)
# Number of sections to split into
sections = 3
# Axis along which to split
axis = 0
ARGS = {
"x": x,
"sections": sections,
"axis": axis,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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 3, 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
|
| take_per_row |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("e8c3e310ce1ef8a3") 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 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
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# - A: indexed with torch.arange and all_indx, so needs to be a tensor or array
# - indx: used with [:, None] and np.arange, so needs to be a numpy array or convertible
# - num_elem: used in np.arange(num_elem), so needs to be an int
# Create a small 2D array A (batch_size=2, features=4)
A = torch.randn(2, 4)
# Create indx as a numpy array with starting indices (batch_size=2)
# Using distinct size: 2 rows, each with a starting index
indx = np.array([0, 1], dtype=np.int64)
# num_elem: number of elements to take per row
num_elem = 3
ARGS = {
"A": A,
"indx": indx,
"num_elem": num_elem
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy, 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
|
| to_numpy3d |
Ran ran, honoured the contract we drafted |
wickstrom/mixupcontrastivelearning/src/mcl/data.py code served (permissive licence) · get_code("8eec0828aa4f64f6") 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 3, dtype family float, shape (3, 1, 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 numpy as np
import pandas as pd
# Test case 1: 2D numpy array
X_2d = np.random.randn(3, 5).astype(np.float32)
# Test case 2: 3D numpy array
X_3d = np.random.randn(2, 4, 6).astype(np.float32)
# Test case 3: Nested DataFrame (each cell contains an array-like)
nested_data = {
'col1': [np.array([1.0, 2.0, 3.0]), np.array([4.0, 5.0, 6.0])],
'col2': [np.array([7.0, 8.0, 9.0]), np.array([10.0, 11.0, 12.0])]
}
X_nested = pd.DataFrame(nested_data)
# Test case 4: MultiIndex DataFrame (sktime format)
arrays = [
['instance_0', 'instance_0', 'instance_1', 'instance_1'],
['timepoint_0', 'timepoint_1', 'timepoint_0', 'timepoint_1']
]
multi_index = pd.MultiIndex.from_arrays(arrays, names=['instance', 'timepoint'])
X_multiindex = pd.DataFrame({
'channel_0': [1.0, 2.0, 3.0, 4.0],
'channel_1': [5.0, 6.0, 7.0, 8.0]
}, index=multi_index)
# Test case 5: Wide DataFrame (no nesting)
X_wide = pd.DataFrame(np.random.randn(3, 4).astype(np.float32))
# Test case 6: Series
X_series = pd.Series([1.0, 2.0, 3.0, 4.0])
# Use the 2D numpy array as the primary test input
ARGS = {'X': X_2d}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 3, dtype family float, shape (3, 1, 5) — shape (3, 1, 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
|
| torch_pad_nan |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("3e925bf8ba27d5fe") 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 Tensor, ndim 2, dtype family float, shape (5, 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
import numpy as np
torch.manual_seed(0)
# Create a small tensor to pad
arr = torch.randn(2, 4)
ARGS = {
"arr": arr,
"left": 1,
"right": 2,
"dim": 0
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy, 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 (5, 4) — shape (5, 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
|
| trial_contrastive_loss |
Ran ran; our contract draft was wrong, not the code |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("9f939df27acbf98d") 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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# z1 and z2 should be tensors of shape (B, T, D) where:
# B = batch size
# T = sequence length
# D = feature dimension
# The function reshapes them to (B, T*D) after permuting
batch_size = 2
sequence_length = 3
feature_dim = 4
z1 = torch.randn(batch_size, sequence_length, feature_dim)
z2 = torch.randn(batch_size, sequence_length, feature_dim)
# id should be a tensor of shape (B,) containing person IDs
# The function converts it to numpy and creates string representations
id_tensor = torch.tensor([0, 1], dtype=torch.long)
ARGS = {
'z1': z1,
'z2': z2,
'tid': id_tensor
}
- 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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| trial_shuffle_feature_label |
Ran ran, honoured the contract we drafted |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("1acb85286d268c68") 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 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 numpy as np
import torch
from sklearn.utils import shuffle
import itertools
# Define a simple nn.Module instance
class SimpleModel(torch.nn.Module):
def __init__(self):
super(SimpleModel, self).__init__()
self.linear = torch.nn.Linear(4, 3)
model = SimpleModel()
# Create tiny tensors for X and y
torch.manual_seed(0)
X = torch.randn(2, 4) # 2 samples, 4 features
y = torch.randint(0, 10, (2, 5)) # 2 samples, 5 labels (one of them will be used for sorting)
# Define the ARGS dictionary
ARGS = {
'X': X,
'y': y
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- 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 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
|
| COMET |
Not yet run unverified (harvested, no recorded run) |
dl4mhealth/comet/comet.py code served (permissive licence) · get_code("ae8e2b7de075b9f3") How it ran |
| TS2Vec |
Not yet run unverified (harvested, no recorded run) |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("64cc44e198273c4e") How it ran |
| centerize_vary_length_series |
Not yet run unverified (harvested, no recorded run) |
yuezhihan/ts2vec/ts2vec.py code served (permissive licence) · get_code("a0b6f98fa3e2d24e") How it ran |
| fit_lr |
Not yet run unverified (harvested, no recorded run) |
DL4mHealth/COMET/tasks/_eval_protocols.py pointer only (licence: MIT); the stored copy get_code serves, from KoheiObata/MoST, is pointer only (licence: NONE) · get_code("2309c20a08ac1773") 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 KoheiObata/MoST, 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. No invocation recorded. |
| load_dataset |
Not yet run unverified (harvested, no recorded run) |
wickstrom/mixupcontrastivelearning/src/mcl/data.py code served (permissive licence) · get_code("48272503a70e16a5") How it ran |
| train |
Not yet run unverified (harvested, no recorded run) |
wickstrom/mixupcontrastivelearning/src/mcl/trainer.py code served (permissive licence) · get_code("f5c0c05f7535c06b") How it ran |