SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.01603 · 2019

Dream to Control: Learning Behaviors by Latent Imagination

Jimmy Ba, Danijar Hafner, Timothy Deepmind, Mohammad Google Brain

arXiv · PDF · Open in the Atlas

Code that ran

52 of 62 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (33 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 42 have no contract verdict; 9 failures of our instrument; 10 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1912.01603.json · badge: /api/ran/1912.01603.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
danijar/dreamer canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
Yizhao111/dreamer-pytorch community
Papers with Code archive
13 ran · 2 no recorded run
zhixuan-lin/dreamer-pytorch community
Papers with Code archive
10 ran · 1 no recorded run
adityabingi/Dreamer community
Papers with Code archive
9 ran · 1 no recorded run
chamorajg/pl-dreamer community
Papers with Code archive
8 ran · 1 no recorded run
KohMat/carracing-dreamer community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
Eclectic-Sheep/sheeprl community
Papers with Code archive
1 ran · 1 no recorded run
cross32768/Dreamer_PyTorch community
Papers with Code archive
1 ran · 0 no recorded run
juliusfrost/dreamer-pytorch community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
yusukeurakami/dreamer-pytorch community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
ActionDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("83372b051144a5c7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ActionDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("0b707e9f2a68a262")
How it ran

Ran 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, ActionDecoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'input_dim': 8,
    'size': 4,
    'layers': 2,
    'units': 16,
    'dist': 'tanh_normal',
    'act': nn.ELU,
    'min_std': 0.0001,
    'init_std': 5,
    'mean_scale': 5,
}
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 ActionDecoder — 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 ActionDecoder 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
ActionDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("032906ec0da4a020")
How it ran

Ran 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, ActionDecoder: 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)

ARGS = {
    'action_size': 3,
    'stoch_size': 4,
    'deter_size': 5,
    'n_layers': 2,
    'units': 8,
    'activation': 'relu',
    'min_std': 0.0001,
    'init_std': 5,
    'mean_scale': 5,
}
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 ActionDecoder — 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 ActionDecoder 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
ActorModel Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("1e69bdfedcc82427")
How it ran

Ran 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, ActorModel: 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 torch.nn.functional as F
import numpy as np

torch.manual_seed(0)

ARGS = {
    'action_size': 3,
    'belief_size': 4,
    'state_size': 5,
    'hidden_size': 8,
    'mean_scale': 5,
    'min_std': 0.0001,
    'init_std': 5,
    'activation_function': 'elu'
}
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 ActorModel — 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 ActorModel 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
AttrDict Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("4000edd2f154ac83")
How it ran

Ran 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, AttrDict: 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)

# AttrDict is a dict subclass that allows attribute-style access
# The __init__ method is inherited from dict, which accepts:
# - no arguments: dict()
# - a mapping: dict({'key': 'value'})
# - keyword arguments: dict(key='value')
# - an iterable of pairs: dict([('key', 'value')])

# Since AttrDict only overrides __setattr__ and __getattr__,
# it doesn't add any new parameters beyond dict's standard ones.
# We can construct it with various dict initializers.

# Example 1: Empty dict
example1 = {}

# Example 2: Dict with some data
example2 = {'name': 'test', 'value': 42, 'tensor': torch.randn(2, 4)}

# Example 3: Dict with nested structures
example3 = {
    'config': {'learning_rate': 0.001, 'batch_size': 32},
    'data': [1, 2, 3, 4],
    'model_state': torch.randn(3, 5)
}

# Since the function signature only shows the class definition with
# __setattr__ and __getattr__ overrides, and no explicit __init__,
# the parameters come from dict's __init__.
# The most general form accepts a mapping or iterable of key-value pairs.

ARGS = {
    'arg1': example2
}
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 AttrDict — the run constructed an instance of its own class and did not call it; no shape 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
AverageMeter Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("06a7b70ff704fbf8")
How it ran

Ran 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, AverageMeter: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import Tensor, nn, optim

torch.manual_seed(0)

# AverageMeter.__init__ takes no parameters beyond self
# The class just initializes internal state, so no external arguments needed

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 AverageMeter — 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 AverageMeter 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
Config Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("36c19e60097cae7a")
How it ran

Ran 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, Config: 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)

ARGS = {
    'device': 'cpu',
    'logdir': './output/',
    'comment': 'test_run',
    'seed': 42,
    'deterministic': False,
    'steps': 1000000,
    'eval_every': 10000,
    'video_every': 10000,
    'save_every': 10000,
    'eval_episodes': 5,
    'log_every': 1000,
    'log_scalars': True,
    'log_images': True,
    'task': 'cartpole_balance',
    'envs': 1,
    'action_repeat': 2,
    'time_limit': 1000,
    'prefill': 5000,
    'eval_noise': 0.0,
    'clip_rewards': 'none',
    'deter_size': 200,
    'stoch_size': 30,
    'num_units': 400,
    'dense_act': 'elu',
    'cnn_act': 'relu',
    'cnn_depth': 32,
    'pcont': False,
    'free_nats': 3.0,
    'kl_scale': 1.0,
    'pcont_scale': 10.0,
    'weight_decay': 0.0,
    'batch_size': 50,
    'batch_length': 50,
    'train_every': 1000,
    'train_steps': 100,
    'model_lr': 0.0006,
    'value_lr': 8e-05,
    'actor_lr': 8e-05,
    'grad_clip': 100.0,
    'dataset_balance': False,
    'discount': 0.99,
    'disclam': 0.95,
    'horizon': 15,
    'action_dist': 'tanh_normal',
    'action_init_std': 5.0,
    'expl': 'additive_gaussian',
    'expl_amount': 0.3,
    'expl_decay': 0.0,
    'expl_min': 0.0,
    'update_horizon': None,
    'single_step_q': False,
    'tf_init': False,
}
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 Config — 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 Config 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
ConvDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("478198ae4e61532f")
How it ran

