| aggregate_publications_from_json |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/loader_utils.py code served (permissive licence) · get_code("ff59295bb51c26d9") 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 tempfile
import json
from pathlib import Path
# Create a temporary directory structure with JSON files
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)
json_dir = temp_path / 'data' / 'json'
json_dir.mkdir(parents=True, exist_ok=True)
# Create sample JSON files with publication data
sample_data_1 = [
{
'figureset': [{'fig': 1}, {'fig': 2}],
'title': 'Publication 1',
'authors': 'Author A'
},
{
'figureset': [],
'title': 'Publication 2',
'authors': 'Author B'
}
]
sample_data_2 = [
{
'figureset': [{'fig': 3}],
'title': 'Publication 3',
'authors': 'Author C'
}
]
# Write JSON files to disk
with open(json_dir / 'pub1.json', 'w') as f:
json.dump(sample_data_1, f)
with open(json_dir / 'pub2.json', 'w') as f:
json.dump(sample_data_2, f)
ARGS = {
'directory_path': str(temp_path),
'drop_empty_figure_sets': True,
'n': None,
'verbose': True
}
- 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
|
| collect_tar_files |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/wd_loader.py code served (permissive licence) · get_code("bcffe5ae51595c56") 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 os
import tempfile
import shutil
# Create a temporary directory structure with .tar files
temp_root = tempfile.mkdtemp()
# Create subset directories
subsets = ['commercial', 'noncommercial', 'other']
for subset in subsets:
subset_dir = os.path.join(temp_root, subset)
os.makedirs(subset_dir, exist_ok=True)
# Create some dummy .tar files
for i in range(2):
tar_file = os.path.join(subset_dir, f'file{i}.tar')
open(tar_file, 'w').close()
ARGS = {
'root': temp_root,
'subsets': ['commercial', 'noncommercial', 'other'],
'random_seed': 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 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
|
| collect_tar_files_from_labels |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/wd_loader.py code served (permissive licence) · get_code("bbb9d8b536ae3d83") 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 os
import tempfile
import shutil
# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
# Create subset directories
subsets = ['commercial', 'noncommercial', 'other']
for subset in subsets:
subset_path = os.path.join(temp_dir, subset)
os.makedirs(subset_path, exist_ok=True)
# Create subdirectories within each subset
for i in range(2):
subdir_path = os.path.join(subset_path, f'subdir_{i}')
os.makedirs(subdir_path, exist_ok=True)
# Create some .tar files
for j in range(2):
tar_file_path = os.path.join(subdir_path, f'file_{j}.tar')
with open(tar_file_path, 'w') as f:
f.write('')
ARGS = {
'root': temp_dir,
'subsets': ['commercial', 'noncommercial', 'other'],
'random_seed': 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 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
|
| compare_csv_row_counts |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/download_batch.py code served (permissive licence) · get_code("cb97752db69a8eba") 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 bool, 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 csv
import tempfile
import os
# Create temporary CSV files for testing
temp_dir = tempfile.mkdtemp()
# Create first CSV file with 5 rows (including header)
file1_path = os.path.join(temp_dir, "file1.csv")
with open(file1_path, 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['col1', 'col2', 'col3'])
writer.writerow(['a', 'b', 'c'])
writer.writerow(['d', 'e', 'f'])
writer.writerow(['g', 'h', 'i'])
writer.writerow(['j', 'k', 'l'])
# Create second CSV file with 5 rows (including header) - matching count
file2_path = os.path.join(temp_dir, "file2.csv")
with open(file2_path, 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['x', 'y', 'z'])
writer.writerow(['1', '2', '3'])
writer.writerow(['4', '5', '6'])
writer.writerow(['7', '8', '9'])
writer.writerow(['10', '11', '12'])
ARGS = {
'file1_path': file1_path,
'file2_path': file2_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 bool, 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
|
| create_log_file_path |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/build_json.py code served (permissive licence) · get_code("d83d88e5f98e49d5") 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
# Set up the arguments for create_log_file_path
directory = "/path/to/batch_data/sample_batch_001"
batch_index = 5
log_type = "error"
log_dir = "/tmp/logs/"
ARGS = {
"directory": directory,
"batch_index": batch_index,
"log_type": log_type,
"log_dir": log_dir,
}
- 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
|
| extract_features_from_dataloader |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/feature_extractors/extract_features.py code served (permissive licence) · get_code("ac1c2471664def4c") 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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np
import tempfile
import os
torch.manual_seed(0)
# Create a minimal model that satisfies the function's usage
class DummyFeatureExtractor(nn.Module):
def __init__(self, input_dim=3, output_dim=8):
super().__init__()
self.linear = nn.Linear(input_dim, output_dim)
def forward(self, x):
# x shape: (batch, channels, height, width) -> flatten to (batch, channels*height*width)
batch_size = x.shape[0]
x_flat = x.view(batch_size, -1)
return self.linear(x_flat)
# Create a minimal dataloader
# Each sample is (image, label, key)
def create_dummy_dataloader(num_batches=5, batch_size=2):
batches = []
for b in range(num_batches):
images = torch.randn(batch_size, 3, 4, 4) # (batch, channels, height, width)
labels = torch.randint(0, 10, (batch_size,))
keys = [f"key_{b}_{i}" for i in range(batch_size)]
batches.append((images, labels, keys))
return batches
# Build arguments
model = DummyFeatureExtractor(input_dim=3*4*4, output_dim=8)
dataloader = create_dummy_dataloader(num_batches=5, batch_size=2)
save_dir = tempfile.mkdtemp()
ARGS = {
'dataloader': dataloader,
'model': model,
'device': 'cpu',
'max_images': 3,
'store_images': 2,
'save': save_dir,
'save_every': 2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch, tqdm — 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
|
| extract_image_caption_pairs |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/loader_utils.py code served (permissive licence) · get_code("e0bc84a5913a68cd") 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
import numpy as np
from typing import List, Dict, Any, Tuple
# Construct sample publications data
publications = [
{
'accession_id': 'ACC001',
'figureset': [
{
'image_path': '/path/to/image1.jpg',
'caption': 'This is the first image caption',
'image_id': 'IMG001'
},
{
'image_path': '/path/to/image2.jpg',
'caption': 'This is the second image caption',
'image_id': 'IMG002'
}
]
},
{
'accession_id': 'ACC002',
'figureset': [
{
'image_path': '/path/to/image3.jpg',
'caption': 'Third image caption here',
'image_id': 'IMG003'
}
]
},
{
'accession_id': 'ACC003',
'figureset': [
{
'image_path': '/path/to/image4.jpg',
'caption': 'Fourth image caption',
'image_id': 'IMG004'
},
{
'image_path': '/path/to/image5.jpg',
'image_id': 'IMG005'
}
]
}
]
ARGS = {
'publications': publications
}
- 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 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
|
| filter_no_caption_or_no_image |
Ran ran, violated the contract we drafted |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/wd_loader.py code served (permissive licence) · get_code("38a36c2da131f507") 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 bool, 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 numpy as np
# Define a sample dictionary with both caption and image
sample_valid = {
'txt': 'A cat sitting on a mat',
'jpg': b'fake_image_data'
}
# Define ARGS mapping the parameter to a value
ARGS = {
'sample': sample_valid
}
- 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 bool, 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_image_identifier |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/caption.py code served (permissive licence) · get_code("42b8eab2675d547e") 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 os
# The function takes a list of file paths as strings
# It extracts file names without extensions from each path
# Let's create a list of image file paths
list_of_path_to_image = [
"/home/user/images/photo1.jpg",
"/home/user/images/photo2.png",
"/home/user/images/photo3.jpeg",
"relative/path/image.gif",
"another_image.bmp"
]
ARGS = {
"list_of_path_to_image": list_of_path_to_image
}
- 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
|
| get_image_paths |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/caption.py code served (permissive licence) · get_code("7a900ce20281ac4b") 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 os
import tempfile
import shutil
# Create a temporary directory with some test image files
temp_dir = tempfile.mkdtemp()
# Create some .jpg files in the temp directory
jpg_file_1 = os.path.join(temp_dir, "image1.jpg")
jpg_file_2 = os.path.join(temp_dir, "image2.jpg")
non_jpg_file = os.path.join(temp_dir, "document.txt")
# Write dummy content to the files
with open(jpg_file_1, 'w') as f:
f.write("dummy image data")
with open(jpg_file_2, 'w') as f:
f.write("dummy image data")
with open(non_jpg_file, 'w') as f:
f.write("dummy text data")
ARGS = {
"path_to_pmcid": temp_dir
}
- 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
|
| get_kmeans |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/label_utils/models.py code served (permissive licence) · get_code("544ccd5b57784198") 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 (10,) 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 tempfile
import os
np.random.seed(0)
# Create small feature array: 10 samples, 5 features
features = np.random.rand(10, 5).astype(np.float32)
# Create a temporary directory for potential file operations
temp_dir = tempfile.gettempdir()
save_path = os.path.join(temp_dir, "kmeans_test_model.joblib")
ARGS = {
"features": features,
"num_clusters": 3,
"save_to": save_path,
"from_file": False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- joblib, numpy, sklearn — 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 (10,) — shape (10,) 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_main_batch_index |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/download_batch.py code served (permissive licence) · get_code("2e665f86d4a45067") 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)
# The function get_main_batch_index takes a sub_batch_id string and extracts
# the main batch index by splitting on underscore and returning the first part.
# It handles both cases: with underscore (returns first part) and without (returns original).
# Test case 1: sub_batch_id with underscore
sub_batch_id_with_underscore = "batch_001_subset"
# Test case 2: sub_batch_id without underscore
sub_batch_id_without_underscore = "batch_001"
# We'll use the first one as the primary argument
ARGS = {
"sub_batch_id": "batch_001_subset"
}
- 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_next_index |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/build_json.py code served (permissive licence) · get_code("180bb7762557abf2") 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 re
import tempfile
# Create a temporary directory with some test JSON files
temp_dir = tempfile.mkdtemp()
# Create some test files matching the expected pattern
test_filelist_name = "test_filelist"
for i in range(3):
filepath = os.path.join(temp_dir, f"{test_filelist_name}_{i}.json")
with open(filepath, 'w') as f:
f.write('{}')
ARGS = {
"json_dir": temp_dir,
"filelist_name": test_filelist_name,
}
- 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
|
| get_pca |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/label_utils/models.py code served (permissive licence) · get_code("b1a84bc8eee5b294") 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 (100, 30) 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 tempfile
import os
# Create sample features with shape (100, 50) - 100 samples, 50 features
features = np.random.rand(100, 50)
# Create temporary file paths for save_to and from_file
temp_dir = tempfile.gettempdir()
save_path = os.path.join(temp_dir, "pca_model_test.joblib")
from_file_path = None # We'll set this to None for the initial run, or to save_path for a second run
ARGS = {
"features": features,
"from_file": from_file_path,
"save_to": save_path,
"n_components": 30
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- joblib, numpy, sklearn — 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 (100, 30) — shape (100, 30) 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
|
| load_and_process_media_filelist_csv |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/download.py code served (permissive licence) · get_code("cca1e5f8e9f7b0e0") 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 DataFrame. 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 pandas as pd
import tempfile
import os
# Create a temporary CSV file with the required structure
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "media_filelist.csv")
# Create a sample CSV with File column
csv_data = pd.DataFrame({
'File': [
'path/to/media1.mp4',
'path/to/media2.wav',
'another/path/media3.jpg'
]
})
csv_data.to_csv(csv_path, index=False)
ARGS = {
'path_to_filelist': csv_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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_file |
Ran ran on a synthesized input |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/loader_utils.py code served (permissive licence) · get_code("97c7f58efcfba433") 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 json
import tempfile
from pathlib import Path
# Create a temporary JSON file with valid data
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)
test_data = [
{"id": 1, "name": "Alice", "value": 42},
{"id": 2, "name": "Bob", "value": 137}
]
json.dump(test_data, temp_file)
temp_file.close()
ARGS = {
"file_path": Path(temp_file.name)
}
- 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
|
| download_media |
Not yet run unverified (harvested, no recorded run) |
minwoosun/biomedica-etl/src/pmc_oa/download.py code served (permissive licence) · get_code("7a342b3fd8f33439") How it ran |
| load_and_concatenate_subset |
Not yet run unverified (harvested, no recorded run) |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/dino_features_loader.py code served (permissive licence) · get_code("f2f23afd2de6f9dc") How it ran |
| load_and_concatenate_subsets |
Not yet run unverified (harvested, no recorded run) |
minwoosun/biomedica-etl/src/pmc_oa/data_loaders/dino_features_loader.py code served (permissive licence) · get_code("ae69a8e47ba31b5d") How it ran |
| reconnect_ftp |
Not yet run unverified (harvested, no recorded run) |
minwoosun/biomedica-etl/src/pmc_oa/download.py code served (permissive licence) · get_code("1a9cc446f390c491") How it ran |