| RerankConfig |
Ran ran on a synthesized input · constructed an object; no result was computed |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("3978d263c0be12f3") 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 an instance of its own class, RerankConfig: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass
torch.manual_seed(0)
@dataclass
class RerankConfig:
window_size: int = 5
stride: int = 1
candidate_top_n: int = 500
raw_weight: float = 0.0
dca_router_block_size: int = 32
lexical_features: bool = True
window_mode: str = 'full'
ARGS = {
'window_size': 5,
'stride': 1,
'candidate_top_n': 500,
'raw_weight': 0.0,
'dca_router_block_size': 32,
'lexical_features': True,
'window_mode': 'full'
}
- 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 RerankConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RerankConfig 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
|
| RerankResult |
Ran ran on a synthesized input · constructed an object; no result was computed |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("36b31d0aed95da4e") 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 an instance of its own class, RerankResult: the run constructed the object and did not call it, so no result was computed. 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 dataclasses import dataclass
from typing import Optional
@dataclass
class RerankResult:
memory_id: str
score: float
raw_score: float
rank: int
text: Optional[str] = None
validity: Optional[dict] = None
ARGS = {
"memory_id": "mem_001",
"score": 0.95,
"raw_score": 0.87,
"rank": 1,
"text": "This is a sample reranked result text.",
"validity": {"is_valid": True, "confidence": 0.92}
}
- 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 RerankResult — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RerankResult 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
|
| best_window_scores_for_candidates |
Ran ran; our contract draft was wrong, not the code |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("0ddec4a5dea41247") 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
torch.manual_seed(0)
# window_logits: a 1D tensor of logits for different windows
window_logits = torch.randn(5, dtype=torch.float32)
# memory_to_windows: a dict mapping memory indices to lists of window indices
memory_to_windows = {
0: [0, 1],
1: [2, 3],
2: [], # some memory indices may have no touching windows
3: [4],
}
# candidate_indices: a list of memory indices to query
candidate_indices = [0, 1, 2, 3]
# device: CPU device
device = torch.device('cpu')
ARGS = {
'window_logits': window_logits,
'memory_to_windows': memory_to_windows,
'candidate_indices': candidate_indices,
'device': device,
}
- 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
|
| build_memory_to_windows |
Ran ran; our contract draft was wrong, not the code |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("9bd9b7471a82323a") 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)
# Analyze the function:
# - It takes `windows` as a parameter
# - It iterates over windows with enumerate
# - For each window, it iterates over memory_idx values in that window
# - It converts memory_idx to int and uses it as a dict key
# - It appends window_idx to lists in the dictionary
# This means windows should be an iterable of iterables containing numeric indices
# Create sample windows data
# windows should be a list of collections (lists/tuples) where each contains memory indices
windows = [
[0, 1, 2], # window 0 contains memory indices 0, 1, 2
[1, 3], # window 1 contains memory indices 1, 3
[0, 2, 3], # window 2 contains memory indices 0, 2, 3
[2], # window 3 contains memory index 2
]
ARGS = {
"windows": windows
}
- 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
|
| candidate_local_windows |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("142cb2843aa5f4da") 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 2, 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 torch
import numpy as np
torch.manual_seed(0)
# Analyze the function:
# - num_items: int, represents the total number of items
# - candidate_indices: iterable of indices that can be converted to int
# - window_size: int, the size of each window
ARGS = {
"num_items": 10,
"candidate_indices": np.array([2, 5, 8, 1]),
"window_size": 4
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 2, 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
|
| cosine_scores |
Ran ran, violated the contract we drafted |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("3958eba049be360c") 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 (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)
# The function performs matrix multiplication: matrix @ query
# query should be a vector (1D tensor) or column vector
# matrix should be a 2D tensor compatible for multiplication
query = torch.randn(4) # 1D tensor of dimension 4
matrix = torch.randn(3, 4) # 2D tensor (3, 4) to multiply with query (4,)
ARGS = {
"query": query,
"matrix": matrix,
}
- 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 (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
|
| dca_router_outputs |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("800bcf2f798d2681") 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 numpy as np
import torch
torch.manual_seed(0)
# Construct the item dict with memory_embeddings and query_embedding
memory_embeddings = np.random.randn(6, 4).astype(np.float32)
query_embedding = np.random.randn(4).astype(np.float32)
item = {
'memory_embeddings': memory_embeddings,
'query_embedding': query_embedding
}
# candidate_indices should be valid indices into the memories
candidate_indices = np.array([0, 2, 4, 5])
# block_size determines how memories are grouped into blocks
block_size = 2
# device for output tensor
device = 'cpu'
ARGS = {
'item': item,
'candidate_indices': candidate_indices,
'block_size': block_size,
'device': device
}
- 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 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
|
| ensure_lexical_cache |
Ran ran; our contract draft was wrong, not the code |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("20e2cd80fa2d5f21") 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 re
from functools import lru_cache
STOPWORDS = {'a', 'an', 'and', 'are', 'as', 'at', 'be', 'did', 'do', 'does', 'for', 'from', 'had', 'has', 'have', 'he', 'her', 'him', 'his', 'i', 'in', 'is', 'it', 'of', 'on', 'or', 'she', 'that', 'the', 'their', 'they', 'to', 'was', 'were', 'what', 'when', 'where', 'which', 'who', 'why', 'with'}
TOKEN_RE = re.compile('[A-Za-z0-9]+')
@lru_cache(maxsize=250000)
def lexical_signature(text):
tokens = lexical_token_tuple(str(text))
return (frozenset(tokens), frozenset(zip(tokens, tokens[1:])))
@lru_cache(maxsize=250000)
def lexical_token_tuple(text):
text = str(text)
return tuple((t for t in TOKEN_RE.findall(text.lower()) if len(t) > 1 and t not in STOPWORDS))
def ensure_lexical_cache(item):
cache = item.get('_lexical_cache')
if cache is not None:
return cache
query_set, query_bigrams = lexical_signature(item['query'])
cache = {'query_set': query_set, 'query_bigrams': query_bigrams, 'memory_signatures': [None for _ in item['memories']]}
item['_lexical_cache'] = cache
return cache
# Setup code to construct valid arguments
ARGS = {
'item': {
'query': 'what is the meaning of life and the universe',
'memories': [
'the answer is forty two',
'everything happens for a reason',
'nothing matters in the end'
],
'_lexical_cache': 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 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
|
| lexical_overlap_features |
Ran ran; our contract draft was wrong, not the code |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("29d3aeac237af3b7") 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 numpy as np
import torch
import re
from functools import lru_cache
torch.manual_seed(0)
STOPWORDS = {'a', 'an', 'and', 'are', 'as', 'at', 'be', 'did', 'do', 'does', 'for', 'from', 'had', 'has', 'have', 'he', 'her', 'him', 'his', 'i', 'in', 'is', 'it', 'of', 'on', 'or', 'she', 'that', 'the', 'their', 'they', 'to', 'was', 'were', 'what', 'when', 'where', 'which', 'who', 'why', 'with'}
TOKEN_RE = re.compile('[A-Za-z0-9]+')
def lexical_token_tuple(text):
text = str(text)
return tuple((t for t in TOKEN_RE.findall(text.lower()) if len(t) > 1 and t not in STOPWORDS))
def lexical_signature(text):
tokens = lexical_token_tuple(str(text))
return (frozenset(tokens), frozenset(zip(tokens, tokens[1:])))
# Create a sample item structure that the function expects
item = {
'query': 'machine learning algorithms for data science',
'memories': [
{'text': 'deep learning neural networks'},
{'text': 'data processing and machine learning'},
],
'_lexical_cache': None
}
# Create candidate indices - indices into the memories list
candidate_indices = [0, 1]
# Device
device = 'cpu'
ARGS = {
'item': item,
'candidate_indices': candidate_indices,
'device': device,
}
- 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 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
|
| lexical_signature |
Ran ran; our contract draft was wrong, not the code |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("77dba932178b921d") 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 torch
import numpy as np
from functools import lru_cache
import re
torch.manual_seed(0)
# The function lexical_signature takes a single parameter: text
# It converts text to string, extracts tokens, and creates a signature
# The function uses: str(text), TOKEN_RE.findall(), len(), frozenset(), zip()
ARGS = {
'text': 'The quick brown fox jumps over the lazy dog'
}
- 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 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
|
| lexical_token_tuple |
Ran ran; our contract draft was wrong, not the code |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("4c116d17ef103637") 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 re
from functools import lru_cache
STOPWORDS = {'a', 'an', 'and', 'are', 'as', 'at', 'be', 'did', 'do', 'does', 'for', 'from', 'had', 'has', 'have', 'he', 'her', 'him', 'his', 'i', 'in', 'is', 'it', 'of', 'on', 'or', 'she', 'that', 'the', 'their', 'they', 'to', 'was', 'were', 'what', 'when', 'where', 'which', 'who', 'why', 'with'}
TOKEN_RE = re.compile('[A-Za-z0-9]+')
@lru_cache(maxsize=250000)
def lexical_token_tuple(text):
text = str(text)
return tuple((t for t in TOKEN_RE.findall(text.lower()) if len(t) > 1 and t not in STOPWORDS))
# Setup code to construct valid arguments
ARGS = {
'text': 'This is a test string with some meaningful words like Python and Machine Learning'
}
- 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, 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
|
| normalize_rows |
Ran ran, violated the contract we drafted |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("03589bbe0a298b97") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (4, 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
# The function normalize_rows takes a matrix parameter and:
# - Converts it to np.asarray with dtype=np.float32
# - Computes L2 norms along axis=1 (rows)
# - Divides each row by its norm
# Create a small test matrix with distinct dimensions (4 rows, 3 columns)
test_matrix = np.array([
[1.0, 2.0, 3.0],
[4.0, 5.0, 6.0],
[7.0, 8.0, 9.0],
[10.0, 11.0, 12.0]
], dtype=np.float32)
ARGS = {
"matrix": test_matrix
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family float, shape (4, 3) — shape (4, 3) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| normalize_scores |
Ran ran, violated the contract we drafted |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("ee33c4c15d79bb72") 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
# The function normalize_scores takes a 'scores' parameter
# It converts it to a numpy array of float32
# It computes std and mean
# So we need to provide array-like data
ARGS = {
"scores": [1.0, 2.0, 3.0, 4.0, 5.0]
}
- 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
|
| rerank_candidates |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("e573407cc07d66f4") 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 numpy as np
# Analyze the function signature and body:
# - raw_scores_all: numpy array, indexed with candidate_indices, used with np.argsort
# - candidate_indices: array-like, used to index raw_scores_all
# - candidate_scores: array-like, normalized like a score array
# - memory_ids: array-like, indexed with integers
# - raw_weight: float, used in weighted combination (0.0 to 1.0)
# Create test data
np.random.seed(0)
# raw_scores_all: array of scores for all candidates
raw_scores_all = np.array([0.9, 0.7, 0.5, 0.3, 0.1, 0.8], dtype=np.float32)
# candidate_indices: indices into raw_scores_all for the candidates we're reranking
candidate_indices = np.array([1, 3, 4], dtype=np.int32)
# candidate_scores: reranker scores for those candidates
candidate_scores = np.array([0.8, 0.6, 0.4], dtype=np.float32)
# memory_ids: identifiers for all candidates (indexed by the indices)
memory_ids = np.array(['id_0', 'id_1', 'id_2', 'id_3', 'id_4', 'id_5'], dtype=object)
# raw_weight: balance between raw and candidate scores
raw_weight = 0.5
ARGS = {
'raw_scores_all': raw_scores_all,
'candidate_indices': candidate_indices,
'candidate_scores': candidate_scores,
'memory_ids': memory_ids,
'raw_weight': raw_weight
}
- 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 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
|
| sliding_windows |
Ran ran, honoured the contract we drafted |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("5fa1aee78d001204") 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 2, 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 torch
import numpy as np
# The function sliding_windows takes three integer parameters
# num_items: total number of items
# window_size: size of each window
# stride: step size between windows
ARGS = {
"num_items": 10,
"window_size": 3,
"stride": 2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 2, 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
|
| window_tensor |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("57257e682be52820") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (3, 3, 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 numpy as np
torch.manual_seed(0)
# memory_embeddings: a tensor of shape (num_memories, embedding_dim)
# The function indexes into this tensor using windows
memory_embeddings = torch.randn(10, 4, dtype=torch.float32)
# windows: a list of lists, where each inner list contains indices into memory_embeddings
# Test case 1: all windows have the same length
windows_same_len = [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
# windows_var_len would test variable length windows
windows_var_len = [[0, 1], [2, 3, 4], [5]]
# Use the variable length case to test all branches
windows = windows_var_len
ARGS = {
"memory_embeddings": memory_embeddings,
"windows": windows
}
- 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 Tensor, ndim 3, dtype family float, shape (3, 3, 4) — shape (3, 3, 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
|
| ConvMemoryReranker |
Not yet run unverified (harvested, no recorded run) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("5bb21451777c1832") How it ran |
| candidate_features |
Not yet run unverified (harvested, no recorded run) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("56d22c23d9ac6e8f") How it ran |
| score_ce_lite |
Not yet run unverified (harvested, no recorded run) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("6377aea4a9075a3a") How it ran |
| window_scores |
Not yet run unverified (harvested, no recorded run) |
pth2002/ConvMemory/convmemory/reranker.py code served (permissive licence) · get_code("210ab691c6729f5b") How it ran |