| compile_model |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/models.py code served (permissive licence) · get_code("6c8d0a26b4f06870") 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 Sequential. 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 keras.optimizers import Adam
# Create a minimal Keras model that can be compiled
try:
import keras
from keras import layers
# Build a minimal sequential model
model = keras.Sequential([
layers.Dense(3, activation='relu', input_shape=(4,)),
layers.Dense(2, activation='softmax')
])
except ImportError:
# Fallback: create a mock model with compile method
class MockKerasModel:
def compile(self, loss, optimizer):
self.loss = loss
self.optimizer = optimizer
model = MockKerasModel()
# Define arguments for compile_model function
ARGS = {
'model': model,
'loss': 'categorical_crossentropy',
'optimizer': Adam,
'optimizer_kwargs': {'learning_rate': 0.001}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- keras, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential 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
|
| map_pool |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/parallel.py code served (permissive licence) · get_code("3d0f147423a544c0") 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 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 multiprocessing
import torch
import time
class DummyProcess(multiprocessing.Process):
"""A simple process that computes something and stores output"""
def __init__(self, value, multiplier=1):
super().__init__()
self.value = value
self.multiplier = multiplier
self.output = None
def run(self):
# Simulate some work
time.sleep(0.01)
self.output = self.value * self.multiplier
def create_process(value, multiplier=1):
"""Factory function to create a DummyProcess"""
return DummyProcess(value, multiplier=multiplier)
# Set up test data
torch.manual_seed(0)
# Create arguments for map_pool
args_list = [
(10,),
(20,),
(30,),
(40,),
]
ARGS = {
'process': create_process,
'args': args_list,
'n_jobs': 2,
'multiplier': 2,
}
- 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| map_pool_kwargs |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/parallel.py code served (permissive licence) · get_code("3b59110db926347c") 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 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 multiprocessing
import torch
import torch.nn as nn
torch.manual_seed(0)
class DummyWorker(multiprocessing.Process):
"""A simple worker process that stores output"""
def __init__(self, task_id=0, sleep_duration=0.01):
super().__init__()
self.task_id = task_id
self.sleep_duration = sleep_duration
self.output = f"task_{task_id}_completed"
def run(self):
"""Simulate some work"""
import time
time.sleep(self.sleep_duration)
self.output = f"task_{self.task_id}_result"
def dummy_process_factory(task_id=0, sleep_duration=0.01):
"""Factory function that returns a configured worker process"""
return DummyWorker(task_id=task_id, sleep_duration=sleep_duration)
# Create kwargs for multiple job configurations
kwargs_list = [
{"task_id": 0, "sleep_duration": 0.01},
{"task_id": 1, "sleep_duration": 0.01},
{"task_id": 2, "sleep_duration": 0.01},
]
ARGS = {
"process": dummy_process_factory,
"kwargs": kwargs_list,
"n_jobs": 2,
}
- 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| obtain_lock_id |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/gpu_lock.py code served (permissive licence) · get_code("cc9d02eccf1e3749") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import time
# The function obtain_lock_id takes optional parameters:
# - pid: an integer process id (or None to use current process)
# - block: a boolean flag
# Looking at the function body:
# - pid is passed to launch_reaper, which handles None by converting to os.getpid()
# - block is passed to obtain_lock_id_to_hog as a keyword argument
# - The function returns an integer
# Setup minimal valid arguments
ARGS = {
'pid': None, # Will use current process id
'block': False # Don't block waiting for a free GPU
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| obtain_lock_id_to_hog |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/gpu_lock.py code served (permissive licence) · get_code("2d38755828846f3f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import time
# The function obtain_lock_id_to_hog takes one parameter: block
# It's a boolean that controls whether to block waiting for a free GPU lock
ARGS = {
'block': False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| owner_of_lock |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/gpu_lock.py code served (permissive licence) · get_code("f09af435f1bfb16a") 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 str. 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 os
import tempfile
# The function owner_of_lock takes an integer id parameter
# It uses this id to construct a lock file path and then tries to stat it
# We'll pass a simple integer that won't have an actual lock file
# (so it will return empty string), which is a valid test case
ARGS = {
'id': 42
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
|
| pixel_edges |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/preprocessing.py code served (permissive licence) · get_code("d50f26955867a47c") 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 numpy as np
ARGS = {
"jet_size": 1.0,
"pixel_size": (0.1, 0.1),
"border_size": 0.25
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, 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
|
| pixelize |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/preprocessing.py code served (permissive licence) · get_code("9cbdef9eb6baca7c") 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 (4, 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 numpy as np
# Create a small dictionary representing jet constituents
# The function accesses: jet_csts['eta'], jet_csts['phi'], jet_csts['ET']
jet_csts = {
'eta': np.array([0.1, 0.2, 0.3, 0.5]),
'phi': np.array([1.0, 1.5, 2.0, 2.5]),
'ET': np.array([0.05, 0.15, 0.25, 0.35])
}
# Create eta and phi edges for the 2D histogram
# edges[0] is used for eta bins, edges[1] is used for phi bins
edges = [
np.linspace(-1, 1, 5), # 4 bins for eta
np.linspace(0, 3.14, 6) # 5 bins for phi
]
# Set cutoff
cutoff = 0.1
ARGS = {
'jet_csts': jet_csts,
'edges': edges,
'cutoff': cutoff
}
- 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 (4, 5) — shape (4, 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
|
| rotate_image |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/preprocessing.py code served (permissive licence) · get_code("250898811dc60e9d") 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 (4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small image array (4x3)
image = np.random.rand(4, 3).astype(np.float32)
# Create a structured array for subjets with 'phi' and 'eta' fields
# We'll test both the len > 1 case and the len <= 1 case
subjets = np.array([
(0.5, 1.2),
(0.3, 0.8)
], dtype=[('phi', np.float32), ('eta', np.float32)])
ARGS = {
'image': image,
'subjets': subjets
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, skimage — 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 (4, 3) — shape (4, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| test_model |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/learning.py code served (permissive licence) · get_code("36100b103e1ce4c7") 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 h5py
import numpy as np
import tempfile
import os
# Create a minimal mock Keras model
class MockKerasModel:
def evaluate(self, X, Y, batch_size=100, verbose=0, sample_weight=None):
return 0.85
def predict_proba(self, X, batch_size=100, verbose=0):
# Return probabilities for 2 classes
n_samples = len(X)
probs = np.random.dirichlet([1, 1], n_samples)
return probs
def predict_classes(self, X, batch_size=100, verbose=0):
n_samples = len(X)
return np.random.randint(0, 2, n_samples)
# Create a temporary HDF5 file with test data
temp_dir = tempfile.mkdtemp()
test_h5_path = os.path.join(temp_dir, 'test_data.h5')
n_samples = 10
n_features = 4
with h5py.File(test_h5_path, 'w') as f:
# Create X_test dataset
X_test_data = np.random.randn(n_samples, n_features).astype(np.float32)
f.create_dataset('X_test', data=X_test_data)
# Create Y_test dataset (one-hot encoded for 2 classes)
Y_test_data = np.zeros((n_samples, 2), dtype=np.float32)
Y_test_data[np.arange(n_samples), np.random.randint(0, 2, n_samples)] = 1.0
f.create_dataset('Y_test', data=Y_test_data)
# Create auxvars_test group with weights
auxvars = f.create_group('auxvars_test')
weights = np.ones(n_samples, dtype=np.float32)
auxvars.create_dataset('weights', data=weights)
# Define likelihood_ratio function (called by test_model)
def likelihood_ratio(Y_test, Y_prob, weights_test):
bins = np.linspace(0, 1, 11)
lklhd_rat = np.ones(len(bins) - 1)
return lklhd_rat, bins
# Inject the function into the module namespace
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'likelihood_ratio', likelihood_ratio)
ARGS = {
'model': MockKerasModel(),
'test_h5_file': test_h5_path,
'model_name': 'test_model',
'batch_size': 100,
'verbose': 2,
'log_to_file': False,
'show_roc_curve': False,
'X_dataset': 'X_test',
'Y_dataset': 'Y_test'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- h5py, numpy, sklearn — 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
|
| train_model_auc_score |
Ran ran on a synthesized input |
deepjets/deepjets/deepjets/learning.py code served (permissive licence) · get_code("702368455bc30097") 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 Functional. 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 h5py
import numpy as np
import tempfile
import os
# Create a minimal keras-like model mock
class MinimalKerasModel:
def __init__(self):
self.optimizer = MinimalOptimizer()
self.weights = []
def fit(self, X, Y, batch_size=100, nb_epoch=1, verbose=0, sample_weight=None, shuffle=True):
"""Mock fit method"""
pass
def predict_proba(self, X, batch_size=100, verbose=0):
"""Return mock predictions with 2 classes"""
n_samples = len(X)
# Return probabilities for 2 classes that sum to 1
probs = np.random.rand(n_samples, 2)
probs = probs / probs.sum(axis=1)[:, np.newaxis]
return probs
class MinimalOptimizer:
def __init__(self):
self.lr = MinimalLR(0.0001)
class MinimalLR:
def __init__(self, value):
self.value = value
def set_value(self, val):
self.value = val
def likelihood_ratio(Y_true, Y_prob, weights=None):
"""Mock likelihood ratio function"""
bins = np.linspace(0, 1, 11)
lklhd_rat = np.ones(len(bins) - 1)
return lklhd_rat, bins
def save_model(model, model_name):
"""Mock save model function"""
pass
# Create temporary h5 file with required structure
temp_dir = tempfile.mkdtemp()
h5_path = os.path.join(temp_dir, 'train_data.h5')
with h5py.File(h5_path, 'w') as f:
# Create training data
X_train = np.random.rand(10, 4, 3).astype(np.float32)
Y_train = np.random.randint(0, 2, (10, 1)).astype(np.float32)
# Create validation data
X_val = np.random.rand(6, 4, 3).astype(np.float32)
Y_val = np.random.randint(0, 2, (6, 1)).astype(np.float32)
# Create datasets
f.create_dataset('X_train', data=X_train)
f.create_dataset('Y_train', data=Y_train)
f.create_dataset('X_val', data=X_val)
f.create_dataset('Y_val', data=Y_val)
# Create optional auxvars with weights
auxvars_train = f.create_group('auxvars_train')
auxvars_train.create_dataset('weights', data=np.ones(10, dtype=np.float32))
auxvars_val = f.create_group('auxvars_val')
auxvars_val.create_dataset('weights', data=np.ones(6, dtype=np.float32))
# Build the ARGS dictionary
ARGS = {
'model': MinimalKerasModel(),
'train_h5_file': h5_path,
'model_name': os.path.join(temp_dir, 'test_model'),
'batch_size': 2,
'epochs': 3,
'patience': 2,
'lr_init': 0.0001,
'lr_scale_factor': 0.95,
'custom_lr_schedule': None,
'verbose': 1,
'log_to_file': False,
'read_into_ram': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- h5py, numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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_generator_input |
Not yet run unverified (harvested, no recorded run) |
deepjets/deepjets/deepjets/generate.py code served (permissive licence) · get_code("8166c185e901298f") How it ran |
| load_model |
Not yet run unverified (harvested, no recorded run) |
deepjets/deepjets/deepjets/models.py code served (permissive licence) · get_code("040234d4633b444f") How it ran |
| map_gpu_pool |
Not yet run unverified (harvested, no recorded run) |
deepjets/deepjets/deepjets/parallel.py code served (permissive licence) · get_code("ffa9d2b41c2008f4") How it ran |
| plot_kinematics |
Not yet run unverified (harvested, no recorded run) |
deepjets/deepjets/deepjets/plotting.py code served (permissive licence) · get_code("2141c010b0f937b0") How it ran |
| train_model |
Not yet run unverified (harvested, no recorded run) |
deepjets/deepjets/deepjets/learning.py code served (permissive licence) · get_code("92a034a791592c7b") How it ran |