| collate_fn |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/llava_eval.py code served (permissive licence) · get_code("20e4f665698a3d18") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
torch.manual_seed(0)
# The collate_fn expects a batch which is a list/iterable of tuples
# Each tuple contains (input_ids, image_tensor, image_size)
# The function unpacks these, stacks input_ids and image_tensors, and returns image_sizes as-is
# Create sample data items
item1 = (
torch.randint(0, 100, (4,)), # input_ids: small tensor
torch.randn(3, 8, 8), # image_tensor: 3-channel image, 8x8
(8, 8) # image_size: tuple
)
item2 = (
torch.randint(0, 100, (4,)), # input_ids: same shape
torch.randn(3, 8, 8), # image_tensor: same shape
(8, 8) # image_size: tuple
)
# Create batch as a list of tuples
batch = [item1, item2]
ARGS = {
"batch": batch
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — 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
|
| collect_all_questions |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/evaluation_utils.py code served (permissive licence) · get_code("55c5aa2c82585ebd") 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
import os
from pathlib import Path
# Create a temporary directory with test data
temp_dir = tempfile.mkdtemp()
# Create a questions.txt file with JSON content
questions_data = [
{"question": "What is this?", "answer": "A test"},
{"question": "Where is it?", "answer": "In a test"}
]
txt_file_path = os.path.join(temp_dir, "paper_questions.txt")
with open(txt_file_path, 'w') as f:
f.write('[' + ','.join(json.dumps(item) for item in questions_data) + ']')
# Create corresponding JSON file (in case recover_text_to_json doesn't work perfectly)
json_file_path = os.path.join(temp_dir, "paper_questions.json")
with open(json_file_path, 'w') as f:
json.dump(questions_data, f)
# Create another set of questions for table type
table_questions_data = [
{"question": "What table value?", "answer": "42"}
]
table_txt_file_path = os.path.join(temp_dir, "paper_questions_table.txt")
with open(table_txt_file_path, 'w') as f:
f.write('[' + json.dumps(table_questions_data[0]) + ']')
table_json_file_path = os.path.join(temp_dir, "paper_questions_table.json")
with open(table_json_file_path, 'w') as f:
json.dump(table_questions_data, f)
ARGS = {
"src_dir": temp_dir,
"q_type": "figure",
"gen_model": "gpt-4"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tqdm — 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
|
| create_prompt |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/filter_utils.py code served (permissive licence) · get_code("730b80d67018d2aa") 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
import numpy as np
# Construct a valid entry dictionary for the create_prompt function
entry = {
'Q': 'What is the capital of France?',
'options': ['London', 'Berlin', 'Paris', 'Madrid']
}
# Define ARGS mapping every parameter to a value
ARGS = {
'entry': entry
}
- 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 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
|
| encode_image |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/model_utils/claude_utils.py code served (permissive licence) · get_code("beb4056b7230f14f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import base64
import os
from typing import Union, List, Dict
from PIL import Image
from io import BytesIO
import tempfile
# Create a temporary image file for testing
def create_temp_image():
# Create a simple PIL Image
img = Image.new('RGB', (100, 100), color='red')
# Save to a temporary file
temp_file = tempfile.NamedTemporaryFile(suffix='.jpg', delete=False)
img.save(temp_file.name, format='JPEG')
temp_file.close()
return temp_file.name
# Create temporary image path
temp_image_path = create_temp_image()
# Create a PIL Image object directly
pil_image = Image.new('RGB', (50, 50), color='blue')
pil_image.format = 'JPEG'
# Define ARGS with both test cases
ARGS = {
'image_path': temp_image_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| encode_image |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/model_utils/gpt_utils.py code served (permissive licence) · get_code("826cad294a32186a") 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 base64
from io import BytesIO
from PIL import Image
import tempfile
import os
# Create a temporary image file for testing
def create_test_image():
# Create a simple RGB image
img = Image.new('RGB', (100, 100), color='red')
# Save to a temporary file
temp_dir = tempfile.gettempdir()
temp_image_path = os.path.join(temp_dir, 'test_image.png')
img.save(temp_image_path)
return temp_image_path
image_path = create_test_image()
ARGS = {
'image_path': image_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL — 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_gt |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/evaluation_utils.py code served (permissive licence) · get_code("cda3c93c1984bd12") 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
import numpy as np
from typing import List, Dict
torch.manual_seed(0)
# The function extract_gt takes:
# 1. gt_val: str - a ground truth value to find
# 2. shuffled_options: List - a list containing the gt_val that we search through
# We need to construct arguments where:
# - gt_val is some string value
# - shuffled_options is a list containing that string value at some index
gt_val = "apple"
shuffled_options = ["banana", "apple", "cherry", "date"]
ARGS = {
"gt_val": gt_val,
"shuffled_options": shuffled_options
}
- 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 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_all_img_cap_pairs_above_length_th |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/document_utils.py code served (permissive licence) · get_code("cc0b40f9f77cdf10") 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 tempfile
import os
from pathlib import Path
# Create a temporary directory with test image and caption files
temp_dir = tempfile.mkdtemp()
# Create some test .png files with corresponding .txt caption files
test_cases = [
("image1.png", "This is a detailed caption that is long enough to pass the threshold."),
("image2.png", "Short"),
("image3.png", "Another detailed caption with sufficient length that will pass the filtering criteria."),
]
for img_name, caption in test_cases:
img_path = os.path.join(temp_dir, img_name)
txt_path = os.path.join(temp_dir, img_name.replace('.png', '.txt'))
# Create dummy png file (just empty file)
Path(img_path).touch()
# Create txt caption file
with open(txt_path, 'w') as f:
f.write(caption)
# Define arguments for the function
ARGS = {
'src_dir': temp_dir,
'length_th': 30,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tqdm — 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
|
| get_general_description_prompt |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/model_utils/claude_utils.py code served (permissive licence) · get_code("9908efa6f99f8c6f") 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
# The function takes a single parameter: text_desc (str)
# It simply formats this string into a prompt and returns it
# No complex objects needed
text_desc = "Line plot showing experimental results over time with error bars"
ARGS = {
"text_desc": text_desc
}
- 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
|
| group_by |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/filter_utils.py code served (permissive licence) · get_code("b00f8fb2fa7ece30") 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.
from typing import Dict, List
ARGS = {
'list_of_dicts': [
{
'arxiv_ref': '2301.00001',
'title': 'First Paper',
'authors': ['Alice', 'Bob']
},
{
'arxiv_ref': '2301.00002',
'title': 'Second Paper',
'authors': ['Charlie']
},
{
'arxiv_ref': '2301.00001',
'title': 'Related Paper',
'authors': ['Dave']
},
{
'arxiv_ref': '2301.00003',
'title': 'Third Paper',
'authors': ['Eve', 'Frank']
}
],
'group_key': 'arxiv_ref'
}
- 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
|
| irt_forward |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/livexiv/efficient_eval.py code served (permissive licence) · get_code("ec7e7e421e348522") 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 (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 torch
from torch import nn
torch.manual_seed(0)
sigmoid = nn.Sigmoid()
def irt_forward(theta, beta):
return sigmoid(theta.squeeze()[:, None] - beta.squeeze()[None, :])
# theta: should be a tensor that when squeezed and indexed becomes a 1D array
# beta: should be a tensor that when squeezed and indexed becomes a 1D array
# The function performs outer subtraction: theta[:, None] - beta[None, :]
# Result shape will be (len(theta), len(beta))
# Create theta with shape (2, 1) - 2 ability parameters
theta = torch.randn(2, 1)
# Create beta with shape (4, 1) - 4 difficulty parameters
beta = torch.randn(4, 1)
ARGS = {
"theta": theta,
"beta": beta,
}
- 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 (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
|
| load_description_from_image_path |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/document_utils.py code served (permissive licence) · get_code("fde558d67cd0c6b6") 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
# Create a temporary directory and files for testing
temp_dir = tempfile.mkdtemp()
test_image_path = os.path.join(temp_dir, "test_image.png")
test_text_path = os.path.join(temp_dir, "test_image.txt")
# Create the image file (just a placeholder)
with open(test_image_path, 'w') as f:
f.write("")
# Create the corresponding text file with some content
test_description = "This is a test image description"
with open(test_text_path, 'w') as f:
f.write(test_description)
ARGS = {
'img_path': test_image_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 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
|
| loss_matrix |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/livexiv/efficient_eval.py code served (permissive licence) · get_code("3a18110e5cc4b51e") 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 (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 torch
import torch.nn as nn
torch.manual_seed(0)
# Construct tiny binary classification tensors
# Y: binary labels, shape (2, 4) - batch size 2, 4 dimensions
Y = torch.tensor([
[1.0, 0.0, 1.0, 0.0],
[0.0, 1.0, 1.0, 0.0]
])
# P: predicted probabilities, shape (2, 4) - batch size 2, 4 dimensions
# Values between 0 and 1
P = torch.tensor([
[0.9, 0.1, 0.8, 0.2],
[0.2, 0.85, 0.95, 0.15]
])
# eps: small constant for numerical stability (default provided)
eps = 1e-05
ARGS = {
"Y": Y,
"P": P,
"eps": eps
}
- 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 (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
|
| nearest_multiple_crop |
Ran ran, honoured the contract we drafted |
nimrodshabtay/livexiv/vqa_generation/model_utils/gpt_utils.py code served (permissive licence) · get_code("4f8e0c5e2a5c0e2f") 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
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# nearest_multiple_crop(value, crop_sz)
# - Takes two parameters: value and crop_sz
# - Performs integer division and multiplication: value // crop_sz * crop_sz
# - Both should support // and * operators (int, float, tensor, ndarray)
# Create simple scalar values
value = 17
crop_sz = 5
ARGS = {
"value": value,
"crop_sz": crop_sz
}
- 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 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
|
| prepare_questions_for_eval |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/evaluation_utils.py code served (permissive licence) · get_code("9e6dbf5093b8e74f") 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 random
import tempfile
import os
# Set seed for reproducibility
random.seed(42)
# Create a temporary directory for the save path
temp_dir = tempfile.mkdtemp()
save_path = os.path.join(temp_dir, "questions_eval.json")
# Construct a valid questions_list with the required structure
questions_list = [
{
'arxiv_ref': 'arxiv:2301.00001',
'question': 'What is the main subject?',
'Q': 'What is shown?',
'a': 'correct_answer',
'n0': 'wrong_answer_1',
'n1': 'wrong_answer_2',
'n2': 'wrong_answer_3',
'n3': 'wrong_answer_4',
'n4': 'wrong_answer_5',
'image_path': '/path/to/image1.jpg',
'gen_model': 'model_v1'
},
{
'arxiv_ref': 'arxiv:2301.00002',
'question': 'What is the color?',
'a': 'blue',
'n0': 'red',
'n1': 'green',
'n2': 'yellow',
'n3': 'purple',
'image_path': '/path/to/image2.jpg',
'gen_model': 'model_v2'
},
{
'arxiv_ref': 'arxiv:2301.00003',
'Q': 'Which one?',
'a': 'option_a',
'n0': 'option_b',
'n1': 'option_c',
'n2': 'option_d',
'n3': 'option_e',
'image_path': '/path/to/image3.jpg',
'gen_model': 'model_v1'
}
]
ARGS = {
'questions_list': questions_list,
'save_path': save_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tqdm — 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
|
| replace_delimiters |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/generate_raw_questions.py code served (permissive licence) · get_code("b69516ff4137a498") 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
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# - text: a string that will be processed
# - delimiters: a list of strings to search for and replace
# - replacement: a string to replace delimiters with
# The function iterates through delimiters and replaces each with replacement
ARGS = {
'text': 'hello.world_test',
'delimiters': ['.', '_'],
'replacement': '-'
}
- 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 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
|
| resize_to_closest_ar |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/model_utils/claude_utils.py code served (permissive licence) · get_code("4ac30ea009f8b618") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
from PIL import Image
import os
# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")
# Create a simple test image with a specific aspect ratio
# Creating a 3:4 aspect ratio image (width:height = 3:4)
test_width = 600
test_height = 800
test_img = Image.new('RGB', (test_width, test_height), color='red')
test_img.save(temp_image_path)
ARGS = {
'image_path': temp_image_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL — 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
|
| without_duplicates |
Ran ran; our contract draft was wrong, not the code |
nimrodshabtay/livexiv/vqa_generation/filter_utils.py code served (permissive licence) · get_code("bbe6df2991cd4f9c") 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
# The function without_duplicates checks if a list has no duplicates
# by comparing its length to the length of its set conversion.
# It takes a single parameter 'lst' which should be a list-like object.
# Test case 1: A list with no duplicates
lst_no_duplicates = [1, 2, 3, 4, 5]
ARGS = {
"lst": lst_no_duplicates
}
- 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
|
| EfficEval |
Not yet run unverified (harvested, no recorded run) |
nimrodshabtay/livexiv/livexiv/efficient_eval.py code served (permissive licence) · get_code("b8e78f199e05bc35") How it ran |
| classify_figure_type |
Not yet run unverified (harvested, no recorded run) |
nimrodshabtay/livexiv/vqa_generation/classify_figures.py code served (permissive licence) · get_code("199fbacfdb5ba1ef") How it ran |