| sigmoid_rampup |
Ran ran, honoured the contract we drafted |
z-jianxin/llpfc/llpvatlib/train_fun.py code served (permissive licence) · get_code("3fb68ed6809a8085") How it ranRan in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T23:27:05Z). 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
# The function sigmoid_rampup takes two parameters:
# - current: a numeric value representing the current step/epoch
# - rampup_length: a numeric value representing the total rampup length
ARGS = {
"current": 5,
"rampup_length": 10
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, 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
|
| compute_forward_loss_on_minibatch |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfclib/train_fun.py code served (permissive licence) · get_code("8dfaa29133b7b53e") 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 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 torch.nn as nn
torch.manual_seed(0)
# Create a simple model that takes images and outputs logits
class SimpleModel(nn.Module):
def __init__(self, input_size, num_classes):
super().__init__()
self.fc = nn.Linear(input_size, num_classes)
def forward(self, x):
# Flatten if needed and pass through linear layer
x = x.view(x.size(0), -1)
return self.fc(x)
# Create a simple loss function that takes prob_corrected, noisy_y, weights, and device
def simple_loss_f(prob_corrected, noisy_y, weights, device):
# Compute weighted cross entropy loss
log_prob = torch.log(prob_corrected + 1e-8)
loss = -torch.sum(weights.unsqueeze(1) * noisy_y * log_prob) / weights.sum()
return loss
# Setup parameters
batch_size = 2
image_channels = 1
image_height = 4
image_width = 4
num_classes = 3
device = 'cpu'
# Create model
model = SimpleModel(input_size=image_channels * image_height * image_width, num_classes=num_classes)
model = model.to(device)
# Create loss function
loss_f = simple_loss_f
# Create images tensor (batch_size, channels, height, width)
images = torch.randn(batch_size, image_channels, image_height, image_width)
# Create noisy_y tensor (batch_size, num_classes) - soft labels
noisy_y = torch.softmax(torch.randn(batch_size, num_classes), dim=1)
# Create transition matrix (batch_size, num_classes, num_classes)
trans_m = torch.eye(num_classes).unsqueeze(0).repeat(batch_size, 1, 1)
trans_m = trans_m + torch.randn(batch_size, num_classes, num_classes) * 0.01
trans_m = torch.softmax(trans_m, dim=2)
# Create weights tensor (batch_size,)
weights = torch.ones(batch_size)
ARGS = {
'model': model,
'loss_f': loss_f,
'images': images,
'noisy_y': noisy_y,
'trans_m': trans_m,
'weights': weights,
'device': device
}
- 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 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
|
| compute_gen_loss |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpganlib/train_fun.py code served (permissive licence) · get_code("998ed6c7658f52b1") 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 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 torch.nn as nn
from torch.nn.functional import mse_loss
torch.manual_seed(0)
# Build a minimal discriminator that returns (outputs, features)
class MinimalDiscriminator(nn.Module):
def __init__(self):
super().__init__()
self.conv = nn.Conv2d(3, 8, kernel_size=3, padding=1)
self.fc = nn.Linear(8 * 4 * 4, 1)
def forward(self, x):
# x shape: (batch, channel, height, width)
features = self.conv(x) # (batch, 8, 4, 4)
features_flat = features.view(features.size(0), -1) # (batch, 128)
outputs = self.fc(features_flat) # (batch, 1)
return outputs, features_flat
dis = MinimalDiscriminator()
# Create true_images with shape (batch_size=2, bag_size=3, channel=3, height=4, width=4)
true_images = torch.randn(2, 3, 3, 4, 4)
# Create fake_images with shape (batch_size*bag_size, channel, height, width) = (6, 3, 4, 4)
fake_images = torch.randn(6, 3, 4, 4)
ARGS = {
"dis": dis,
"true_images": true_images,
"fake_images": fake_images
}
- 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 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
|
| get_rampup_weight |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpvatlib/train_fun.py code served (permissive licence) · get_code("558f680b9d5b46c5") 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 float, 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 numpy as np
ARGS = {
"weight": 0.5,
"iteration": 10,
"rampup": 100
}
- 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 float, 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
|
| loss_f |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfc.py code served (permissive licence) · get_code("4f39307b536dbec8") 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 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 torch.nn as nn
torch.manual_seed(0)
# x: must satisfy simplex constraint (probabilities that sum to 1 across last dim)
# Batch size 2, 4 classes
x = torch.tensor([
[0.1, 0.2, 0.3, 0.4],
[0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)
# y: class indices for NLL loss
# Batch size 2, values must be in [0, 3] (class indices)
y = torch.tensor([3, 1], dtype=torch.long)
# weights: must be broadcastable with unweighted loss (batch size 2)
# and support .sum() and division
weights = torch.tensor([1.0, 2.0], dtype=torch.float32)
# device: CPU
device = torch.device('cpu')
ARGS = {
'x': x,
'y': y,
'weights': weights,
'device': device,
'epsilon': 1e-08
}
- 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 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
|
| loss_f_test |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfc.py code served (permissive licence) · get_code("bfd8a6f20ee6eba2") 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 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 torch.nn as nn
torch.manual_seed(0)
# Create small tensors for x and y
# x should be probabilities (values between 0 and 1)
# y should be class indices (long tensor)
batch_size = 2
num_classes = 4
x = torch.rand(batch_size, num_classes) # Shape: (2, 4), values in [0, 1]
y = torch.tensor([0, 2], dtype=torch.long) # Shape: (2,), class indices
device = torch.device('cpu')
ARGS = {
'x': x,
'y': y,
'device': device,
'epsilon': 1e-08
}
- 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 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
|
| loss_f_val |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfc.py code served (permissive licence) · get_code("84f530af9f2aade8") 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 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 torch.nn as nn
torch.manual_seed(0)
# x must satisfy simplex constraint: non-negative, sum to 1 along last dimension
# Shape: (batch_size, num_classes)
x = torch.tensor([
[0.1, 0.2, 0.3, 0.4],
[0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)
# y are class indices for nll_loss
# Shape: (batch_size,)
y = torch.tensor([0, 3], dtype=torch.long)
# weights for scaling the loss
# Shape: (batch_size,)
weights = torch.tensor([1.0, 2.0], dtype=torch.float32)
device = 'cpu'
ARGS = {
'x': x,
'y': y,
'weights': weights,
'device': device,
'epsilon': 1e-08
}
- 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 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
|
| make_a_group |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfclib/make_groups.py code served (permissive licence) · get_code("4594f9125bd3a7ab") 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
import random
from unittest.mock import Mock
# Set random seed for reproducibility
random.seed(0)
np.random.seed(0)
# Create a simple logger mock
class SimpleLogger:
def warning(self, msg):
pass
logger = SimpleLogger()
# Set up parameters for make_a_group
num_classes = 3
# Create a clean prior (probability distribution over classes)
clean_prior = np.array([0.5, 0.3, 0.2])
# Create bag_ids - list of identifiers for bags
bag_ids = list(range(10))
# Create bag2prop - mapping from bag_id to class proportions
# Each bag has a proportion vector of length num_classes
bag2prop = {}
for bag_id in bag_ids:
# Random proportions that sum to 1
props = np.random.rand(num_classes)
props = props / np.sum(props)
bag2prop[bag_id] = props
# Choose noisy prior method
noisy_prior_choice = 'approx'
ARGS = {
'num_classes': num_classes,
'clean_prior': clean_prior,
'bag_ids': bag_ids,
'bag2prop': bag2prop,
'noisy_prior_choice': noisy_prior_choice,
'logger': logger
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, scipy — 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
|
| test_llpgan |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpganlib/train_fun.py code served (permissive licence) · get_code("9383576c11fa6d1b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Define a small model that matches the usage in test_llpgan
class SmallLLPGAN(nn.Module):
def __init__(self):
super().__init__()
self.fc = nn.Linear(4, 3) # 4 input features, 3 output classes
def forward(self, x):
outputs = self.fc(x)
# Return outputs and a dummy second value (underscore in function)
return outputs, torch.tensor([])
# Create model
model = SmallLLPGAN()
# Create a small test loader (list of (images, labels) tuples)
test_loader = [
(torch.randn(2, 4), torch.randint(0, 3, (2,))),
(torch.randn(2, 4), torch.randint(0, 3, (2,)))
]
# Create a simple criterion that takes (prob, labels, device)
class SimpleCriterion(nn.Module):
def __init__(self):
super().__init__()
def forward(self, prob, labels, device):
# Compute cross entropy loss
log_prob = torch.log(prob + 1e-10)
loss = -log_prob.gather(1, labels.unsqueeze(1)).mean()
return loss
criterion = SimpleCriterion()
# Set device to CPU
device = torch.device('cpu')
ARGS = {
'model': model,
'test_loader': test_loader,
'criterion': criterion,
'device': device
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| test_model |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfclib/train_fun.py code served (permissive licence) · get_code("735ff4fe221938e9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Define a small model
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.fc = nn.Linear(4, 3)
def forward(self, x):
return self.fc(x)
# Create model
model = SimpleModel()
# Create test_loader as list of (images, labels) tuples
# Batch size 2, image dimension 4, 3 classes
test_loader = [
(torch.randn(2, 4), torch.tensor([0, 1])),
(torch.randn(2, 4), torch.tensor([2, 0])),
]
# Define a custom criterion that matches the function's usage
class CustomCriterion(nn.Module):
def forward(self, prob, labels, device):
# prob is softmax output, labels are targets
# Return a scalar loss
return -torch.sum(prob[torch.arange(len(labels)), labels])
criterion = CustomCriterion()
# Device (CPU only)
device = torch.device('cpu')
ARGS = {
'model': model,
'test_loader': test_loader,
'criterion': criterion,
'device': device,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| truncate_data_group |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfclib/utils.py code served (permissive licence) · get_code("7316381140a2a51d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Construct x: feature tensor (batch_size=2, features=4)
x = torch.randn(2, 4)
# Construct y: target tensor (batch_size=2)
y = torch.randn(2)
# Construct instance2group: dict mapping instance index to group id
# Use -1 to indicate instances to be filtered out, and valid group ids otherwise
instance2group = {0: 0, 1: -1}
ARGS = {
"x": x,
"y": y,
"instance2group": instance2group,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| validate_model_forward |
Ran ran on a synthesized input |
z-jianxin/llpfc/llpfclib/train_fun.py code served (permissive licence) · get_code("257860ac14515f2f") 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 float, 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 torch.nn as nn
torch.manual_seed(0)
# Define a simple model that takes images and outputs logits
class SimpleModel(nn.Module):
def __init__(self, num_classes=3):
super().__init__()
self.fc = nn.Linear(4, num_classes)
def forward(self, x):
return self.fc(x)
# Define a custom loss function that matches the signature used
def custom_loss_f(prob_corrected, noisy_y, weights, device):
# Weighted cross-entropy-like loss
return (prob_corrected.sum() * weights.sum()).mean()
# Create tiny test data
batch_size = 2
num_classes = 3
input_dim = 4
# Create validation loader: list of (images, noisy_y, trans_m, weights)
val_loader = []
for _ in range(2):
images = torch.randn(batch_size, input_dim)
noisy_y = torch.randint(0, num_classes, (batch_size,))
trans_m = torch.eye(num_classes).unsqueeze(0).repeat(batch_size, 1, 1)
weights = torch.ones(batch_size)
val_loader.append((images, noisy_y, trans_m, weights))
# Create model and loss function
model = SimpleModel(num_classes=num_classes)
loss_f_val = custom_loss_f
device = "cpu"
ARGS = {
"model": model,
"loss_f_val": loss_f_val,
"val_loader": val_loader,
"device": device,
}
- 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 float, 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
|
| validate_model_kl |
Ran ran on a synthesized input |
z-jianxin/llpfc/kllib/train_fun.py code served (permissive licence) · get_code("fab18262bd7c9aa6") 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 float, 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 torch.nn as nn
torch.manual_seed(0)
# Create a simple model that takes images and outputs logits
class SimpleModel(nn.Module):
def __init__(self, num_classes=5):
super().__init__()
self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
self.global_pool = nn.AdaptiveAvgPool2d(1)
self.fc = nn.Linear(8, num_classes)
def forward(self, x):
x = self.conv1(x)
x = self.global_pool(x)
x = x.view(x.size(0), -1)
x = self.fc(x)
return x
# Create model
model = SimpleModel(num_classes=5)
# Create a simple data loader with (images, props) tuples
# images shape: (batch_size=2, bag_size=3, channels=3, height=4, width=4)
# props shape: (batch_size=2, num_classes=5)
batch_size = 2
bag_size = 3
channels = 3
height = 4
width = 4
num_classes = 5
val_loader = []
for _ in range(2):
images = torch.randn(batch_size, bag_size, channels, height, width)
props = torch.nn.functional.softmax(torch.randn(batch_size, num_classes), dim=-1)
val_loader.append((images, props))
# Device is CPU
device = 'cpu'
ARGS = {
'model': model,
'val_loader': val_loader,
'device': device,
}
- 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 float, 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
|
| approx_noisy_prior |
Not yet run unverified (harvested, no recorded run) |
z-jianxin/llpfc/llpfclib/make_groups.py code served (permissive licence) · get_code("1dd7d15d0579ec92") How it ran |
| compute_dis_loss |
Not yet run unverified (harvested, no recorded run) |
z-jianxin/llpfc/llpganlib/train_fun.py code served (permissive licence) · get_code("aa4ce400bd6bb308") How it ran |
| compute_kl_loss_on_bagbatch |
Not yet run unverified (harvested, no recorded run) |
z-jianxin/llpfc/kllib/train_fun.py code served (permissive licence) · get_code("32690d2d1696b286") How it ran |
| make_bags_counts |
Not yet run unverified (harvested, no recorded run) |
z-jianxin/llpfc/llpfclib/make_bags.py code served (permissive licence) · get_code("e4b4fecc775f1957") How it ran |
| make_bags_dirichlet |
Not yet run unverified (harvested, no recorded run) |
z-jianxin/llpfc/llpfclib/make_bags.py code served (permissive licence) · get_code("46a69e93d1e82f52") How it ran |
| make_bags_uniform |
Not yet run unverified (harvested, no recorded run) |
z-jianxin/llpfc/llpfclib/make_bags.py code served (permissive licence) · get_code("e8b1a9a1c3eb655f") How it ran |
| merge_bags |
Not yet run unverified (harvested, no recorded run) |
z-jianxin/llpfc/llpfclib/make_groups.py code served (permissive licence) · get_code("c0dd0d0fc964de0d") How it ran |