| MaestroConv2d |
Ran ran on a synthesized input · constructed an object; no result was computed |
samuelhorvath/maestro-lod/maestro/layers/conv.py code served (permissive licence) · get_code("838b3ced47c739f8") 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, MaestroConv2d: 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)
ARGS = {
'in_features': 4,
'out_features': 3,
'kernel_size': 3,
'stride': 1,
'padding': 0,
'dilation': 1,
'groups': 1,
'bias': True,
}
- 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 MaestroConv2d — 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 MaestroConv2d 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
|
| bool_string |
Ran ran, violated the contract we drafted |
SamuelHorvath/Maestro-LoD/maestro_opts.py code served (permissive licence) · get_code("396d2b49a5391613") 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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def bool_string(s):
if s not in {'False', 'True'}:
raise ValueError('Not a valid boolean string')
return s == 'True'
ARGS = {
's': 'True'
}
- 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 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
|
| check_layer |
Ran ran, honoured the contract we drafted |
samuelhorvath/maestro-lod/maestro/layers/conv.py code served (permissive licence) · get_code("a80d13a84b21f1cf") 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
import torch.nn as nn
torch.manual_seed(0)
class SimpleLayer(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 3)
def forward(self, x):
return self.linear(x)
layer = SimpleLayer()
# Test case 1: p is just a plain value (not a tuple)
p_simple = 0.5
# Test case 2: p is a tuple with (value, layer)
p_tuple = (0.5, layer)
ARGS = {
"layer": layer,
"p": p_tuple
}
- 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 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
|
| create_conv2d_layer |
Ran ran; our contract draft was wrong, not the code |
SamuelHorvath/Maestro-LoD/maestro/models/lenet.py code served (permissive licence) · get_code("18a414ece7a6c3c2") 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 Conv2d. 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 a minimal MaestroConv2d class that mimics nn.Conv2d interface
class MaestroConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.kernel_size = kernel_size if isinstance(kernel_size, tuple) else (kernel_size, kernel_size)
self.stride = stride
self.padding = padding
self.dilation = dilation
self.groups = groups
self.weight = nn.Parameter(torch.randn(out_channels, in_channels // groups, *self.kernel_size))
if bias:
self.bias = nn.Parameter(torch.randn(out_channels))
else:
self.bias = None
def forward(self, x):
return torch.nn.functional.conv2d(x, self.weight, self.bias, self.stride, self.padding, self.dilation, self.groups)
ARGS = {
'decomposition': False,
'in_channels': 3,
'out_channels': 16,
'kernel_size': 3,
'stride': 1,
'padding': 1,
'dilation': 1,
'groups': 1,
'bias': True
}
- 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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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_linear_layer |
Ran ran; our contract draft was wrong, not the code |
SamuelHorvath/Maestro-LoD/maestro/models/utils.py code served (permissive licence) · get_code("33eb693ad533396c") 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 Linear. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
class MaestroLinear(nn.Module):
def __init__(self, in_features, out_features, bias=True):
super().__init__()
self.in_features = in_features
self.out_features = out_features
self.weight = nn.Parameter(torch.randn(out_features, in_features))
if bias:
self.bias = nn.Parameter(torch.randn(out_features))
else:
self.register_parameter('bias', None)
def forward(self, x):
return torch.nn.functional.linear(x, self.weight, self.bias)
ARGS = {
"decomposition": False,
"in_features": 4,
"out_features": 3,
"bias": True
}
- 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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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_norm_layer |
Ran ran; our contract draft was wrong, not the code |
samuelhorvath/maestro-lod/cifar_mnist_main.py code served (permissive licence) · get_code("31759f14336427d4") 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 BatchNorm2d. 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)
# Test case 1: BatchNorm enabled
ARGS = {
"num_channels": 64,
"batch_norm": True,
}
- 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 BatchNorm2d — a BatchNorm2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BatchNorm2d 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
|
| decompose_conv2d |
Ran ran; our contract draft was wrong, not the code |
SamuelHorvath/Maestro-LoD/maestro/layers/conv.py code served (permissive licence) · get_code("11a9508cc4b6b3fa") 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 MaestroConv2d. 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)
# Create a simple Conv2d layer to decompose
# in_channels=3, out_channels=4, kernel_size=3x3
conv_layer = nn.Conv2d(
in_channels=3,
out_channels=4,
kernel_size=3,
stride=1,
padding=1,
dilation=1,
groups=1,
bias=True
)
ARGS = {
"layer": conv_layer,
"device": "cpu"
}
- 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 MaestroConv2d — a MaestroConv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MaestroConv2d 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
|
| decompose_linear |
Ran ran; our contract draft was wrong, not the code |
samuelhorvath/maestro-lod/maestro/layers/linear.py code served (permissive licence) · get_code("db892158fa6646a4") 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 MaestroLinear. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create a small nn.Linear layer to decompose
# Use distinct dimensions: in_features=4, out_features=3
layer = nn.Linear(in_features=4, out_features=3, bias=True)
# Initialize with some data so SVD works well
layer.weight.data = torch.randn(3, 4)
layer.bias.data = torch.randn(3)
ARGS = {
"layer": layer,
"device": None,
}
- 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 MaestroLinear — a MaestroLinear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MaestroLinear 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
|
| do_not_decompose_linear |
Ran ran, violated the contract we drafted |
samuelhorvath/maestro-lod/maestro/layers/linear.py code served (permissive licence) · get_code("db6320dbc007c7bd") 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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
import numpy as np
torch.manual_seed(0)
# Create a MaestroLinear layer with specific dimensions
# in_features=5, out_features=3, so inner_dim=min(5,3)=3
layer = nn.Module()
layer.in_features = 5
layer.out_features = 3
layer.inner_dim = min(5, 3)
# Create the in_network and out_network as the function expects
layer.in_network = nn.Linear(5, 3, bias=False)
layer.out_network = nn.Linear(3, 3, bias=True)
# Initialize with some weights
layer.in_network.weight = Parameter(torch.randn(3, 5))
layer.out_network.weight = Parameter(torch.randn(3, 3))
layer.out_network.bias = Parameter(torch.randn(3))
ARGS = {
"layer": layer
}
- 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 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
|
| get_submodel_and_name |
Ran ran; our contract draft was wrong, not the code |
SamuelHorvath/Maestro-LoD/maestro/layers/decomposition.py code served (permissive licence) · get_code("54c0134104fb7718") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.layer1 = nn.Linear(4, 3)
self.layer2 = nn.Sequential(
nn.Linear(3, 2),
nn.ReLU()
)
self.nested = nn.Module()
self.nested.sublayer = nn.Linear(2, 1)
model = SimpleModel()
ARGS = {
"model": model,
"name": "layer1.weight"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| group_lasso_criterion |
Ran ran, honoured the contract we drafted |
SamuelHorvath/Maestro-LoD/maestro/layers/utils.py code served (permissive licence) · get_code("88bb5d3e4db2e20f") 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
torch.manual_seed(0)
class ModuleWithGroupLasso(nn.Module):
def __init__(self):
super().__init__()
self.inner_dim = 4
self.weight = nn.Parameter(torch.randn(4, 3))
def group_lasso(self, hierarchical=False):
# Return a tensor that can be summed
# Simulate group lasso regularization
if hierarchical:
return torch.abs(self.weight).sum(dim=1, keepdim=True)
else:
return torch.abs(self.weight).sum(dim=1, keepdim=True)
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.layer1 = ModuleWithGroupLasso()
self.layer2 = ModuleWithGroupLasso()
self.linear = nn.Linear(3, 2)
def forward(self, x):
return x
model = SimpleModel()
ARGS = {
'model': model,
'hierarchical': False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| initialise_model |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
samuelhorvath/maestro-lod/cifar_mnist_main.py code served (permissive licence) · get_code("fb70500cc298c8d1") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal args object with batch_norm attribute
class Args:
def __init__(self, batch_norm=True):
self.batch_norm = batch_norm
# Create minimal stand-in models for the imports that would fail
class MockResNet18(nn.Module):
def __init__(self, norm_layer):
super().__init__()
self.norm_layer = norm_layer
self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3)
self.bn1 = norm_layer(64)
self.relu = nn.ReLU(inplace=True)
def forward(self, x):
return self.relu(self.bn1(self.conv1(x)))
class MockVGG19(nn.Module):
def __init__(self, norm_layer):
super().__init__()
self.norm_layer = norm_layer
self.conv1 = nn.Conv2d(3, 64, kernel_size=3, padding=1)
self.bn1 = norm_layer(64)
def forward(self, x):
return self.bn1(self.conv1(x))
class MockMaestroLeNet(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(1, 32, kernel_size=5)
def forward(self, x):
return self.conv1(x)
# Monkey-patch the imports to return our mock models
import sys
from types import ModuleType
maestro_models_resnets = ModuleType('maestro.models.resnets')
maestro_models_resnets.resnet18 = lambda norm_layer: MockResNet18(norm_layer)
maestro_models_vggs = ModuleType('maestro.models.vggs')
maestro_models_vggs.VGG = lambda arch, norm_layer: MockVGG19(norm_layer)
maestro_models_lenet = ModuleType('maestro.models.lenet')
maestro_models_lenet.MaestroLeNet = MockMaestroLeNet
sys.modules['maestro'] = ModuleType('maestro')
sys.modules['maestro.models'] = ModuleType('maestro.models')
sys.modules['maestro.models.resnets'] = maestro_models_resnets
sys.modules['maestro.models.vggs'] = maestro_models_vggs
sys.modules['maestro.models.lenet'] = maestro_models_lenet
ARGS = {
'model_str': 'resnet18',
'device': 'cpu',
'args': Args(batch_norm=True)
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- maestro, 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
|
| maestro_to_full_linear |
Ran ran; our contract draft was wrong, not the code |
samuelhorvath/maestro-lod/maestro/layers/linear.py code served (permissive licence) · get_code("c4f3e05b55394eae") 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 Linear. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
torch.manual_seed(0)
# Create a MaestroLinear layer with small dimensions
in_features = 4
out_features = 3
inner_dim = min(in_features, out_features)
maestro_layer = nn.Module()
maestro_layer.in_features = in_features
maestro_layer.out_features = out_features
maestro_layer.inner_dim = inner_dim
# Create the inner and outer networks
maestro_layer.in_network = nn.Linear(in_features, inner_dim, bias=False)
maestro_layer.out_network = nn.Linear(inner_dim, out_features, bias=True)
# Initialize with some weights
maestro_layer.in_network.weight.data = torch.randn(inner_dim, in_features)
maestro_layer.out_network.weight.data = torch.randn(out_features, inner_dim)
maestro_layer.out_network.bias.data = torch.randn(out_features)
# Create low_rank mask
maestro_layer.low_rank = torch.ones(inner_dim, dtype=torch.bool)
# Convert to MaestroLinear type for proper typing
from torch.nn.modules.module import Module
class MaestroLinear(Module):
__constants__ = ['in_features', 'out_features']
in_features: int
out_features: int
def __init__(self, in_features: int, out_features: int, bias: bool=True) -> None:
super(MaestroLinear, self).__init__()
self.in_features = in_features
self.out_features = out_features
self.inner_dim = min(self.in_features, self.out_features)
self.in_network = nn.Linear(self.in_features, self.inner_dim, bias=False)
self.out_network = nn.Linear(self.inner_dim, self.out_features, bias=bias)
self.reset_parameters()
self.low_rank = (torch.ones(self.inner_dim) >= 0).cpu()
self.is_od = True
def reset_parameters(self) -> None:
self.in_network.reset_parameters()
self.out_network.reset_parameters()
maestro_layer = MaestroLinear(in_features=4, out_features=3, bias=True)
ARGS = {
'layer': maestro_layer,
'device': None
}
- 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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
|
| parse_maestro_opts |
Ran ran; our contract draft was wrong, not the code |
SamuelHorvath/Maestro-LoD/maestro_opts.py code served (permissive licence) · get_code("4998b554a5d3b133") 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 ArgumentParser. 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 argparse
import time
torch_seed = 0
ARGS = {
'parser': argparse.ArgumentParser(description='Test parser for parse_maestro_opts')
}
- 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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
|
| validate |
Ran ran, honoured the contract we drafted |
samuelhorvath/maestro-lod/imagenet_main.py code served (permissive licence) · get_code("c63928dac29e7a1d") 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, ndim 1, dtype family float; no output shape is stated. 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 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 torch.nn as nn
from torch.utils.data import DataLoader, TensorDataset
import torch.distributed as dist
torch.manual_seed(0)
# Create a minimal model that accepts images and val_od_sampler
class MinimalModel(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 10)
def forward(self, x, val_od_sampler=None):
return self.linear(x)
# Create a minimal criterion
criterion = nn.CrossEntropyLoss()
# Create minimal val_loader with (images, target) tuples
images = torch.randn(2, 4) # batch_size=2, features=4
targets = torch.randint(0, 10, (2,)) # 10 classes
dataset = TensorDataset(images, targets)
val_loader = DataLoader(dataset, batch_size=2)
# Create a minimal args object
class Args:
def __init__(self):
self.gpu = None
self.print_freq = 1
self.distributed = False
self.world_size = 1
args = Args()
# Create model
model = MinimalModel()
# Create val_od_sampler (can be None or a simple object)
val_od_sampler = None
ARGS = {
'val_loader': val_loader,
'model': model,
'criterion': criterion,
'args': args,
'val_od_sampler': val_od_sampler
}
- 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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| create_linear_layer |
Not yet run unverified (harvested, no recorded run) |
SamuelHorvath/Maestro-LoD/maestro/models/lenet.py code served (permissive licence) · get_code("752dd8c48fb5d47b") How it ran |
| do_not_decompose_conv2d |
Not yet run unverified (harvested, no recorded run) |
SamuelHorvath/Maestro-LoD/maestro/layers/conv.py code served (permissive licence) · get_code("a02b80587a98bf46") How it ran |
| maestro_to_full_conv2d |
Not yet run unverified (harvested, no recorded run) |
SamuelHorvath/Maestro-LoD/maestro/layers/conv.py code served (permissive licence) · get_code("991b739d35882910") How it ran |