| build_tqdm |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/utils/jax_tqdm.py code served (permissive licence) · get_code("1222b814438ac04e") 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 typing
import jax
from jax.debug import callback
from jax.experimental import io_callback
from tqdm.auto import tqdm
# The function build_tqdm takes two parameters:
# 1. n: int - the number of iterations
# 2. message: typing.Optional[str] - an optional message for the progress bar
# Reading the function body:
# - n is used to create range(n), check iteration numbers against n, and format a string
# - message is used as a description for the tqdm bar (optional)
# Build arguments
ARGS = {
"n": 100,
"message": "Processing batches"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, tqdm — 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
|
| check_valid_dtype |
Ran ran, violated the contract we drafted |
wilson-labs/cola/cola/backends/backends.py code served (permissive licence) · get_code("1505bc3ca64e8748") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
def dummy_alloc_fn(array, dtype):
"""A simple allocation function that converts array to the given dtype."""
if isinstance(array, torch.Tensor):
return array.to(dtype)
elif isinstance(array, np.ndarray):
return array.astype(dtype)
else:
raise TypeError(f"Unsupported array type: {type(array)}")
# Create a small test array
test_array = torch.randn(2, 4)
# Valid dtype for the test
test_dtype = torch.float32
ARGS = {
"array": test_array,
"dtype": test_dtype,
"alloc_fn": dummy_alloc_fn
}
- 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 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
|
| combine |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
wilson-labs/cola/cola/utils/custom_autodiff.py code served (permissive licence) · get_code("e09ed6dad6d629b9") 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 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# Create small torch tensors for torch_tensors iterable
torch_tensors = [
torch.randn(2, 4),
torch.randn(2, 4),
torch.randn(2, 4)
]
# Create small non-torch tensors (using numpy or lists)
import numpy as np
non_torch_tensors = [
np.array([[1, 2, 3, 4], [5, 6, 7, 8]]),
np.array([[9, 10, 11, 12], [13, 14, 15, 16]]),
np.array([[17, 18, 19, 20], [21, 22, 23, 24]])
]
# Create is_torch boolean selector list
is_torch = [True, False, True]
ARGS = {
"torch_tensors": torch_tensors,
"non_torch_tensors": non_torch_tensors,
"is_torch": is_torch
}
- 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 list, ndim 3, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| eig |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/backends/np_fns.py code served (permissive licence) · get_code("194698227eb24ab9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small square matrix for eigenvalue decomposition
# Using distinct dimensions where appropriate
test_matrix = np.array([
[4.0, 2.0],
[1.0, 3.0]
], dtype=np.float64)
ARGS = {
"array": test_matrix
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| is_xnp_array |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/ops/operator_base.py code served (permissive licence) · get_code("79232c17bd3e80b9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Create a mock xnp object that behaves like numpy or torch
class MockXnp:
def is_array(self, obj):
# Return True for numpy arrays and torch tensors
return isinstance(obj, (np.ndarray, torch.Tensor))
# Create test objects
numpy_array = np.array([1, 2, 3, 4], dtype=np.float32)
torch_tensor = torch.tensor([1.0, 2.0, 3.0, 4.0])
xnp_mock = MockXnp()
ARGS = {
'obj': numpy_array,
'xnp': xnp_mock
}
- 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 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
|
| iterative_autograd |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/utils/custom_autodiff.py code served (permissive licence) · get_code("07094ab2794b77be") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create a mock iterative_bwd function that serves as the VJP for the iterative solver
def mock_iterative_bwd(res, d_outputs, unflatten, *args, **kwargs):
"""
Mock backward function for iterative solver.
Takes (res, d_outputs, unflatten, *args, **kwargs) and returns gradient w.r.t. A
"""
params, output = res
# Return a gradient tensor with same shape as params
dA = torch.ones_like(params)
return (dA,)
# Create a mock iterative function decorated with iterative_autograd
def mock_iterative_fwd(A, *args, **kwargs):
"""
Mock forward function that uses A as first argument.
A is expected to be a tensor-like object.
"""
# Do some computation with A
result = A @ torch.ones(A.shape[-1], 4, dtype=A.dtype)
return result
# Create a wrapper class that mimics torch tensor behavior with flatten/unflatten
class MockTensorWrapper:
def __init__(self, tensor):
self.tensor = tensor
self.xnp = torch
def flatten(self):
"""Returns (flattened_param, unflatten_fn)"""
flat = self.tensor.flatten()
def unflatten(params):
return params.reshape(self.tensor.shape)
return (flat, unflatten)
def __getattr__(self, name):
return getattr(self.tensor, name)
# Create mock A tensor (4x3 matrix for distinct dimensions)
A_tensor = torch.randn(4, 3, requires_grad=True)
A = MockTensorWrapper(A_tensor)
# Additional arguments for the iterative solver
extra_args = (torch.randn(3, 2),)
extra_kwargs = {"scale": 2.0}
ARGS = {
"iterative_bwd": mock_iterative_bwd,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| loop_tqdm |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/utils/jax_tqdm.py code served (permissive licence) · get_code("d551c022a49dc59a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import typing
import jax
import jax.lax
# Define ARGS for loop_tqdm function
# loop_tqdm takes:
# - n: int (number of iterations)
# - message: typing.Optional[str] (optional message for progress bar)
ARGS = {
"n": 10,
"message": "Testing loop_tqdm"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| lstsq |
Ran ran, violated the contract we drafted |
wilson-labs/cola/cola/backends/np_fns.py code served (permissive licence) · get_code("5dc26cca6fae567f") 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 (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 numpy as np
# Create a simple least squares problem
# A should be a 2D array (m x n) where m >= n
# b should be a 1D or 2D array (m,) or (m, k)
# Using distinct sizes: 5 rows, 3 columns for A, 5 rows for b
A = np.array([
[1.0, 2.0, 3.0],
[2.0, 3.0, 4.0],
[3.0, 4.0, 5.0],
[4.0, 5.0, 6.0],
[5.0, 6.0, 7.0]
], dtype=np.float64)
b = np.array([1.0, 2.0, 3.0, 4.0, 5.0], dtype=np.float64)
ARGS = {
"A": A,
"b": b
}
- 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 (3,) — shape (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
|
| maybe_get_dtype |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/ops/operator_base.py code served (permissive licence) · get_code("12064a51bf1dd610") 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 dtype. 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)
# The function tries to access obj.dtype and returns it, or returns None if AttributeError
# We need to test with an object that has dtype (like a tensor) and one that doesn't
# Create a tensor with dtype attribute
tensor_obj = torch.randn(2, 4)
# Create a stand-in object without dtype attribute
class NoTypeObj:
pass
no_type_obj = NoTypeObj()
# ARGS should map the parameter 'obj' to a value
# We'll use the tensor since it has dtype
ARGS = {
"obj": tensor_obj
}
- 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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
|
| product |
Ran ran, violated the contract we drafted |
wilson-labs/cola/cola/ops/operators.py code served (permissive licence) · get_code("18ed40676168eff9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from functools import partial, reduce
torch.manual_seed(0)
# The function `product(c)` takes a single parameter `c`
# It uses reduce with a lambda that multiplies elements together
# So `c` should be an iterable of numbers that can be multiplied
# Test with a simple list of integers
c = [2, 3, 4, 5]
ARGS = {
"c": c
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| scan_tqdm |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/utils/jax_tqdm.py code served (permissive licence) · get_code("06b12e67297b8604") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import typing
import jax
import jax.numpy as jnp
# Setup for scan_tqdm function
# The function takes n (int) and message (Optional[str])
ARGS = {
"n": 10,
"message": "Test scan progress"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| sparse_csr |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/backends/jax_fns.py code served (permissive licence) · get_code("c56a560ef1f1c286") 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 BCSR. 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 jax
import jax.numpy as jnp
import numpy as np
from jax.experimental.sparse import BCSR
# Create a small sparse matrix in CSR format
# Matrix shape: 3x4
# We'll create a simple sparse matrix with a few non-zero elements
# Row pointers: indicate where each row starts in the col_indices and data arrays
# For a 3x4 matrix with 3 non-zero elements
row_pointers = jnp.array([0, 1, 2, 3])
# Column indices: which column each non-zero element is in
col_indices = jnp.array([0, 2, 3])
# Data: the actual non-zero values
data = jnp.array([1.0, 2.0, 3.0])
# Shape of the sparse matrix
shape = (3, 4)
ARGS = {
"row_pointers": row_pointers,
"col_indices": col_indices,
"data": data,
"shape": shape,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type BCSR — a BCSR 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
|
| sparse_csr |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/backends/torch_fns.py code served (permissive licence) · get_code("624ef6c3eeae7741") 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. 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)
# For a sparse CSR tensor, we need:
# - row_pointers (crow_indices): shape [m+1] where m is number of rows
# - col_indices: shape [nnz] where nnz is number of non-zero elements
# - data (values): shape [nnz] with the non-zero values
# - shape: tuple (m, n) for the matrix dimensions
# Let's create a small 3x4 sparse matrix with 4 non-zero elements
m, n = 3, 4
nnz = 4
# row_pointers: indicates where each row starts in col_indices and data
# For 3 rows with 4 total non-zeros, a valid example is [0, 2, 3, 4]
row_pointers = torch.tensor([0, 2, 3, 4], dtype=torch.int64)
# col_indices: column index for each non-zero element
col_indices = torch.tensor([0, 2, 1, 3], dtype=torch.int64)
# data: the actual values
data = torch.tensor([1.0, 2.0, 3.0, 4.0], dtype=torch.float32)
# shape: dimensions of the matrix
shape = (m, n)
ARGS = {
"row_pointers": row_pointers,
"col_indices": col_indices,
"data": data,
"shape": shape,
}
- 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, shape (3, 4) — shape (3, 4) as a later run recorded it
- 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
|
| svd |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
wilson-labs/cola/cola/backends/jax_fns.py code served (permissive licence) · get_code("a9583780ceda1e46") 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 jax.numpy as jnp
import numpy as np
# Create a small matrix for SVD decomposition
# Using distinct dimensions (4x3) for clarity
A = jnp.array([
[1.0, 2.0, 3.0],
[4.0, 5.0, 6.0],
[7.0, 8.0, 9.0],
[10.0, 11.0, 12.0]
])
ARGS = {
"A": A,
"full_matrices": False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| to_np |
Ran ran, violated the contract we drafted |
wilson-labs/cola/cola/backends/jax_fns.py code served (permissive licence) · get_code("0381ba678b73491b") 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 (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 jax
from jax import numpy as jnp
# Create a simple JAX array to pass to to_np
test_array = jnp.array([1.0, 2.0, 3.0, 4.0], dtype=jnp.float32)
# Define arguments for to_np function
ARGS = {
'array': test_array
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — 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 (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
|
| while_loop |
Ran ran, honoured the contract we drafted |
wilson-labs/cola/cola/utils/torch_tqdm.py code served (permissive licence) · get_code("200e115745cfc25b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# cond_fun: takes a value and returns a boolean
# body_fun: takes a value and returns a new value
# init_val: initial value to start with
# Simple example: count up from 0 to 5
def cond_fun(val):
"""Continue while val < 5"""
return val < 5
def body_fun(val):
"""Increment val by 1"""
return val + 1
init_val = 0
ARGS = {
"cond_fun": cond_fun,
"body_fun": body_fun,
"init_val": init_val,
}
- 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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| while_loop_winfo |
Ran ran; our contract draft was wrong, not the code |
wilson-labs/cola/cola/utils/torch_tqdm.py code served (permissive licence) · get_code("f71a8d09e632c999") 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 numpy as np
from torch import nn
torch.manual_seed(0)
# Define a simple iterative state that will converge
class SimpleState:
def __init__(self, value):
self.value = value
def __repr__(self):
return f"SimpleState({self.value})"
# Define the error function - should decrease over iterations
def errorfn(state):
return float(state.value)
# Define condition function - continue while error > tolerance
def cond_fun(state):
return state.value > 1e-4
# Define body function - decreases the state value
def body_fun(state):
state.value *= 0.8 # Reduce by 20% each iteration
return state
# Initial state with high error
init_val = SimpleState(1.0)
# Tolerance level
tol = 1e-4
# Maximum iterations
max_iters = 50
# Every n iterations update progress
every = 1
# Description for progress bar
desc = 'Test while loop'
# Whether to show progress bar
pbar = False
# Additional kwargs
kwargs = {}
ARGS = {
'errorfn': errorfn,
'tol': tol,
'max_iters': max_iters,
'every': every,
'desc': desc,
'pbar': pbar,
'kwargs': kwargs
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch, tqdm — 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
|