| comp_list_to_lnpdf |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/components.py code served (permissive licence) · get_code("b2a5368072b67c7a") 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 autograd.numpy as np
class Component:
"""Stand-in component class with required methods for Gaussian mixture model"""
def __init__(self, D, mean_vec, cov_mat):
self.D = D
self._mean = mean_vec
self._cov = cov_mat
self._icov = np.linalg.inv(cov_mat)
self._lndet = np.log(np.linalg.det(cov_mat))
# Cholesky decomposition of covariance
self._chol = np.linalg.cholesky(cov_mat)
def mean(self):
return self._mean
def cov(self):
return self._cov
def icov(self):
return self._icov
def lndet(self):
return self._lndet
def cholesky(self):
return self._chol
class MockMog:
"""Mock mog module with required functions"""
@staticmethod
def mog_logprob(z, means, icovs, lndets, pis):
"""Compute log probability for mixture of gaussians"""
return np.sum(np.log(pis)) if z is not None else 0.0
@staticmethod
def mog_samples(n, means, chols, pis):
"""Generate samples from mixture of gaussians"""
return np.random.randn(n, means.shape[1])
# Create mock mog module
import sys
import types
mog = types.ModuleType('mog')
mog.mog_logprob = MockMog.mog_logprob
mog.mog_samples = MockMog.mog_samples
sys.modules['mog'] = mog
# Create component list with valid Gaussian components
D = 4
comp1_mean = np.array([1.0, 2.0, 3.0, 4.0])
comp1_cov = np.eye(D) * 0.5
comp1 = Component(D, comp1_mean, comp1_cov)
comp2_mean = np.array([2.0, 3.0, 4.0, 5.0])
comp2_cov = np.eye(D) * 0.7
comp2 = Component(D, comp2_mean, comp2_cov)
# Create component list: list of (pi, component) tuples
# pi values represent mixture weights (should sum to 1.0)
comp_list = [
(0.4, comp1),
(0.6, comp2),
]
ARGS = {
'comp_list': comp_list,
'normalized': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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
|
| comp_list_to_matrices |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/components.py code served (permissive licence) · get_code("49ed24a857423342") 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 autograd.numpy as np
class Component:
"""Stand-in component class with required methods."""
def __init__(self, D, mean_val, cov_val, icov_val, lndet_val, chol_val):
self.D = D
self._mean = mean_val
self._cov = cov_val
self._icov = icov_val
self._lndet = lndet_val
self._chol = chol_val
def mean(self):
return self._mean
def cov(self):
return self._cov
def icov(self):
return self._icov
def lndet(self):
return self._lndet
def cholesky(self):
return self._chol
# Create component list with (pi, component) tuples
D = 4
comp1_mean = np.array([1.0, 2.0, 3.0, 4.0])
comp1_cov = np.eye(D)
comp1_icov = np.eye(D)
comp1_lndet = 0.0
comp1_chol = np.eye(D)
comp2_mean = np.array([5.0, 6.0, 7.0, 8.0])
comp2_cov = np.eye(D) * 2.0
comp2_icov = np.eye(D) / 2.0
comp2_lndet = np.log(2.0) * D
comp2_chol = np.eye(D) * np.sqrt(2.0)
component1 = Component(D, comp1_mean, comp1_cov, comp1_icov, comp1_lndet, comp1_chol)
component2 = Component(D, comp2_mean, comp2_cov, comp2_icov, comp2_lndet, comp2_chol)
pi1 = 0.6
pi2 = 0.4
comp_list = [
(pi1, component1),
(pi2, component2)
]
ARGS = {
'comp_list': comp_list
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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
|
| logit |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/misc.py code served (permissive licence) · get_code("6484ceeef4eab518") 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 autograd.numpy as np
def logit(a):
return np.log(a) - np.log(1 - a)
# Create a small valid input for logit
# The function expects a value between 0 and 1 (exclusive)
# since log(a) and log(1-a) require a > 0 and 1-a > 0
a_value = np.array([0.2, 0.5, 0.7, 0.9])
ARGS = {
"a": a_value
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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
|
| make_covariance_scatterplot |
Ran ran on a synthesized input |
andymiller/vboost/code/baseball_viz.py code served (permissive licence) · get_code("6c93f42f8110c8bb") 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 Axes. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
import matplotlib.pyplot as plt
# Create a mock chain recarray with the required fields
# The function expects chain to have 'logit_phi', 'log_kappa', and 'logit_theta' fields
n_samples = 50
chain = np.zeros(n_samples, dtype=[('logit_phi', float), ('log_kappa', float), ('logit_theta', float)])
chain['logit_phi'] = np.random.randn(n_samples)
chain['log_kappa'] = np.random.randn(n_samples)
chain['logit_theta'] = np.random.randn(n_samples)
# Create a qcov covariance matrix (3x3 since we have 3 parameters)
# This should be a valid covariance matrix
qcov = np.array([
[1.2, 0.1, 0.05],
[0.1, 0.8, 0.02],
[0.05, 0.02, 0.9]
])
# Create a matplotlib axis
fig, ax = plt.subplots(figsize=(6, 6))
ARGS = {
'chain': chain,
'qcov': qcov,
'ax': ax,
'do_variance': False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Axes — a Axes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Axes 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
|
| make_param_unpacker |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/components.py code served (permissive licence) · get_code("4c6d2556907239b4") 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 autograd.numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Define small dimensions with distinct sizes
D = 5 # dimension of posterior
rank = 3 # number of ranks
# Create optional clamped parameters
clamped_m = np.ones(D) * 0.1 # D-dim array for clamped mean
clamped_v = np.ones(D) * -1.0 # D-dim array for clamped log diagonal
clamped_C = np.random.randn(D, 1) # D x num_clamped_ranks array (1 clamped rank)
ARGS = {
'D': D,
'rank': rank,
'clamped_m': clamped_m,
'clamped_v': clamped_v,
'clamped_C': clamped_C,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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
|
| mog_samples |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/mog.py code served (permissive licence) · get_code("5f4be04c07d2a968") 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 (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 autograd.numpy as np
import autograd.numpy.random as npr
# Set seed for reproducibility
npr.seed(0)
# Define parameters for mog_samples
N = 2 # number of samples
K = 3 # number of mixture components
D = 4 # dimensionality
# means: shape (K, D) - means of each Gaussian component
means = np.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]
], dtype=np.float64)
# chols: shape (K, D, D) - Cholesky decompositions for each component
chols = np.array([
[[1.0, 0.0, 0.0, 0.0],
[0.1, 1.0, 0.0, 0.0],
[0.2, 0.1, 1.0, 0.0],
[0.3, 0.2, 0.1, 1.0]],
[[1.0, 0.0, 0.0, 0.0],
[0.05, 1.0, 0.0, 0.0],
[0.1, 0.05, 1.0, 0.0],
[0.15, 0.1, 0.05, 1.0]],
[[1.0, 0.0, 0.0, 0.0],
[0.2, 1.0, 0.0, 0.0],
[0.3, 0.2, 1.0, 0.0],
[0.4, 0.3, 0.2, 1.0]]
], dtype=np.float64)
# pis: shape (K,) - mixture weights that sum to 1
pis = np.array([0.2, 0.3, 0.5], dtype=np.float64)
ARGS = {
'N': N,
'means': means,
'chols': chols,
'pis': pis
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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 (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
|
| mvn_diag_logpdf |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/misc.py code served (permissive licence) · get_code("c41e2ac7137e2d8a") 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 (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 autograd.numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Create small test data
batch_size = 2
dim = 4
# x: shape (batch_size, dim) - points at which to evaluate the log pdf
x = np.random.randn(batch_size, dim)
# mean: shape (dim,) - mean of the multivariate normal
mean = np.random.randn(dim)
# log_std: shape (dim,) - log of standard deviations (diagonal covariance)
log_std = np.random.randn(dim)
ARGS = {
"x": x,
"mean": mean,
"log_std": log_std,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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 (2,) — shape (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
|
| mvn_lowrank_entropy |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/lowr_mvn.py code served (permissive licence) · get_code("6aa8d5fea9d80c7d") 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 float64, ndim 0, 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 autograd.numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Create test data
# C: shape (D, r) - low-rank factor matrix
# lns_diag: shape (D,) - log of diagonal variances
D = 4 # dimension
r = 2 # rank of low-rank component
# Create a small low-rank matrix C
C = np.random.randn(D, r).astype(np.float64)
# Create log-diagonal terms (these should be real-valued)
lns_diag = np.random.randn(D).astype(np.float64)
ARGS = {
"C": C,
"lns_diag": lns_diag,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
- 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
|
| mvn_lowrank_logpdf |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/lowr_mvn.py code served (permissive licence) · get_code("3a675ed8b41a7042") 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 (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 autograd.numpy as np
# Set seed for reproducibility
np.random.seed(0)
# Define dimensions
D = 4 # dimensionality of the data
r = 2 # rank of low-rank component
batch_size = 2 # number of samples
# Create arguments for mvn_lowrank_logpdf(x, mean, C, s_diag)
x = np.random.randn(batch_size, D).astype(np.float64)
mean = np.random.randn(D).astype(np.float64)
C = np.random.randn(D, r).astype(np.float64)
s_diag = np.random.randn(D).astype(np.float64)
ARGS = {
"x": x,
"mean": mean,
"C": C,
"s_diag": s_diag
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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 (2,) — shape (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
|
| mvn_lowrank_sample |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/lowr_mvn.py code served (permissive licence) · get_code("b0a4d16e077f1992") 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 (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 autograd.numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Define dimensions
D = 4 # dimension of the multivariate normal
r = 3 # rank of the low-rank component
num_samps = 2 # number of samples
# Create mu: mean vector of shape (D,)
mu = np.array([0.1, 0.2, 0.3, 0.4])
# Create C: low-rank matrix of shape (D, r)
C = np.random.randn(D, r)
# Create v: log-variance vector of shape (D,)
v = np.array([-1.0, -0.5, 0.0, 0.5])
# Create eps_lowr: low-rank noise of shape (num_samps, r)
eps_lowr = np.random.randn(num_samps, r)
# Create eps_diag: diagonal noise of shape (num_samps, D)
eps_diag = np.random.randn(num_samps, D)
ARGS = {
'num_samps': num_samps,
'mu': mu,
'C': C,
'v': v,
'eps_lowr': eps_lowr,
'eps_diag': eps_diag,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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 (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
|
| sigmoid |
Ran ran on a synthesized input |
andymiller/vboost/code/vbproj/vi/vboost/misc.py code served (permissive licence) · get_code("ee2be3a29cd908e3") 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 (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 autograd.numpy as np
def sigmoid(a):
return 1.0 / (1.0 + np.exp(-a))
# Construct valid arguments for sigmoid function
# The function takes a single parameter 'a' which should be a numeric array or scalar
# and returns the sigmoid transformation
# Create a small array as input
input_array = np.array([[-2.0, -1.0, 0.0, 1.0],
[2.0, 0.5, -0.5, 1.5]])
ARGS = {
'a': input_array
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- autograd — 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 (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
|
| mixture_of_ts_samples |
Not yet run unverified (harvested, no recorded run) |
andymiller/vboost/code/vbproj/vi/vboost/mixtures.py code served (permissive licence) · get_code("0ead379d04f1dc7c") How it ran |