| Attention |
Ran ran on a synthesized input · constructed an object; no result was computed |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("bf3079228b4b66f8") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Attention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch import Tensor
torch.manual_seed(0)
# Define the required components
class Linear(nn.Module):
def __init__(self, in_dim, out_dim, bias=True, w_init='linear'):
super().__init__()
self.linear_layer = nn.Linear(in_dim, out_dim, bias=bias)
nn.init.xavier_uniform_(self.linear_layer.weight, gain=nn.init.calculate_gain(w_init))
def forward(self, x):
return self.linear_layer(x)
class MultiheadAttention(nn.Module):
def __init__(self, num_hidden_k):
super().__init__()
self.num_hidden_k = num_hidden_k
self.attn_dropout = nn.Dropout(p=0.1)
def forward(self, key, value, query):
attn = torch.bmm(query, key.transpose(1, 2))
attn = attn / (self.num_hidden_k ** 0.5)
attn = torch.softmax(attn, dim=-1)
attn = self.attn_dropout(attn)
output = torch.bmm(attn, value)
return (output, attn)
class Attention(nn.Module):
def __init__(self, num_hidden, n_heads=4):
super().__init__()
self.num_hidden = num_hidden
self.num_hidden_per_attn = num_hidden // n_heads
self.n_heads = n_heads
self.encoder_key = Linear(num_hidden, num_hidden, bias=False)
self.encoder_value = Linear(num_hidden, num_hidden, bias=False)
self.encoder_query = Linear(num_hidden, num_hidden, bias=False)
self.multihead = MultiheadAttention(self.num_hidden_per_attn)
self.residual_dropout = nn.Dropout(p=0.1)
self.final_linear = Linear(num_hidden * 2, num_hidden)
self.layer_norm = nn.LayerNorm(num_hidden)
def forward(self, key, value, query):
from einops import rearrange
pattern = 'b n (nh nhpa) -> (nh b) n nhpa'
key_enc = rearrange(self.encoder_key(key), pattern, nh=self.n_heads)
value_enc = rearrange(self.encoder_value(value), pattern, nh=self.n_heads)
query_enc = rearrange(self.encoder_query(query), pattern, nh=self.n_heads)
output, attns = self.multihead(key_enc, value_enc, query_enc)
output = rearrange(output, '(nh b) sq nhpa -> b sq (nh nhpa)', nh=self.n_heads)
output = torch.cat([query, output], dim=-1)
output = self.final_linear(output)
output = self.residual_dropout(output)
output += query
output = self.layer_norm(output)
return (output, attns)
# Create arguments for Attention
# num_hidden must be divisible by n_heads for the forward pass to work
num_hidden = 8
n_heads = 4
# Create the Attention module
attention_module = Attention(num_hidden=num_hidden, n_heads=n_heads)
# Create input tensors
# Shape: (batch_size, sequence_length, num_hidden)
batch_size = 2
seq_length = 3
key = torch.randn(batch_size, seq_length, num_hidden)
value = torch.randn(batch_size, seq_length, num_hidden)
query = torch.randn(batch_size, seq_length, num_hidden)
# Define ARGS dict for the Attention.__init__ parameters
ARGS = {
'num_hidden': num_hidden,
'n_heads': n_heads,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Attention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Attention 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
|
| DeterministicEncoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("5db7fd66cc15d4fe") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DeterministicEncoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from torch import Tensor
torch.manual_seed(0)
# Define the Linear class as it appears in the function
class Linear(nn.Module):
def __init__(self, in_dim, out_dim, bias=True, w_init='linear'):
super().__init__()
self.linear_layer = nn.Linear(in_dim, out_dim, bias=bias)
nn.init.xavier_uniform_(self.linear_layer.weight, gain=nn.init.calculate_gain(w_init))
def forward(self, x):
return self.linear_layer(x)
# Define the MultiheadAttention class as it appears in the function
class MultiheadAttention(nn.Module):
def __init__(self, num_hidden_k):
super().__init__()
self.num_hidden_k = num_hidden_k
self.attn_dropout = nn.Dropout(p=0.1)
def forward(self, key, value, query):
import math
attn = torch.bmm(query, key.transpose(1, 2))
attn = attn / math.sqrt(self.num_hidden_k)
attn = torch.softmax(attn, dim=-1)
attn = self.attn_dropout(attn)
output = torch.bmm(attn, value)
return (output, attn)
# Define the Attention class as it appears in the function
class Attention(nn.Module):
def __init__(self, num_hidden, n_heads=4):
super().__init__()
self.num_hidden = num_hidden
self.num_hidden_per_attn = num_hidden // n_heads
self.n_heads = n_heads
self.encoder_key = Linear(num_hidden, num_hidden, bias=False)
self.encoder_value = Linear(num_hidden, num_hidden, bias=False)
self.encoder_query = Linear(num_hidden, num_hidden, bias=False)
self.multihead = MultiheadAttention(self.num_hidden_per_attn)
self.residual_dropout = nn.Dropout(p=0.1)
self.final_linear = Linear(num_hidden * 2, num_hidden)
self.layer_norm = nn.LayerNorm(num_hidden)
def forward(self, key, value, query):
from einops import rearrange
pattern = 'b n (nh nhpa) -> (nh b) n nhpa'
key_enc = rearrange(self.encoder_key(key), pattern, nh=self.n_heads)
value_enc = rearrange(self.encoder_value(value), pattern, nh=self.n_heads)
query_enc = rearrange(self.encoder_query(query), pattern, nh=self.n_heads)
output, attns = self.multihead(key_enc, value_enc, query_enc)
output = rearrange(output, '(nh b) sq nhpa -> b sq (nh nhpa)', nh=self.n_heads)
output = torch.cat([query, output], dim=-1)
output = self.final_linear(output)
output = self.residual_dropout(output)
output += query
output = self.layer_norm(output)
return (output, attns)
# Set up arguments for DeterministicEncoder
num_hidden = 8
num_latent = 6
dim_x = 3
dim_y = 5
# Create sample tensors with distinct sizes to avoid ambiguity
batch_size = 2
num_context_points = 4
num_target_points = 3
context_x = torch.randn(batch_size, num_context_points, dim_x)
context_y = torch.randn(batch_size, num_context_points, dim_y)
target_x = torch.randn(batch_size, num_target_points, dim_x)
ARGS = {
'num_hidden': num_hidden,
'num_latent': num_latent,
'dim_x': dim_x,
'dim_y': dim_y,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DeterministicEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DeterministicEncoder 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
|
| LatentEncoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("868f64d33b0f779e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, LatentEncoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from einops import rearrange, reduce
import math
torch.manual_seed(0)
class Linear(nn.Module):
def __init__(self, in_dim, out_dim, bias=True, w_init='linear'):
super().__init__()
self.linear_layer = nn.Linear(in_dim, out_dim, bias=bias)
nn.init.xavier_uniform_(self.linear_layer.weight, gain=nn.init.calculate_gain(w_init))
def forward(self, x):
return self.linear_layer(x)
class MultiheadAttention(nn.Module):
def __init__(self, num_hidden_k):
super().__init__()
self.num_hidden_k = num_hidden_k
self.attn_dropout = nn.Dropout(p=0.1)
def forward(self, key, value, query):
attn = torch.bmm(query, key.transpose(1, 2))
attn = attn / math.sqrt(self.num_hidden_k)
attn = torch.softmax(attn, dim=-1)
attn = self.attn_dropout(attn)
output = torch.bmm(attn, value)
return (output, attn)
class Attention(nn.Module):
def __init__(self, num_hidden, n_heads=4):
super().__init__()
self.num_hidden = num_hidden
self.num_hidden_per_attn = num_hidden // n_heads
self.n_heads = n_heads
self.encoder_key = Linear(num_hidden, num_hidden, bias=False)
self.encoder_value = Linear(num_hidden, num_hidden, bias=False)
self.encoder_query = Linear(num_hidden, num_hidden, bias=False)
self.multihead = MultiheadAttention(self.num_hidden_per_attn)
self.residual_dropout = nn.Dropout(p=0.1)
self.final_linear = Linear(num_hidden * 2, num_hidden)
self.layer_norm = nn.LayerNorm(num_hidden)
def forward(self, key, value, query):
pattern = 'b n (nh nhpa) -> (nh b) n nhpa'
key_enc = rearrange(self.encoder_key(key), pattern, nh=self.n_heads)
value_enc = rearrange(self.encoder_value(value), pattern, nh=self.n_heads)
query_enc = rearrange(self.encoder_query(query), pattern, nh=self.n_heads)
output, attns = self.multihead(key_enc, value_enc, query_enc)
output = rearrange(output, '(nh b) sq nhpa -> b sq (nh nhpa)', nh=self.n_heads)
output = torch.cat([query, output], dim=-1)
output = self.final_linear(output)
output = self.residual_dropout(output)
output += query
output = self.layer_norm(output)
return (output, attns)
class LatentEncoder(nn.Module):
def __init__(self, num_hidden, num_latent, dim_x, dim_y):
super().__init__()
input_dim = dim_x + dim_y
self.input_projection = Linear(input_dim, num_hidden)
self.self_attentions = nn.ModuleList([Attention(num_hidden) for _ in range(2)])
self.penultimate_layer = Linear(num_hidden, num_hidden, w_init='relu')
self.mu = Linear(num_hidden, num_latent)
self.log_sigma = Linear(num_hidden, num_latent)
def forward(self, x, y):
encoder_input = torch.cat([x, y], dim=-1)
encoder_input = self.input_projection(encoder_input)
for attention in self.self_attentions:
encoder_input, _ = attention(encoder_input, encoder_input, encoder_input)
hidden = encoder_input.mean(dim=1)
hidden = torch.relu(self.penultimate_layer(hidden))
mu = self.mu(hidden)
log_sigma = self.log_sigma(hidden)
std = torch.exp(0.5 * log_sigma)
eps = torch.randn_like(std)
z = eps.mul(std).add_(mu)
return (mu, log_sigma, z)
# Setup arguments
ARGS = {
'num_hidden': 8,
'num_latent': 3,
'dim_x': 4,
'dim_y': 5,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type LatentEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LatentEncoder 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
|
| Linear |
Ran ran on a synthesized input · constructed an object; no result was computed |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("0c114347b4d5b3e6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Linear: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
ARGS = {
'in_dim': 4,
'out_dim': 3,
'bias': True,
'w_init': 'linear'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Linear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Linear output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MultiheadAttention |
Ran ran on a synthesized input · constructed an object; no result was computed |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("fc456591ed6ce764") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MultiheadAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from torch import nn
import math
torch.manual_seed(0)
# Construct the model
model = nn.Module()
# Define ARGS for the forward method
# The forward method expects: key, value, query
# All should be tensors with compatible shapes for the operations
batch_size = 2
num_hidden_k = 4
seq_len_k = 3
seq_len_q = 5
# query shape: (batch, seq_len_q, num_hidden_k)
query = torch.randn(batch_size, seq_len_q, num_hidden_k)
# key shape: (batch, seq_len_k, num_hidden_k)
key = torch.randn(batch_size, seq_len_k, num_hidden_k)
# value shape: (batch, seq_len_k, num_hidden_k)
value = torch.randn(batch_size, seq_len_k, num_hidden_k)
ARGS = {
"num_hidden_k": num_hidden_k,
}
# Also prepare forward pass arguments for testing
FORWARD_ARGS = {
"key": key,
"value": value,
"query": query,
}
- 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 MultiheadAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultiheadAttention 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_second_deriv_mat |
Ran ran, honoured the contract we drafted |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("f90ab48d1192a606") 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 (3, 5) 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)
# The function _get_second_deriv_mat takes a single parameter nx (number of points)
# It creates an identity matrix of size nx x nx, then constructs a second derivative
# matrix by stacking three slices of the identity matrix with different offsets
nx = 5
ARGS = {
"nx": nx,
}
- 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 (3, 5) — shape (3, 5) 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_second_derivative_var |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("5edc3fc22a03e116") 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 4, dtype family float, shape (2, 3, 3, 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
torch.manual_seed(0)
# The function expects a tensor with shape (nf, nt, nx, _)
# where nf, nt, nx are extracted and the last dimension is implicit
# The function slices along dimension 2 (nx dimension) using :-2, 1:-1, and 2:
# So we need at least 3 elements in the nx dimension to make this work
# Let's use shape (2, 3, 5, 4) for (nf, nt, nx, last_dim)
cov = torch.randn(2, 3, 5, 4)
ARGS = {
"cov": cov,
"alpha": 0.5,
}
- 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 4, dtype family float, shape (2, 3, 3, 4) — shape (2, 3, 3, 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
|
| apply_non_linear_ineq_constraint |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("862c973a482ccbe4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, 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
torch.manual_seed(0)
# Create small tensors with distinct dimensions
# new_mu shape: (nf, nt, nx, 1) where nf=2, nt=3, nx=4
nf, nt, nx = 2, 3, 4
new_mu = torch.randn(nf, nt, nx, 1)
# new_cov shape: (nf, nt, nx, nx) - covariance matrices must be positive definite
# Create positive definite matrices by A @ A.T
new_cov_list = []
for _ in range(nf):
cov_t_list = []
for _ in range(nt):
A = torch.randn(nx, nx)
cov_matrix = A @ A.T + torch.eye(nx) * 0.1 # Add identity for stability
cov_t_list.append(cov_matrix)
new_cov_list.append(torch.stack(cov_t_list, dim=0))
new_cov = torch.stack(new_cov_list, dim=0)
# Initialize the global dict for caching diff matrices
import sys
current_module = sys.modules[__name__]
current_module._diff_matrices = {}
ARGS = {
'new_mu': new_mu,
'new_cov': new_cov,
'tol': 1e-08,
'max_iter': 1,
'mode': 'monotone'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- einops, numpy, scipy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
- 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_cov_tilde_as_projection |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("ebfa11fc11be9ee2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 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
from einops import rearrange, reduce
torch.manual_seed(0)
# Create a small variance tensor with shape (n, nt, nx, 1)
# n=2 (batch), nt=3 (time steps), nx=4 (spatial/feature dimension)
variance = torch.randn(2, 3, 4, 1).abs() + 0.1 # Add small constant to ensure positive variance
ARGS = {
"variance": variance
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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_mu_tilde_as_projection |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("d80230f4a8355b1f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 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
from einops import rearrange, reduce
torch.manual_seed(0)
# Create small tensors with shape (n, nt, nx, 1)
# Using distinct sizes: n=2, nt=3, nx=4, last_dim=1
mu = torch.randn(2, 3, 4, 1)
variance = torch.randn(2, 3, 4, 1).abs() + 0.1 # ensure positive for variance
ARGS = {
"mu": mu,
"variance": variance,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- einops, 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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
|
| ANP |
Not yet run unverified (harvested, no recorded run) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("cf283110e1c4d57c") How it ran |
| Decoder |
Not yet run unverified (harvested, no recorded run) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("4d1194aa0f452075") How it ran |
| PhysNP |
Not yet run unverified (harvested, no recorded run) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("8ac5d2eae63272ef") How it ran |
| _apply_g |
Not yet run unverified (harvested, no recorded run) |
amazon-science/probconserv/deep_pdes/attentive_neural_process/probconserv.py code served (permissive licence) · get_code("cb5f9cc3ba938241") How it ran |