| add_centroid |
Ran ran; our contract draft was wrong, not the code |
cambridge-mlg/sgd-gp/scalable_gps/kmeans.py code served (permissive licence) · get_code("256df157025464e0") 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 kmeans_init_state. 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 chex
from jax import random
from typing import NamedTuple
class kmeans_init_state(NamedTuple):
centroids: chex.Array
points: chex.Array
key: chex.PRNGKey
# Set up a random key
key = random.PRNGKey(0)
# Create small test data
points = jnp.array([
[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0],
], dtype=jnp.float32)
# Initialize centroids with first point
centroids = jnp.array([
[1.0, 2.0, 3.0, 4.0],
[0.0, 0.0, 0.0, 0.0],
], dtype=jnp.float32)
# Create initial state
state = kmeans_init_state(
centroids=centroids,
points=points,
key=key
)
# Define arguments for add_centroid
ARGS = {
'i': 1,
'state': state
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type kmeans_init_state — a kmeans_init_state 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
|
| custom_cg |
Ran ran; our contract draft was wrong, not the code |
cambridge-mlg/sgd-gp/scalable_gps/custom_cg.py code served (permissive licence) · get_code("e516cb910a18d1c4") 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
import jax.numpy as jnp
import numpy as np
from functools import partial
# Set seed for reproducibility
np.random.seed(0)
# Create a small positive definite matrix for A
# Using a simple 4x4 symmetric positive definite matrix
A_matrix = np.array([
[4.0, 1.0, 0.5, 0.2],
[1.0, 3.5, 0.3, 0.1],
[0.5, 0.3, 3.0, 0.2],
[0.2, 0.1, 0.2, 2.5]
], dtype=np.float32)
# Create right-hand side vector
b_vector = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float32)
# Define A as a function (matrix-vector product)
def A_func(x):
return jnp.dot(A_matrix, x)
# Define initial guess
x0_vector = np.array([0.0, 0.0, 0.0, 0.0], dtype=np.float32)
# Define preconditioner M as identity (or a simple diagonal preconditioner)
def M_func(x):
return x
ARGS = {
'A': A_func,
'b': b_vector,
'x0': x0_vector,
'cg_state': None,
'tol': 1e-5,
'atol': 0.0,
'maxiter': 100,
'M': M_func,
}
- 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
|
| error |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
cambridge-mlg/sgd-gp/scalable_gps/linear_model.py code served (permissive licence) · get_code("e0776f5f9f8da068") 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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np
# Define a simple kernel function that takes two arrays and returns a matrix
def kernel_fn(x1: jnp.ndarray, x2: jnp.ndarray) -> jnp.ndarray:
"""Simple RBF-like kernel: computes pairwise distances"""
# x1 shape: (B, D), x2 shape: (N, D)
# Returns shape: (B, N)
x1_expanded = x1[:, np.newaxis, :] # (B, 1, D)
x2_expanded = x2[np.newaxis, :, :] # (1, N, D)
distances = jnp.sum((x1_expanded - x2_expanded) ** 2, axis=2) # (B, N)
return jnp.exp(-distances) # Gaussian kernel
# Set up small test data
N = 5 # total number of samples
B = 2 # batch size (number of indices)
D = 4 # feature dimension
M = 3 # parameter dimension (kernel output size matches N)
# Create JAX arrays
x = jnp.ones((N, D)) # (5, 4) - all training points
idx = jnp.array([0, 2]) # (2,) - indices into x for the batch
params = jnp.ones((N,)) # (5,) - parameters, one per training point
target = jnp.ones((N,)) # (5,) - target values for all points
ARGS = {
"params": params,
"idx": idx,
"x": x,
"target": target,
"kernel_fn": kernel_fn,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, 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
|
| fp_dicts_to_arr |
Ran ran, honoured the contract we drafted |
cambridge-mlg/sgd-gp/scalable_gps/fingerprint_utils.py code served (permissive licence) · get_code("902854c4bdd7e801") 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 2, dtype family float, shape (3, 8) 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
# Construct fingerprint dictionaries
# Each dict maps bit indices to counts/values
fp_dict_1 = {0: 2, 3: 1, 5: 3}
fp_dict_2 = {1: 1, 2: 2, 4: 1}
fp_dict_3 = {0: 1, 2: 1}
fp_dicts = [fp_dict_1, fp_dict_2, fp_dict_3]
ARGS = {
"fp_dicts": fp_dicts,
"nbits": 8,
"binarize": False,
}
- 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 2, dtype family float, shape (3, 8) — shape (3, 8) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| freeze_non_variational_params |
Ran ran; our contract draft was wrong, not the code |
cambridge-mlg/sgd-gp/scalable_gps/SVGP.py code served (permissive licence) · get_code("182f12ef71a39631") 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 ParameterState. 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
class ParameterState:
def __init__(self):
self.trainables = {
'variational_family': {
'mean': jnp.array([1.0, 2.0, 3.0, 4.0]),
'std': jnp.array([0.5, 0.6, 0.7, 0.8]),
},
'other_param_1': jnp.array([5.0, 6.0]),
'other_param_2': jnp.array([7.0, 8.0, 9.0]),
}
parameter_state = ParameterState()
ARGS = {
'parameter_state': parameter_state,
}
- 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 ParameterState — a ParameterState output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ParameterState 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
|
| generate_close_pair_dict |
Ran ran; our contract draft was wrong, not the code |
cambridge-mlg/sgd-gp/scalable_gps/knn.py code served (permissive licence) · get_code("5aff9dfc1a529f98") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
class MockAnnoyIndex:
"""Mock Annoy index that returns nearest neighbors"""
def __init__(self, data):
self.data = data
def get_nns_by_item(self, i, num_neighbours):
"""Return indices of nearest neighbors (including the item itself)"""
# Simple mock: return item itself plus next num_neighbours-1 items
indices = [i]
for j in range(len(self.data)):
if j != i and len(indices) < num_neighbours:
indices.append(j)
return indices
# Create small test data
num_points = 5
data_dim = 4
data = np.random.randn(num_points, data_dim).astype(np.float32)
# Create mock index
t = MockAnnoyIndex(data)
# Define arguments
ARGS = {
"data": data,
"t": t,
"num_points": num_points,
"num_neighbours": 3,
"max_dist": 2.0
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_concentrating_toy_sin_dataset |
Ran ran; our contract draft was wrong, not the code |
cambridge-mlg/sgd-gp/scalable_gps/data.py code served (permissive licence) · get_code("c95de35c70b9ab83") 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 jax.numpy as jnp
import jax.random as jr
ARGS = {
"seed": 42,
"n": 16,
"noise_scale": 0.1,
"n_test": 8,
"x_std": 1.0,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax — 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
|
| get_pruned_indices |
Ran ran, honoured the contract we drafted |
cambridge-mlg/sgd-gp/scalable_gps/knn.py code served (permissive licence) · get_code("bc4d5ad47891f330") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Analyzing the function:
# - close_pairs is a dict where:
# - keys are items (integers based on usage)
# - values are sets that support .intersection() and .difference()
# - The function accesses close_pairs[i] and close_pairs[n]
# - It calls len() on close_pairs[i]
# - It iterates over close_pairs[i] to get n values
# - Sets support .intersection(), .difference()
# Build a valid close_pairs dict with sets as values
close_pairs = {
0: {1, 2, 3}, # Multiple neighbors
1: {0, 2}, # Multiple neighbors
2: {0, 1, 3}, # Multiple neighbors
3: {0, 2}, # Multiple neighbors
4: {5}, # Single neighbor
5: set(), # No neighbors
}
ARGS = {
"close_pairs": close_pairs,
}
- 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 1, dtype family int — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_split_toy_sin_dataset |
Ran ran; our contract draft was wrong, not the code |
cambridge-mlg/sgd-gp/scalable_gps/data.py code served (permissive licence) · get_code("4eee6abddb7dac5c") 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 jax.numpy as jnp
import jax.random as jr
ARGS = {
"seed": 42,
"n": 16,
"noise_scale": 0.1,
"n_test": 8,
"x_std": 1.0,
"separation": 0.5,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax — 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
|
| hilbert_space_RMSE |
Ran ran, honoured the contract we drafted |
cambridge-mlg/sgd-gp/scalable_gps/eval_utils.py code served (permissive licence) · get_code("2bda1745f6d5e206") 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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Create small test arrays for the Hilbert space RMSE function
# x: true values (4-dimensional)
x = jnp.array([1.0, 2.0, 3.0, 4.0])
# x_hat: predicted values (4-dimensional, slightly different from x)
x_hat = jnp.array([1.1, 2.1, 2.9, 4.1])
# K: covariance matrix (4x4, symmetric positive definite)
# Create a simple covariance matrix
K = jnp.array([
[2.0, 0.5, 0.2, 0.1],
[0.5, 2.0, 0.3, 0.2],
[0.2, 0.3, 2.0, 0.4],
[0.1, 0.2, 0.4, 2.0]
])
ARGS = {
"x": x,
"x_hat": x_hat,
"K": K
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, 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
|
| i_error |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
cambridge-mlg/sgd-gp/scalable_gps/inducing_linear_model.py code served (permissive licence) · get_code("776edbdfc8352a25") 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 ArrayImpl, 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 jax
import jax.numpy as jnp
import chex
from typing import Callable
# Set seed for reproducibility
key = jax.random.PRNGKey(0)
# Define dimensions to be distinct
batch_size = 2 # B
num_samples = 4 # N
feature_dim = 3 # feature dimension for x and z
param_dim = 5 # dimension for params and z second dim
# Create params: shape (param_dim,)
params = jnp.ones(param_dim)
# Create idx: shape (batch_size,) - indices into x
idx = jnp.array([0, 1])
# Create x: shape (num_samples, feature_dim)
x = jnp.arange(num_samples * feature_dim, dtype=jnp.float32).reshape(num_samples, feature_dim)
# Create z: shape (param_dim, feature_dim)
z = jnp.arange(param_dim * feature_dim, dtype=jnp.float32).reshape(param_dim, feature_dim)
# Create target: shape (num_samples,)
target = jnp.ones(num_samples)
# Define kernel_fn: takes x[idx] of shape (batch_size, feature_dim)
# and z of shape (param_dim, feature_dim)
# Should return shape (batch_size, param_dim)
def kernel_fn(x_batch: jnp.ndarray, z_matrix: jnp.ndarray) -> jnp.ndarray:
# Simple dot product kernel
return jnp.dot(x_batch, z_matrix.T)
ARGS = {
"params": params,
"idx": idx,
"x": x,
"z": z,
"target": target,
"kernel_fn": kernel_fn,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, 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
|
| kmeanspp |
Ran ran on a synthesized input |
cambridge-mlg/sgd-gp/scalable_gps/kmeans.py code served (permissive licence) · get_code("8940eaaee4dd71b2") 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 ArrayImpl, ndim 2, dtype family float, shape (2, 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
import jax.numpy as jnp
from jax import random
# Set seed for reproducibility
key = random.PRNGKey(0)
# Create small sample data: 2 points with 4 dimensions each
points = jnp.array([
[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0]
], dtype=jnp.float32)
# Number of clusters
k = 2
ARGS = {
"points": points,
"key": key,
"k": k
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
|
| pred_space_RMSE |
Ran ran, violated the contract we drafted |
cambridge-mlg/sgd-gp/scalable_gps/eval_utils.py code served (permissive licence) · get_code("5eca356948077f17") 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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np
# Create small test arrays
np.random.seed(0)
# x: true values, shape (4,)
x = jnp.array([1.0, 2.0, 3.0, 4.0])
# x_hat: predicted values, same shape as x
x_hat = jnp.array([1.1, 2.1, 2.9, 3.95])
# K: covariance matrix, shape (4, 4)
K = jnp.array([
[1.0, 0.1, 0.0, 0.0],
[0.1, 1.0, 0.1, 0.0],
[0.0, 0.1, 1.0, 0.1],
[0.0, 0.0, 0.1, 1.0]
])
ARGS = {
"x": x,
"x_hat": x_hat,
"K": K
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, 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
|
| subsample |
Ran ran; our contract draft was wrong, not the code |
cambridge-mlg/sgd-gp/scalable_gps/data.py code served (permissive licence) · get_code("5e56bc4f20bb7af5") 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 Dataset. 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 jax.random as jr
from dataclasses import dataclass
from typing import Optional
import chex
@dataclass
class Dataset:
"""
Represents a dataset with input features (x) and corresponding labels (y).
Attributes:
x (Array): The input features of the dataset.
y (Array): The corresponding labels of the dataset.
N (int): The number of data points in the dataset.
D (int): The dimensionality of the input features.
Optional Attributes:
z (Optional[Array]): An optional array representing additional information associated with the dataset.
mu_x (Optional[Array]): An optional array representing the mean of the input features.
sigma_x (Optional[Array]): An optional array representing the standard deviation of the input features.
mu_y (Optional[Array]): An optional array representing the mean of the labels.
sigma_y (Optional[Array]): An optional array representing the standard deviation of the labels.
"""
x: chex.Array
y: chex.Array
N: int
D: int
z: Optional[chex.Array] = None
mu_x: Optional[chex.Array] = None
sigma_x: Optional[chex.Array] = None
mu_y: Optional[chex.Array] = None
sigma_y: Optional[chex.Array] = None
# Create a small dataset
key = jr.PRNGKey(0)
N = 100
D = 4
# Generate random data
x = jr.normal(key, (N, D))
y = jr.normal(jr.fold_in(key, 1), (N, 1))
# Create optional statistics
mu_x = jnp.mean(x, axis=0)
sigma_x = jnp.std(x, axis=0)
mu_y = jnp.mean(y, axis=0)
sigma_y = jnp.std(y, axis=0)
# Create dataset
ds = Dataset(
x=x,
y=y,
N=N,
D=D,
z=None,
mu_x=mu_x,
sigma_x=sigma_x,
mu_y=mu_y,
sigma_y=sigma_y
)
# Create PRNG key for subsample function
subsample_key = jr.PRNGKey(42)
ARGS = {
"key": subsample_key,
"ds": ds,
"n_subsample": 10
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset 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
|
| vector_quantize |
Ran ran, honoured the contract we drafted |
cambridge-mlg/sgd-gp/scalable_gps/kmeans.py code served (permissive licence) · get_code("f9ffe6a03a54afb0") 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 2, 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 jax
import jax.numpy as jnp
import chex
# Set up small test arrays
# points: shape (num_points, feature_dim) = (2, 4)
# centroids: shape (num_centroids, feature_dim) = (3, 4)
points = jnp.array([
[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0]
], dtype=jnp.float32)
centroids = jnp.array([
[0.0, 0.0, 0.0, 0.0],
[1.0, 1.0, 1.0, 1.0],
[10.0, 10.0, 10.0, 10.0]
], dtype=jnp.float32)
ARGS = {
"points": points,
"centroids": centroids
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- chex, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 2, 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
|
| i_error_grad_sample |
Not yet run unverified (harvested, no recorded run) |
cambridge-mlg/sgd-gp/scalable_gps/inducing_linear_model.py code served (permissive licence) · get_code("0f413768b7c2cd5a") How it ran |
| i_regularizer |
Not yet run unverified (harvested, no recorded run) |
cambridge-mlg/sgd-gp/scalable_gps/inducing_linear_model.py code served (permissive licence) · get_code("c92ac444fbedc857") How it ran |
| regularizer |
Not yet run unverified (harvested, no recorded run) |
cambridge-mlg/sgd-gp/scalable_gps/linear_model.py code served (permissive licence) · get_code("05b0c6b467ba7da1") How it ran |
| sample_from_qu |
Not yet run unverified (harvested, no recorded run) |
cambridge-mlg/sgd-gp/scalable_gps/SVGP.py code served (permissive licence) · get_code("e79e6d84397801b3") How it ran |