Ran 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, ConvDecoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    "feature_dim": 128,
    "depth": 32,
    "act": nn.ReLU,
    "shape": (3, 64, 64),
}
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 ConvDecoder — 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 ConvDecoder 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
ConvDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("c2fb17f9cc07745b")
How it ran

Ran 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, ConvDecoder: 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)

ARGS = {
    'stoch_size': 4,
    'deter_size': 5,
    'output_shape': (3, 64, 64),
    'activation': 'relu',
    'depth': 32,
}
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 ConvDecoder — 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 ConvDecoder 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
ConvEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("5a3d541c43e302f3")
How it ran

Ran 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, ConvEncoder: 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)

ARGS = {
    'depth': 32,
    'act': nn.ReLU,
}

# Construct a minimal test input to verify the setup
encoder = nn.Conv2d(3, 1 * 32, kernel_size=4, stride=2)
test_image = torch.randn(2, 2, 3, 64, 64)  # T=2, B=2, C=3, H=64, W=64
test_obs = {'image': test_image}

# Instantiate the encoder to verify it works
encoder_instance = nn.Module()
encoder_instance.__class__ = type('ConvEncoder', (nn.Module,), {
    '__init__': lambda self, depth=32, act=nn.ReLU: (
        super(type(self), self).__init__(),
        setattr(self, 'depth', depth),
        setattr(self, 'conv1', nn.Conv2d(3, 1 * depth, kernel_size=4, stride=2)),
        setattr(self, 'conv2', nn.Conv2d(1 * depth, 2 * depth, kernel_size=4, stride=2)),
        setattr(self, 'conv3', nn.Conv2d(2 * depth, 4 * depth, kernel_size=4, stride=2)),
        setattr(self, 'conv4', nn.Conv2d(4 * depth, 8 * depth, kernel_size=4, stride=2)),
        setattr(self, 'act', act()),
    )[-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 ConvEncoder — 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 ConvEncoder 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
ConvEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("ea21fcd799d8f65e")
How it ran

Ran 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, ConvEncoder: 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)

ARGS = {
    'input_shape': (3, 32, 32),
    'embed_size': 256,
    'activation': 'relu',
    'depth': 32
}
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 ConvEncoder — 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 ConvEncoder 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
Decoder Ran
ran on a synthesized input · constructed an object; no result was computed
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("feeb1770217fa3ec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

DenseDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("846d8e32c15e22b1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

DenseDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("9c449af65508ffc5")
How it ran

Ran 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, DenseDecoder: 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 numpy as np
from torch import nn

torch.manual_seed(0)

ARGS = {
    'input_dim': 8,
    'shape': (3, 4),
    'layers': 2,
    'units': 16,
    'dist': 'normal',
    'act': nn.ELU,
}
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 DenseDecoder — 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 DenseDecoder 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
DenseDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("9647814e70d10581")
How it ran

Ran 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, DenseDecoder: 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 numpy as np
import torch
import torch.nn as nn
import torch.distributions as distributions

torch.manual_seed(0)

ARGS = {
    'stoch_size': 4,
    'deter_size': 3,
    'output_shape': (2, 2),
    'n_layers': 2,
    'units': 8,
    'activation': 'relu',
    'dist': 'normal'
}
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 DenseDecoder — 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 DenseDecoder 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
Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("491e2697053dd0fc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Encoder Ran
ran; our contract draft was wrong, not the code
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("5903294d08bd52f9")
How it ran

Ran 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 SymbolicEncoder. 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 import optim
from torch.nn import functional as F

torch.manual_seed(0)

# Test both symbolic and visual encoder paths
ARGS = {
    "symbolic": True,
    "observation_size": 16,
    "embedding_size": 32,
    "activation_function": "relu"
}
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 SymbolicEncoder — a SymbolicEncoder output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SymbolicEncoder 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
ObservationModel Ran
ran; our contract draft was wrong, not the code
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("be5a219bf8efda66")
How it ran

Ran 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 SymbolicObservationModel. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'symbolic': True,
    'observation_size': 5,
    'belief_size': 4,
    'state_size': 3,
    'embedding_size': 6,
    'activation_function': 'relu'
}
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 SymbolicObservationModel — a SymbolicObservationModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SymbolicObservationModel 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
PCONTModel Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("9d8facfbbfad7e8e")
How it ran

Ran 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, PCONTModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn, optim
from torch.nn import functional as F

torch.manual_seed(0)

ARGS = {
    'belief_size': 4,
    'state_size': 3,
    'hidden_size': 8,
    'activation_function': 'relu'
}
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 PCONTModel — 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 PCONTModel 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
RSSM Ran
ran on a synthesized input · constructed an object; no result was computed
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("5fd2e204f8b1686c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

RSSM Ran
ran on a synthesized input
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("d0fb3df4884ed3da")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from gym import spaces
from torch import nn

# Define the action space
action_space = spaces.Box(low=-1, high=1, shape=(3,), dtype='float32')

# INIT_ARGS: parameters for RSSM.__init__
INIT_ARGS = {
    'action_space': action_space,
    'stoch': 4,
    'deter': 8,
    'hidden': 6,
    'embed': 12,
    'act': nn.ELU,
}

# ARGS: parameters for the computation method (observe)
ARGS = {
    'embed': torch.randn(2, 5, 12),  # (B=2, T=5, embed=12)
    'action': torch.randn(2, 5, 3),  # (B=2, T=5, action_dim=3)
    'state': None,
}

# METHOD: specify which method to call
METHOD = 'observe'

# Construct and call the class
from typing import Optional

class RSSM(nn.Module):

    def __init__(self, action_space: spaces.Box, stoch: int=30, deter: int=200, hidden: int=200, embed: int=1024, act: nn.Module=nn.ELU):
        super().__init__()
        self.activation = act
        self.stoch_size = stoch
        self.deter_size = deter
        self.hidden_size = hidden
        self.cell = nn.GRUCell(input_size=self.hidden_size, hidden_size=self.deter_size)
        self.act = act()
        self.fc_input = nn.Sequential(nn.Linear(stoch + action_space.shape[0], hidden), self.act)
        self.fc_prior = nn.Sequential(nn.Linear(deter, hidden), self.act, nn.Linear(hidden, 2 * stoch))
        self.fc_post = nn.Sequential(nn.Linear(deter + embed, hidden), self.act, nn.Linear(hidden, 2 * stoch))
        self.device = torch.device('cpu')

    def initial(self, batch_size: int):
        return dict(mean=torch.zeros(batch_size, self.stoch_size, device=self.device), std=torch.zeros(batch_size, self.stoch_size, device=self.device), stoch=torch.zeros(batch_size, self.stoch_size, device=self.device), deter=torch.zeros(batch_size, self.deter_size, device=self.device))

    def get_feat(self, state: dict):
        return torch.cat([state['stoch'], state['deter']], -1)

    def get_dist(self, state: dict):
        from torch.distributions import Normal, Independent
        return Independent(Normal(state['mean'], state['std']), 1)

    def observe(self, embed, action, state: Optional[torch.Tensor]=None):
        B, T, D = action.size()
        if state is None:
            state = self.initial(B)
        post_list = []
        prior_list = []
        for t in range(T):
            post_state, prior_state = self.obs_step(state, action[:, t], embed[:, t])
            prior_list.append(prior_state)
            post_list.append(post_state)
            state = post_state
        prior = {k: torch.stack([s[k] for s in prior_list], dim=1) for k in prior_list[0]}
        post = {k: torch.stack([s[k] for s in post_list], dim=1) for k in post_list[0]}
        return (post, prior)

    def imagine(self, action, state: Optional[torch.Tensor]=None):
        B, T, D = action.size()
        if state is None:
            state = self.initial(B)
        assert isinstance(state, dict)
        prior_list = []
        for t in range(T):
            state = self.img_step(state, action[:, t])
            prior_list.append(state)
        prior = {k: torch.stack([s[k] for s in prior_list], dim=1) for k in prior_list[0]}
        return prior

    def obs_step(self, prev_state, prev_action, embed):
        prior = self.img_step(prev_state, prev_action)
        x = torch.cat([prior['deter'], embed], dim=-1)
        x = self.fc_post(x)
        mean, std = x.chunk(2, dim=-1)
        std = torch.nn.functional.softplus(std) + 0.1
        stoch = self.get_dist(dict(mean=mean, std=std)).rsample()
        post = dict(mean=mean, std=std, stoch=stoch, deter=prior['deter'])
        return (post, prior)

    def img_step(self, prev_state, prev_action):
        x = torch.cat([prev_state['stoch'], prev_action], dim=-1)
        x = self.fc_input(x)
        x = deter = self.cell(x, prev_state['deter'])
        x = self.fc_prior(x)
        mean, std = x.chunk(2, dim=-1)
        std = torch.nn.functional.softplus(std) + 0.1
        stoch = self.get_dist(dict(mean=mean, std=std)).rsample()
        prior = dict(mean=mean, std=std, stoch=stoch, deter=deter)
        return prior


if __name__ == '__main__':
    model = RSSM(**INIT_ARGS)
    result = getattr(model, METHOD)(**ARGS)
    print("Success! Result keys:", result[0].keys() if isinstance(result, tuple) else result.keys())
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
gym, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RSSM Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("6ed93a3bd0b35bbd")
How it ran

Ran 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, RSSM: 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)

# Define ARGS dict with all constructor parameters
ARGS = {
    'action_size': 4,
    'stoch_size': 3,
    'deter_size': 5,
    'hidden_size': 6,
    'obs_embed_size': 7,
    'activation': 'relu'
}
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 RSSM — 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 RSSM 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
RecurrentStateSpaceModel Ran
ran on a synthesized input
cross32768/Dreamer_PyTorch/model.py
code served (permissive licence) · get_code("06dafb6454d57ef2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
from torch import nn
from torch.nn import functional as F
from torch.distributions import Normal

INIT_ARGS = {
    'state_dim': 4,
    'action_dim': 3,
    'rnn_hidden_dim': 5,
    'hidden_dim': 6,
    'min_stddev': 0.1,
    'act': F.relu
}

ARGS = {
    'state': torch.randn(2, 4),
    'action': torch.randn(2, 3),
    'rnn_hidden': torch.randn(2, 5),
    'embedded_next_obs': torch.randn(2, 1024)
}
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 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ReplayBuffer Ran
ran on a synthesized input · constructed an object; no result was computed
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("8c761148be72a1af")
How it ran

Ran 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, ReplayBuffer: 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 numpy as np
from gym import spaces

# Create a simple action space
action_space = spaces.Box(low=-1.0, high=1.0, shape=(3,), dtype=np.float32)

# Define ARGS dictionary with all parameters
ARGS = {
    'action_space': action_space,
    'balance': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ReplayBuffer — 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 ReplayBuffer 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
ReplayBuffer Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("9250128488be37e8")
How it ran

Ran 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, ReplayBuffer: 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 numpy as np

ARGS = {
    'size': 100,
    'obs_shape': (4, 84, 84),
    'action_size': 6,
    'seq_len': 5,
    'batch_size': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ReplayBuffer — 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 ReplayBuffer 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
Reshape Ran
ran on a synthesized input · constructed an object; no result was computed
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("78cb080bf8cd18b0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

RewardModel Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("ff12acbebe54d7cc")
How it ran

Ran 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, RewardModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'belief_size': 4,
    'state_size': 3,
    'hidden_size': 8,
    'activation_function': 'relu'
}
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 RewardModel — 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 RewardModel 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
SampleDist Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("56dcf30a95968f30")
How it ran

Ran 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, SampleDist: 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.distributions as dist

torch.manual_seed(0)

# Create a simple distribution that SampleDist will wrap
# Normal distribution with batch_shape=(2,) and event_shape=(4,)
base_dist = dist.Normal(
    loc=torch.zeros(2, 4),
    scale=torch.ones(2, 4)
)

ARGS = {
    "dist": base_dist,
    "samples": 100
}
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 SampleDist — 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 SampleDist 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
SampleDist Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("f09ab92bd73f0a92")
How it ran

Ran 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, SampleDist: 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.distributions as dist

torch.manual_seed(0)

# Create a simple distribution that satisfies the interface used by SampleDist
# The code calls: rsample(), expand(), batch_shape, log_prob(), sample()
base_dist = dist.Normal(
    loc=torch.zeros(2, 4),
    scale=torch.ones(2, 4)
)

ARGS = {
    'dist': base_dist,
    'samples': 100
}
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 SampleDist — 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 SampleDist 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
SymbolicEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("8440a6eb02fe1454")
How it ran

Ran 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, SymbolicEncoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn, optim
from torch.nn import functional as F

torch.manual_seed(0)

ARGS = {
    'observation_size': 4,
    'embedding_size': 8,
    'activation_function': 'relu'
}
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 SymbolicEncoder — 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 SymbolicEncoder 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
SymbolicObservationModel Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("2e24f94844e096be")
How it ran

Ran 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, SymbolicObservationModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn, optim
from torch.nn import functional as F

torch.manual_seed(0)

# Define dimensions (distinct sizes for different meanings)
observation_size = 5
belief_size = 4
state_size = 3
embedding_size = 8

ARGS = {
    'observation_size': observation_size,
    'belief_size': belief_size,
    'state_size': state_size,
    'embedding_size': embedding_size,
    'activation_function': 'relu'
}
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 SymbolicObservationModel — 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 SymbolicObservationModel 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
TanhBijector Ran
ran on a synthesized input · constructed an object; no result was computed
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("d4396c5590abd108")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

TanhBijector Ran
ran on a synthesized input · constructed an object; no result was computed
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("e441022cca867bcd")
How it ran

Ran 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, TanhBijector: 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 numpy as np
import torch.distributions as distributions

torch.manual_seed(0)

class TanhBijector(distributions.Transform):

    def __init__(self):
        super().__init__()
        self.bijective = True
        self.domain = distributions.constraints.real
        self.codomain = distributions.constraints.interval(-1.0, 1.0)

    @property
    def sign(self):
        return 1.0

    def _call(self, x):
        return torch.tanh(x)

    def atanh(self, x):
        return 0.5 * torch.log((1 + x) / (1 - x))

    def _inverse(self, y: torch.Tensor):
        y = torch.where(torch.abs(y) <= 1.0, torch.clamp(y, -0.99999997, 0.99999997), y)
        y = self.atanh(y)
        return y

    def log_abs_det_jacobian(self, x, y):
        return 2.0 * (np.log(2) - x - torch.nn.functional.softplus(-2.0 * x))


ARGS = {}
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 TanhBijector — 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 TanhBijector 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
TransitionModel Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("2a61bebe2088ddb9")
How it ran

Ran 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, TransitionModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'belief_size': 8,
    'state_size': 4,
    'action_size': 3,
    'hidden_size': 6,
    'embedding_size': 5,
    'activation_function': 'relu',
    'min_std_dev': 0.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 TransitionModel — 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 TransitionModel 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
ValueModel Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("097f32971f48a3db")
How it ran

Ran 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, ValueModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

# Parameters for ValueModel.__init__
belief_size = 4
state_size = 3
hidden_size = 8
activation_function = 'relu'

ARGS = {
    'belief_size': belief_size,
    'state_size': state_size,
    'hidden_size': hidden_size,
    'activation_function': activation_function
}

# Verify the model can be instantiated and used
model = nn.Module.__new__(type('ValueModel', (nn.Module,), {}))
model.__dict__.update(nn.Module().__dict__)

# Actually create a proper ValueModel instance to test
from torch.nn import functional as F

class ValueModel(nn.Module):
    def __init__(self, belief_size, state_size, hidden_size, activation_function='relu'):
        super().__init__()
        self.act_fn = getattr(F, activation_function)
        self.fc1 = nn.Linear(belief_size + state_size, hidden_size)
        self.fc2 = nn.Linear(hidden_size, hidden_size)
        self.fc3 = nn.Linear(hidden_size, hidden_size)
        self.fc4 = nn.Linear(hidden_size, 1)

    def forward(self, belief, state):
        x = torch.cat([belief, state], dim=1)
        hidden = self.act_fn(self.fc1(x))
        hidden = self.act_fn(self.fc2(hidden))
        hidden = self.act_fn(self.fc3(hidden))
        reward = self.fc4(hidden).squeeze(dim=1)
        return reward

model = ValueModel(**ARGS)
belief = torch.randn(2, belief_size)
state = torch.randn(2, state_size)
output = model(belief, state)
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 ValueModel — 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 ValueModel 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
VisualEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("bf63a45ab9d6bbf2")
How it ran

Ran 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, VisualEncoder: 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 import optim
from torch.nn import functional as F

torch.manual_seed(0)

# Test with embedding_size = 512 (different from 1024 to exercise the Linear layer)
embedding_size = 512
activation_function = 'relu'

ARGS = {
    'embedding_size': embedding_size,
    'activation_function': activation_function,
}
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 VisualEncoder — 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 VisualEncoder 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
VisualObservationModel Ran
ran on a synthesized input · constructed an object; no result was computed
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("c42784e0cc95cfe0")
How it ran

Ran 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, VisualObservationModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'belief_size': 4,
    'state_size': 3,
    'embedding_size': 5,
    'activation_function': 'relu'
}
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 VisualObservationModel — 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 VisualObservationModel 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
apply Ran
ran on a synthesized input
KohMat/carracing-dreamer/dreamer/utils/apply.py
code served (permissive licence) · get_code("956ceb6333c8ac66")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Define a simple callable function to apply
def dummy_func(x):
    if isinstance(x, torch.Tensor):
        return x * 2
    elif isinstance(x, np.ndarray):
        return x * 2
    elif isinstance(x, float):
        return x * 2
    return x

# Create test data of various types
float_data = 3.14
numpy_array_data = np.array([1.0, 2.0, 3.0, 4.0])
list_data = [np.array([1.0, 2.0]), np.array([3.0, 4.0])]
tuple_data = (np.array([5.0, 6.0]), np.array([7.0, 8.0]))
dict_data = {
    'a': np.array([1.0, 2.0, 3.0]),
    'b': np.array([4.0, 5.0, 6.0])
}
tensor_data = torch.randn(2, 4)

ARGS = {
    'data': float_data,
    'func': dummy_func
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
atanh Ran
ran; our contract draft was wrong, not the code
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("094cf207447fa2a5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cal_returns Ran
ran; our contract draft was wrong, not the code
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("8463fe3398301135")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (5, 2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Parameters for cal_returns function
# reward: dim=[horizon, (chuck-1)*batch, reward_shape]
# value: dim=[horizon, (chuck-1)*batch, value_shape]
# bootstrap: dim=[(chuck-1)*batch, value_dim]
# pcont: gamma (scalar or tensor matching reward shape)
# lambda_: lambda (scalar)

horizon = 5
batch_size = 2
reward_dim = 3
value_dim = 4

# Create reward tensor: [horizon, batch, reward_dim]
reward = torch.randn(horizon, batch_size, reward_dim)

# Create value tensor: [horizon, batch, value_dim]
# Note: value should have same shape as reward according to assertion
value = torch.randn(horizon, batch_size, reward_dim)

# Create bootstrap tensor: [batch, value_dim]
bootstrap = torch.randn(batch_size, reward_dim)

# pcont can be a scalar (int or float) or tensor
pcont = 0.99

# lambda_ is a scalar
lambda_ = 0.95

ARGS = {
    "reward": reward,
    "value": value,
    "bootstrap": bootstrap,
    "pcont": pcont,
    "lambda_": lambda_
}
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 3, dtype family float, shape (5, 2, 3) — shape (5, 2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_stochastic_state Ran
ran; our contract draft was wrong, not the code
Eclectic-Sheep/sheeprl/sheeprl/algos/dreamer_v1/agent.py
code served (permissive licence) · get_code("fa76beb6fb8d8865")
How it ran

Ran 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.functional as F
from torch.distributions import Distribution, Independent, Normal

torch.manual_seed(0)

# Create a state_information tensor
# The function chunks this into mean and std, so we need even last dimension
# Batch size 2, feature dim 8 (will be chunked into 4 for mean and 4 for std)
state_information = torch.randn(2, 8)

# Define ARGS dictionary with all parameters
ARGS = {
    "state_information": state_information,
    "event_shape": 1,
    "min_std": 0.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 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
conv_out Ran
ran on a synthesized input
KohMat/carracing-dreamer/dreamer/carracing/network.py
code served (permissive licence) · get_code("ecebf2e9b74c28b2")
How it ran

Ran 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.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function: conv_out(h_in, padding, kernel_size, stride)
# The function computes output height of a convolution layer
# Parameters are all numeric (int or float)
# Formula: (h_in + 2*padding - (kernel_size - 1) - 1) / stride + 1

# Create valid arguments for a typical convolution scenario
h_in = 28  # input height
padding = 1  # padding amount
kernel_size = 3  # kernel size
stride = 1  # stride

ARGS = {
    "h_in": h_in,
    "padding": padding,
    "kernel_size": kernel_size,
    "stride": stride
}
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 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
conv_out_shape Ran
ran on a synthesized input
KohMat/carracing-dreamer/dreamer/carracing/network.py
code served (permissive licence) · get_code("bda617dc1839d3c5")
How it ran

Ran 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 int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# h_in is expected to be a tuple/sequence of integers
# padding is an integer
# kernel_size is an integer
# stride is an integer

h_in = (32, 64)  # input height and width dimensions
padding = 1
kernel_size = 3
stride = 1

ARGS = {
    "h_in": h_in,
    "padding": padding,
    "kernel_size": kernel_size,
    "stride": stride
}
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, ndim 1, dtype family int — 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
freeze Ran
ran; our contract draft was wrong, not the code
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("d1d08bc76fe301d5")
How it ran

Ran 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 _GeneratorContextManager. 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 SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.bn = nn.BatchNorm1d(3)
    
    def forward(self, x):
        x = self.linear(x)
        x = self.bn(x)
        return x

module = SimpleModel()

ARGS = {
    "module": module
}
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 _GeneratorContextManager — a _GeneratorContextManager output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _GeneratorContextManager 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_parameters Ran
ran; our contract draft was wrong, not the code
KohMat/carracing-dreamer/dreamer/utils/freeze_parameter.py
code served (permissive licence) · get_code("c53ea31731e9c271")
How it ran

Ran 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. 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 typing import Iterable

torch.manual_seed(0)

# Create small nn.Module instances
class SimpleModule1(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class SimpleModule2(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear(x)

class SimpleModule3(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv1d(2, 5, 3)
    
    def forward(self, x):
        return self.conv(x)

# Create instances
module1 = SimpleModule1()
module2 = SimpleModule2()
module3 = SimpleModule3()

# Create an iterable of modules
modules_list = [module1, module2, module3]

ARGS = {
    "modules": modules_list
}
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 — a list 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
get_parameters Ran
ran; our contract draft was wrong, not the code
juliusfrost/dreamer-pytorch/dreamer/utils/module.py
code served (permissive licence) · get_code("00749ea05ebef1a6")
How it ran

Ran 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. 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 typing import Iterable

torch.manual_seed(0)

# Create a few small nn.Module instances with parameters
class SimpleModule(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)

class AnotherModule(nn.Module):
    def __init__(self, hidden_dim):
        super().__init__()
        self.embedding = nn.Embedding(10, hidden_dim)
    
    def forward(self, x):
        return self.embedding(x)

# Create instances of modules
module1 = SimpleModule(4, 3)
module2 = AnotherModule(5)
module3 = SimpleModule(5, 2)

# Create an iterable of modules (list)
modules_list = [module1, module2, module3]

ARGS = {
    "modules": modules_list
}
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 — a list 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
kl_divergence_between_states Ran
ran on a synthesized input
KohMat/carracing-dreamer/dreamer/rssm.py
code served (permissive licence) · get_code("5108b244cb3972b4")
How it ran

Ran 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 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributions as td
from typing import NamedTuple

torch.manual_seed(0)

class State(NamedTuple):
    mean: torch.Tensor
    stddev: torch.Tensor
    deterministic: torch.Tensor
    stochastic: torch.Tensor

    def feature(self) -> torch.Tensor:
        return torch.cat((self.stochastic, self.deterministic), dim=-1)

    def distribution(self, dist_type):
        hidden_state_dims = 1
        return td.independent.Independent(dist_type(self.mean, self.stddev), hidden_state_dims)

    def detach(self):
        return State(self.mean.detach(), self.stddev.detach(), self.deterministic.detach(), self.stochastic.detach())

    @classmethod
    def zero(cls, batch_size: int, deterministic_size: int, stochastic_size: int, device: torch.device=None):
        deterministic_shape = (batch_size, deterministic_size)
        stochastic_shape = (batch_size, stochastic_size)
        if device is not None:
            return State(torch.zeros(stochastic_shape, device=device), torch.zeros(stochastic_shape, device=device), torch.zeros(deterministic_shape, device=device), torch.zeros(stochastic_shape, device=device))
        else:
            return State(torch.zeros(stochastic_shape), torch.zeros(stochastic_shape), torch.zeros(deterministic_shape), torch.zeros(stochastic_shape))

    @classmethod
    def stack(cls, states: list, dim=0):
        return State(torch.stack([state.mean for state in states], dim=dim), torch.stack([state.stddev for state in states], dim=dim), torch.stack([state.deterministic for state in states], dim=dim), torch.stack([state.stochastic for state in states], dim=dim))

    @classmethod
    def from_tuple(cls, data):
        return State(*data)

# Create prior and posterior states with small tensors
batch_size = 2
stochastic_size = 4
deterministic_size = 3

prior_state = State(
    mean=torch.randn(batch_size, stochastic_size),
    stddev=torch.abs(torch.randn(batch_size, stochastic_size)) + 0.1,
    deterministic=torch.randn(batch_size, deterministic_size),
    stochastic=torch.randn(batch_size, stochastic_size)
)

posterior_state = State(
    mean=torch.randn(batch_size, stochastic_size),
    stddev=torch.abs(torch.randn(batch_size, stochastic_size)) + 0.1,
    deterministic=torch.randn(batch_size, deterministic_size),
    stochastic=torch.randn(batch_size, stochastic_size)
)

# Distribution type (Normal)
dist_type = td.Normal

# Minimum nats value
min_nats = 0.1

ARGS = {
    "prior": prior_state,
    "posterior": posterior_state,
    "min_nats": min_nats,
    "dist_type": dist_type
}
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 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_baselines Ran
ran, honoured the contract we drafted
danijar/dreamer/plotting.py
code served (permissive licence) · get_code("2f2cf1bbab74e2d7")
How it ran

Ran 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 collections
import json
import pathlib
import re
import tempfile
import os

Run = collections.namedtuple('Run', 'task method seed xs ys color')

# Create a temporary directory with baseline JSON files
temp_dir = tempfile.mkdtemp()
baselines_dir = os.path.join(temp_dir, 'baselines')
os.makedirs(baselines_dir, exist_ok=True)

# Write sample baseline JSON files
baseline_data_1 = {
    "task_a": {
        "method_x": 0.85,
        "method_y": 0.90
    }
}
baseline_data_2 = {
    "task_b": {
        "method_x": 0.75,
        "method_z": 0.88
    }
}

with open(os.path.join(baselines_dir, 'baseline1.json'), 'w') as f:
    json.dump(baseline_data_1, f)

with open(os.path.join(baselines_dir, 'baseline2.json'), 'w') as f:
    json.dump(baseline_data_2, f)

# Create a mock args object with required attributes
class MockArgs:
    def __init__(self):
        self.baselines = [re.compile(r'method_x'), re.compile(r'method_z')]
        self.colors = {}
        self.palette = ['red', 'blue', 'green', 'yellow', 'purple']

args_obj = MockArgs()

# Monkey patch __file__ for the module context
import sys
mock_module = type(sys)('mock_module')
mock_module.__file__ = os.path.join(baselines_dir, '..', 'dummy.py')
sys.modules['mock_module'] = mock_module

ARGS = {
    'args': args_obj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family 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
load_run Ran
ran on a synthesized input
danijar/dreamer/plotting.py
code served (permissive licence) · get_code("8e5272c2d61dcc1d")
How it ran

Ran 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 Run. 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 collections
import json
import pandas as pd
from pathlib import Path
import tempfile
import os

Run = collections.namedtuple('Run', 'task method seed xs ys color')

# Create a temporary directory structure and file
temp_dir = tempfile.mkdtemp()
indir = Path(temp_dir)

# Create nested directory structure: task/method/seed/
task_dir = indir / "task1" / "method_a" / "seed_42"
task_dir.mkdir(parents=True, exist_ok=True)

# Create a JSONL file with sample data
filename = task_dir / "data.jsonl"
with open(filename, 'w') as f:
    f.write(json.dumps({"epoch": 1, "loss": 0.5}) + "\n")
    f.write(json.dumps({"epoch": 2, "loss": 0.3}) + "\n")
    f.write(json.dumps({"epoch": 3, "loss": 0.2}) + "\n")

# Create args object with required attributes
class Args:
    def __init__(self):
        self.xaxis = "epoch"
        self.yaxis = "loss"
        self.colors = {
            "method_a": "#FF0000",
            "method_b": "#00FF00"
        }

args = Args()

ARGS = {
    "filename": filename,
    "indir": indir,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Run — a Run 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
nest_summary Ran
ran on a synthesized input
danijar/dreamer/tools.py
code served (permissive licence) · get_code("0ff405af2200f366")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function recursively processes nested structures (dicts, lists)
# and converts objects with 'shape' attribute to string representations
# Test with a nested structure containing tensors and arrays

tensor_2d = torch.randn(2, 4)
tensor_3d = torch.randn(3, 5, 6)
array_1d = np.array([1, 2, 3])
array_2d = np.array([[1, 2], [3, 4], [5, 6]])

structure = {
    'tensors': [tensor_2d, tensor_3d],
    'arrays': {
        'arr1d': array_1d,
        'arr2d': array_2d
    },
    'scalar': 42,
    'nested_list': [
        {'deep_tensor': torch.randn(7, 8, 9)},
        [array_1d, tensor_2d]
    ],
    'string': 'test'
}

ARGS = {
    'structure': structure
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
output_padding Ran
ran on a synthesized input
KohMat/carracing-dreamer/dreamer/carracing/network.py
code served (permissive licence) · get_code("b733787027a71a6d")
How it ran

Ran 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.

import torch
import numpy as np

torch.manual_seed(0)

def conv_out(h_in, padding, kernel_size, stride):
    return int((h_in + 2.0 * padding - (kernel_size - 1.0) - 1.0) / stride + 1.0)

def output_padding(h_in, conv_out_val, padding, kernel_size, stride):
    return h_in - (conv_out_val - 1) * stride + 2 * padding - (kernel_size - 1) - 1

# Calculate a valid conv_out value
h_in = 28
padding = 1
kernel_size = 3
stride = 1
conv_out_val = conv_out(h_in, padding, kernel_size, stride)

ARGS = {
    "h_in": h_in,
    "conv_out": conv_out_val,
    "padding": padding,
    "kernel_size": kernel_size,
    "stride": stride
}
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 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
preprocess_obs Ran
ran; our contract draft was wrong, not the code
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("b3d662dabfc89979")
How it ran

Ran 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)

# Create a small tensor with integer values (0-255 range for image data)
obs = torch.randint(0, 256, (2, 4), dtype=torch.uint8)

ARGS = {
    "obs": obs
}
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
Dreamer Not yet run
unverified (harvested, no recorded run)
zhixuan-lin/dreamer-pytorch/dreamer.py
code served (permissive licence) · get_code("af793972b29d01fd")
How it ran

no invocation recorded.

Dreamer Not yet run
unverified (harvested, no recorded run)
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("5d8eb8c3fb19bbac")
How it ran

no invocation recorded.

Dreamer Not yet run
unverified (harvested, no recorded run)
adityabingi/Dreamer/dreamer.py
code served (permissive licence) · get_code("e6c80bdd218b3f8f")
How it ran

no invocation recorded.

PLANet Not yet run
unverified (harvested, no recorded run)
chamorajg/pl-dreamer/planet.py
pointer only (licence: NONE) · get_code("8cd4d48928170685")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chamorajg/pl-dreamer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

RSSM Not yet run
unverified (harvested, no recorded run)
Eclectic-Sheep/sheeprl/sheeprl/algos/dreamer_v1/agent.py
code served (permissive licence) · get_code("6f6fbb1df0959d34")
How it ran

no invocation recorded.

TransitionModel Not yet run
unverified (harvested, no recorded run)
yusukeurakami/dreamer-pytorch/models.py
code served (permissive licence) · get_code("28f50a7941b7cc60")
How it ran

no invocation recorded.

bottle Not yet run
unverified (harvested, no recorded run)
Yizhao111/dreamer-pytorch/agent.py
code served (permissive licence) · get_code("25c79a6d1db5ea05")
How it ran

no invocation recorded.

encode_gif Not yet run
unverified (harvested, no recorded run)
danijar/dreamer/tools.py
code served (permissive licence) · get_code("427c760e638127dd")
How it ran

no invocation recorded.

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("1912.01603").

Also present in other papers' code

Of 62 samples lifted from this paper's linked repositories, 62 carry a function identity and 0 do not. Of the 61 distinct functions with an identity, 11 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 10 later) and 50 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
ObservationModel
brick of this paper's assembly: model
2 other papers
2 later
2005.05960 (2020-05)
Planning to Explore via Self-Supervised World Models
2311.02227 (2023-11)
State-Wise Safe Reinforcement Learning With Pixel Observations
bottle
brick of this paper's assembly: helper
2 other papers
2 later
2005.05960 (2020-05)
Planning to Explore via Self-Supervised World Models
2311.02227 (2023-11)
State-Wise Safe Reinforcement Learning With Pixel Observations
encode_gif 2 other papers
2 later
2110.09514 (2021-10)
Discovering and Achieving Goals via World Models
2210.12566 (2022-10)
Solving Continuous Control via Q-learning
Encoder
brick of this paper's assembly: model
1 other paper
1 later
2005.05960 (2020-05)
Planning to Explore via Self-Supervised World Models
TransitionModel
brick of this paper's assembly: entry
1 other paper
1 later
2005.05960 (2020-05)
Planning to Explore via Self-Supervised World Models
TransitionModel
brick of this paper's assembly: model
1 other paper
1 dated earlier
1811.04551 (2018-11)
Learning Latent Dynamics for Planning from Pixels
get_parameters 1 other paper
1 later
2110.10083 (2021-10)
Contrastive Active Inference
graph_summary 1 other paper
1 later
2106.07156 (2021-06)
Temporal Predictive Coding For Model-Based Planning In Latent Space
load_baselines 1 other paper
1 later
2106.07156 (2021-06)
Temporal Predictive Coding For Model-Based Planning In Latent Space
load_runs 1 other paper
1 later
2106.07156 (2021-06)
Temporal Predictive Coding For Model-Based Planning In Latent Space
nest_summary 1 other paper
1 later
2106.07156 (2021-06)
Temporal Predictive Coding For Model-Based Planning In Latent Space

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Learned world models summarize an agent's experience to facilitate learning complex behaviors. While learning world models from high-dimensional sensory inputs is becoming feasible through deep learning, there are many potential ways for deriving behaviors from them. We present Dreamer, a reinforcement learning agent that solves long-horizon tasks from images purely by latent imagination. We efficiently learn behaviors by propagating analytic gradients of learned state values back through trajectories imagined in the compact state space of a learned world model. On 20 challenging visual control tasks, Dreamer exceeds existing approaches in data-efficiency, computation time, and final performance.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1912.01603")
get_code_for_paper("1912.01603")
have("1912.01603")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1912.01603.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1912.01603.svg)](https://syntology.ai/paper/1912.01603)

Connect an agent — have() is free.