| build_candidate_interaction |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/interactions.py code served (permissive licence) · get_code("c3a384dc22d47af5") 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 RelationalCandidateInteraction. 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
from torch import nn
torch.manual_seed(0)
class MockConfig:
def __init__(self, interaction='relational', interaction_dim=256, interaction_hidden_dim=512, interaction_dropout=0.1, interaction_score_scale=0.1):
self.interaction = interaction
self.interaction_dim = interaction_dim
self.interaction_hidden_dim = interaction_hidden_dim
self.interaction_dropout = interaction_dropout
self.interaction_score_scale = interaction_score_scale
config = MockConfig(
interaction='relational',
interaction_dim=128,
interaction_hidden_dim=256,
interaction_dropout=0.1,
interaction_score_scale=0.1
)
input_dim = 64
ARGS = {
'config': config,
'input_dim': input_dim,
}
- 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 RelationalCandidateInteraction — a RelationalCandidateInteraction output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RelationalCandidateInteraction 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
|
| candidate_id |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/prompts.py code served (permissive licence) · get_code("f97677f8570c1943") 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
from collections.abc import Mapping
from typing import Any
# The function takes two parameters:
# 1. item: Mapping[str, Any] - a dict-like object that is checked for keys
# 2. fallback: int - an integer used as fallback
# Create a valid Mapping with one of the expected keys
item_dict = {
'item_id': 12345
}
# Create fallback int
fallback_value = 999
ARGS = {
'item': item_dict,
'fallback': fallback_value
}
- 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
|
| ensure_dir |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/training.py code served (permissive licence) · get_code("7e8c38139d9ac58c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
from pathlib import Path
# The function takes a path (str or Path) and creates directories
# We'll use a temporary directory path as a string
with tempfile.TemporaryDirectory() as tmpdir:
test_path = str(Path(tmpdir) / "test_dir" / "nested" / "path")
ARGS = {
"path": test_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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| evaluate_at_k |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/experiments/evaluation/metrics.py code served (permissive licence) · get_code("6655d3145e66c701") 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 math
from collections.abc import Iterable, Mapping, Sequence
from typing import Any
# Create test data for evaluate_at_k
recommendations = {
"user1": ["item1", "item2", "item3", "item4"],
"user2": ["item2", "item4", "item1"],
"user3": ["item5", "item6"]
}
ground_truth = {
"user1": ["item1", "item3", "item5"],
"user2": ["item2", "item4"],
"user3": ["item6", "item7"]
}
k = 3
ARGS = {
"recommendations": recommendations,
"ground_truth": ground_truth,
"k": k
}
- 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
|
| global_preference_inconsistency |
Ran ran, honoured the contract we drafted |
ejbito/InvariRank/experiments/evaluation/preference.py code served (permissive licence) · get_code("792fd2c13deb2736") 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 float, 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
from collections.abc import Mapping, Sequence
torch.manual_seed(0)
# Construct observations: a sequence of mappings with 'input' and 'output' keys
# Each contains sequences of strings (item IDs)
observations = [
{
'input': ['item_a', 'item_b', 'item_c'],
'output': ['item_b', 'item_a', 'item_c']
},
{
'input': ['item_a', 'item_b', 'item_c'],
'output': ['item_a', 'item_c', 'item_b']
},
{
'input': ['item_a', 'item_b', 'item_c'],
'output': ['item_c', 'item_b', 'item_a']
}
]
ARGS = {
'observations': observations
}
- 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 float, 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
|
| hit_rate_at_k |
Ran ran, honoured the contract we drafted |
ejbito/InvariRank/experiments/evaluation/metrics.py code served (permissive licence) · get_code("d91d03fb0d2fc06a") 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 float, 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
from collections.abc import Mapping, Sequence, Iterable
torch.manual_seed(0)
# Create valid arguments for hit_rate_at_k function
# The function expects:
# - recommendations: Mapping[Any, Sequence[Any]] - maps user IDs to sequences of recommended item IDs
# - ground_truth: Mapping[Any, Iterable[Any]] - maps user IDs to iterables of relevant item IDs
# - k: int - the cutoff for top-k evaluation
recommendations = {
"user1": ["item_a", "item_b", "item_c", "item_d"],
"user2": [1, 2, 3, 4],
"user3": ["x", "y", "z"],
}
ground_truth = {
"user1": {"item_a", "item_e"}, # item_a is in recommendations[:k], so hit
"user2": {2, 5, 6}, # 2 is in recommendations[:k], so hit
"user3": {"x", "y", "m", "n"}, # x and y are in recommendations[:k], so hit
}
k = 2
ARGS = {
"recommendations": recommendations,
"ground_truth": ground_truth,
"k": k,
}
- 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 float, 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
|
| item_fields |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/prompts.py code served (permissive licence) · get_code("892aae0040720850") 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.
# Analyze the function to understand what arguments it needs
# item_fields takes one parameter: item (a Mapping[str, Any])
# The function uses:
# - item.get() method to access keys like 'title', 'name', 'year', 'release_year', 'rating', 'genres', 'categories'
# - str() conversion on values
# - ', '.join() on genres/categories (expects iterable of items that can be str()'d)
# - candidate_id() function which expects item dict and a fallback int
# Build a sample item dict with various fields
item = {
'item_id': 12345,
'title': 'Inception',
'year': 2010,
'rating': 8.8,
'genres': ['Sci-Fi', 'Action', 'Thriller'],
'name': 'Alternative Title',
'release_year': 2011,
'categories': ['Category1', 'Category2']
}
ARGS = {
'item': item
}
- 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
|
| listwise_collator |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/training.py code served (permissive licence) · get_code("c060abb0abd4293e") 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
torch.manual_seed(0)
# The function expects a batch which is a list of dicts
# It checks that len(batch) == 1, so we need exactly one element
# It returns batch[0], which is a dict[str, Any]
sample_dict = {
"query": torch.randn(2, 4),
"documents": torch.randn(3, 4),
"relevance_scores": torch.tensor([1.0, 0.5, 0.2]),
"doc_ids": [101, 102, 103],
"metadata": {"source": "test"}
}
batch = [sample_dict]
ARGS = {
"batch": batch
}
- 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
|
| load_template |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/prompts.py code served (permissive licence) · get_code("235d0ccc9ee9dd9b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import tempfile
from pathlib import Path
# Define INVARIRANK_TEMPLATE as a dict that would be used by the function
INVARIRANK_TEMPLATE = {
"prompt": "This is a template",
"version": "1.0"
}
# Create a temporary JSON file to use as a test template
temp_dir = tempfile.mkdtemp()
temp_json_path = Path(temp_dir) / "test_template.json"
with open(temp_json_path, 'w', encoding='utf-8') as f:
json.dump({"prompt": "test", "model": "gpt-3"}, f)
# Set up arguments for the function
ARGS = {
"name_or_path": str(temp_json_path),
"default_name": "invarirank"
}
- 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
|
| marginal_position_exposure |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/experiments/evaluation/position_bias.py code served (permissive licence) · get_code("776af5b4244f944d") 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
from collections.abc import Mapping
from typing import Any
torch.manual_seed(0)
# Construct a valid users mapping argument
users = {
"user_1": {
"permutations": [
{
"permutation_index": 0,
"input_candidate_item_ids": [101, 102, 103, 104, 105],
"reranked_item_ids": [102, 101, 105, 103, 104]
},
{
"permutation_index": 1,
"input_candidate_item_ids": [201, 202, 203, 204],
"reranked_item_ids": [203, 201, 202, 204]
}
]
},
"user_2": {
"permutations": [
{
"permutation_index": 0,
"input_candidate_item_ids": [301, 302, 303],
"reranked_item_ids": [302, 303, 301]
}
]
}
}
ARGS = {
"users": users,
"k": 5,
"include_values": False
}
- 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
|
| method_from_config |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/config.py code served (permissive licence) · get_code("c127a43848d15fe3") 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.
class MockConfig:
def __init__(self, attention_mask='causal', position_ids='standard', interaction='none'):
self.attention_mask = attention_mask
self.position_ids = position_ids
self.interaction = interaction
config = MockConfig(attention_mask='causal', position_ids='standard', interaction='none')
ARGS = {'config': config}
- 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
|
| order_user_ids |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/experiments/evaluation/sampling.py code served (permissive licence) · get_code("c4ac6c200cfb9f23") 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 int; 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
from collections.abc import Sequence
ARGS = {
"user_ids": [1, 2, 3, 4, 5],
"sample": True,
"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 int — 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
|
| position_bias_metrics_path |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/experiments/evaluation/position_bias.py code served (permissive licence) · get_code("18aaf88796801c06") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
ARGS = {
'dataset': 'msmarco',
'retriever': 'bm25',
'candidate_file_stem': 'candidates',
'reranker_file_stem': 'reranker_scores',
'k': 10
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| recall_at_k |
Ran ran, honoured the contract we drafted |
ejbito/InvariRank/experiments/evaluation/metrics.py code served (permissive licence) · get_code("20d2254a15485774") 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 float, 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.
# Setup code for recall_at_k function
ARGS = {
"recommendations": {
"user_1": ["item_a", "item_b", "item_c", "item_d"],
"user_2": ["item_x", "item_y", "item_z"],
"user_3": ["item_1", "item_2", "item_3", "item_4", "item_5"],
},
"ground_truth": {
"user_1": ["item_b", "item_d", "item_e"],
"user_2": ["item_x", "item_y"],
"user_3": ["item_2", "item_4"],
},
"k": 3,
}
- 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 float, 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
|
| resolve_dtype |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/modeling.py code served (permissive licence) · get_code("f97a2e08f775f1b8") 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 dtype. 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 resolve_dtype takes a single parameter: dtype_name (str)
# It looks up the dtype_name in a dictionary of aliases and returns the corresponding torch dtype
# Valid inputs are strings like 'float32', 'fp32', 'float16', 'fp16', 'bfloat16', 'bf16'
ARGS = {
'dtype_name': 'float32'
}
- 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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
|
| sample_permutation |
Ran ran, honoured the contract we drafted |
ejbito/InvariRank/invarirank/training.py code served (permissive licence) · get_code("750d88b81ce8918f") 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 int; 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
ARGS = {
"count": 5,
"deterministic": True,
"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 int — 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
|
| select_device |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/invarirank/modeling.py code served (permissive licence) · get_code("1b3da8d667ff6ca4") 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 device. 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
torch.manual_seed(0)
ARGS = {
'requested': 'cpu'
}
- 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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| select_user_ids |
Ran ran; our contract draft was wrong, not the code |
ejbito/InvariRank/experiments/evaluation/sampling.py code served (permissive licence) · get_code("51956f680bfe0400") 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 int; 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
from collections.abc import Sequence
# Define ARGS dict with valid arguments for select_user_ids
ARGS = {
"user_ids": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
"max_users": 5,
"sample": True,
"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 int — 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
|
| load_tokenizer |
Not yet run unverified (harvested, no recorded run) |
ejbito/InvariRank/invarirank/modeling.py code served (permissive licence) · get_code("6d2f32351f12ba2b") How it ran |
| pairwise_preference_instability |
Not yet run unverified (harvested, no recorded run) |
ejbito/InvariRank/experiments/evaluation/preference.py code served (permissive licence) · get_code("fa5041287e45f1db") How it ran |
| preference_consistency_metrics |
Not yet run unverified (harvested, no recorded run) |
ejbito/InvariRank/experiments/evaluation/preference.py code served (permissive licence) · get_code("db3a38a24e82111c") How it ran |