| apply_init_args |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/core.py code served (permissive licence) · get_code("8b642ae98586389c") 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 inspect
torch.manual_seed(0)
# Create a simple function to use as `fn`
def sample_init_fn(self, hparams=None, *args, **kwargs):
"""Sample initialization function with various signatures."""
return {"self": self, "hparams": hparams, "args": args, "kwargs": kwargs}
# Create a simple class to use as `self`
class SimpleModule:
def __init__(self):
self.value = 42
# Create hparams as a dict
hparams = {
"learning_rate": 0.001,
"batch_size": 32,
"num_epochs": 10
}
# Build the ARGS dictionary
ARGS = {
"fn": sample_init_fn,
"self": SimpleModule(),
"hparams": hparams,
"args": (torch.randn(2, 4), torch.randn(2, 3)),
"kwargs": {"param1": "value1", "param2": torch.randn(2, 4)}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| cat_steps |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/lifecycle.py code served (permissive licence) · get_code("e2db25de373de572") 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 (6, 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 collections
torch.manual_seed(0)
# Test case 1: Sequence of Tensors
steps_tensors = [
torch.randn(2, 4),
torch.randn(2, 4),
torch.randn(2, 4)
]
# Test case 2: Sequence of Sequences of Tensors
steps_sequences = [
[torch.randn(2, 4), torch.randn(3, 4)],
[torch.randn(2, 4), torch.randn(3, 4)],
[torch.randn(2, 4), torch.randn(3, 4)]
]
# Test case 3: Sequence of Dicts with Tensor values
steps_dicts = [
{'a': torch.randn(2, 4), 'b': torch.randn(2, 5)},
{'a': torch.randn(2, 4), 'b': torch.randn(2, 5)},
{'a': torch.randn(2, 4), 'b': torch.randn(2, 5)}
]
# Use the tensor case as the main test
ARGS = {
'steps': steps_tensors
}
- 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 (6, 4) — shape (6, 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
|
| detach_to_cpu |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/lifecycle.py code served (permissive licence) · get_code("3a77b599b00adde4") 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 collections
torch.manual_seed(0)
# Test case 1: Single tensor
tensor_single = torch.randn(2, 4)
# Test case 2: Sequence of tensors
tensor_list = [torch.randn(2, 4), torch.randn(3, 5)]
# Test case 3: Dict of tensors
tensor_dict = {
'a': torch.randn(2, 4),
'b': torch.randn(3, 5),
'nested': {
'c': torch.randn(2, 3)
}
}
# Test case 4: Nested structure - sequence containing dicts and tensors
nested_sequence = [
torch.randn(2, 4),
{'x': torch.randn(3, 5)},
[torch.randn(2, 3)]
]
# Choose one test case for ARGS
ARGS = {
'x': tensor_dict
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| discounted_steps_per_epoch |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/optimizers.py code served (permissive licence) · get_code("c07ed198a634bd89") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from math import ceil
def discounted_steps_per_epoch(base_steps: int, num_gpus: int, accumulate_grad_batches: int):
return max(1, ceil(base_steps / max(1, num_gpus) / max(1, accumulate_grad_batches or 1)))
ARGS = {
"base_steps": 1000,
"num_gpus": 4,
"accumulate_grad_batches": 2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| fig2img |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/logging.py code served (permissive licence) · get_code("1ac34a74721355dc") 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 PngImageFile. 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 matplotlib.pyplot as plt
import numpy as np
# Create a simple matplotlib figure
fig, ax = plt.subplots(figsize=(4, 3))
x = np.linspace(0, 10, 100)
y = np.sin(x)
ax.plot(x, y)
ax.set_title('Test Plot')
ax.set_xlabel('X')
ax.set_ylabel('Y')
ARGS = {
'fig': fig
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type PngImageFile — a PngImageFile output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PngImageFile output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_modules_to_unfreeze |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/unfreeze.py code served (permissive licence) · get_code("0a139178de9f1bb5") 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 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
torch.manual_seed(0)
# Build a small module hierarchy with named submodules
# The function uses: named_modules(), hasattr(m, 'weight'), hasattr(m, 'bias')
class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.layer1 = nn.Linear(4, 3)
self.layer2 = nn.Sequential(
nn.Linear(3, 2),
nn.ReLU()
)
self.layer3_special = nn.Linear(2, 1)
self.buffer_only = nn.Module() # Module without weight/bias
def forward(self, x):
x = self.layer1(x)
x = self.layer2(x)
x = self.layer3_special(x)
return x
parent_module = SimpleModel()
name_must_include = 'layer'
ARGS = {
'parent_module': parent_module,
'name_must_include': name_must_include
}
- 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 list, ndim 2, 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
|
| linear_unfreeze_schedule |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/unfreeze.py code served (permissive licence) · get_code("416813b50c6c11a1") 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 torch.nn as nn
torch.manual_seed(0)
ARGS = {
"initial_epoch": 0,
"total_layers": 10,
"step_size": 1,
"init_layers": 0,
"max_layers": -1,
"epoch_step": 1
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type 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
|
| prefix_keys |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/lifecycle.py code served (permissive licence) · get_code("1a777ae82c0e6442") 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
from typing import Dict
torch.manual_seed(0)
# Construct arguments for prefix_keys function
prefix = "model_"
dictionary = {
"loss": 0.5,
"accuracy": 0.95,
"learning_rate": 0.001,
"epoch": 42
}
ARGS = {
"prefix": prefix,
"dictionary": dictionary
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| scatter_plot |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/feature_visualisation.py code served (permissive licence) · get_code("0539e693642efec3") 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 Figure. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
from typing import List
# Create sample features array (2D array with shape [n_samples, 2] for scatter plotting)
features = np.array([
[1.0, 2.0],
[2.5, 3.5],
[3.2, 1.8],
[4.1, 4.2],
[1.5, 3.1],
])
# Create sample labels array (class indices for each sample)
labels = np.array([0, 1, 0, 1, 0])
# Create class names list
classes = ["Class A", "Class B"]
ARGS = {
"features": features,
"labels": labels,
"classes": classes,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- matplotlib, numpy, seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
|
| sort_out_figures |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/metrics.py code served (permissive licence) · get_code("684a9bda1377854e") 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 matplotlib.pyplot as plt
from matplotlib.figure import Figure
torch.manual_seed(0)
# Create a small ExtendedMetricDict with both Tensors and Figures
metric_tensor_1 = torch.randn(2, 4)
metric_tensor_2 = torch.randn(3, 5)
fig1 = plt.figure()
fig2 = plt.figure()
extended_metric_dict = {
"loss": metric_tensor_1,
"accuracy": metric_tensor_2,
"plot_1": fig1,
"plot_2": fig2,
}
ARGS = {
"d": extended_metric_dict,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- matplotlib, 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
|
| topks_correct |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/metrics.py code served (permissive licence) · get_code("a3813ef3bc3516ed") 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 torch
from typing import List
torch.manual_seed(0)
# Create small tensors for testing
# preds: batch_size x num_classes (2 x 4)
preds = torch.randn(2, 4)
# labels: batch_size (2,)
labels = torch.tensor([1, 3])
# ks: list of top-k values
ks = [1, 2]
ARGS = {
'preds': preds,
'labels': labels,
'ks': ks
}
- 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 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
|
| try_pickle_load |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/finetune.py code served (permissive licence) · get_code("6d14d68c20596b92") 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 pickle
import tempfile
import os
# Create a temporary pickle file with valid data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.pkl")
# Create a simple object to pickle
test_data = {"key": "value", "number": 42, "list": [1, 2, 3]}
# Write it as a pickle file in binary mode
with open(temp_file, 'wb') as f:
pickle.dump(test_data, f)
ARGS = {
"file": temp_file
}
- 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
|
| try_pyth_load |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/finetune.py code served (permissive licence) · get_code("dc96d15db03f89da") 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 tempfile
import os
torch.manual_seed(0)
# Create a temporary file to use with torch.load
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, 'checkpoint.pt')
# Create a sample state dict with model weights
sample_state_dict = {
'layer1.weight': torch.randn(4, 3),
'layer1.bias': torch.randn(4),
'layer2.weight': torch.randn(5, 4),
'layer2.bias': torch.randn(5),
}
# Save it as a dictionary checkpoint with the 'state_dict' key
checkpoint = {
'state_dict': sample_state_dict,
'epoch': 10,
}
torch.save(checkpoint, temp_file)
ARGS = {
'file': temp_file,
'model_state_key': 'state_dict',
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| unfreeze_from_end |
Ran ran on a synthesized input |
lukashedegaard/ride/ride/unfreeze.py code served (permissive licence) · get_code("4915f88063dd9ab4") 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 torch
import torch.nn as nn
torch.manual_seed(0)
# Create small nn.Module instances for the layers
class SimpleLayer(nn.Module):
def __init__(self, in_features, out_features):
super().__init__()
self.linear = nn.Linear(in_features, out_features)
def forward(self, x):
return self.linear(x)
# Build a sequence of (name, module) tuples
layer1 = SimpleLayer(4, 3)
layer2 = SimpleLayer(3, 2)
layer3 = SimpleLayer(2, 2)
layer4 = SimpleLayer(2, 1)
layers = [
("layer1", layer1),
("layer2", layer2),
("layer3", layer3),
("layer4", layer4),
]
# Define arguments for the function
ARGS = {
"layers": layers,
"num_layers_from_end": 2,
"freeze_others": True,
}
- 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 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
|
| get_log_dir |
Not yet run unverified (harvested, no recorded run) |
lukashedegaard/ride/ride/logging.py code served (permissive licence) · get_code("9170c3ab64f34ec1") How it ran |