| adapt_model_last_layer |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/trainutils.py code served (permissive licence) · get_code("4447dfdb8e0d3030") 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 MinimalResNet. 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)
# Create a minimal ResNet-like model with an fc layer
class MinimalResNet(nn.Module):
def __init__(self, num_classes=10):
super().__init__()
self.fc = nn.Linear(512, num_classes)
def forward(self, x):
return self.fc(x)
# Create model instance
model = MinimalResNet(num_classes=10)
# Define arguments for the function
ARGS = {
"model": model,
"num_classes": 5
}
- 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 MinimalResNet — a MinimalResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalResNet 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
|
| check_for_mapping |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/noise.py code served (permissive licence) · get_code("962747bce5a794a6") 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 SimpleDataset. 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 Dataset
torch.manual_seed(0)
class SimpleDataset(Dataset):
def __init__(self):
self.data = torch.randn(5, 4)
self.targets = [0, 1, 0, 1, 0]
self.class_to_idx = {'class_0': 0, 'class_1': 1}
self.indices = [0, 1, 2, 3, 4]
def __len__(self):
return len(self.data)
def __getitem__(self, idx):
return self.data[idx], self.targets[idx]
dataset = SimpleDataset()
ARGS = {
'dataset': dataset
}
- 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 SimpleDataset — a SimpleDataset 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
|
| extract_root_dataset |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/noise.py code served (permissive licence) · get_code("3a1ddce3e40b6101") 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 SimpleDataset. 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 Subset, Dataset
torch.manual_seed(0)
# Create a minimal custom Dataset class
class SimpleDataset(Dataset):
def __init__(self, size=10):
self.data = torch.randn(size, 4)
self.labels = torch.randint(0, 2, (size,))
def __len__(self):
return len(self.data)
def __getitem__(self, idx):
return self.data[idx], self.labels[idx]
# Create root dataset
root_dataset = SimpleDataset(size=10)
# Create a nested Subset structure to test the recursive extraction
subset_level1 = Subset(root_dataset, indices=[0, 1, 2, 3])
subset_level2 = Subset(subset_level1, indices=[0, 1])
ARGS = {
'subset': subset_level2
}
- 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 SimpleDataset — a SimpleDataset 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
|
| extract_root_dataset_and_indices |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/noise.py code served (permissive licence) · get_code("0efa60f24821a29b") 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
from torch.utils.data import Subset, Dataset
torch.manual_seed(0)
# Create a simple root dataset
class SimpleDataset(Dataset):
def __init__(self, size=10):
self.data = torch.randn(size, 4)
def __len__(self):
return len(self.data)
def __getitem__(self, idx):
return self.data[idx]
# Build the nested Subset structure
root_dataset = SimpleDataset(size=10)
level1_subset = Subset(root_dataset, indices=[0, 1, 2, 3, 4])
level2_subset = Subset(level1_subset, indices=[0, 2, 4])
ARGS = {
"subset": level2_subset,
"indices": None
}
- 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
|
| generate_client_ids |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/utils.py code served (permissive licence) · get_code("be7250c1f5f8f348") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
ARGS = {
'num_clients': 5
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_accuracy |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/trainutils.py code served (permissive licence) · get_code("2402e9b3ec5e41df") 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 float, 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
from torch import nn, Tensor
torch.manual_seed(0)
# Create sample outputs (logits from a classification model)
# Shape: (batch_size=2, num_classes=4)
outputs = torch.randn(2, 4)
# Create sample targets (class labels)
# Shape: (batch_size=2,)
targets = torch.tensor([0, 2])
ARGS = {
"outputs": outputs,
"targets": targets,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, 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
|
| get_client_train_val_indices |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/data.py code served (permissive licence) · get_code("99583fc942c75d14") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Create sample clients_indices - a list where each element is an array of indices for that client
# Client 0 has indices [0, 1, 2, 3, 4]
# Client 1 has indices [5, 6, 7, 8, 9]
# Client 2 has indices [10, 11, 12, 13]
clients_indices = [
np.array([0, 1, 2, 3, 4]),
np.array([5, 6, 7, 8, 9]),
np.array([10, 11, 12, 13])
]
ARGS = {
"clients_indices": clients_indices,
"train_ratio": 0.9
}
- 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_free_rider_split |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/splits.py code served (permissive licence) · get_code("4f9a66fa8ada3f8e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
np.random.seed(0)
# Create index_label_mapping
# The function expects a dict where keys are labels (int or str)
# and values are lists of indices for that class
num_classes = 3
total_samples = 150
# Create a mapping from class label to list of sample indices
index_label_mapping = {}
sample_idx = 0
for class_label in range(num_classes):
samples_per_class = 50
index_label_mapping[class_label] = list(range(sample_idx, sample_idx + samples_per_class))
sample_idx += samples_per_class
num_clients = 4
free_rider_idx = 0
free_rider_actual_size = 10
alpha = 1.0
ARGS = {
'index_label_mapping': index_label_mapping,
'num_clients': num_clients,
'num_classes': num_classes,
'free_rider_idx': free_rider_idx,
'free_rider_actual_size': free_rider_actual_size,
'alpha': alpha,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_iid_split_v1 |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/splits.py code served (permissive licence) · get_code("e43161ef6d9ff086") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import torch
from torch.utils.data import Subset, Dataset
torch.manual_seed(0)
# Create a minimal Dataset
class DummyDataset(Dataset):
def __init__(self, size=10):
self.size = size
def __len__(self):
return self.size
def __getitem__(self, idx):
return torch.randn(4), torch.randint(0, 2, (1,))
# Create a full dataset and then a Subset from it
full_dataset = DummyDataset(size=10)
subset = Subset(full_dataset, indices=list(range(10)))
ARGS = {
"dataset": subset,
"num_splits": 3,
"seed": 42
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_index_label_mapping |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/data.py code served (permissive licence) · get_code("e2f7b5c3efde3b90") 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 defaultdict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from pathlib import Path
import tempfile
from collections import defaultdict
# Create a temporary directory for the root
temp_dir = tempfile.mkdtemp()
root = Path(temp_dir)
# Create a minimal mock dataset that yields (data, label) tuples
class MockDataset:
def __init__(self):
self.data = [
(torch.randn(3, 4), 0),
(torch.randn(3, 4), 1),
(torch.randn(3, 4), 0),
(torch.randn(3, 4), 2),
]
def __len__(self):
return len(self.data)
def __iter__(self):
return iter(self.data)
dataset = MockDataset()
ARGS = {
'dataset': dataset,
'root': root,
'dataset_name': 'CIFAR10'
}
- 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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
|
| mask_grad_update_by_magnitude |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/rewards.py code served (permissive licence) · get_code("df5d968cc3bcd6e3") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from torch import nn, Tensor
torch.manual_seed(0)
# Create a list of small tensors with distinct shapes to serve as gradient updates
grad_update_list = [
torch.randn(2, 4),
torch.randn(3, 2),
torch.randn(4,)
]
# Define mask constant - gradients with absolute value less than this will be zeroed
mask_constant = 0.5
ARGS = {
"grad_update": grad_update_list,
"mask_constant": mask_constant
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| mask_grad_update_by_order |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/rewards.py code served (permissive licence) · get_code("40e54a807901ada4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from torch import nn, Tensor
torch.manual_seed(0)
# Create a list of small gradient tensors to use as grad_update
grad_update = [
torch.randn(4, 3),
torch.randn(5, 2),
torch.randn(3)
]
# Define ARGS dictionary with all parameters for mask_grad_update_by_order
ARGS = {
'grad_update': grad_update,
'mask_order': None,
'mask_percentile': 0.5,
'mode': 'all'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| pearson_corr |
Ran ran, violated the contract we drafted |
asimukaye/spectralfuse/spectralfuse.py code served (permissive licence) · get_code("24f0981a4d25c5ac") 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 float, 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
# Read the function to understand what it needs:
# - x: converted to np.ndarray of float
# - y: converted to np.ndarray of float
# The function computes Pearson correlation coefficient
# Create simple test data
x_data = np.array([1.0, 2.0, 3.0, 4.0])
y_data = np.array([2.0, 4.0, 5.0, 4.0])
ARGS = {
"x": x_data,
"y": y_data,
}
- 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 float, 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
|
| rankdata |
Ran ran, violated the contract we drafted |
asimukaye/spectralfuse/spectralfuse.py code served (permissive licence) · get_code("c5fb628437a9d366") 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 float, shape (6,) 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
# rankdata takes a single parameter: arr
# It expects an array-like object (list, numpy array, or similar)
# The function converts it to a numpy array and performs ranking operations
# Create a small test array with some ties to properly test the ranking logic
test_array = np.array([3.5, 1.2, 2.8, 1.2, 3.5, 2.8])
ARGS = {
'arr': test_array
}
- 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 float, shape (6,) — shape (6,) 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
|
| recalibrate_bn |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/spectralfuse.py code served (permissive licence) · get_code("f4d1c78c1076019f") 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 SimpleModelWithBN. 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 torch.nn as nn
from torch.utils.data import DataLoader, Subset
torch.manual_seed(0)
# Build a minimal model with batch norm layers
class SimpleModelWithBN(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 4, kernel_size=3, padding=1)
self.bn1 = nn.BatchNorm2d(4)
self.linear = nn.Linear(4 * 8 * 8, 2)
def forward(self, x):
x = self.conv1(x)
x = self.bn1(x)
x = x.view(x.size(0), -1)
x = self.linear(x)
return x
# Create a minimal dataset as list of (x, y) tuples
dataset = [
(torch.randn(3, 8, 8), torch.randint(0, 2, (1,)).item())
for _ in range(20)
]
# Create dataloader
dataloader = DataLoader(dataset, batch_size=2, shuffle=True)
# Build model
model = SimpleModelWithBN()
# Define all arguments
ARGS = {
'model': model,
'dataloader': dataloader,
'batch_size': 2,
'num_batches': 10,
'device': torch.device('cpu')
}
- 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 SimpleModelWithBN — a SimpleModelWithBN output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModelWithBN 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
|
| resnet18_wrapper |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/models.py code served (permissive licence) · get_code("66e40f1474410407") 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 ResNet. 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 torchvision.models import resnet18
torch.manual_seed(0)
ARGS = {
'num_classes': 10
}
- 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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
|
| slugify |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/utils.py code served (permissive licence) · get_code("7c683413a2f8a345") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import unicodedata
import re
def slugify(value, allow_unicode=False):
"""
Taken from https://github.com/django/django/blob/master/django/utils/text.py
Convert to ASCII if 'allow_unicode' is False. Convert spaces or repeated
dashes to single dashes. Remove characters that aren't alphanumerics,
underscores, or hyphens. Convert to lowercase. Also strip leading and
trailing whitespace, dashes, and underscores.
"""
value = str(value)
if allow_unicode:
value = unicodedata.normalize('NFKC', value)
else:
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
value = re.sub('[^\\w\\s-]', '', value.lower())
return re.sub('[-\\s]+', '-', value).strip('-_')
ARGS = {
'value': 'Hello World --- Test_String!!!',
'allow_unicode': False
}
- 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 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
|
| train_one_epoch_model |
Ran ran; our contract draft was wrong, not the code |
asimukaye/spectralfuse/trainutils.py code served (permissive licence) · get_code("abb3c7aa1e31bda1") 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. 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
from torch import nn, Tensor
import torch.optim as optim
from torch.utils.data import DataLoader, Subset, TensorDataset
torch.manual_seed(0)
# Define a minimal model that works with the function
class SimpleClassifier(nn.Module):
def __init__(self, input_dim=4, num_classes=3):
super().__init__()
self.fc = nn.Linear(input_dim, num_classes)
def forward(self, x):
return self.fc(x)
# Create tiny tensors for training data
batch_size = 2
num_samples = 4
input_dim = 4
num_classes = 3
images = torch.randn(num_samples, input_dim)
labels = torch.randint(0, num_classes, (num_samples,))
# Create a dataset and dataloader
dataset = TensorDataset(images, labels)
train_loader = DataLoader(dataset, batch_size=batch_size, shuffle=False)
# Create model, optimizer, and loss criterion
model = SimpleClassifier(input_dim=input_dim, num_classes=num_classes)
optimizer = optim.SGD(model.parameters(), lr=0.01)
criterion = nn.CrossEntropyLoss()
# Device set to CPU only
device = torch.device('cpu')
ARGS = {
'model': model,
'train_loader': train_loader,
'optimizer': optimizer,
'criterion': criterion,
'device': device
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- 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
|
| get_client_train_val_indices |
Not yet run unverified (harvested, no recorded run) |
asimukaye/spectralfuse/utils.py code served (permissive licence) · get_code("3873eb626fb8d391") How it ran |
| get_dirichlet_split |
Not yet run unverified (harvested, no recorded run) |
asimukaye/spectralfuse/splits.py code served (permissive licence) · get_code("24b01f08a193ab5a") How it ran |
| resnet50_pretrained |
Not yet run unverified (harvested, no recorded run) |
asimukaye/spectralfuse/models.py code served (permissive licence) · get_code("028e03a437811396") How it ran |
| vit_b_16_pretrained |
Not yet run unverified (harvested, no recorded run) |
asimukaye/spectralfuse/models.py code served (permissive licence) · get_code("7521025916691093") How it ran |