| add_batch_dim |
Ran ran on a synthesized input |
ucl-dark/pax/pax/utils.py code served (permissive licence) · get_code("6b4576fe27ed0a8e") 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 jax
from jax import numpy as jnp
# Test add_batch_dim with various pytree structures
# The function takes any pytree and expands dims on axis 0
# Create simple scalar and array values
scalar_value = jnp.array(5.0)
array_value = jnp.array([1.0, 2.0, 3.0, 4.0])
nested_array = jnp.ones((3, 4))
# Create a dict pytree (common structure)
dict_pytree = {
'a': jnp.array([1.0, 2.0]),
'b': jnp.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]),
'nested': {
'c': jnp.array(7.0),
'd': jnp.array([8.0, 9.0, 10.0, 11.0])
}
}
# The function parameter 'values' can be any pytree structure
# Using the dict pytree as the main test case
values = dict_pytree
ARGS = {
'values': values
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — 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
|
| get_advantages |
Ran ran on a synthesized input |
ucl-dark/pax/pax/utils.py code served (permissive licence) · get_code("8d1fa95afa90b12b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
# Analyzing the function:
# - carry: tuple of (gae, next_value, gae_lambda)
# - transition: tuple of (value, reward, discounts)
# - All operations are element-wise arithmetic on tensors
# - gae, next_value, value, reward, discounts should be tensors
# - gae_lambda is a scalar
# Create small tensors (batch_size=2, feature_dim=4)
gae = torch.randn(2, 4)
next_value = torch.randn(2, 4)
gae_lambda = 0.95 # scalar for GAE lambda
value = torch.randn(2, 4)
reward = torch.randn(2, 4)
discounts = torch.randn(2, 4)
# Package into the carry and transition tuples
carry = (gae, next_value, gae_lambda)
transition = (value, reward, discounts)
ARGS = {
"carry": carry,
"transition": transition
}
- 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 tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| global_setup |
Ran ran on a synthesized input |
ucl-dark/pax/pax/experiment.py code served (permissive licence) · get_code("7998dbf93494334f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
from datetime import datetime
import omegaconf
from omegaconf import OmegaConf
class MockWandBConfig:
def __init__(self):
self.log = False
self.name = "test_run"
self.entity = "test_entity"
self.project = "test_project"
self.group = "test_group"
self.mode = "offline"
self.tags = ["test", "debug"]
class MockArgs:
def __init__(self):
self.save_dir = "/tmp/test_save"
self.runner = "train"
self.debug = False
self.wandb = MockWandBConfig()
args = MockArgs()
ARGS = {
"args": args
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- omegaconf, wandb — 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
|
| make_GRU |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/hyper/networks.py code served (permissive licence) · get_code("bdb8d47954719031") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
import haiku as hk
import distrax
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
ARGS = {
'num_actions': 4,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_GRU_hypernetwork |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/hyper/networks.py code served (permissive licence) · get_code("61fc2fad0c403979") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
import haiku as hk
import distrax
# Set random seed for reproducibility
jax.config.update("jax_platform_name", "cpu")
# num_actions parameter: integer representing the number of action dimensions
num_actions = 4
ARGS = {
"num_actions": num_actions,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_GRU_ipd_att_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/shaper_att/networks.py code served (permissive licence) · get_code("0a49d3ae85eecc1f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
import haiku as hk
import distrax
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
# Define small test arguments
num_actions = 3
hidden_size = 4
ARGS = {
"num_actions": num_actions,
"hidden_size": hidden_size,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_GRU_ipd_avg_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/shaper_att/networks.py code served (permissive licence) · get_code("d64c512a602ec179") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
import haiku as hk
import distrax
# Set random seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
# Define ARGS dictionary with parameters for make_GRU_ipd_avg_network
ARGS = {
'num_actions': 4,
'hidden_size': 3,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_GRU_ipd_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/shaper_att/networks.py code served (permissive licence) · get_code("365cfd6131c2ac62") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
import haiku as hk
import distrax
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
# Define parameters for make_GRU_ipd_network
num_actions = 4
hidden_size = 8
ARGS = {
"num_actions": num_actions,
"hidden_size": hidden_size,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_coingame_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/naive/network.py code served (permissive licence) · get_code("607630c430f35d26") 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 Transformed. 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 jax
import jax.numpy as jnp
class PPOConfig:
def __init__(self):
self.output_channels = 16
self.kernel_shape = (3, 3)
self.with_cnn = True
class ArgsConfig:
def __init__(self):
self.ppo = PPOConfig()
num_actions = 4
args = ArgsConfig()
ARGS = {
"num_actions": num_actions,
"args": args,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_cournot_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/ppo/networks.py code served (permissive licence) · get_code("ba7cdb74da41663e") 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 Transformed. 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 jax
import jax.numpy as jnp
import distrax
import haiku as hk
# Set random seed for reproducibility
jax.config.update("jax_platform_name", "cpu")
ARGS = {
"num_actions": 4,
"hidden_size": 8,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_fishery_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/ppo/networks.py code served (permissive licence) · get_code("0c5f9da603bc1634") 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 Transformed. 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 jax
import jax.numpy as jnp
import distrax
import haiku as hk
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
# Define ARGS dictionary with valid arguments for make_fishery_network
ARGS = {
'num_actions': 3,
'hidden_size': 8,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_ipd_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/ppo/networks.py code served (permissive licence) · get_code("db890d82d0ebeef0") 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 Transformed. 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 jax
import jax.numpy as jnp
import haiku as hk
import distrax
# Set seed for reproducibility
jax.config.update("jax_platform_name", "cpu")
# Define the ARGS dictionary with all parameters for make_ipd_network
ARGS = {
"num_actions": 4,
"tabular": False,
"hidden_size": 8,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_mfos_avg_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/mfos_ppo/networks.py code served (permissive licence) · get_code("d48299dc9766e894") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
# Set seed for reproducibility
key = jax.random.PRNGKey(0)
# Define arguments for make_mfos_avg_network
num_actions = 4
hidden_size = 8
ARGS = {
"num_actions": num_actions,
"hidden_size": hidden_size,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_mfos_continuous_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/mfos_ppo/networks.py code served (permissive licence) · get_code("cb1865b00332fa19") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
# Set seed for reproducibility
jax.config.update("jax_platform_name", "cpu")
# Define small test inputs
batch_size = 2
input_dim = 4
num_actions = 3
hidden_size = 5
# Create input tensor: (batch_size, input_dim)
input_data = jnp.ones((batch_size, input_dim), dtype=jnp.float32)
# Create th (temperature/threshold) tensor: (batch_size, hidden_size)
th_data = jnp.ones((batch_size, hidden_size), dtype=jnp.float32) * 0.5
# Combine inputs as expected by the forward_fn
inputs = (input_data, th_data)
# Create initial state: (batch_size, 3 * hidden_size)
initial_state = jnp.zeros((batch_size, 3 * hidden_size), dtype=jnp.float32)
ARGS = {
"num_actions": num_actions,
"hidden_size": hidden_size,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_mfos_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/mfos_ppo/networks.py code served (permissive licence) · get_code("2eb4d1417b0a6d2f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import jax
import jax.numpy as jnp
ARGS = {
'num_actions': 5,
'hidden_size': 8,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple — a tuple output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/lola/network.py code served (permissive licence) · get_code("2cd8e496d080743d") 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 Transformed. 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 jax
import jax.numpy as jnp
import distrax
import haiku as hk
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
# Define ARGS dict with all parameters for make_network
ARGS = {
'num_actions': 4,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/naive/network.py code served (permissive licence) · get_code("bd3555b465d1974f") 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 Transformed. 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 jax
import jax.numpy as jnp
import haiku as hk
import distrax
# Set seed for reproducibility
jax.config.update("jax_platform_name", "cpu")
# Define the arguments for make_network
num_actions = 4
ARGS = {
"num_actions": num_actions,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_policy_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/lola/network.py code served (permissive licence) · get_code("d2a9587eacd4ae54") 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 Transformed. 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 jax
import jax.numpy as jnp
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
ARGS = {
'num_actions': 5
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_rice_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/naive/network.py code served (permissive licence) · get_code("8dfd96d7efaac91f") 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 Transformed. 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 jax
import jax.numpy as jnp
import distrax
import haiku as hk
# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')
# Define ARGS dict with all parameters for make_rice_network
ARGS = {
'num_actions': 4,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- distrax, haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| make_value_network |
Ran ran on a synthesized input |
ucl-dark/pax/pax/agents/lola/network.py code served (permissive licence) · get_code("7dfc7920e7654bda") 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 Transformed. 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 jax
import jax.numpy as jnp
import haiku as hk
# Set a seed for reproducibility
key = jax.random.PRNGKey(0)
# Create a small input tensor for testing
# batch_size=2, input_dim=4
inputs = jnp.ones((2, 4), dtype=jnp.float32)
# num_actions is the only parameter for make_value_network
ARGS = {
"num_actions": 4
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- haiku, jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Transformed — a Transformed output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Transformed output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| reduce_outer_traj |
Ran ran on a synthesized input |
ucl-dark/pax/pax/runners/runner_marl_nplayer.py code served (permissive licence) · get_code("0c175a3d42cc09ab") 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 Sample. 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 jax
import jax.numpy as jnp
from typing import NamedTuple
class Sample(NamedTuple):
"""Object containing a batch of data"""
observations: jnp.ndarray
actions: jnp.ndarray
rewards: jnp.ndarray
behavior_log_probs: jnp.ndarray
behavior_values: jnp.ndarray
dones: jnp.ndarray
hiddens: jnp.ndarray
# Create sample trajectory with nested dimensions
# The function expects shape[2] and shape[3] to be the environment dimensions
# shape[0] and shape[1] to be the timestep dimensions
# shape[4:] are feature dimensions
batch_time_1 = 2
batch_time_2 = 3
num_envs_1 = 4
num_envs_2 = 5
feature_dim = 6
observations = jnp.ones((batch_time_1, batch_time_2, num_envs_1, num_envs_2, feature_dim))
actions = jnp.ones((batch_time_1, batch_time_2, num_envs_1, num_envs_2, 2))
rewards = jnp.ones((batch_time_1, batch_time_2, num_envs_1, num_envs_2))
behavior_log_probs = jnp.ones((batch_time_1, batch_time_2, num_envs_1, num_envs_2, 1))
behavior_values = jnp.ones((batch_time_1, batch_time_2, num_envs_1, num_envs_2, 1))
dones = jnp.ones((batch_time_1, batch_time_2, num_envs_1, num_envs_2))
hiddens = jnp.ones((batch_time_1, batch_time_2, num_envs_1, num_envs_2, 3))
sample_traj = Sample(
observations=observations,
actions=actions,
rewards=rewards,
behavior_log_probs=behavior_log_probs,
behavior_values=behavior_values,
dones=dones,
hiddens=hiddens
)
ARGS = {
"traj": sample_traj
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Sample — a Sample output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| to_numpy |
Ran ran on a synthesized input |
ucl-dark/pax/pax/utils.py code served (permissive licence) · get_code("0c9e5aa92235c1ab") 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 jax
import jax.numpy as jnp
import numpy as np
# The function to_numpy takes 'values' as its only parameter
# It uses jax.tree_util.tree_map to convert JAX arrays/pytrees to numpy arrays
# We need to construct a valid pytree that contains JAX arrays
# Create some JAX arrays
jax_array_1 = jnp.array([1.0, 2.0, 3.0, 4.0])
jax_array_2 = jnp.array([[1.0, 2.0], [3.0, 4.0]])
# Create a nested pytree structure with JAX arrays
values = {
'array1': jax_array_1,
'array2': jax_array_2,
'nested': {
'array3': jnp.array([5.0, 6.0, 7.0]),
'list_of_arrays': [jnp.array([8.0, 9.0]), jnp.array([10.0, 11.0])]
}
}
ARGS = {
'values': values
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, numpy — 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
|
| make_network |
Not yet run unverified (harvested, no recorded run) |
ucl-dark/pax/pax/agents/hyper/networks.py code served (permissive licence) · get_code("019e1da94cf6b12f") How it ran |