| batch_hard |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/triplet_loss.py code served (permissive licence) · get_code("2fa6cc6f02a35ebc") 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 1, dtype family float, shape (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.functional as F
torch.manual_seed(0)
# Create a small batch hard loss setup
# Batch size: 4 samples, Distance matrix: 4x4
batch_size = 4
# All-to-all distance matrix (4x4)
# Distances between all pairs of samples
cdist = torch.tensor([
[0.0, 1.5, 2.3, 3.1],
[1.5, 0.0, 1.8, 2.9],
[2.3, 1.8, 0.0, 1.2],
[3.1, 2.9, 1.2, 0.0]
], dtype=torch.float32)
# Person IDs (classes) - 4 samples, 2 classes
# Samples 0,1 belong to class 0; samples 2,3 belong to class 1
pids = torch.tensor([0, 0, 1, 1], dtype=torch.long)
# Margin can be:
# - a float (e.g., 0.5)
# - 'soft' (uses softplus)
# - 'none' (no margin applied)
margin = 0.5
ARGS = {
'cdist': cdist,
'pids': pids,
'margin': margin
}
- 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 1, dtype family float, shape (4,) — shape (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
|
| calc_cdist |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/triplet_loss.py code served (permissive licence) · get_code("e48e75619dc39f15") 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, 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)
# Create two small tensors with distinct dimensions
a = torch.randn(2, 4) # batch_size=2, feature_dim=4
b = torch.randn(3, 4) # batch_size=3, feature_dim=4
ARGS = {
'a': a,
'b': b,
'metric': 'euclidean'
}
- 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, 3) — shape (2, 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
|
| clean_dict |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/embed.py code served (permissive licence) · get_code("2a170d2b7c7dddc3") 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 torch
torch.manual_seed(0)
# The function clean_dict takes a dictionary as input and removes 'module.' prefix from keys
# This is typically used when loading weights from a DataParallel model
# The function only uses .items(), .startswith(), and string slicing on the dict
# Create a test dictionary with some keys that have 'module.' prefix and some without
test_dict = {
'module.layer1.weight': torch.randn(4, 3),
'module.layer1.bias': torch.randn(3),
'module.layer2.weight': torch.randn(5, 4),
'layer3.weight': torch.randn(2, 5),
'layer3.bias': torch.randn(2),
}
ARGS = {
'dic': test_dict
}
- 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 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
|
| cmc |
Ran ran; our contract draft was wrong, not the code |
ZJULearning/PTL/functions.py code served (permissive licence) · get_code("d829b83e56e02c65") 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
from collections import defaultdict
# Set random seed for reproducibility
np.random.seed(0)
# Create a small distance matrix (4 gallery samples x 3 query samples)
distmat = np.random.rand(3, 4).astype(np.float32)
# Query IDs: 3 queries with IDs [0, 1, 2]
query_ids = np.array([0, 1, 2], dtype=np.int32)
# Gallery IDs: 4 gallery samples with IDs [0, 1, 0, 2]
# Note: repeated IDs so matches can be found
gallery_ids = np.array([0, 1, 0, 2], dtype=np.int32)
# Query camera IDs: 3 queries from cameras [0, 1, 0]
query_cams = np.array([0, 1, 0], dtype=np.int32)
# Gallery camera IDs: 4 gallery samples from cameras [1, 0, 1, 0]
gallery_cams = np.array([1, 0, 1, 0], dtype=np.int32)
# Top-k parameter
topk = 5
# Boolean flags
separate_camera_set = False
single_gallery_shot = False
first_match_break = False
ARGS = {
'distmat': distmat,
'query_ids': query_ids,
'gallery_ids': gallery_ids,
'query_cams': query_cams,
'gallery_cams': gallery_cams,
'topk': topk,
'separate_camera_set': separate_camera_set,
'single_gallery_shot': single_gallery_shot,
'first_match_break': first_match_break,
}
- 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
|
| cosine_dist |
Ran ran; our contract draft was wrong, not the code |
WangTaoAs/MGN_ReID/loss/triplet_loss.py pointer only (licence: Apache-2.0); the stored copy get_code serves, from stone96123/MDReID, is pointer only (licence: NONE) · get_code("71b4e1d375d8fd78") How it ranThe body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from stone96123/MDReID, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| create_pids2idxs |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/triplet_sampler.py code served (permissive licence) · get_code("a1d570b6c43c23c8") 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 torch
import numpy as np
class MockDataSource:
def __init__(self):
self.imgs = [
(torch.randn(3, 4), 0, "metadata_0"),
(torch.randn(3, 4), 1, "metadata_1"),
(torch.randn(3, 4), 0, "metadata_2"),
(torch.randn(3, 4), 2, "metadata_3"),
(torch.randn(3, 4), 1, "metadata_4"),
]
ARGS = {
"data_source": MockDataSource()
}
- 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 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
|
| euclidean_dist |
Ran ran; our contract draft was wrong, not the code |
WangTaoAs/MGN_ReID/loss/triplet_loss.py pointer only (licence: Apache-2.0); the stored copy get_code serves, from stone96123/MDReID, is pointer only (licence: NONE) · get_code("5315f75bf5367f0a") How it ranThe body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from stone96123/MDReID, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| euclidean_distance |
Ran ran on a synthesized input |
WangTaoAs/MGN_ReID/utils/metrics.py code served (permissive licence) · get_code("93f3ef4f748bb19f") 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, 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
import numpy as np
torch.manual_seed(0)
# qf: query features tensor - used with .shape[0], torch.pow, .sum(dim=1, keepdim=True), .expand, and .t()
# gf: gallery features tensor - used with .shape[0], torch.pow, .sum(dim=1, keepdim=True), .expand, .t(), and as argument to addmm_
# Both should be 2D tensors of floats
qf = torch.randn(2, 4) # 2 query samples, 4-dimensional features
gf = torch.randn(3, 4) # 3 gallery samples, 4-dimensional features
ARGS = {
"qf": qf,
"gf": gf,
}
- 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 (2, 3) — shape (2, 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
|
| eval_func |
Ran ran on a synthesized input |
WangTaoAs/MGN_ReID/utils/metrics.py code served (permissive licence) · get_code("684ff63ea266cf09") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Construct valid arguments for eval_func
# The function expects:
# - distmat: distance matrix of shape (num_queries, num_gallery)
# - q_pids: query person IDs, shape (num_queries,)
# - g_pids: gallery person IDs, shape (num_gallery,)
# - q_camids: query camera IDs, shape (num_queries,)
# - g_camids: gallery camera IDs, shape (num_gallery,)
# - max_rank: maximum rank to evaluate (default 50)
np.random.seed(0)
num_queries = 4
num_gallery = 8
# Distance matrix: smaller values mean better matches
distmat = np.random.rand(num_queries, num_gallery).astype(np.float32)
# Query person IDs - some identities appear in gallery
q_pids = np.array([1, 2, 1, 3], dtype=np.int32)
# Gallery person IDs - must have matching identities for valid queries
g_pids = np.array([1, 1, 2, 3, 4, 5, 2, 3], dtype=np.int32)
# Query camera IDs
q_camids = np.array([1, 1, 2, 2], dtype=np.int32)
# Gallery camera IDs - used to filter out same-camera matches for same person
g_camids = np.array([1, 2, 1, 1, 2, 2, 2, 1], dtype=np.int32)
max_rank = 5
ARGS = {
'distmat': distmat,
'q_pids': q_pids,
'g_pids': g_pids,
'q_camids': q_camids,
'g_camids': g_camids,
'max_rank': max_rank
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — 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
|
| evaluate |
Ran ran; our contract draft was wrong, not the code |
CoinCheung/SphereReID/evaluate.py code served (permissive licence) · get_code("14ce86adfcabf648") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create small synthetic embedding data
np.random.seed(0)
# Number of queries and gallery samples
n_q = 3
n_g = 5
emb_dim = 4
# Query embeddings and metadata
query_embds = np.random.randn(n_q, emb_dim).astype(np.float32)
query_pids = np.array([0, 1, 0], dtype=np.int32) # Person IDs
query_camids = np.array([0, 1, 2], dtype=np.int32) # Camera IDs
# Gallery embeddings and metadata
gallery_embds = np.random.randn(n_g, emb_dim).astype(np.float32)
gallery_pids = np.array([0, 1, 2, 0, 1], dtype=np.int32) # Person IDs
gallery_camids = np.array([1, 2, 0, 0, 1], dtype=np.int32) # Camera IDs
# Package as tuple
embd_res = (query_embds, query_pids, query_camids, gallery_embds, gallery_pids, gallery_camids)
ARGS = {
'embd_res': embd_res,
'cmc_max_rank': 1
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, 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_csv_name |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/embed.py code served (permissive licence) · get_code("bed67b8223c2839d") 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
def extract_csv_name(csv_file):
filename = os.path.basename(csv_file)
if filename.endswith('.csv'):
return filename[:-4]
else:
return filename
ARGS = {
'csv_file': '/path/to/data.csv'
}
- 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
|
| get_data_shape |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/logger.py code served (permissive licence) · get_code("b483a25cae0194a3") 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 Size. 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)
# Test case 1: torch tensor with shape attribute
tensor_data = torch.randn(2, 4)
# Test case 2: numpy array with shape attribute
numpy_data = np.random.randn(3, 5)
# Test case 3: list
list_data = [1, 2, 3, 4, 5]
# Test case 4: tuple
tuple_data = (10, 20, 30)
# Test case 5: scalar (no shape, not list/tuple)
scalar_data = 42
# Test with tensor as primary argument
ARGS = {
'data': tensor_data
}
- 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 Size — a Size output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Size output the recorded ndim 1 and dtype family int 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_last_file_number |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/logger.py code served (permissive licence) · get_code("0f69b32d83075cfd") 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
import shutil
# Create a temporary directory with test files
temp_dir = tempfile.mkdtemp()
# Create some test files matching a pattern with numbers
test_files = [
"checkpoint_0.pt",
"checkpoint_5.pt",
"checkpoint_12.pt",
"checkpoint_3.pt",
"other_file.txt",
]
for filename in test_files:
with open(os.path.join(temp_dir, filename), 'w') as f:
f.write("test")
# Define the arguments
ARGS = {
"base_name": "checkpoint_{}.pt",
"path": 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 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_new_numeric_name |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/logger.py code served (permissive licence) · get_code("2ac5011790ab78b8") 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 re
import tempfile
import shutil
# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()
# Create some test files matching the pattern
test_files = [
"checkpoint_1.pt",
"checkpoint_2.pt",
"checkpoint_5.pt",
]
for file in test_files:
open(os.path.join(temp_dir, file), 'w').close()
ARGS = {
"base_name": "checkpoint_{}.pt",
"path": 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 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
|
| k_reciprocal_neigh |
Ran ran on a synthesized input |
ZJULearning/PTL/functions.py code served (permissive licence) · get_code("a610e67edff490e6") 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 (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small initial_rank matrix
# The function indexes into this with [i, :k1+1] and [forward_k_neigh_index, :k1+1]
# So we need enough rows and columns
initial_rank = np.array([
[0, 1, 2, 3, 4],
[1, 0, 3, 2, 4],
[2, 3, 0, 1, 4],
[3, 2, 1, 0, 4],
[4, 0, 1, 2, 3]
], dtype=np.int64)
# i is an index into the first dimension of initial_rank
i = 0
# k1 is used to slice the rank matrix up to k1+1
k1 = 2
ARGS = {
"initial_rank": initial_rank,
"i": i,
"k1": k1
}
- 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 (3,) — shape (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
|
| list_pictures |
Ran ran on a synthesized input |
ZJULearning/PTL/data.py code served (permissive licence) · get_code("eb053124052a3cd2") 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 some image files
temp_dir = tempfile.mkdtemp()
# Create subdirectories
os.makedirs(os.path.join(temp_dir, 'subdir1'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'subdir2'), exist_ok=True)
# Create dummy image files with various extensions
open(os.path.join(temp_dir, 'image1.jpg'), 'w').close()
open(os.path.join(temp_dir, 'image2.jpeg'), 'w').close()
open(os.path.join(temp_dir, 'image3.png'), 'w').close()
open(os.path.join(temp_dir, 'image4.bmp'), 'w').close()
open(os.path.join(temp_dir, 'image5.ppm'), 'w').close()
open(os.path.join(temp_dir, 'subdir1', 'nested1.jpg'), 'w').close()
open(os.path.join(temp_dir, 'subdir2', 'nested2.png'), 'w').close()
open(os.path.join(temp_dir, 'other_file.txt'), 'w').close()
ARGS = {
'directory': temp_dir,
'ext': 'jpg|jpeg|bmp|png|ppm'
}
- 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
|
| list_pictures |
Ran ran on a synthesized input |
zp1018/ReID-MGN/mgn/market1501.py code served (permissive licence) · get_code("593b08055f5a5011") 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 re
import tempfile
import shutil
# Create a temporary directory structure with some image files
temp_dir = tempfile.mkdtemp()
# Create subdirectories
os.makedirs(os.path.join(temp_dir, "subdir1"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir2"), exist_ok=True)
# Create dummy image files with various extensions
open(os.path.join(temp_dir, "image1.jpg"), 'w').close()
open(os.path.join(temp_dir, "image2.png"), 'w').close()
open(os.path.join(temp_dir, "photo.jpeg"), 'w').close()
open(os.path.join(temp_dir, "subdir1", "image3.bmp"), 'w').close()
open(os.path.join(temp_dir, "subdir1", "image4.ppm"), 'w').close()
open(os.path.join(temp_dir, "subdir2", "image5.png"), 'w').close()
# Create a non-image file that should be filtered out
open(os.path.join(temp_dir, "readme.txt"), 'w').close()
ARGS = {
"directory": temp_dir,
"ext": "jpg|jpeg|bmp|png|ppm"
}
- 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
|
| make_dataset_default |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/csv_dataset.py code served (permissive licence) · get_code("c928647a92245df7") 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 os
import tempfile
import csv
# Create a temporary directory and CSV file for testing
temp_dir = tempfile.mkdtemp()
csv_file = os.path.join(temp_dir, 'test.csv')
data_dir = os.path.join(temp_dir, 'data')
os.makedirs(data_dir, exist_ok=True)
# Create test image files
test_image_1 = os.path.join(data_dir, 'image1.jpg')
test_image_2 = os.path.join(data_dir, 'image2.jpg')
open(test_image_1, 'w').close()
open(test_image_2, 'w').close()
# Create a CSV file with the expected format
with open(csv_file, 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['pid', 'path'])
writer.writerow(['1', 'image1.jpg'])
writer.writerow(['2', 'image2.jpg'])
ARGS = {
'csv_file': csv_file,
'data_dir': data_dir,
'limit': None
}
- 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 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
|
| make_dilated_layer4 |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/models/dilated.py code served (permissive licence) · get_code("843e31edd4b97817") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Create a minimal block class that satisfies the function's usage
class MinimalBlock(nn.Module):
expansion = 2 # Used in the function to compute planes * block.expansion
def __init__(self, inplanes, planes, stride=1, downsample=None, rate=1, dilation=1):
super().__init__()
self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=3, padding=1, stride=stride, dilation=dilation)
self.bn1 = nn.BatchNorm2d(planes)
self.conv2 = nn.Conv2d(planes, planes * self.expansion, kernel_size=3, padding=1)
self.bn2 = nn.BatchNorm2d(planes * self.expansion)
self.downsample = downsample
self.stride = stride
def forward(self, x):
identity = x
out = self.conv1(x)
out = self.bn1(out)
out = self.conv2(out)
out = self.bn2(out)
if self.downsample is not None:
identity = self.downsample(x)
out += identity
return out
ARGS = {
"block": MinimalBlock,
"planes": 512,
"blocks": 3
}
- 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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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_optimizer |
Ran ran on a synthesized input |
WangTaoAs/MGN_ReID/processor/make_optimizer.py code served (permissive licence) · get_code("6e544671b85f034f") 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 Adam. 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
import torch.optim as optim
torch.manual_seed(0)
# Create a minimal model with some trainable parameters
class MinimalModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(4, 3)
self.linear2 = nn.Linear(3, 2)
def forward(self, x):
x = self.linear1(x)
x = self.linear2(x)
return x
model = MinimalModel()
# Create a minimal args object with all required attributes
class Args:
def __init__(self):
self.optimizer = 'ADAM'
self.lr = 0.001
self.weight_decay = 1e-5
self.momentum = 0.9
self.dampening = 0.0
self.nesterov = False
self.beta1 = 0.9
self.beta2 = 0.999
self.epsilon = 1e-8
self.amsgrad = False
args = Args()
ARGS = {
'args': args,
'model': model
}
- 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 Adam — a Adam output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Adam 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_scheduler |
Ran ran on a synthesized input |
WangTaoAs/MGN_ReID/processor/make_optimizer.py code served (permissive licence) · get_code("348c97f2f7dfc317") 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 StepLR. 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
import torch.optim as optim
torch.manual_seed(0)
# Create a minimal model
model = nn.Linear(4, 3)
# Create an optimizer
optimizer = optim.SGD(model.parameters(), lr=0.1)
# Create args object with necessary attributes
class Args:
def __init__(self):
self.decay_type = 'step'
self.lr_decay = 10
self.gamma = 0.1
args = Args()
ARGS = {
'args': args,
'optimizer': optimizer
}
- 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 StepLR — a StepLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a StepLR 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
|
| mean_ap |
Ran ran on a synthesized input |
ZJULearning/PTL/functions.py code served (permissive licence) · get_code("ade5a37f8a900999") 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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small distance matrix (4 queries x 3 gallery items)
distmat = np.array([
[0.1, 0.5, 0.8],
[0.2, 0.3, 0.9],
[0.4, 0.6, 0.7],
[0.15, 0.55, 0.85]
], dtype=np.float32)
# Query IDs: 4 queries with IDs [0, 1, 2, 3]
query_ids = np.array([0, 1, 2, 3], dtype=np.int32)
# Gallery IDs: 3 gallery items with IDs [0, 1, 0]
# Having duplicates allows for matches
gallery_ids = np.array([0, 1, 0], dtype=np.int32)
# Query camera IDs: all from camera 0
query_cams = np.array([0, 0, 0, 0], dtype=np.int32)
# Gallery camera IDs: from cameras [1, 1, 1]
gallery_cams = np.array([1, 1, 1], dtype=np.int32)
ARGS = {
'distmat': distmat,
'query_ids': query_ids,
'gallery_ids': gallery_ids,
'query_cams': query_cams,
'gallery_cams': gallery_cams
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
- 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
|
| normalize |
Ran ran; our contract draft was wrong, not the code |
WangTaoAs/MGN_ReID/loss/triplet_loss.py code served (permissive licence) · get_code("e3b2a83f52101f2d") 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
torch.manual_seed(0)
# Create a small tensor with batch size 2 and feature dimension 4
x = torch.randn(2, 4)
ARGS = {
"x": x,
"axis": -1
}
- 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
|
| pil_loader |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/csv_dataset.py code served (permissive licence) · get_code("adea188f95a2367b") 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 Image. 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 PIL import Image
import io
import tempfile
import os
# Create a temporary valid RGB image file
temp_dir = tempfile.mkdtemp()
img_path = os.path.join(temp_dir, "test_image.png")
# Create a simple RGB image and save it
rgb_image = Image.new('RGB', (4, 3), color=(255, 0, 0))
rgb_image.save(img_path)
# Define ARGS
ARGS = {
"path": img_path,
"row": 0
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
|
| pil_loader_with_crop |
Ran ran on a synthesized input |
kilsenp/triplet-reid-pytorch/csv_dataset.py code served (permissive licence) · get_code("1fef0055e4652d03") 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 Image. 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 PIL import Image
import io
# 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 RGB image (100x100)
img = Image.new('RGB', (100, 100), color='red')
img.save(temp_image_path)
# Create a row dict with crop parameters
row = {
'left': 10.0,
'top': 15.0,
'width': 30.0,
'height': 25.0
}
ARGS = {
'path': temp_image_path,
'row': row
}
- 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 Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
|
| batch_soft |
Not yet run unverified (harvested, no recorded run) |
kilsenp/triplet-reid-pytorch/triplet_loss.py code served (permissive licence) · get_code("f29fa18ca4edab98") How it ran |
| import_from_path |
Not yet run unverified (harvested, no recorded run) |
kilsenp/triplet-reid-pytorch/models/utils.py code served (permissive licence) · get_code("caf4525e66901338") How it ran |
| make_loss |
Not yet run unverified (harvested, no recorded run) |
WangTaoAs/MGN_ReID/loss/make_loss.py code served (permissive licence) · get_code("78f5737686a6d6fd") How it ran |
| make_model |
Not yet run unverified (harvested, no recorded run) |
WangTaoAs/MGN_ReID/model/build_model.py code served (permissive licence) · get_code("c656b5d8b9ddaf71") How it ran |
| write_to_h5 |
Not yet run unverified (harvested, no recorded run) |
kilsenp/triplet-reid-pytorch/embed.py code served (permissive licence) · get_code("36e1ac6f83dcf494") How it ran |