| CrossEntropyLoss |
Ran ran on a synthesized input · constructed an object; no result was computed |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("9f6f6b5018897446") 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, CrossEntropyLoss: 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 torch.nn import BCELoss
torch.manual_seed(0)
class CrossEntropyLoss:
def __init__(self):
self._func = BCELoss()
def __call__(self, y_pred, y_true):
return self._func(y_pred, y_true.float())
# Create small test tensors
# y_pred: batch_size=2, output_dim=4 (probabilities, should be in [0,1] for BCELoss)
y_pred = torch.sigmoid(torch.randn(2, 4))
# y_true: batch_size=2, output_dim=4 (binary labels, should be 0 or 1)
y_true = torch.randint(0, 2, (2, 4)).float()
ARGS = {
}
- 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 CrossEntropyLoss — 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 CrossEntropyLoss 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
|
| MaxAggregator |
Ran ran on a synthesized input |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("a57219c4a4a3794e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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 torch.nn as nn
class SimilarityOutputLayer(nn.Module):
def __init__(self):
super(SimilarityOutputLayer, self).__init__()
self._projection_layer = nn.Sequential(nn.Linear(1, 1, True), nn.Sigmoid())
def forward(self, user_emb, item_emb):
"""
n_embs is the number of embedding vecters per user
:param user_emb: tensor, shape [batch_size, n_embs, emb_size]
:param item_emb: tensor, shape [batch_size, n_items, emb_size]
:return: similarity prediction [batch_size, n_items, n_embs]
"""
cos_sim = _sims(user_emb, item_emb)
return torch.squeeze(self._projection_layer(cos_sim), dim=-1)
def _sims(user_emb, item_emb):
"""
n_embs is the number of embedding vecters per user
:param user_emb: tensor, shape [batch_size, n_embs, emb_size]
:param item_emb: tensor, shape [batch_size, n_items, emb_size]
:return: similarity prediction [batch_size, n_items, n_embs]
"""
user_emb_norm = user_emb / torch.clamp(torch.norm(user_emb, dim=-1, keepdim=True), 1e-07)
item_emb_norm = item_emb / torch.clamp(torch.norm(item_emb, dim=-1, keepdim=True), 1e-07)
user_4d = torch.unsqueeze(user_emb_norm, dim=1)
item_4d = torch.unsqueeze(item_emb_norm, dim=2)
cos_sim = torch.sum(torch.mul(user_4d, item_4d), dim=-1, keepdim=True)
return cos_sim
class MaxAggregator(nn.Module):
def __init__(self):
super(MaxAggregator, self).__init__()
self._output_layer = SimilarityOutputLayer()
def forward(self, user_emb, item_emb, last_item_mask=None):
sims = self._output_layer(user_emb, item_emb)
if last_item_mask is None:
return sims.max(dim=-1, keepdim=False)[0]
last_item_mask = last_item_mask.unsqueeze(dim=1)
sims *= torch.where(last_item_mask == 1, last_item_mask, torch.ones_like(last_item_mask) * -10000)
return sims.max(dim=-1, keepdim=False)[0]
INIT_ARGS = {}
batch_size = 2
n_embs = 3
emb_size = 4
n_items = 5
user_emb = torch.randn(batch_size, n_embs, emb_size)
item_emb = torch.randn(batch_size, n_items, emb_size)
last_item_mask = torch.randint(0, 2, (batch_size, n_embs)).float()
ARGS = {
'user_emb': user_emb,
'item_emb': item_emb,
'last_item_mask': last_item_mask
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| MultiHeadAttention |
Ran ran on a synthesized input · constructed an object; no result was computed |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("208c6661bc2229c7") 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, MultiHeadAttention: 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
import numpy as np
torch.manual_seed(0)
# Define parameters for MultiHeadAttention
d_model = 8
input_dim = 15 # seq feature (4) + pos_enc (5) + time_enc (6)
emb_size = 4
n_head = 2
dropout = 0.1
activation = nn.ReLU
# Create sample tensors for forward pass testing
batch_size = 2
seq_len = 3
seq = torch.randn(batch_size, seq_len, emb_size)
pos_enc = torch.randn(batch_size, seq_len, 5)
time_enc = torch.randn(batch_size, seq_len, 6)
causality = True
cluster_mask = torch.ones(batch_size, seq_len, seq_len)
ARGS = {
'd_model': d_model,
'input_dim': input_dim,
'emb_size': emb_size,
'n_head': n_head,
'dropout': dropout,
'activation': activation,
}
- 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 MultiHeadAttention — 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 MultiHeadAttention 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
|
| OneHot |
Ran ran on a synthesized input · constructed an object; no result was computed |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("37b02f4c45d97cb2") 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, OneHot: 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
torch.manual_seed(0)
# Create a OneHot instance with reasonable parameters
one_hot_instance = nn.Module() # placeholder, will be overridden below
# Define arguments for OneHot.__init__
base = 2
max_k = 10
# Create sample timestamps tensor
# Shape: (batch_size=2, seq_len=4, 1) - small batch with sequence
timestamps = torch.tensor([
[[1.0], [2.0], [4.0], [8.0]],
[[1.0], [3.0], [5.0], [9.0]]
], dtype=torch.float32)
# Create sample time intervals tensor (alternative input)
time_itvls = torch.tensor([
[[0.0], [1.0], [2.0], [4.0]],
[[0.0], [2.0], [2.0], [4.0]]
], dtype=torch.float32)
ARGS = {
'base': base,
'max_k': max_k
}
- 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 OneHot — 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 OneHot 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
|
| RelValue |
Ran ran on a synthesized input |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("06e82cb3cef17ea6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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 torch.nn as nn
def _timestamp_to_intervals(timestamps: torch.Tensor) -> torch.Tensor:
"""
convert timestamps to intervals via numpy since
tf tensor does not support assignment
:param timestamps: python list or np array
:return: np array
"""
with torch.no_grad():
itvl = torch.zeros_like(timestamps)
itvl[:, 1:] = timestamps[:, 1:] - timestamps[:, :-1]
return itvl
class RelValue(nn.Module):
output_dim = 1
def forward(self, timestamps: torch.Tensor) -> torch.Tensor:
with torch.no_grad():
itvl = _timestamp_to_intervals(timestamps).float()
itvl /= torch.mean(itvl)
return itvl
INIT_ARGS = {}
ARGS = {
'timestamps': torch.tensor([
[0.0, 1.0, 3.0, 6.0],
[0.0, 2.0, 5.0, 9.0]
])
}
if __name__ == '__main__':
model = RelValue(**INIT_ARGS)
output = model(**ARGS)
print("Output shape:", output.shape)
print("Output:\n", output)
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| SimilarityOutputLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("7d07c4265897e12f") 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, SimilarityOutputLayer: 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
torch.manual_seed(0)
# Set up tiny tensors with distinct dimensions
batch_size = 2
n_embs = 3
n_items = 4
emb_size = 5
# Create user embeddings: [batch_size, n_embs, emb_size]
user_emb = torch.randn(batch_size, n_embs, emb_size)
# Create item embeddings: [batch_size, n_items, emb_size]
item_emb = torch.randn(batch_size, n_items, emb_size)
ARGS = {
}
- 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 SimilarityOutputLayer — 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 SimilarityOutputLayer 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
|
| SineEnc |
Ran ran on a synthesized input · constructed an object; no result was computed |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("5e6495bd6abbe5f5") 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, SineEnc: 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
torch.manual_seed(0)
class SineEnc(nn.Module):
def __init__(self, dim, max_time_scale=10000.0):
super(SineEnc, self).__init__()
self._dim = dim
self._denom = torch.arange(0, self._dim, 2) / self._dim
self._denom = self._denom.float()
self._denom *= -torch.log(torch.tensor(max_time_scale, dtype=torch.float))
self._denom = torch.reshape(torch.exp(self._denom), [1, 1, -1])
self.output_dim = dim
def forward(self, timestamps: torch.Tensor) -> torch.Tensor:
device = timestamps.device
if self._denom.device != device:
self._denom = self._denom.to(device)
pe = torch.zeros([timestamps.shape[0], timestamps.shape[1], self._dim], dtype=torch.float).to(device)
pe[:, :, 0::2] = torch.sin(timestamps * self._denom)
pe[:, :, 1::2] = torch.cos(timestamps * self._denom)
return pe
ARGS = {
'dim': 4,
'max_time_scale': 10000.0
}
- 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 SineEnc — 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 SineEnc 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
|
| SingleAttention |
Ran ran on a synthesized input · constructed an object; no result was computed |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("ab7fba4b5a28b231") 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, SingleAttention: 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
import numpy as np
torch.manual_seed(0)
# Parameters for SingleAttention
d_model = 4
input_dim = 5 # seq feature_dim (3) + pos_enc_dim (2)
activation = nn.ReLU
ARGS = {
"d_model": d_model,
"input_dim": input_dim,
"activation": activation,
}
- 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 SingleAttention — 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 SingleAttention 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
|
| TripletLoss |
Ran ran on a synthesized input |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("bad0b84ee7c194b1") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
INIT_ARGS = {
'margin': 0.5
}
ARGS = {
'y_pred': torch.tensor([
[0.8, 0.3, 0.9, 0.2, 0.7],
[0.4, 0.6, 0.1, 0.8, 0.5]
]),
'y_true': torch.tensor([
[1.0, 0.0, 1.0, 0.0, 1.0],
[0.0, 1.0, 0.0, 1.0, 0.0]
])
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 0, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| _get_cluster_m |
Ran ran; our contract draft was wrong, not the code |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("3272442123d20c03") 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 AgglomerativeClustering. 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 sklearn.cluster import AgglomerativeClustering
from sklearn import cluster
torch.manual_seed(0)
ARGS = {
'n_clusters': 3,
'method': 'ward'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type AgglomerativeClustering — a AgglomerativeClustering output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AgglomerativeClustering 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
|
| _log |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("2b6ce7681447068e") 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)
ARGS = {
"x": torch.tensor([[2.0, 4.0, 8.0, 16.0], [1.0, 2.0, 3.0, 4.0]]),
"base": 2
}
- 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
|
| _sims |
Ran ran; our contract draft was wrong, not the code |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("a80cf919b13904f1") 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 4, dtype family float, shape (2, 4, 3, 1) 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)
# Parameters:
# user_emb: tensor, shape [batch_size, n_embs, emb_size]
# item_emb: tensor, shape [batch_size, n_items, emb_size]
batch_size = 2
n_embs = 3
n_items = 4
emb_size = 5
user_emb = torch.randn(batch_size, n_embs, emb_size)
item_emb = torch.randn(batch_size, n_items, emb_size)
ARGS = {
"user_emb": user_emb,
"item_emb": item_emb,
}
- 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 4, dtype family float, shape (2, 4, 3, 1) — shape (2, 4, 3, 1) 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
|
| _timestamp_to_intervals |
Ran ran; our contract draft was wrong, not the code |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("6caadc02749ca1c6") 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)
# The function expects a tensor of timestamps with shape (batch_size, sequence_length)
# It computes intervals between consecutive timestamps
# The tensor should have at least 2 dimensions where:
# - First dimension is batch size
# - Second dimension is sequence length (at least 2 elements to compute intervals)
timestamps = torch.tensor([
[1.0, 2.5, 4.0, 5.5],
[0.5, 1.2, 3.1, 4.8]
], dtype=torch.float32)
ARGS = {
"timestamps": timestamps
}
- 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
|
| masked_softmax |
Ran ran; our contract draft was wrong, not the code |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("27a750666daf5a7f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
torch.manual_seed(0)
# Construct vec: a small tensor of logits
# Shape (2, 4) - batch size 2, 4 dimensions
vec = torch.randn(2, 4)
# Construct mask: a boolean tensor indicating valid positions
# Same shape as vec, with some True values (valid) and some False (masked out)
mask = torch.tensor([[True, True, False, True],
[True, False, True, True]], dtype=torch.bool)
# dim parameter for softmax
dim = -1
# epsilon for numerical stability (though not used in function body)
epsilon = 0.001
ARGS = {
'vec': vec,
'mask': mask,
'dim': dim,
'epsilon': epsilon
}
- 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
|
| WeightedMaxAggregator |
Not yet run unverified (harvested, no recorded run) |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("c0e9529199099257") How it ran |
| WeightedPinnerSagePlus |
Not yet run unverified (harvested, no recorded run) |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("1a497f47346c2715") How it ran |
| _AttentionModel |
Not yet run unverified (harvested, no recorded run) |
shihui2010/mip/modules/named_models.py code served (permissive licence) · get_code("7b08c36ccda6a574") How it ran |