| AttentionPool2d |
Ran ran on a synthesized input · constructed an object; no result was computed |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("c31ea380cbe12461") 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, AttentionPool2d: 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 = {
"spacial_dim": 4,
"embed_dim": 8,
"num_heads": 2,
"output_dim": 16,
}
- 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 AttentionPool2d — 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 AttentionPool2d 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
|
| Bottleneck |
Ran ran on a synthesized input · constructed an object; no result was computed |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("317eeb922af6df8c") 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, Bottleneck: 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
from torch import nn
from collections import OrderedDict
torch.manual_seed(0)
ARGS = {
'inplanes': 64,
'planes': 16,
'stride': 2,
}
- 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 Bottleneck — 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 Bottleneck 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
|
| CLIPVisionCfg |
Ran ran on a synthesized input · constructed an object; no result was computed |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("147cc99e5a62df69") 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, CLIPVisionCfg: 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
from dataclasses import dataclass
from typing import Tuple, Union
torch.manual_seed(0)
@dataclass
class CLIPVisionCfg:
layers: Union[Tuple[int, int, int, int], int] = 12
width: int = 768
head_width: int = 64
mlp_ratio: float = 4.0
patch_size: int = 16
image_size: Union[Tuple[int, int], int] = 224
timm_model_name: str = None
timm_model_pretrained: bool = False
timm_pool: str = 'avg'
timm_proj: str = 'linear'
ARGS = {
'layers': (3, 4, 5, 6),
'width': 512,
'head_width': 32,
'mlp_ratio': 3.5,
'patch_size': 14,
'image_size': (224, 224),
'timm_model_name': 'vit_base_patch16_224',
'timm_model_pretrained': False,
'timm_pool': 'avg',
'timm_proj': 'linear',
}
- 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 CLIPVisionCfg — 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 CLIPVisionCfg 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
|
| DefaultDataLoader |
Ran ran on a synthesized input |
xeaver/emotionclip/linear_eval.py code served (permissive licence) · get_code("4e3b3a6334554db6") 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 DataLoader. 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
import argparse
from dataclasses import dataclass
from typing import Literal, Optional
from torch.utils.data import Dataset, DataLoader, TensorDataset
torch.manual_seed(0)
@dataclass
class EvalArgs(argparse.Namespace):
dataset: Literal['bold', 'mg', 'meld', 'emotic', 'la'] = 'bold'
ckpt_path: str = './exps/cvpr_final-20221113-235224-a4a18adc/checkpoints/latest.pt'
use_cache: bool = False
save_cache: bool = True
ckpt_strict: bool = True
cuda_deterministic: bool = True
has_test_set: bool = False
seed: int = 2022
video_len: int = 8
device: str = 'cpu'
dataloader_workers: int = 0
batch_size: int = 2
cache_dir: str = './data/cache'
# Create a minimal dataset with 2 samples
# Each sample has input of shape (4,) and output of shape (3,)
x = torch.randn(2, 4)
y = torch.randn(2, 3)
dataset = TensorDataset(x, y)
# Create EvalArgs instance
args = EvalArgs()
ARGS = {
'dataset': dataset,
'args': args,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
|
| LayerNorm |
Ran ran on a synthesized input |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("521eb383ee0b590c") 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, 3, 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 torch.nn.functional as F
from torch import nn
class LayerNorm(nn.LayerNorm):
"""Subclass torch's LayerNorm to handle fp16."""
def forward(self, x: torch.Tensor) -> torch.Tensor:
orig_type = x.dtype
x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
return x.to(orig_type)
INIT_ARGS = {
'normalized_shape': (4,),
'eps': 1e-5,
'elementwise_affine': True,
}
ARGS = {
'x': torch.randn(2, 3, 4),
}
if __name__ == '__main__':
layer_norm = LayerNorm(**INIT_ARGS)
output = layer_norm(**ARGS)
print(f"Input shape: {ARGS['x'].shape}")
print(f"Output shape: {output.shape}")
print(f"Output dtype: {output.dtype}")
print("LayerNorm executed successfully")
- 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, 3, 4) — shape (2, 3, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| ResidualAttentionBlock |
Ran ran on a synthesized input · constructed an object; no result was computed |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("72ae1815d1a81517") 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, ResidualAttentionBlock: 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
from collections import OrderedDict
import torch.nn.functional as F
class LayerNorm(nn.LayerNorm):
"""Subclass torch's LayerNorm to handle fp16."""
def forward(self, x: torch.Tensor) -> torch.Tensor:
orig_type = x.dtype
x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
return x.to(orig_type)
class ResidualAttentionBlock(nn.Module):
def __init__(self, d_model: int, n_head: int, mlp_ratio: float=4.0, act_layer=nn.GELU):
super().__init__()
self.attn = nn.MultiheadAttention(d_model, n_head)
self.ln_1 = LayerNorm(d_model)
mlp_width = int(d_model * mlp_ratio)
self.mlp = nn.Sequential(OrderedDict([('c_fc', nn.Linear(d_model, mlp_width)), ('gelu', act_layer()), ('c_proj', nn.Linear(mlp_width, d_model))]))
self.ln_2 = LayerNorm(d_model)
def attention(self, x: torch.Tensor, attn_mask=None) -> torch.Tensor:
return self.attn(x, x, x, need_weights=False, attn_mask=attn_mask)[0]
def forward(self, x: torch.Tensor, attn_mask=None) -> torch.Tensor:
x = x + self.attention(self.ln_1(x), attn_mask=attn_mask)
x = x + self.mlp(self.ln_2(x))
return x
torch.manual_seed(0)
ARGS = {
'd_model': 8,
'n_head': 2,
'mlp_ratio': 4.0,
'act_layer': nn.GELU
}
- 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 ResidualAttentionBlock — 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 ResidualAttentionBlock 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
|
| Transformer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("698e12b8a3909d01") 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 = {
"width": 64,
"layers": 2,
"heads": 4,
"mlp_ratio": 4.0,
"act_layer": nn.GELU,
}
- 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 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
|
| VisualHead |
Ran ran on a synthesized input · constructed an object; no result was computed |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("02d6e69496cfde7c") 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, VisualHead: 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
from torch import nn
torch.manual_seed(0)
ARGS = {
'temporal_fusion': 'transformer',
'embed_dim': 512,
'video_len': 8,
'transformer_nhead': 8,
'transformer_nlayer': 6,
'transformer_dim_feedforward': 2048,
}
- 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 VisualHead — 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 VisualHead 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
|
| VisualTransformer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("c857cf6246801938") 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, VisualTransformer: 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)
# Define ARGS dict with all parameters for VisualTransformer.__init__
ARGS = {
'image_size': 8,
'patch_size': 4,
'width': 4,
'layers': 2,
'heads': 2,
'mlp_ratio': 4.0,
'output_dim': 3,
'act_layer': nn.GELU,
}
# Create a VisualTransformer instance to verify the setup works
model = nn.Module.__new__(type('VisualTransformer', (nn.Module,), {}))
# Now verify by actually instantiating it
from collections import OrderedDict
import collections.abc
import itertools
def _ntuple(n: int):
def parse(x):
if isinstance(x, collections.abc.Iterable):
return x
return tuple(itertools.repeat(x, n))
return parse
to_2tuple = _ntuple(2)
# Create test inputs for forward pass
batch_size = 2
image_size = ARGS['image_size']
test_input = torch.randn(batch_size, 3, image_size, image_size)
test_mask = torch.ones(batch_size, image_size, image_size)
- 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 VisualTransformer — 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 VisualTransformer 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
|
| _ntuple |
Ran ran; our contract draft was wrong, not the code |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("ee61c52d701d0844") 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 itertools
import collections.abc
def _ntuple(n: int):
def parse(x):
if isinstance(x, collections.abc.Iterable):
return x
return tuple(itertools.repeat(x, n))
return parse
ARGS = {
"n": 3
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| create_index |
Ran ran on a synthesized input |
xeaver/emotionclip/preprocessing/create_index.py code served (permissive licence) · get_code("5117c4f71e3e05f2") 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 os
import os.path as osp
import json
import tempfile
import shutil
# Create temporary directories for the test
temp_base = tempfile.mkdtemp()
video_path = osp.join(temp_base, 'videos')
caption_path = osp.join(temp_base, 'captions')
save_path = osp.join(temp_base, 'index.json')
os.makedirs(video_path)
os.makedirs(caption_path)
# Create a test video ID
video_id = 'test_video_001'
# Create video directory structure
video_dir = osp.join(video_path, video_id)
os.makedirs(video_dir)
# Create caption directory structure
caption_dir = osp.join(caption_path, video_id)
os.makedirs(caption_dir)
# Create frames.hdf5 file
import h5py
frames_file = osp.join(video_dir, 'frames.hdf5')
with h5py.File(frames_file, 'w') as f:
for i in range(100):
f.create_dataset(f'{i}.png', data=[1, 2, 3, 4])
# Create human_boxes.json
human_boxes = [
{'10.png': [[10, 20, 30, 40]], '11.png': [[15, 25, 35, 45]]},
{'20.png': [[20, 30, 40, 50]]}
]
human_boxes_file = osp.join(video_dir, 'human_boxes.json')
with open(human_boxes_file, 'w') as f:
json.dump(human_boxes, f)
# Create transcript_cleaned.json
caption_data = [
{
'start': 0.5,
'end': 2.0,
'duration': 1.5,
'text': 'This is a test caption'
},
{
'start': 2.5,
'end': 4.0,
'duration': 1.5,
'text': 'This is another test caption'
}
]
transcript_file = osp.join(caption_dir, 'transcript_cleaned.json')
with open(transcript_file, 'w') as f:
json.dump(caption_data, f)
# Create neutral_score.json
neutral_score_path = osp.join(temp_base, 'neutral_scores.json')
neutral_scores = {
video_id: [0.5, 0.3]
}
with open(neutral_score_path, 'w') as f:
json.dump(neutral_scores, f)
ARGS = {
'video_path': video_path,
'caption_path': caption_path,
'neutral_score_path': neutral_score_path,
'save_path': save_path,
'fps': 8,
'video_len': 8
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- h5py, rich, tqdm — 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
|
| filter_frames_by_subs |
Ran ran on a synthesized input |
xeaver/emotionclip/preprocessing/download_videos.py code served (permissive licence) · get_code("908004750488edf4") 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 (144,) 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 json
import numpy as np
import tempfile
import os
# Create a temporary JSON file with subtitle data
temp_dir = tempfile.mkdtemp()
subs_file = os.path.join(temp_dir, "subs.json")
# Create sample subtitle data
subtitle_data = [
{"text": "Hello world", "start": 0.5, "duration": 2.0},
{"text": "This is a test", "start": 3.0, "duration": 1.5},
{"text": "[MUSIC]", "start": 5.0, "duration": 1.0}, # Will be filtered out
{"text": "Another subtitle", "start": 6.5, "duration": 2.5},
]
with open(subs_file, 'w') as f:
json.dump(subtitle_data, f)
ARGS = {
"subs_file": subs_file,
"fps": 24
}
- 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 (144,) — shape (144,) 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
|
| frames_to_hdf5 |
Ran ran on a synthesized input |
xeaver/emotionclip/preprocessing/frames_to_hdf5.py code served (permissive licence) · get_code("982a5d4308b89326") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import os
import tempfile
import shutil
# Create temporary directories for the test
temp_base = tempfile.mkdtemp()
vid_name = os.path.join(temp_base, "test_video")
out_dir = os.path.join(temp_base, "output")
# Create the video directory structure
os.makedirs(vid_name)
frames_dir = os.path.join(vid_name, "frames")
os.makedirs(frames_dir)
os.makedirs(out_dir)
# Create some dummy frame files
for i in range(3):
frame_path = os.path.join(frames_dir, f"frame_{i:04d}.bin")
with open(frame_path, 'wb') as f:
f.write(b"dummy_frame_data_" + str(i).encode())
ARGS = {
"vid_name": vid_name,
"out_dir": out_dir,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- h5py, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| freeze_batch_norm_2d |
Ran ran; our contract draft was wrong, not the code |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("4414627a34d3f5a6") 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 SimpleModel. 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 import nn
from torchvision.ops.misc import FrozenBatchNorm2d
torch.manual_seed(0)
# Create a simple module with BatchNorm2d layers
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 16, 3)
self.bn1 = nn.BatchNorm2d(16)
self.conv2 = nn.Conv2d(16, 32, 3)
self.bn2 = nn.BatchNorm2d(32)
self.nested = nn.Sequential(
nn.Conv2d(32, 64, 3),
nn.BatchNorm2d(64)
)
def forward(self, x):
x = self.bn1(self.conv1(x))
x = self.bn2(self.conv2(x))
x = self.nested(x)
return x
# Create model instance
model = SimpleModel()
# Initialize batch norm statistics with some dummy data
x_dummy = torch.randn(2, 3, 8, 8)
with torch.no_grad():
_ = model(x_dummy)
# Test case 1: freeze all batch norms (empty module_match)
module_arg = model
module_match_arg = {}
name_arg = ''
ARGS = {
'module': module_arg,
'module_match': module_match_arg,
'name': name_arg
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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_correct_bbox |
Ran ran on a synthesized input |
xeaver/emotionclip/src/datasets/emotic.py code served (permissive licence) · get_code("fffd8407fb58896e") 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 math
def get_correct_bbox(box: list[float], img_shape: tuple[int, int], orginal_shape: tuple[int, int]) -> list[float]:
r = min(orginal_shape[0] / img_shape[0], orginal_shape[1] / img_shape[1])
new_box = [max(math.floor(box[0] / r), 0), max(math.floor(box[1] / r), 0), min(math.ceil(box[2] / r), img_shape[0]), min(math.ceil(box[3] / r), img_shape[1])]
return new_box
ARGS = {
"box": [10.5, 20.3, 100.7, 150.2],
"img_shape": (256, 512),
"orginal_shape": (512, 1024)
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_word_time_range |
Ran ran on a synthesized input |
xeaver/emotionclip/preprocessing/regroup_transcripts.py code served (permissive licence) · get_code("8fce15b73d85523c") 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 torch.nn as nn
class PunctuationModel(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(10, 3)
def preprocess(self, text):
"""Split text into words"""
if not text or not text.strip():
return []
return text.strip().split()
def predict(self, words):
"""
Returns list of [word, punc, punc_confidence]
where punc is a punctuation mark and punc_confidence is a float
"""
results = []
for word in words:
# Return format: [word, punctuation, confidence]
results.append([word, ".", 0.95])
return results
# Create a minimal model instance
model = PunctuationModel()
# Create a transcript in the expected format
transcript = [
{
'text': 'hello world',
'start': 0.0,
'duration': 2.0
},
{
'text': 'this is a test',
'start': 2.0,
'duration': 3.0
}
]
# File path for logging
f_path = '/tmp/test_transcript.json'
ARGS = {
'model': model,
'transcript': transcript,
'f_path': f_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — 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
|
| is_path_writable |
Ran ran on a synthesized input |
xeaver/emotionclip/src/utils.py code served (permissive licence) · get_code("ea7b78f323af0b60") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os.path as osp
import tempfile
import os
# Create a temporary directory that we know is writable
temp_dir = tempfile.gettempdir()
# Use a path within the writable temp directory
test_path = osp.join(temp_dir, "test_subdir")
ARGS = {
"path": test_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| joints_to_bbox |
Ran ran on a synthesized input |
xeaver/emotionclip/src/datasets/bold.py code served (permissive licence) · get_code("617c4c27e5687338") 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 math
# The function expects an np.ndarray with structure:
# arr[0] = frame_id (f_id)
# arr[1] = some value (unused in function)
# arr[2:] = 18 joints, each with 3 values (x, y, confidence)
# Total length needed: 1 + 1 + (18 * 3) = 56
# Create a valid input array
# Frame ID at index 0
frame_id = 5
# Unused value at index 1
unused_val = 0
# 18 joints with (x, y, confidence) coordinates
# Some joints will be zeros, some will have real values
joints_data = np.array([
[100.0, 150.0, 0.9], # joint 0: valid
[0.0, 0.0, 0.0], # joint 1: zero (will be filtered)
[120.0, 160.0, 0.85], # joint 2: valid
[0.0, 0.0, 0.0], # joint 3: zero
[110.0, 155.0, 0.88], # joint 4: valid
[0.0, 0.0, 0.0], # joint 5: zero
[130.0, 170.0, 0.92], # joint 6: valid
[0.0, 0.0, 0.0], # joint 7: zero
[105.0, 145.0, 0.87], # joint 8: valid
[0.0, 0.0, 0.0], # joint 9: zero
[125.0, 165.0, 0.89], # joint 10: valid
[0.0, 0.0, 0.0], # joint 11: zero
[115.0, 152.0, 0.86], # joint 12: valid
[0.0, 0.0, 0.0], # joint 13: zero
[140.0, 175.0, 0.91], # joint 14: valid
[0.0, 0.0, 0.0], # joint 15: zero
[95.0, 140.0, 0.84], # joint 16: valid
[0.0, 0.0, 0.0], # joint 17: zero
], dtype=np.float32)
# Construct the full array: [frame_id, unused_val, ...flattened joints]
arr = np.concatenate([[frame_id, unused_val], joints_data.flatten()])
ARGS = {
"arr": arr,
"x_padding": 5,
"y_padding": 10
}
- 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 — 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
|
| regroup_by_punc |
Ran ran on a synthesized input |
xeaver/emotionclip/preprocessing/regroup_transcripts.py code served (permissive licence) · get_code("507b8fae3df11365") 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 re
# Construct word_punc_with_time as return value from get_word_time_range()
# This should be a list of dicts with 'word', 'punc', and 'time_range' keys
word_punc_with_time = [
{'word': 'Hello', 'punc': '', 'time_range': [0.0, 0.5]},
{'word': 'world', 'punc': '.', 'time_range': [0.5, 1.0]},
{'word': 'This', 'punc': '', 'time_range': [1.0, 1.5]},
{'word': 'is', 'punc': '', 'time_range': [1.5, 2.0]},
{'word': 'a', 'punc': '', 'time_range': [2.0, 2.5]},
{'word': 'test', 'punc': '.', 'time_range': [2.5, 3.0]},
{'word': 'Another', 'punc': '', 'time_range': [3.0, 3.5]},
{'word': 'sentence', 'punc': '.', 'time_range': [3.5, 4.0]},
]
ARGS = {
'word_punc_with_time': word_punc_with_time,
'split_punc': '.',
'exclude_on': None,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| remove_unuseful_frames |
Ran ran on a synthesized input |
xeaver/emotionclip/preprocessing/download_videos.py code served (permissive licence) · get_code("a13c7ce400fe0bd9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import tempfile
import shutil
# Create a temporary directory with some frame files
temp_dir = tempfile.mkdtemp()
# Create some dummy frame files
frame_files = ["0.jpg", "1.jpg", "2.jpg", "3.jpg", "4.jpg"]
for frame_file in frame_files:
open(os.path.join(temp_dir, frame_file), 'w').close()
# Define useful_frames - only frames 1, 3, and 4 are useful
useful_frames = {1, 3, 4}
ARGS = {
"useful_frames": useful_frames,
"frames_dir": temp_dir
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| tar_gz_to_hdf5 |
Ran ran on a synthesized input |
xeaver/emotionclip/preprocessing/frames_to_hdf5.py code served (permissive licence) · get_code("7433c55c64017801") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import os
import h5py
import tarfile
import tempfile
import shutil
# Create a temporary directory structure for testing
temp_base = tempfile.mkdtemp()
vid_name = os.path.join(temp_base, "test_video")
os.makedirs(vid_name)
# Create frames directory and a tar.gz file
frames_dir = os.path.join(vid_name, "frames_8_fps")
os.makedirs(frames_dir)
# Create some dummy frame files
for i in range(3):
frame_path = os.path.join(frames_dir, f"frame_{i:06d}.png")
with open(frame_path, 'wb') as f:
f.write(b"fake_png_data_" + str(i).encode())
# Create the tar.gz file
frames_tar_path = os.path.join(vid_name, "frames_8_fps.tar.gz")
with tarfile.open(frames_tar_path, 'w:gz') as tar:
tar.add(frames_dir, arcname="frames_8_fps")
# Create output directory
out_dir = os.path.join(temp_base, "output")
os.makedirs(out_dir)
ARGS = {
"vid_name": vid_name,
"out_dir": out_dir
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- h5py, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| timeit |
Ran ran on a synthesized input |
xeaver/emotionclip/src/utils.py code served (permissive licence) · get_code("e037cf75b0da50f6") 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 functools
import time
from collections.abc import Callable
def timeit(func: Callable) -> Callable:
@functools.wraps(func)
def wrapper(*args, **kwargs):
start = time.perf_counter()
result = func(*args, **kwargs)
end = time.perf_counter()
print(f'{func}: {end - start}s')
return result
return wrapper
# Create a simple test function to be decorated
def sample_function(x, y):
"""A simple function that performs basic computation."""
time.sleep(0.001)
return x + y
# Create another test function with keyword arguments
def sample_computation(a, b=10):
"""A function with default arguments."""
time.sleep(0.001)
return a * b
ARGS = {
'func': sample_function
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| with_timer |
Ran ran on a synthesized input |
xeaver/emotionclip/src/utils.py code served (permissive licence) · get_code("6907192b23bf18d8") 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 functools
import time
from collections.abc import Callable
def with_timer(func: Callable) -> Callable:
@functools.wraps(func)
def wrapper(*args, **kwargs):
start = time.perf_counter()
result = func(*args, **kwargs)
end = time.perf_counter()
wrapper.n_calls += 1
wrapper.total_time += end - start
return result
wrapper.n_calls = 0
wrapper.total_time = 0
return wrapper
def sample_function(x, y):
"""A simple function to be decorated."""
return x + y
ARGS = {
"func": sample_function
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| CLIP |
Not yet run unverified (harvested, no recorded run) |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("bd68a70f00670d88") How it ran |
| EmotionCLIP |
Not yet run unverified (harvested, no recorded run) |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("83d96ef6b277e8b1") How it ran |
| ModifiedResNet |
Not yet run unverified (harvested, no recorded run) |
Xeaver/EmotionCLIP/src/models/base.py code served (permissive licence) · get_code("e16cbf2cae362701") How it ran |
| accuracy_from_affect2mm |
Not yet run unverified (harvested, no recorded run) |
xeaver/emotionclip/linear_eval.py code served (permissive licence) · get_code("304f8d104c3ae85b") How it ran |
| bbox_to_mask |
Not yet run unverified (harvested, no recorded run) |
xeaver/emotionclip/src/datasets/bold.py code served (permissive licence) · get_code("22f55504153a6c4a") How it ran |
| search_playlist |
Not yet run unverified (harvested, no recorded run) |
xeaver/emotionclip/preprocessing/search_youtube.py code served (permissive licence) · get_code("4a6f84446e0450a6") How it ran |