| build_conditioned_input |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/conditioning.py code served (permissive licence) · get_code("3bb455ee6f260ca1") 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 3, dtype family float, shape (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
torch.manual_seed(0)
# Create a small degraded image tensor
# Shape: (channels, height, width) = (3, 4, 4)
degraded_img = torch.rand(3, 4, 4, dtype=torch.float32)
# Create a sampling mask tensor with same spatial dims but 1 channel
# Shape: (1, 4, 4)
sampling_mask = torch.randint(0, 2, (1, 4, 4), dtype=torch.float32)
# Theta parameter
theta = 0.5
# Condition mode - test with 'none' which is valid
condition_mode = 'none'
ARGS = {
'degraded_img': degraded_img,
'sampling_mask': sampling_mask,
'theta': theta,
'condition_mode': condition_mode
}
- 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 3, dtype family float, shape (3, 4, 4) — shape (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
|
| build_horizontal_cache_dataset |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/hv_conformal.py code served (permissive licence) · get_code("4f338875fc3b7ca0") 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 HorizontalCacheDataset. 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
# Small dataset with 2 images and 4 theta values
num_images = 2
num_theta = 4
# Create theta_grid: 1D array of theta values
theta_grid = np.linspace(0.0, 1.0, num_theta)
# Create loss matrix: 2D array (num_images x num_theta)
# Values should be decreasing along theta axis for oracle to work
loss_mse = np.array([
[10.0, 5.0, 2.0, 1.0],
[8.0, 4.0, 1.5, 0.5]
], dtype=np.float64)
# Create one_step_residuals: same shape as loss matrix, nonnegative
one_step_residuals = np.array([
[0.5, 0.3, 0.2, 0.1],
[0.4, 0.25, 0.15, 0.05]
], dtype=np.float64)
# Create manifest rows with split roles
manifest_rows = [
{'split_role': 'calibration', 'name': 'img_0'},
{'split_role': 'test', 'name': 'img_1'}
]
# Construct the arrays dict
arrays = {
'theta_grid': theta_grid,
'loss_mse': loss_mse,
'horizontal_one_step_residual': one_step_residuals,
'manifest_rows': manifest_rows
}
ARGS = {
'arrays': arrays,
'c_value': 3.0,
'oracle_loss': 'mse',
'residual_source': 'horizontal_one_step_residual'
}
- 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 HorizontalCacheDataset — a HorizontalCacheDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HorizontalCacheDataset 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
|
| build_sampling_mask |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/physics.py code served (permissive licence) · get_code("02fb01ed1a182109") 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 3, dtype family float, shape (1, 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 torch
torch.manual_seed(0)
# Build clean_img: shape (1, H, W) - a single-channel image
clean_img = torch.randn(1, 4, 3)
# Build trajectory: indices for sampling
# For MRI mode: trajectory should have up to W elements
# For DCT mode: trajectory should have up to H*W elements
# For residual mode: trajectory should have up to (H//block_size)*(W//block_size) elements
# We'll make it large enough for all cases
trajectory = torch.tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], dtype=torch.long)
# theta: fraction of coefficients to keep (0 to 1)
theta = 0.5
ARGS = {
'clean_img': clean_img,
'trajectory': trajectory,
'theta': theta,
'mode': 'mri',
}
- 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 3, dtype family float, shape (1, 4, 3) — shape (1, 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
|
| compute_keep_counts |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/hv_residuals.py code served (permissive licence) · get_code("7ed68a9e31fe578d") 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 int, shape (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
# Construct valid arguments for compute_keep_counts
# The function expects:
# - theta_grid: 1D numpy array of float values between 0 and 1
# - width: positive integer
# - minimum: nonnegative integer (default=1)
# Create a 1D theta_grid with values that increase monotonically
# This ensures that keep counts will be non-decreasing
theta_grid = np.array([0.1, 0.3, 0.5, 0.7, 0.9], dtype=np.float64)
# Set width to a reasonable positive value
width = 10
# Set minimum to a nonnegative value (using default would also work)
minimum = 1
ARGS = {
'theta_grid': theta_grid,
'width': width,
'minimum': minimum,
}
- 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 1, dtype family int, shape (5,) — shape (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
|
| compute_mri_next_band_residuals |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/hv_residuals.py code served (permissive licence) · get_code("419b8e12dec66413") 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 (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
# Set up test data for compute_mri_next_band_residuals
height, width = 4, 3
num_steps = 5
# Create a clean reference image (H, W)
clean_image = np.random.randn(height, width).astype(np.float64)
# Create a reconstruction stack (T, H, W) with num_steps time steps
recon_stack = np.random.randn(num_steps, height, width).astype(np.float64)
# Create a trajectory array with column indices
# Must have at least width entries, with valid column indices [0, width)
trajectory = np.array([0, 1, 2, 0, 1, 2, 0], dtype=np.int64)
# Create a theta_grid that produces monotonically increasing keep counts
# theta_grid should have length num_steps
# Values should be between 0 and 1, and produce non-decreasing keep counts
theta_grid = np.linspace(0.2, 0.95, num_steps).astype(np.float64)
ARGS = {
"clean_image": clean_image,
"recon_stack": recon_stack,
"trajectory": trajectory,
"theta_grid": theta_grid,
}
- 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 1, dtype family float, shape (5,) — shape (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
|
| expected_in_channels |
Ran ran, honoured the contract we drafted |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/conditioning.py code served (permissive licence) · get_code("524e18f7194fef75") 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 torch
torch.manual_seed(0)
# The function takes a single parameter: condition_mode (a string)
# It returns an int based on the condition_mode value
# No complex objects needed - just a string parameter
ARGS = {
'condition_mode': 'mask'
}
- 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 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
|
| format_float_token |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/trajectory_features.py code served (permissive licence) · get_code("0e1bfe9111482944") 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 torch
torch.manual_seed(0)
ARGS = {
'value': 3.14159
}
- 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 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
|
| get_dct_matrix |
Ran ran, honoured the contract we drafted |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/physics.py code served (permissive licence) · get_code("3b9bf9b05f46dbed") 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 (8, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import math
torch.manual_seed(0)
ARGS = {
"N": 8
}
- 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 (8, 8) — shape (8, 8) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_effective_mri_theta_grid |
Ran ran, honoured the contract we drafted |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/trajectory_features.py code served (permissive licence) · get_code("e7e7aaa8dafefc34") 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 (16,) 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 = {
'width': 32,
'min_keep': 1,
'max_keep': 16,
}
- 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 1, dtype family float, shape (16,) — shape (16,) 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_local_gap_summary_keys |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/trajectory_features.py code served (permissive licence) · get_code("e390847680b05593") 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 torch
torch.manual_seed(0)
DEFAULT_LOCAL_GAP_WINDOW_SIZE = 3
LOCAL_GAP_SUMMARY_SPECS = (('mean', None), ('var', None), ('q75', 0.75), ('q90', 0.9))
def get_local_gap_summary_keys(window_size: int=DEFAULT_LOCAL_GAP_WINDOW_SIZE, metric_name: str='l1') -> list[str]:
return [f'gap_local_monotone{window_size}_{metric_name}_{suffix}' for suffix, _ in LOCAL_GAP_SUMMARY_SPECS]
ARGS = {
'window_size': 3,
'metric_name': 'l1'
}
- 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
|
| get_loss_function |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/loss.py code served (permissive licence) · get_code("09504493ce28502c") 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 ForegroundWeightedLoss. 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 = {
'name': 'weighted',
'device': 'cpu',
'threshold': 0.1,
'background_weight': 0.05,
}
- 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 ForegroundWeightedLoss — a ForegroundWeightedLoss output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ForegroundWeightedLoss 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
|
| inspect_m4raw_file |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/mri/io.py code served (permissive licence) · get_code("5f6b5e6cdbf1fb0a") 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 M4RawMetadata. 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 tempfile
import h5py
from pathlib import Path
import numpy as np
# Create a temporary HDF5 file with the required structure
temp_dir = tempfile.mkdtemp()
h5_path = Path(temp_dir) / "test_m4raw.h5"
with h5py.File(h5_path, 'w') as f:
# Create kspace dataset with shape (slices=2, coils=3, height=4, width=5)
kspace_data = np.random.randn(2, 3, 4, 5).astype(np.complex64)
f.create_dataset('kspace', data=kspace_data)
# Create reconstruction_rss dataset with shape (slices=2, height=4, width=5)
reconstruction_data = np.random.randn(2, 4, 5).astype(np.float32)
f.create_dataset('reconstruction_rss', data=reconstruction_data)
# Add some attributes
f.attrs['patient_id'] = b'patient_123'
f.attrs['acquisition_date'] = b'2024-01-15'
f.attrs['acceleration_factor'] = np.float32(2.5)
ARGS = {
'path': h5_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- h5py, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type M4RawMetadata — a M4RawMetadata output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a M4RawMetadata 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_policy_study_dir |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/stopping_policies.py code served (permissive licence) · get_code("91f80aced105ec8f") 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 PosixPath. 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.
from pathlib import Path
import tempfile
# Create a temporary directory to use as the study_dir
temp_dir = tempfile.mkdtemp()
study_dir = Path(temp_dir)
# Define arguments for make_policy_study_dir
ARGS = {
'study_dir': study_dir,
'tag': 'test_policy_study'
}
- 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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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_study_dir |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/trajectory_cache.py code served (permissive licence) · get_code("fb5e5c9731b06015") 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 PosixPath. 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.
from datetime import datetime
from pathlib import Path
import tempfile
# Create a temporary directory to use as project_root
temp_dir = Path(tempfile.mkdtemp())
ARGS = {
'project_root': temp_dir,
'tag': 'test_study_001'
}
- 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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
|
| read_json |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/trajectory_cache.py code served (permissive licence) · get_code("5afba1901d89e933") 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 json
from pathlib import Path
import tempfile
import os
# Create a temporary directory and a test JSON file
temp_dir = tempfile.mkdtemp()
test_json_path = Path(temp_dir) / "test.json"
# Write a valid JSON file
test_data = {
"key1": "value1",
"key2": 42,
"key3": ["a", "b", "c"],
"key4": {"nested": "dict"}
}
with open(test_json_path, 'w', encoding='utf-8') as f:
json.dump(test_data, f)
ARGS = {
"path": test_json_path
}
- 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 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
|
| read_m4raw_slice |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/mri/io.py code served (permissive licence) · get_code("2d9b612a583c697a") 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
from pathlib import Path
# Create a temporary H5 file with the required structure
temp_dir = tempfile.mkdtemp()
h5_path = Path(temp_dir) / "test_data.h5"
with h5py.File(h5_path, 'w') as f:
# Create kspace dataset with shape (num_slices, coils, height, width)
# Using distinct dimensions: 2 slices, 3 coils, 4 height, 5 width
kspace_data = np.random.randn(2, 3, 4, 5).astype(np.complex64)
f.create_dataset('kspace', data=kspace_data)
# Create reconstruction_rss dataset with shape (num_slices, height, width)
reconstruction_data = np.random.randn(2, 4, 5).astype(np.float32)
f.create_dataset('reconstruction_rss', data=reconstruction_data)
# Add some attributes to test _decode_attr
f.attrs['test_string'] = b'test_value'
f.attrs['test_int'] = np.int32(42)
f.attrs['test_float'] = np.float32(3.14)
ARGS = {
'path': str(h5_path),
'slice_index': 0,
'read_reconstruction': True,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- h5py, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| read_manifest_rows |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/trajectory_cache.py code served (permissive licence) · get_code("9fbb9bf57df621ae") 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 csv
from pathlib import Path
import tempfile
import os
# Create a temporary CSV file with some test data
temp_dir = tempfile.mkdtemp()
csv_path = Path(temp_dir) / "test_manifest.csv"
# Write a simple CSV file with headers and rows
with open(csv_path, 'w', encoding='utf-8', newline='') as f:
writer = csv.DictWriter(f, fieldnames=['id', 'name', 'value'])
writer.writeheader()
writer.writerow({'id': '1', 'name': 'test1', 'value': 'data1'})
writer.writerow({'id': '2', 'name': 'test2', 'value': 'data2'})
ARGS = {
'path': csv_path
}
- 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 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
|
| resolve_hv_variant |
Ran ran; our contract draft was wrong, not the code |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/hv_conformal.py code served (permissive licence) · get_code("7380309ed760b827") 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 HVVariantConfig. 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.
# Setup code for resolve_hv_variant
ARGS = {
"variant": "floor",
"t0": 5,
}
# Alternative test case to verify the function works with different inputs
ARGS_NO_FLOOR = {
"variant": "no_floor",
"t0": 3,
}
# Use the first set as the primary ARGS
ARGS = {
"variant": "floor",
"t0": 5,
}
- 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 HVVariantConfig — a HVVariantConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HVVariantConfig 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
|
| select_loss_matrix |
Ran ran, honoured the contract we drafted |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/stopping_policies.py code served (permissive licence) · get_code("be8dcbb845546eed") 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 numpy as np
# Create a small loss matrix
loss_matrix_1 = np.array([[0.1, 0.2, 0.3, 0.4],
[0.5, 0.6, 0.7, 0.8]])
loss_matrix_2 = np.array([[1.1, 1.2, 1.3, 1.4],
[1.5, 1.6, 1.7, 1.8]])
# Construct the arrays dict with loss matrices
arrays = {
'loss_mse': loss_matrix_1,
'loss_ce': loss_matrix_2,
}
ARGS = {
'arrays': arrays,
'oracle_loss': 'mse',
}
- 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 (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
|
| select_pairwise_matrix |
Ran ran, honoured the contract we drafted |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/stopping_policies.py code served (permissive licence) · get_code("86713c36d70ed1ed") 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
import torch
torch.manual_seed(0)
# Construct a dict of arrays with pairwise reconstruction matrices
arrays = {
'pairwise_recon_mse': np.random.randn(4, 5),
'pairwise_recon_l1': np.random.randn(3, 6),
'pairwise_recon_huber': np.random.randn(2, 7),
}
gap_loss = 'mse'
ARGS = {
'arrays': arrays,
'gap_loss': gap_loss,
}
- 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 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
|
| fit_horizontal_predictions_from_cache |
Not yet run unverified (harvested, no recorded run) |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/hv_conformal.py code served (permissive licence) · get_code("c2249e6bda93983b") How it ran |
| simulate_undersampling |
Not yet run unverified (harvested, no recorded run) |
jiawei-yang05/Conformalized_Rate_Adaptive_Sensing/src/physics.py code served (permissive licence) · get_code("ab74a33c11b34012") How it ran |