| Ax |
Ran ran on a synthesized input |
RixonC/DINGO/minres_qlp.py code served (permissive licence) · get_code("83d9c16e37611d39") 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 2, dtype family float, shape (4, 1) 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
torch.manual_seed(0)
# Option 1: A as a callable function
def matrix_vector_product(x):
"""A simple matrix-vector product function."""
A_matrix = torch.randn(4, 3)
return torch.mm(A_matrix, x)
# Option 2: A as an explicit tensor
A_tensor = torch.randn(4, 3)
# Vector x
x = torch.randn(3, 1)
# Create ARGS dict with A as a callable
ARGS = {
"A": matrix_vector_product,
"x": x
}
# Alternative ARGS with A as a tensor (uncomment to use):
# ARGS = {
# "A": A_tensor,
# "x": x
# }
- 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 2, dtype family float, shape (4, 1) — shape (4, 1) 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
|
| CG |
Ran ran on a synthesized input |
RixonC/DINGO/cg.py code served (permissive licence) · get_code("d21487af01879377") 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
torch.manual_seed(0)
# Define a simple matrix-vector product function A
# The function should take a vector p and return A*p
def matrix_vector_product(p):
# Create a simple 4x4 matrix for testing
A_matrix = torch.tensor([
[4.0, 1.0, 0.0, 0.0],
[1.0, 3.0, 1.0, 0.0],
[0.0, 1.0, 2.0, 1.0],
[0.0, 0.0, 1.0, 1.0]
], device=p.device)
return torch.matmul(A_matrix, p)
# Define the vector b
b = torch.tensor([[1.0], [2.0], [3.0], [4.0]])
# Define the device
device = torch.device('cpu')
# Create the ARGS dictionary
ARGS = {
'A': matrix_vector_product,
'b': b,
'device': device,
'rtol': 0.0001,
'maxit': 100
}
- 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
|
| LSMR |
Ran ran on a synthesized input |
RixonC/DINGO/lsmr.py code served (permissive licence) · get_code("4cac8089e515bce5") 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
from copy import deepcopy
torch.manual_seed(0)
# Define matrix dimensions: A is m x n, so m=5 rows, n=4 columns
m, n = 5, 4
# Create a simple matrix A for testing
A_matrix = torch.randn(m, n)
# Define A as a function that performs matrix-vector product
def A_func(v):
"""Matrix-vector product: A @ v"""
return A_matrix @ v
# Define A_transpose as a function that performs transpose matrix-vector product
def A_transpose_func(u):
"""Transpose matrix-vector product: A.T @ u"""
return A_matrix.T @ u
# Create a right-hand side vector b
b = torch.randn(m, 1)
# Solution dimension is the number of columns in A
dimension = n
# Device specification (CPU only)
device = torch.device("cpu")
# Build ARGS dictionary with all parameters
ARGS = {
"A": A_func,
"A_transpose": A_transpose_func,
"b": b,
"dimension": dimension,
"device": device,
"myRtol": 0.0001,
"maxit": 100,
"damp": 0.0,
"atol": 0.0,
"btol": 0.0,
"conlim": 0.0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| Precond |
Ran ran on a synthesized input |
RixonC/DINGO/minres_qlp.py code served (permissive licence) · get_code("95b0f58fcfa41cac") 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 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Precond takes two arguments: M and r
# Looking at the function body, it simply returns r
# M is used as a preconditioner matrix (likely applied to r)
# r is a residual vector that gets returned
# M should be a matrix-like object (could be a tensor, array, or operator)
# r should be a vector/tensor
M = torch.randn(4, 4) # Preconditioner matrix
r = torch.randn(4) # Residual vector
ARGS = {
"M": M,
"r": r,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_local_line_search_matrix |
Ran ran on a synthesized input |
RixonC/DINGO/DINGO.py code served (permissive licence) · get_code("a0ca34c5f4a73d8b") 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 2, dtype family float, shape (20, 2) 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 copy import deepcopy
torch.manual_seed(0)
# Build a minimal model
class TinyModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 1)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
model = TinyModel()
# Build a minimal Worker class
class Worker:
def __init__(self):
# Create a simple batch: (input, target)
self.x = torch.randn(2, 4)
self.y = torch.randn(2, 1)
def get_local_loss(self, model):
"""Returns loss as a scalar tensor."""
output = model(self.x)
loss = torch.nn.functional.mse_loss(output, self.y)
return loss
def get_local_gradient(self, model):
"""Returns gradient flattened into a 1D tensor."""
model.zero_grad()
output = model(self.x)
loss = torch.nn.functional.mse_loss(output, self.y)
loss.backward()
# Flatten all gradients into a single tensor
gradients = []
for param in model.parameters():
if param.grad is not None:
gradients.append(param.grad.flatten())
return torch.cat(gradients, dim=0).reshape(-1, 1)
worker = Worker()
# Create update direction: flattened parameter vector
total_params = sum(p.numel() for p in model.parameters())
update_direction = torch.randn(total_params)
# Set line search iterations
line_search_max_iterations = 2
ARGS = {
"model": model,
"worker": worker,
"update_direction": update_direction,
"line_search_max_iterations": line_search_max_iterations
}
- 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 2, dtype family float, shape (20, 2) — shape (20, 2) 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_local_line_search_matrix |
Ran ran on a synthesized input |
RixonC/DINGO/DINGO_with_only_case_1.py code served (permissive licence) · get_code("d0d50e8ee368ffc1") 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 2, dtype family float, shape (20, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from copy import deepcopy
torch.manual_seed(0)
# Define a minimal model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 1)
def forward(self, x):
x = torch.relu(self.linear1(x))
x = self.linear2(x)
return x
# Define a minimal Worker class
class Worker:
def __init__(self):
self.data_x = torch.randn(2, 4)
self.data_y = torch.randn(2, 1)
def get_local_loss(self, model):
"""Returns a scalar loss tensor"""
with torch.no_grad():
output = model(self.data_x)
loss = torch.mean((output - self.data_y) ** 2)
return loss
def get_local_gradient(self, model):
"""Returns gradient as a 1D tensor"""
# Compute loss with gradients
output = model(self.data_x)
loss = torch.mean((output - self.data_y) ** 2)
# Compute gradients
grads = torch.autograd.grad(loss, model.parameters(), create_graph=False)
# Flatten and concatenate all gradients into a single tensor
flat_grads = torch.cat([g.reshape(-1) for g in grads])
return flat_grads.reshape(-1, 1)
# Create instances
model = SimpleModel()
# Compute the total number of parameters to create appropriate update_direction
total_params = sum(p.numel() for p in model.parameters())
update_direction = torch.randn(total_params)
worker = Worker()
line_search_max_iterations = 3
ARGS = {
"model": model,
"worker": worker,
"update_direction": update_direction,
"line_search_max_iterations": line_search_max_iterations,
}
- 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 2, dtype family float, shape (20, 3) — shape (20, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_local_line_search_values |
Ran ran on a synthesized input |
RixonC/DINGO/GIANT.py code served (permissive licence) · get_code("d45b190cd1294398") 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 2, dtype family float, shape (1, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from copy import deepcopy
torch.manual_seed(0)
# Define a minimal model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
# Define a minimal Worker class
class Worker:
def __init__(self):
self.data = torch.randn(2, 4)
self.target = torch.randn(2, 2)
def get_local_loss(self, model):
output = model(self.data)
loss = torch.nn.functional.mse_loss(output, self.target)
return loss
# Create instances
model = SimpleModel()
# Calculate total number of parameters for update_direction
total_params = sum(p.numel() for p in model.parameters())
# Create update_direction tensor
update_direction = torch.randn(total_params)
# Create worker
worker = Worker()
# Set line search iterations
line_search_max_iterations = 3
ARGS = {
"model": model,
"worker": worker,
"update_direction": update_direction,
"line_search_max_iterations": line_search_max_iterations
}
- 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 2, dtype family float, shape (1, 3) — shape (1, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_model_weights |
Ran ran on a synthesized input |
RixonC/DINGO/AIDE.py code served (permissive licence) · get_code("2d58dd6bd6825205") 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 2, dtype family float, shape (23, 1) 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 SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
model = SimpleModel()
ARGS = {
"model": model
}
- 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 2, dtype family float, shape (23, 1) — shape (23, 1) 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_new_y_and_new_zeta |
Ran ran on a synthesized input |
RixonC/DINGO/AIDE.py code served (permissive licence) · get_code("c2c7d1e297cbadcb") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Create small tensor arguments for old_weights and new_weights
old_weights = torch.randn(4)
new_weights = torch.randn(4)
# Create scalar arguments
tau = 0.5
old_zeta = 0.3
lamda = 0.1
ARGS = {
"old_weights": old_weights,
"new_weights": new_weights,
"tau": tau,
"old_zeta": old_zeta,
"lamda": lamda
}
- 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
|
| get_updated_model |
Ran ran on a synthesized input |
RixonC/DINGO/DINGO.py code served (permissive licence) · get_code("ecf4c55475f0e8c4") 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
import torch.nn as nn
from copy import deepcopy
torch.manual_seed(0)
# Create a simple model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
model = SimpleModel()
# Calculate total number of parameters to create matching update_direction
total_params = sum(p.numel() for p in model.parameters())
# Create update direction tensor with same total number of elements
update_direction = torch.randn(total_params)
# Create step size
step_size = 0.01
ARGS = {
"model": model,
"update_direction": update_direction,
"step_size": step_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 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_updated_model |
Ran ran on a synthesized input |
RixonC/DINGO/DINGO_with_only_case_1.py code served (permissive licence) · get_code("56db0b4cabde68fe") 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
import torch.nn as nn
from copy import deepcopy
torch.manual_seed(0)
# Build a minimal model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
# Create model instance
model = SimpleModel()
# Calculate total number of parameters
total_params = sum(p.numel() for p in model.parameters())
# Create update_direction tensor with same total size as all model parameters
update_direction = torch.randn(total_params)
# Create step_size
step_size = 0.01
ARGS = {
"model": model,
"update_direction": update_direction,
"step_size": step_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 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_updated_model |
Ran ran on a synthesized input |
RixonC/DINGO/DiSCO.py code served (permissive licence) · get_code("b0d9abbfd044b38b") 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
import torch.nn as nn
from copy import deepcopy
torch.manual_seed(0)
# Create a simple model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
# Instantiate the model
model = SimpleModel()
# Calculate total number of parameters
total_params = sum(p.numel() for p in model.parameters())
# Create update_direction tensor with the same total number of elements
update_direction = torch.randn(total_params)
ARGS = {
"model": model,
"update_direction": update_direction
}
- 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 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
|
| line_search |
Ran ran on a synthesized input |
RixonC/DINGO/GIANT.py code served (permissive licence) · get_code("9da5748a7cdf1878") 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
from copy import deepcopy
torch.manual_seed(0)
# Create a small model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
model = SimpleModel()
# Create update_direction tensor (flattened parameters)
# Count total parameters in model
total_params = sum(p.numel() for p in model.parameters())
update_direction = torch.randn(total_params, 1)
# Create line_search_values tensor: shape (1, num_line_search_steps)
# Each column represents objective value at different step sizes
line_search_values = torch.tensor([[10.5, 9.8, 9.2, 8.9, 8.8]], dtype=torch.float32)
# Current loss value
loss = 11.0
# Gradient tensor (same shape as update_direction)
gradient = torch.randn(total_params, 1)
# Line search rho parameter (Armijo condition parameter)
line_search_rho = 0.1
ARGS = {
"model": model,
"line_search_values": line_search_values,
"loss": loss,
"gradient": gradient,
"update_direction": update_direction,
"line_search_rho": line_search_rho,
}
- 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
|
| minresQLP |
Ran ran on a synthesized input |
RixonC/DINGO/minres_qlp.py code served (permissive licence) · get_code("c80b3003bd596b2a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Define a simple matrix-vector product function
def matrix_vector_product(v):
"""Simple linear operator: multiply by a fixed matrix."""
A_matrix = torch.tensor([
[2.0, 0.5, 0.1, 0.0],
[0.5, 3.0, 0.2, 0.1],
[0.1, 0.2, 1.5, 0.3],
[0.0, 0.1, 0.3, 2.5]
])
return torch.mm(A_matrix, v)
# Create a small right-hand side vector
b = torch.tensor([[1.0], [2.0], [0.5], [1.5]])
# Set device to CPU
device = torch.device('cpu')
# Define preconditioning function (identity for simplicity)
def precond_fn(M, r):
"""Simple preconditioner - identity."""
return r
ARGS = {
'A': matrix_vector_product,
'b': b,
'device': device,
'rtol': 1e-4,
'maxit': 50,
'M': None,
'shift': 0.0,
'maxxnorm': 1e7,
'Acondlim': 1e15,
'TranCond': 1e7,
'show': False,
'rnormvec': False
}
- 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
|
| replace_model_weights |
Ran ran on a synthesized input |
RixonC/DINGO/AIDE.py code served (permissive licence) · get_code("e9168bd6b6f9f588") 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 Sequential. 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 model with a few parameters
model = nn.Sequential(
nn.Linear(4, 3),
nn.ReLU(),
nn.Linear(3, 2)
)
# Calculate total number of parameters
total_params = sum(p.numel() for p in model.parameters())
# Create new weights as a column tensor
new_weights = torch.randn(total_params, 1)
ARGS = {
"model": model,
"new_weights": new_weights
}
- 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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
|
| symOrtho |
Ran ran on a synthesized input |
RixonC/DINGO/lsmr.py code served (permissive licence) · get_code("dd06bcf31465b9ea") 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
torch.manual_seed(0)
ARGS = {
"a": 3.5,
"b": 2.1,
"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 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
|
| distributed_PCG_algorithm |
Not yet run unverified (harvested, no recorded run) |
RixonC/DINGO/DiSCO.py code served (permissive licence) · get_code("b2046fce1a7c26a0") How it ran |
| get_update_direction |
Not yet run unverified (harvested, no recorded run) |
RixonC/DINGO/DINGO.py code served (permissive licence) · get_code("3d413d6939d03a91") How it ran |
| get_update_direction |
Not yet run unverified (harvested, no recorded run) |
RixonC/DINGO/DINGO_with_only_case_1.py code served (permissive licence) · get_code("c142669863cb0c2c") How it ran |