diff --git a/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-01a8ecdc-729d-4ad7-9ea8-2c12971703011753434484022-2025_07_25-11.08.10.182/source.csv b/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-01a8ecdc-729d-4ad7-9ea8-2c12971703011753434484022-2025_07_25-11.08.10.182/source.csv
new file mode 100644
index 0000000000000000000000000000000000000000..d42b12482d5ba67b96a7abab5608c770a4223566
--- /dev/null
+++ b/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-01a8ecdc-729d-4ad7-9ea8-2c12971703011753434484022-2025_07_25-11.08.10.182/source.csv
@@ -0,0 +1,12928 @@
+Sequence,Time,File,RangeOffset,RangeLength,Text,Language,Type
+1,3,".gitignore",0,0,"*.pyc\n*.npy\n*.png\n*.gif\n\nwandb_key\ncheckpoints/\nwandb/\n__pycache__/\n",ignore,tab
+2,326,"extension-output-pdoom-org.crowd-code-#1-crowd-code",0,0,"11:08:10 AM [info] Activating crowd-code\n11:08:10 AM [info] Recording started\n11:08:10 AM [info] Initializing git provider using file system watchers...\n",Log,tab
+3,378,"TERMINAL",0,0,"",,terminal_focus
+4,382,"extension-output-pdoom-org.crowd-code-#1-crowd-code",153,0,"11:08:10 AM [info] Git repository found\n11:08:10 AM [info] Git provider initialized successfully\n11:08:10 AM [info] Initial git state: [object Object]\n",Log,content
+5,501,".gitignore",0,0,"",ignore,tab
+6,513335,"test.ipynb",0,0,"import os\nimport shutil\n\nimport jax.numpy as jnp\nfrom flax import nnx\nimport orbax.checkpoint as ocp\n\n# The hunch is that parameters like biases in Linear layers are only created if\n# they are used (e.g. `use_bias=True`). When checkpointing a model created with\n# `use_bias=False`, the bias parameter is not saved.\n#\n# Attempting to restore this checkpoint into a model instance created with\n# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)\n\n\nclass MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)\n\n\nrngs = nnx.Rngs(0)\nmodel_no_bias = MyModel(use_bias=False, rngs=rngs)\n\ndummy_input = jnp.ones((1, 10))\nmodel_no_bias(dummy_input)\n",python,tab
+7,515152,"test.ipynb",0,0,"",python,tab
+8,530139,"test.ipynb",0,0,"nnx.display(model_no_bias)",python,tab
+9,532051,"test.ipynb",0,0,"",python,tab
+10,536943,"test.ipynb",0,0,"model_no_bias = MyModel(use_bias=False, rngs=rngs)\nmodel_no_bias(dummy_input)\n\nstate_no_bias = nnx.split(model_no_bias)\nnnx.display(state_no_bias)",python,tab
+11,551601,"test.ipynb",0,0,"",python,tab
+12,1324888,"requirements.txt",0,0,"dm_pix>=0.4.3\neinops>=0.8.0\nflax>=0.8.5\njax[cuda12]>=0.6.2\noptax>=0.2.3\nprocgen>=0.10.7\ntyro>=0.8.5\nwandb>=0.17.4\ngrain>=0.2.10\npre-commit>=4.2.0\narray-record>=0.7.2\ntqdm>=4.67.1",pip-requirements,tab
+13,1325715,"requirements.txt",14,0,"",pip-requirements,selection_command
+14,1326237,"requirements.txt",0,0,"",pip-requirements,selection_command
+15,1473988,"requirements.txt",14,0,"",pip-requirements,selection_command
+16,1474241,"requirements.txt",28,0,"",pip-requirements,selection_command
+17,1474264,"requirements.txt",40,0,"",pip-requirements,selection_command
+18,1474299,"requirements.txt",59,0,"",pip-requirements,selection_command
+19,1474449,"requirements.txt",72,0,"",pip-requirements,selection_command
+20,1474449,"requirements.txt",88,0,"",pip-requirements,selection_command
+21,1474450,"requirements.txt",100,0,"",pip-requirements,selection_command
+22,1474450,"requirements.txt",114,0,"",pip-requirements,selection_command
+23,1474707,"requirements.txt",100,0,"",pip-requirements,selection_command
+24,1474866,"requirements.txt",88,0,"",pip-requirements,selection_command
+25,1475335,"requirements.txt",100,0,"",pip-requirements,selection_command
+26,1475585,"requirements.txt",114,0,"",pip-requirements,selection_command
+27,1475689,"requirements.txt",128,0,"",pip-requirements,selection_command
+28,1475689,"requirements.txt",146,0,"",pip-requirements,selection_command
+29,1475755,"requirements.txt",166,0,"",pip-requirements,selection_command
+30,1476213,"requirements.txt",146,0,"",pip-requirements,selection_command
+31,1498241,"requirements.txt",128,0,"",pip-requirements,selection_command
+32,1498702,"requirements.txt",114,0,"",pip-requirements,selection_command
+33,1499156,"requirements.txt",100,0,"",pip-requirements,selection_command
+34,1499566,"requirements.txt",88,0,"",pip-requirements,selection_command
+35,1499903,"requirements.txt",72,0,"",pip-requirements,selection_command
+36,1501272,"requirements.txt",59,0,"",pip-requirements,selection_command
+37,1501423,"requirements.txt",40,0,"",pip-requirements,selection_command
+38,1501886,"requirements.txt",28,0,"",pip-requirements,selection_command
+39,1502435,"requirements.txt",14,0,"",pip-requirements,selection_command
+40,1503040,"requirements.txt",0,0,"",pip-requirements,selection_command
+41,1503521,"requirements.txt",14,0,"",pip-requirements,selection_command
+42,2327294,"test.ipynb",0,0,"",python,tab
+43,2332751,"train_dynamics.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom genie import Genie, restore_genie_components\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n\n\nargs = tyro.cli(Args)\n\n\ndef dynamics_loss_fn(model, inputs):\n """"""Compute masked dynamics loss""""""\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n mask = outputs[""mask""]\n outputs[""token_logits""] = outputs[""token_logits""].astype(jnp.float32)\n ce_loss = optax.softmax_cross_entropy_with_integer_labels(\n outputs[""token_logits""], outputs[""video_tokens""]\n )\n ce_loss = (mask * ce_loss).sum() / mask.sum()\n acc = outputs[""token_logits""].argmax(-1) == outputs[""video_tokens""]\n acc = (mask * acc).sum() / mask.sum()\n select_probs = jax.nn.softmax(outputs[""token_logits""])\n gt = inputs[""videos""].clip(0, 1).reshape(-1, *inputs[""videos""].shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n _, index_counts_lam = jnp.unique_counts(\n jnp.ravel(outputs[""lam_indices""]), size=args.num_latent_actions, fill_value=0\n )\n _, index_counts_tokenizer = jnp.unique_counts(\n jnp.ravel(outputs[""video_tokens""]), size=args.num_patch_latents, fill_value=0\n )\n codebook_usage_lam = (index_counts_lam != 0).mean()\n codebook_usage_tokenizer = (index_counts_tokenizer != 0).mean()\n metrics = dict(\n cross_entropy_loss=ce_loss,\n masked_token_accuracy=acc,\n select_logit=outputs[""token_logits""].max(-1).mean(),\n select_p=select_probs.max(-1).mean(),\n entropy=jax.scipy.special.entr(select_probs).sum(-1).mean(),\n psnr=psnr,\n ssim=ssim,\n codebook_usage_lam=codebook_usage_lam,\n codebook_usage_tokenizer=codebook_usage_tokenizer,\n )\n return ce_loss, (outputs[""recon""], metrics)\n\n\n@nnx.jit\ndef train_step(model, optimizer, inputs):\n """"""Update state and compute metrics""""""\n\n def loss_fn(model):\n return dynamics_loss_fn(model, inputs)\n\n (loss, (recon, metrics)), grads = nnx.value_and_grad(loss_fn, has_aux=True)(model)\n optimizer.update(grads)\n if args.log_gradients:\n metrics[""gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""dynamics""]\n )\n return loss, recon, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n # FIXME (f.srambical): pass sharding information for restoration onto different topology\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state, partial_restore=True),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n else:\n # Restore from pre-trained tokenizer (and LAM)\n optimizer = restore_genie_components(\n optimizer, replicated_sharding, rng, args\n )\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng_mask = jax.random.split(rng, 2)\n inputs = dict(videos=videos, mask_rng=_rng_mask)\n loss, recon, metrics = train_step(genie, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[args.seq_len - 1])),\n recon=wandb.Image(np.asarray(recon_seq[args.seq_len - 1])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+44,2332802,"train_dynamics.py",10218,0,"",python,selection_command
+45,2355069,"train_dynamics.py",11856,0,"",python,selection_mouse
+46,2990396,"train_dynamics.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom genie import Genie, restore_genie_components\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n\n\nargs = tyro.cli(Args)\n\n\ndef dynamics_loss_fn(model, inputs):\n """"""Compute masked dynamics loss""""""\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n mask = outputs[""mask""]\n outputs[""token_logits""] = outputs[""token_logits""].astype(jnp.float32)\n ce_loss = optax.softmax_cross_entropy_with_integer_labels(\n outputs[""token_logits""], outputs[""video_tokens""]\n )\n ce_loss = (mask * ce_loss).sum() / mask.sum()\n acc = outputs[""token_logits""].argmax(-1) == outputs[""video_tokens""]\n acc = (mask * acc).sum() / mask.sum()\n select_probs = jax.nn.softmax(outputs[""token_logits""])\n gt = inputs[""videos""].clip(0, 1).reshape(-1, *inputs[""videos""].shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n _, index_counts_lam = jnp.unique_counts(\n jnp.ravel(outputs[""lam_indices""]), size=args.num_latent_actions, fill_value=0\n )\n _, index_counts_tokenizer = jnp.unique_counts(\n jnp.ravel(outputs[""video_tokens""]), size=args.num_patch_latents, fill_value=0\n )\n codebook_usage_lam = (index_counts_lam != 0).mean()\n codebook_usage_tokenizer = (index_counts_tokenizer != 0).mean()\n metrics = dict(\n cross_entropy_loss=ce_loss,\n masked_token_accuracy=acc,\n select_logit=outputs[""token_logits""].max(-1).mean(),\n select_p=select_probs.max(-1).mean(),\n entropy=jax.scipy.special.entr(select_probs).sum(-1).mean(),\n psnr=psnr,\n ssim=ssim,\n codebook_usage_lam=codebook_usage_lam,\n codebook_usage_tokenizer=codebook_usage_tokenizer,\n )\n return ce_loss, (outputs[""recon""], metrics)\n\n\n@nnx.jit\ndef train_step(model, optimizer, inputs):\n """"""Update state and compute metrics""""""\n\n def loss_fn(model):\n return dynamics_loss_fn(model, inputs)\n\n (loss, (recon, metrics)), grads = nnx.value_and_grad(loss_fn, has_aux=True)(model)\n optimizer.update(grads)\n if args.log_gradients:\n metrics[""gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""dynamics""]\n )\n return loss, recon, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n # FIXME (f.srambical): pass sharding information for restoration onto different topology\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state, partial_restore=True),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n else:\n # Restore from pre-trained tokenizer (and LAM)\n optimizer = restore_genie_components(\n optimizer, replicated_sharding, rng, args\n )\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng_mask = jax.random.split(rng, 2)\n inputs = dict(videos=videos, mask_rng=_rng_mask)\n loss, recon, metrics = train_step(genie, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[args.seq_len - 1])),\n recon=wandb.Image(np.asarray(recon_seq[args.seq_len - 1])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+47,2990397,"train_dynamics.py",12429,0,"",python,selection_mouse
+48,2994419,"train_dynamics.py",0,0,"",python,tab
+49,2994421,".gitignore",0,0,"",ignore,tab
+50,2995173,".gitignore",55,0,"",ignore,selection_command
+51,2995307,".gitignore",48,0,"",ignore,selection_command
+52,2995430,".gitignore",35,0,"",ignore,selection_command
+53,2995563,".gitignore",25,0,"",ignore,selection_command
+54,2995711,".gitignore",24,0,"",ignore,selection_command
+55,2995813,".gitignore",18,0,"",ignore,selection_command
+56,2996006,".gitignore",23,0,"\n",ignore,content
+57,2996171,".gitignore",24,0,"8",ignore,content
+58,2996171,".gitignore",25,0,"",ignore,selection_keyboard
+59,2996508,".gitignore",24,1,"",ignore,content
+60,2996680,".gitignore",24,0,"*",ignore,content
+61,2996680,".gitignore",25,0,"",ignore,selection_keyboard
+62,2996862,".gitignore",25,0,".",ignore,content
+63,2996862,".gitignore",26,0,"",ignore,selection_keyboard
+64,2997125,".gitignore",26,0,"a",ignore,content
+65,2997125,".gitignore",27,0,"",ignore,selection_keyboard
+66,2997197,".gitignore",27,0,"r",ignore,content
+67,2997472,".gitignore",28,0,"r",ignore,content
+68,2997472,".gitignore",29,0,"",ignore,selection_keyboard
+69,2997513,".gitignore",29,0,"a",ignore,content
+70,2997513,".gitignore",30,0,"",ignore,selection_keyboard
+71,2997821,".gitignore",30,0,"y",ignore,content
+72,2997822,".gitignore",31,0,"",ignore,selection_keyboard
+73,2999546,".gitignore",31,0,"_",ignore,content
+74,2999547,".gitignore",32,0,"",ignore,selection_keyboard
+75,2999750,".gitignore",32,0,"r",ignore,content
+76,2999751,".gitignore",33,0,"",ignore,selection_keyboard
+77,2999805,".gitignore",33,0,"e",ignore,content
+78,2999806,".gitignore",34,0,"",ignore,selection_keyboard
+79,2999935,".gitignore",34,0,"c",ignore,content
+80,2999935,".gitignore",35,0,"",ignore,selection_keyboard
+81,3000104,".gitignore",35,0,"o",ignore,content
+82,3000104,".gitignore",36,0,"",ignore,selection_keyboard
+83,3000110,".gitignore",36,0,"r",ignore,content
+84,3000110,".gitignore",37,0,"",ignore,selection_keyboard
+85,3000173,".gitignore",37,0,"d",ignore,content
+86,3000173,".gitignore",38,0,"",ignore,selection_keyboard
+87,3000392,".gitignore",37,0,"",ignore,selection_command
+88,3002801,".gitignore",38,0,"\n",ignore,content
+89,3003592,".gitignore",39,1,"",ignore,content
+90,3003662,".gitignore",40,0,"",ignore,selection_command
+91,3003830,".gitignore",50,0,"",ignore,selection_command
+92,3003953,".gitignore",63,0,"",ignore,selection_command
+93,3004080,".gitignore",70,0,"",ignore,selection_command
+94,3004255,".gitignore",82,0,"\n",ignore,content
+95,3004368,".gitignore",83,0,"e",ignore,content
+96,3004368,".gitignore",84,0,"",ignore,selection_keyboard
+97,3004508,".gitignore",84,0,"x",ignore,content
+98,3004508,".gitignore",85,0,"",ignore,selection_keyboard
+99,3004548,".gitignore",85,0,"p",ignore,content
+100,3004548,".gitignore",86,0,"",ignore,selection_keyboard
+101,3004986,".gitignore",86,0,"e",ignore,content
+102,3004987,".gitignore",87,0,"",ignore,selection_keyboard
+103,3005482,".gitignore",87,0,"r",ignore,content
+104,3005482,".gitignore",88,0,"",ignore,selection_keyboard
+105,3005580,".gitignore",88,0,"i",ignore,content
+106,3005580,".gitignore",89,0,"",ignore,selection_keyboard
+107,3005616,".gitignore",89,0,"m",ignore,content
+108,3005616,".gitignore",90,0,"",ignore,selection_keyboard
+109,3005710,".gitignore",90,0,"e",ignore,content
+110,3005710,".gitignore",91,0,"",ignore,selection_keyboard
+111,3005832,".gitignore",91,0,"n",ignore,content
+112,3005833,".gitignore",92,0,"",ignore,selection_keyboard
+113,3005977,".gitignore",92,0,"t",ignore,content
+114,3005978,".gitignore",93,0,"",ignore,selection_keyboard
+115,3006064,".gitignore",93,0,"/",ignore,content
+116,3006064,".gitignore",94,0,"",ignore,selection_keyboard
+117,3006158,".gitignore",93,0,"",ignore,selection_command
+118,3011795,".gitignore",93,0,"s",ignore,content
+119,3011795,".gitignore",94,0,"",ignore,selection_keyboard
+120,3012000,".gitignore",93,0,"",ignore,selection_command
+121,3080411,"README.md",0,0,"
Jafar: A JAX-based Genie Implementation 🧞
\n\n\n \n
\n \n
\n
\n\nJafar is a JAX-based implementation of the DeepMind paper ""[Genie: Generative Interactive Environments](https://arxiv.org/abs/2402.15391)"" (Bruce et al., 2024).\n\nJafar supports training of all Genie components and can complete the CoinRun reproducibility experiment (Appendix F) on a single L40S GPU in under a week.\n\nSetup 🧗
\n\nJafar was built with `python 3.10` and `jax 0.4.30`. To install requirements, run:\n\n```bash\npip install -r requirements.txt\npre-commit install\n```\n\nBefore training the models, generate the CoinRun dataset by running:\n\n```bash\npython generate_dataset.py --num_episodes 10000\n```\n\nNote: this is a large dataset (around 100GB) and may take a while to generate.\n\nFor performant distributed training, we additionally preprocess the dataset into `TFRecord`s:\n\n```bash\npython preprocess_dataset.py\n```\n\nQuick Start 🚀
\n\nGenie has three components: a [video tokenizer](models/tokenizer.py), a [latent action model](models/lam.py), and a [dynamics model](models/dynamics.py). Each of these components are trained separately, however, the dynamics model requires a pre-trained video tokenizer and latent action model.\n\nTo train the video tokenizer (similar for the LAM), run:\n\n```bash\npython train_tokenizer.py --ckpt_dir \n```\n\nOnce the tokenizer and LAM are trained, the dynamics model can be trained with:\n\n```bash\npython train_dynamics.py --tokenizer_checkpoint --lam_checkpoint \n```\n\nLogging with `wandb` is supported. To enable logging, set the `WANDB_API_KEY` environment variable or run:\n\n```bash\nwandb login\n```\n\nTraining can then be logged by setting the `--log` flag:\n\n```bash\npython train_tokenizer.py --log --entity --project \n```\n\nCiting Jafar 📜
\n\nJafar was built by [Matthew Jackson](https://matthewtjackson.com) and [Timon Willi](https://www.timonwilli.com).\n\nIf you use Jafar in your work, please cite us and the original Genie paper as follows:\n\n```\n@inproceedings{\n willi2024jafar,\n title={Jafar: An Open-Source Genie Reimplemention in Jax},\n author={Timon Willi and Matthew Thomas Jackson and Jakob Nicolaus Foerster},\n booktitle={First Workshop on Controllable Video Generation @ ICML 2024},\n year={2024},\n url={https://openreview.net/forum?id=ZZGaQHs9Jb}\n}\n```\n```\n@inproceedings{\n bruce2024genie,\n title={Genie: Generative Interactive Environments},\n author={Jake Bruce and Michael D Dennis and Ashley Edwards and Jack Parker-Holder and Yuge Shi and Edward Hughes and Matthew Lai and Aditi Mavalankar and Richie Steigerwald and Chris Apps and Yusuf Aytar and Sarah Maria Elisabeth Bechtle and Feryal Behbahani and Stephanie C.Y. Chan and Nicolas Heess and Lucy Gonzalez and Simon Osindero and Sherjil Ozair and Scott Reed and Jingwei Zhang and Konrad Zolna and Jeff Clune and Nando de Freitas and Satinder Singh and Tim Rockt{\""a}schel},\n booktitle={Forty-first International Conference on Machine Learning},\n year={2024},\n url={https://openreview.net/forum?id=bJbSbJskOS}\n}\n```\n",markdown,tab
+122,3080511,"README.md",0,0,"Switched from branch 'flax-nnx-migration' to 'features-in-readme'",markdown,git_branch_checkout
+123,3081629,"README.md",67,0,"",markdown,selection_command
+124,3081880,"README.md",68,0,"",markdown,selection_command
+125,3081903,"README.md",87,0,"",markdown,selection_command
+126,3081936,"README.md",154,0,"",markdown,selection_command
+127,3081969,"README.md",236,0,"",markdown,selection_command
+128,3082002,"README.md",281,0,"",markdown,selection_command
+129,3082035,"README.md",366,0,"",markdown,selection_command
+130,3082069,"README.md",371,0,"",markdown,selection_command
+131,3082101,"README.md",372,0,"",markdown,selection_command
+132,3082135,"README.md",533,0,"",markdown,selection_command
+133,3082168,"README.md",534,0,"",markdown,selection_command
+134,3082202,"README.md",689,0,"",markdown,selection_command
+135,3082236,"README.md",690,0,"",markdown,selection_command
+136,3096828,"README.md",689,0,"",markdown,selection_command
+137,3097014,"README.md",534,0,"",markdown,selection_command
+138,3097143,"README.md",533,0,"",markdown,selection_command
+139,3097381,"README.md",372,0,"",markdown,selection_command
+140,3098571,"README.md",531,0,"",markdown,selection_command
+141,3098957,"README.md",372,0,"",markdown,selection_command
+142,3137322,"README.md",372,0,"T",markdown,content
+143,3137323,"README.md",373,0,"",markdown,selection_keyboard
+144,3137453,"README.md",373,0,"h",markdown,content
+145,3137453,"README.md",374,0,"",markdown,selection_keyboard
+146,3137490,"README.md",374,0,"i",markdown,content
+147,3137490,"README.md",375,0,"",markdown,selection_keyboard
+148,3137615,"README.md",375,0,"s",markdown,content
+149,3137616,"README.md",376,0,"",markdown,selection_keyboard
+150,3137646,"README.md",376,0," ",markdown,content
+151,3137646,"README.md",377,0,"",markdown,selection_keyboard
+152,3137761,"README.md",377,0,"s",markdown,content
+153,3137762,"README.md",378,0,"",markdown,selection_keyboard
+154,3137894,"README.md",378,0,"a",markdown,content
+155,3137894,"README.md",379,0,"",markdown,selection_keyboard
+156,3137905,"README.md",379,0," ",markdown,content
+157,3137906,"README.md",380,0,"",markdown,selection_keyboard
+158,3138463,"README.md",379,1,"",markdown,content
+159,3138663,"README.md",378,1,"",markdown,content
+160,3138733,"README.md",377,1,"",markdown,content
+161,3139331,"README.md",377,0,"i",markdown,content
+162,3139331,"README.md",378,0,"",markdown,selection_keyboard
+163,3139376,"README.md",378,0,"s",markdown,content
+164,3139376,"README.md",379,0,"",markdown,selection_keyboard
+165,3139500,"README.md",379,0," ",markdown,content
+166,3139500,"README.md",380,0,"",markdown,selection_keyboard
+167,3139546,"README.md",380,0,"a",markdown,content
+168,3139546,"README.md",381,0,"",markdown,selection_keyboard
+169,3139712,"README.md",381,0," ",markdown,content
+170,3139712,"README.md",382,0,"",markdown,selection_keyboard
+171,3143728,"README.md",382,0,"f",markdown,content
+172,3143728,"README.md",383,0,"",markdown,selection_keyboard
+173,3143908,"README.md",383,0,"e",markdown,content
+174,3143908,"README.md",384,0,"",markdown,selection_keyboard
+175,3144047,"README.md",384,0,"a",markdown,content
+176,3144047,"README.md",385,0,"",markdown,selection_keyboard
+177,3144112,"README.md",385,0,"t",markdown,content
+178,3144112,"README.md",386,0,"",markdown,selection_keyboard
+179,3144310,"README.md",386,0,"u",markdown,content
+180,3144311,"README.md",387,0,"",markdown,selection_keyboard
+181,3144342,"README.md",387,0,"r",markdown,content
+182,3144342,"README.md",388,0,"",markdown,selection_keyboard
+183,3144439,"README.md",388,0,"e",markdown,content
+184,3144439,"README.md",389,0,"",markdown,selection_keyboard
+185,3144587,"README.md",389,0,"-",markdown,content
+186,3144587,"README.md",390,0,"",markdown,selection_keyboard
+187,3144808,"README.md",390,0,"c",markdown,content
+188,3144808,"README.md",391,0,"",markdown,selection_keyboard
+189,3144955,"README.md",391,0,"o",markdown,content
+190,3144956,"README.md",392,0,"",markdown,selection_keyboard
+191,3144976,"README.md",392,0,"m",markdown,content
+192,3144978,"README.md",393,0,"p",markdown,content
+193,3144978,"README.md",394,0,"",markdown,selection_keyboard
+194,3145100,"README.md",394,0,"l",markdown,content
+195,3145100,"README.md",395,0,"",markdown,selection_keyboard
+196,3145170,"README.md",395,0,"e",markdown,content
+197,3145171,"README.md",396,0,"",markdown,selection_keyboard
+198,3145238,"README.md",396,0,"t",markdown,content
+199,3145239,"README.md",397,0,"",markdown,selection_keyboard
+200,3145352,"README.md",397,0,"e",markdown,content
+201,3145352,"README.md",398,0,"",markdown,selection_keyboard
+202,3145765,"README.md",390,8,"",markdown,content
+203,3146176,"README.md",389,1,"",markdown,content
+204,3146693,"README.md",382,7,"",markdown,content
+205,3147052,"README.md",382,0,"f",markdown,content
+206,3147052,"README.md",383,0,"",markdown,selection_keyboard
+207,3147580,"README.md",382,1,"",markdown,content
+208,3148693,"README.md",382,0,"f",markdown,content
+209,3148693,"README.md",383,0,"",markdown,selection_keyboard
+210,3148743,"README.md",383,0,"e",markdown,content
+211,3148744,"README.md",384,0,"",markdown,selection_keyboard
+212,3148816,"README.md",384,0,"a",markdown,content
+213,3148816,"README.md",385,0,"",markdown,selection_keyboard
+214,3148936,"README.md",385,0,"t",markdown,content
+215,3148936,"README.md",386,0,"",markdown,selection_keyboard
+216,3149149,"README.md",386,0,"u",markdown,content
+217,3149149,"README.md",387,0,"",markdown,selection_keyboard
+218,3149150,"README.md",387,0,"r",markdown,content
+219,3149150,"README.md",388,0,"",markdown,selection_keyboard
+220,3149211,"README.md",388,0,"e",markdown,content
+221,3149211,"README.md",389,0,"",markdown,selection_keyboard
+222,3149325,"README.md",389,0," ",markdown,content
+223,3149325,"README.md",390,0,"",markdown,selection_keyboard
+224,3149814,"README.md",389,1,"",markdown,content
+225,3150342,"README.md",389,0,"-",markdown,content
+226,3150342,"README.md",390,0,"",markdown,selection_keyboard
+227,3150604,"README.md",390,0,"c",markdown,content
+228,3150604,"README.md",391,0,"",markdown,selection_keyboard
+229,3150722,"README.md",391,0,"o",markdown,content
+230,3150722,"README.md",392,0,"",markdown,selection_keyboard
+231,3150840,"README.md",392,0,"m",markdown,content
+232,3150842,"README.md",393,0,"p",markdown,content
+233,3150842,"README.md",394,0,"",markdown,selection_keyboard
+234,3150887,"README.md",394,0,"l",markdown,content
+235,3150888,"README.md",395,0,"",markdown,selection_keyboard
+236,3150965,"README.md",395,0,"e",markdown,content
+237,3150965,"README.md",396,0,"",markdown,selection_keyboard
+238,3150989,"README.md",396,0,"t",markdown,content
+239,3150989,"README.md",397,0,"",markdown,selection_keyboard
+240,3151123,"README.md",397,0,"e",markdown,content
+241,3151123,"README.md",398,0,"",markdown,selection_keyboard
+242,3151251,"README.md",398,0," ",markdown,content
+243,3151251,"README.md",399,0,"",markdown,selection_keyboard
+244,3151342,"README.md",399,0,"f",markdown,content
+245,3151342,"README.md",400,0,"",markdown,selection_keyboard
+246,3151475,"README.md",400,0,"o",markdown,content
+247,3151476,"README.md",401,0,"",markdown,selection_keyboard
+248,3151569,"README.md",401,0,"r",markdown,content
+249,3151569,"README.md",402,0,"",markdown,selection_keyboard
+250,3151682,"README.md",402,0," ",markdown,content
+251,3151682,"README.md",403,0,"",markdown,selection_keyboard
+252,3151811,"README.md",403,0,"k",markdown,content
+253,3151811,"README.md",404,0,"",markdown,selection_keyboard
+254,3151994,"README.md",403,1,"",markdown,content
+255,3152119,"README.md",402,1,"",markdown,content
+256,3152295,"README.md",402,0,"k",markdown,content
+257,3152295,"README.md",403,0,"",markdown,selection_keyboard
+258,3152328,"README.md",403,0," ",markdown,content
+259,3152328,"README.md",404,0,"",markdown,selection_keyboard
+260,3152466,"README.md",404,0,"o",markdown,content
+261,3152466,"README.md",405,0,"",markdown,selection_keyboard
+262,3152506,"README.md",405,0,"f",markdown,content
+263,3152507,"README.md",406,0,"",markdown,selection_keyboard
+264,3152588,"README.md",406,0," ",markdown,content
+265,3152588,"README.md",407,0,"",markdown,selection_keyboard
+266,3152860,"README.md",406,0,"",markdown,selection_command
+267,3153742,"README.md",407,0,"",markdown,selection_command
+268,3153869,"README.md",413,0,"",markdown,selection_command
+269,3154012,"README.md",416,0,"",markdown,selection_command
+270,3154302,"README.md",413,0,"",markdown,selection_command
+271,3154462,"README.md",413,3,"",markdown,content
+272,3154916,"README.md",413,0,"h",markdown,content
+273,3154916,"README.md",414,0,"",markdown,selection_keyboard
+274,3155360,"README.md",413,1,"",markdown,content
+275,3155476,"README.md",412,1,"",markdown,content
+276,3155643,"README.md",412,0,",",markdown,content
+277,3155643,"README.md",413,0,"",markdown,selection_keyboard
+278,3155700,"README.md",413,0," ",markdown,content
+279,3155700,"README.md",414,0,"",markdown,selection_keyboard
+280,3155758,"README.md",413,0,"",markdown,selection_command
+281,3157457,"README.md",566,0,"",markdown,selection_command
+282,3157895,"README.md",413,0,"",markdown,selection_command
+283,3158333,"README.md",565,0,"",markdown,selection_command
+284,3160846,"README.md",564,0,"",markdown,selection_command
+285,3161270,"README.md",565,0,"\n",markdown,content
+286,3161602,"README.md",566,0,"\n",markdown,content
+287,3161925,"README.md",567,0,"T",markdown,content
+288,3161925,"README.md",568,0,"",markdown,selection_keyboard
+289,3162059,"README.md",568,0,"h",markdown,content
+290,3162060,"README.md",569,0,"",markdown,selection_keyboard
+291,3162107,"README.md",569,0,"i",markdown,content
+292,3162108,"README.md",570,0,"",markdown,selection_keyboard
+293,3162141,"README.md",570,0,"s",markdown,content
+294,3162141,"README.md",571,0,"",markdown,selection_keyboard
+295,3162230,"README.md",571,0," ",markdown,content
+296,3162230,"README.md",572,0,"",markdown,selection_keyboard
+297,3162317,"README.md",572,0,"r",markdown,content
+298,3162317,"README.md",573,0,"",markdown,selection_keyboard
+299,3162405,"README.md",573,0,"e",markdown,content
+300,3162405,"README.md",574,0,"",markdown,selection_keyboard
+301,3162469,"README.md",574,0,"p",markdown,content
+302,3162469,"README.md",575,0,"",markdown,selection_keyboard
+303,3162562,"README.md",575,0,"o",markdown,content
+304,3162562,"README.md",576,0,"",markdown,selection_keyboard
+305,3162752,"README.md",576,0,"s",markdown,content
+306,3162752,"README.md",577,0,"",markdown,selection_keyboard
+307,3162883,"README.md",577,0,"i",markdown,content
+308,3162883,"README.md",578,0,"",markdown,selection_keyboard
+309,3162947,"README.md",578,0,"t",markdown,content
+310,3162947,"README.md",579,0,"",markdown,selection_keyboard
+311,3163049,"README.md",579,0,"o",markdown,content
+312,3163049,"README.md",580,0,"",markdown,selection_keyboard
+313,3163145,"README.md",580,0,"r",markdown,content
+314,3163145,"README.md",581,0,"",markdown,selection_keyboard
+315,3163239,"README.md",581,0,"y",markdown,content
+316,3163239,"README.md",582,0,"",markdown,selection_keyboard
+317,3163370,"README.md",582,0," ",markdown,content
+318,3163370,"README.md",583,0,"",markdown,selection_keyboard
+319,3163597,"README.md",583,0,"e",markdown,content
+320,3163597,"README.md",584,0,"",markdown,selection_keyboard
+321,3163733,"README.md",584,0,"x",markdown,content
+322,3163733,"README.md",585,0,"",markdown,selection_keyboard
+323,3163909,"README.md",585,0,"t",markdown,content
+324,3163909,"README.md",586,0,"",markdown,selection_keyboard
+325,3163955,"README.md",586,0,"e",markdown,content
+326,3163956,"README.md",587,0,"",markdown,selection_keyboard
+327,3164087,"README.md",587,0,"n",markdown,content
+328,3164087,"README.md",588,0,"",markdown,selection_keyboard
+329,3164130,"README.md",588,0,"d",markdown,content
+330,3164130,"README.md",589,0,"",markdown,selection_keyboard
+331,3164186,"README.md",589,0,"s",markdown,content
+332,3164187,"README.md",590,0,"",markdown,selection_keyboard
+333,3164312,"README.md",590,0," ",markdown,content
+334,3164313,"README.md",591,0,"",markdown,selection_keyboard
+335,3164501,"README.md",591,0,"j",markdown,content
+336,3164501,"README.md",592,0,"",markdown,selection_keyboard
+337,3164864,"README.md",591,1,"",markdown,content
+338,3165080,"README.md",591,0,"J",markdown,content
+339,3165080,"README.md",592,0,"",markdown,selection_keyboard
+340,3165486,"README.md",591,1,"",markdown,content
+341,3165870,"README.md",591,0,"J",markdown,content
+342,3165871,"README.md",592,0,"",markdown,selection_keyboard
+343,3166045,"README.md",592,0,"a",markdown,content
+344,3166045,"README.md",593,0,"",markdown,selection_keyboard
+345,3166108,"README.md",593,0,"f",markdown,content
+346,3166108,"README.md",594,0,"",markdown,selection_keyboard
+347,3166213,"README.md",594,0,"a",markdown,content
+348,3166214,"README.md",595,0,"",markdown,selection_keyboard
+349,3166339,"README.md",595,0,"r",markdown,content
+350,3166339,"README.md",596,0,"",markdown,selection_keyboard
+351,3166440,"README.md",596,0," ",markdown,content
+352,3166440,"README.md",597,0,"",markdown,selection_keyboard
+353,3167678,"README.md",591,6,"",markdown,content
+354,3167817,"README.md",583,8,"",markdown,content
+355,3168242,"README.md",583,0,"i",markdown,content
+356,3168243,"README.md",584,0,"",markdown,selection_keyboard
+357,3168313,"README.md",584,0,"m",markdown,content
+358,3168313,"README.md",585,0,"",markdown,selection_keyboard
+359,3168374,"README.md",585,0,"p",markdown,content
+360,3168374,"README.md",586,0,"",markdown,selection_keyboard
+361,3168492,"README.md",586,0,"l",markdown,content
+362,3168493,"README.md",587,0,"",markdown,selection_keyboard
+363,3168658,"README.md",587,0,"e",markdown,content
+364,3168658,"README.md",588,0,"",markdown,selection_keyboard
+365,3168701,"README.md",588,0,"m",markdown,content
+366,3168701,"README.md",589,0,"",markdown,selection_keyboard
+367,3168756,"README.md",589,0,"e",markdown,content
+368,3168756,"README.md",590,0,"",markdown,selection_keyboard
+369,3168882,"README.md",590,0,"n",markdown,content
+370,3168882,"README.md",591,0,"",markdown,selection_keyboard
+371,3168960,"README.md",591,0,"t",markdown,content
+372,3168961,"README.md",592,0,"",markdown,selection_keyboard
+373,3169040,"README.md",592,0,"s",markdown,content
+374,3169040,"README.md",593,0,"",markdown,selection_keyboard
+375,3169178,"README.md",593,0," ",markdown,content
+376,3169179,"README.md",594,0,"",markdown,selection_keyboard
+377,3169526,"README.md",594,0,"b",markdown,content
+378,3169526,"README.md",595,0,"",markdown,selection_keyboard
+379,3169556,"README.md",595,0,"u",markdown,content
+380,3169556,"README.md",596,0,"",markdown,selection_keyboard
+381,3169618,"README.md",596,0,"g",markdown,content
+382,3169618,"README.md",597,0,"",markdown,selection_keyboard
+383,3169774,"README.md",597,0,"f",markdown,content
+384,3169774,"README.md",598,0,"",markdown,selection_keyboard
+385,3169896,"README.md",598,0,"i",markdown,content
+386,3169897,"README.md",599,0,"",markdown,selection_keyboard
+387,3169939,"README.md",599,0,"x",markdown,content
+388,3169939,"README.md",600,0,"",markdown,selection_keyboard
+389,3170102,"README.md",600,0,"e",markdown,content
+390,3170102,"README.md",601,0,"",markdown,selection_keyboard
+391,3170192,"README.md",601,0,"s",markdown,content
+392,3170192,"README.md",602,0,"",markdown,selection_keyboard
+393,3170365,"README.md",602,0," ",markdown,content
+394,3170366,"README.md",603,0,"",markdown,selection_keyboard
+395,3170429,"README.md",603,0,"a",markdown,content
+396,3170429,"README.md",604,0,"",markdown,selection_keyboard
+397,3170551,"README.md",604,0,"n",markdown,content
+398,3170551,"README.md",605,0,"",markdown,selection_keyboard
+399,3170609,"README.md",605,0,"d",markdown,content
+400,3170609,"README.md",606,0,"",markdown,selection_keyboard
+401,3170690,"README.md",606,0," ",markdown,content
+402,3170690,"README.md",607,0,"",markdown,selection_keyboard
+403,3170982,"README.md",607,0,"e",markdown,content
+404,3170982,"README.md",608,0,"",markdown,selection_keyboard
+405,3171213,"README.md",608,0,"x",markdown,content
+406,3171214,"README.md",609,0,"",markdown,selection_keyboard
+407,3171361,"README.md",609,0,"t",markdown,content
+408,3171361,"README.md",610,0,"",markdown,selection_keyboard
+409,3171397,"README.md",610,0,"e",markdown,content
+410,3171397,"README.md",611,0,"",markdown,selection_keyboard
+411,3171512,"README.md",611,0,"n",markdown,content
+412,3171512,"README.md",612,0,"",markdown,selection_keyboard
+413,3171602,"README.md",612,0,"d",markdown,content
+414,3171602,"README.md",613,0,"",markdown,selection_keyboard
+415,3171642,"README.md",613,0,"s",markdown,content
+416,3171642,"README.md",614,0,"",markdown,selection_keyboard
+417,3171771,"README.md",614,0," ",markdown,content
+418,3171771,"README.md",615,0,"",markdown,selection_keyboard
+419,3172572,"README.md",615,0,"J",markdown,content
+420,3172572,"README.md",616,0,"",markdown,selection_keyboard
+421,3172730,"README.md",616,0,"a",markdown,content
+422,3172730,"README.md",617,0,"",markdown,selection_keyboard
+423,3172789,"README.md",617,0,"f",markdown,content
+424,3172789,"README.md",618,0,"",markdown,selection_keyboard
+425,3172902,"README.md",618,0,"a",markdown,content
+426,3172902,"README.md",619,0,"",markdown,selection_keyboard
+427,3172975,"README.md",619,0,"r",markdown,content
+428,3172975,"README.md",620,0,"",markdown,selection_keyboard
+429,3173093,"README.md",620,0," ",markdown,content
+430,3173093,"README.md",621,0,"",markdown,selection_keyboard
+431,3173451,"README.md",620,0,"",markdown,selection_command
+432,3173572,"README.md",615,0,"",markdown,selection_command
+433,3173730,"README.md",607,0,"",markdown,selection_command
+434,3173868,"README.md",603,0,"",markdown,selection_command
+435,3174006,"README.md",594,0,"",markdown,selection_command
+436,3174138,"README.md",583,0,"",markdown,selection_command
+437,3174276,"README.md",572,0,"",markdown,selection_command
+438,3174381,"README.md",581,0,"",markdown,selection_command
+439,3174877,"README.md",572,0,"",markdown,selection_command
+440,3175014,"README.md",567,0,"",markdown,selection_command
+441,3175309,"README.md",570,0,"",markdown,selection_command
+442,3175562,"README.md",581,0,"",markdown,selection_command
+443,3175587,"README.md",592,0,"",markdown,selection_command
+444,3175624,"README.md",601,0,"",markdown,selection_command
+445,3175791,"README.md",605,0,"",markdown,selection_command
+446,3176078,"README.md",621,0,"",markdown,selection_command
+447,3181403,"README.md",620,1,"",markdown,content
+448,3181510,"README.md",619,0,"",markdown,selection_command
+449,3182143,"README.md",621,0,"",markdown,selection_command
+450,3182263,"README.md",674,0,"",markdown,selection_command
+451,3183187,"README.md",622,155,"",markdown,content
+452,3183288,"README.md",621,0,"",markdown,selection_command
+453,3183423,"README.md",567,0,"",markdown,selection_command
+454,3183564,"README.md",566,0,"",markdown,selection_command
+455,3183966,"README.md",372,0,"",markdown,selection_command
+456,3184178,"README.md",565,0,"\n",markdown,content
+457,3184451,"README.md",566,0,"\nJafar supports training of all Genie components and can complete the CoinRun reproducibility experiment (Appendix F) on a single L40S GPU in under a week.",markdown,content
+458,3184468,"README.md",567,0,"",markdown,selection_command
+459,3185096,"README.md",722,0,"",markdown,selection_command
+460,3185227,"README.md",723,0,"",markdown,selection_command
+461,3185444,"README.md",777,0,"",markdown,selection_command
+462,3185817,"README.md",777,1,"",markdown,content
+463,3185975,"README.md",723,0,"",markdown,selection_command
+464,3189886,"README.md",776,0,"",markdown,selection_command
+465,3190702,"README.md",776,0," ",markdown,content
+466,3190702,"README.md",777,0,"",markdown,selection_keyboard
+467,3191176,"README.md",777,0,"u",markdown,content
+468,3191176,"README.md",778,0,"",markdown,selection_keyboard
+469,3191316,"README.md",778,0,"m",markdown,content
+470,3191316,"README.md",779,0,"",markdown,selection_keyboard
+471,3191411,"README.md",779,0," ",markdown,content
+472,3191411,"README.md",780,0,"",markdown,selection_keyboard
+473,3191524,"README.md",780,0,"m",markdown,content
+474,3191525,"README.md",781,0,"",markdown,selection_keyboard
+475,3191614,"README.md",781,0,"u",markdown,content
+476,3191614,"README.md",782,0,"",markdown,selection_keyboard
+477,3191749,"README.md",782,0,"l",markdown,content
+478,3191749,"README.md",783,0,"",markdown,selection_keyboard
+479,3191863,"README.md",783,0,"t",markdown,content
+480,3191863,"README.md",784,0,"",markdown,selection_keyboard
+481,3191939,"README.md",784,0,"i",markdown,content
+482,3191939,"README.md",785,0,"",markdown,selection_keyboard
+483,3192363,"README.md",785,0,"d",markdown,content
+484,3192363,"README.md",786,0,"",markdown,selection_keyboard
+485,3192438,"README.md",786,0,"u",markdown,content
+486,3192438,"README.md",787,0,"",markdown,selection_keyboard
+487,3192602,"README.md",787,0,"s",markdown,content
+488,3192602,"README.md",788,0,"",markdown,selection_keyboard
+489,3192941,"README.md",787,1,"",markdown,content
+490,3192989,"README.md",787,0,"e",markdown,content
+491,3192989,"README.md",788,0,"",markdown,selection_keyboard
+492,3193043,"README.md",788,0,"s",markdown,content
+493,3193043,"README.md",789,0,"",markdown,selection_keyboard
+494,3193110,"README.md",789,0," ",markdown,content
+495,3193110,"README.md",790,0,"",markdown,selection_keyboard
+496,3193221,"README.md",790,0,"o",markdown,content
+497,3193221,"README.md",791,0,"",markdown,selection_keyboard
+498,3193281,"README.md",791,0,"f",markdown,content
+499,3193281,"README.md",792,0,"",markdown,selection_keyboard
+500,3193373,"README.md",792,0," ",markdown,content
+501,3193373,"README.md",793,0,"",markdown,selection_keyboard
+502,3193621,"README.md",790,3,"",markdown,content
+503,3193775,"README.md",780,10,"",markdown,content
+504,3193958,"README.md",780,0,"m",markdown,content
+505,3193958,"README.md",781,0,"",markdown,selection_keyboard
+506,3194146,"README.md",781,0,"u",markdown,content
+507,3194147,"README.md",782,0,"",markdown,selection_keyboard
+508,3194282,"README.md",782,0,"l",markdown,content
+509,3194283,"README.md",783,0,"",markdown,selection_keyboard
+510,3194355,"README.md",783,0,"t",markdown,content
+511,3194355,"README.md",784,0,"",markdown,selection_keyboard
+512,3194643,"README.md",780,4,"",markdown,content
+513,3194801,"README.md",777,3,"",markdown,content
+514,3196948,"README.md",777,0,"w",markdown,content
+515,3196949,"README.md",778,0,"",markdown,selection_keyboard
+516,3197044,"README.md",778,0,"i",markdown,content
+517,3197044,"README.md",779,0,"",markdown,selection_keyboard
+518,3197216,"README.md",779,0,"t",markdown,content
+519,3197216,"README.md",780,0,"",markdown,selection_keyboard
+520,3197264,"README.md",780,0,"h",markdown,content
+521,3197264,"README.md",781,0,"",markdown,selection_keyboard
+522,3197382,"README.md",781,0," ",markdown,content
+523,3197382,"README.md",782,0,"",markdown,selection_keyboard
+524,3201458,"README.md",781,0,"",markdown,selection_command
+525,3205415,"README.md",777,0,"",markdown,selection_command
+526,3205542,"README.md",771,0,"",markdown,selection_command
+527,3205620,"README.md",763,0,"",markdown,selection_command
+528,3209282,"README.md",759,0,"",markdown,selection_command
+529,3209449,"README.md",750,0,"",markdown,selection_command
+530,3209661,"README.md",759,0,"",markdown,selection_command
+531,3209923,"README.md",763,0,"",markdown,selection_command
+532,3210772,"README.md",763,19,"",markdown,content
+533,3210978,"README.md",763,0,"c",markdown,content
+534,3210979,"README.md",764,0,"",markdown,selection_keyboard
+535,3211086,"README.md",764,0,"o",markdown,content
+536,3211086,"README.md",765,0,"",markdown,selection_keyboard
+537,3211130,"README.md",765,0,"n",markdown,content
+538,3211130,"README.md",766,0,"",markdown,selection_keyboard
+539,3211343,"README.md",766,0,"s",markdown,content
+540,3211343,"README.md",767,0,"",markdown,selection_keyboard
+541,3211479,"README.md",767,0,"i",markdown,content
+542,3211479,"README.md",768,0,"",markdown,selection_keyboard
+543,3211540,"README.md",768,0,"s",markdown,content
+544,3211540,"README.md",769,0,"",markdown,selection_keyboard
+545,3211628,"README.md",769,0,"t",markdown,content
+546,3211628,"README.md",770,0,"",markdown,selection_keyboard
+547,3211761,"README.md",770,0,"u",markdown,content
+548,3211762,"README.md",771,0,"",markdown,selection_keyboard
+549,3211794,"README.md",771,0,"t",markdown,content
+550,3211794,"README.md",772,0,"",markdown,selection_keyboard
+551,3211856,"README.md",772,0,"e",markdown,content
+552,3211856,"README.md",773,0,"",markdown,selection_keyboard
+553,3211923,"README.md",773,0,"s",markdown,content
+554,3211923,"README.md",774,0,"",markdown,selection_keyboard
+555,3212016,"README.md",774,0," ",markdown,content
+556,3212016,"README.md",775,0,"",markdown,selection_keyboard
+557,3212162,"README.md",775,0,"a",markdown,content
+558,3212162,"README.md",776,0,"",markdown,selection_keyboard
+559,3212377,"README.md",776,0," ",markdown,content
+560,3212377,"README.md",777,0,"",markdown,selection_keyboard
+561,3213006,"README.md",777,0,"s",markdown,content
+562,3213006,"README.md",778,0,"",markdown,selection_keyboard
+563,3213130,"README.md",778,0,"c",markdown,content
+564,3213130,"README.md",779,0,"",markdown,selection_keyboard
+565,3213248,"README.md",779,0,"a",markdown,content
+566,3213248,"README.md",780,0,"",markdown,selection_keyboard
+567,3213248,"README.md",780,0,"l",markdown,content
+568,3213248,"README.md",781,0,"",markdown,selection_keyboard
+569,3213324,"README.md",781,0,"i",markdown,content
+570,3213324,"README.md",782,0,"",markdown,selection_keyboard
+571,3213405,"README.md",782,0,"n",markdown,content
+572,3213406,"README.md",783,0,"",markdown,selection_keyboard
+573,3213571,"README.md",783,0,"g",markdown,content
+574,3213571,"README.md",784,0,"",markdown,selection_keyboard
+575,3213662,"README.md",784,0,"-",markdown,content
+576,3213663,"README.md",785,0,"",markdown,selection_keyboard
+577,3213913,"README.md",785,0,"r",markdown,content
+578,3213913,"README.md",786,0,"",markdown,selection_keyboard
+579,3213991,"README.md",786,0,"e",markdown,content
+580,3213991,"README.md",787,0,"",markdown,selection_keyboard
+581,3214151,"README.md",787,0,"a",markdown,content
+582,3214151,"README.md",788,0,"",markdown,selection_keyboard
+583,3214289,"README.md",788,0,"d",markdown,content
+584,3214289,"README.md",789,0,"",markdown,selection_keyboard
+585,3214355,"README.md",789,0,"y",markdown,content
+586,3214355,"README.md",790,0,"",markdown,selection_keyboard
+587,3214517,"README.md",790,0," ",markdown,content
+588,3214517,"README.md",791,0,"",markdown,selection_keyboard
+589,3214694,"README.md",791,0,"f",markdown,content
+590,3214694,"README.md",792,0,"",markdown,selection_keyboard
+591,3214811,"README.md",792,0,"o",markdown,content
+592,3214812,"README.md",793,0,"",markdown,selection_keyboard
+593,3214904,"README.md",793,0,"r",markdown,content
+594,3214905,"README.md",794,0,"",markdown,selection_keyboard
+595,3214954,"README.md",794,0,"e",markdown,content
+596,3214954,"README.md",795,0,"",markdown,selection_keyboard
+597,3215363,"README.md",794,1,"",markdown,content
+598,3215553,"README.md",791,3,"",markdown,content
+599,3217130,"README.md",785,6,"",markdown,content
+600,3217296,"README.md",784,1,"",markdown,content
+601,3217472,"README.md",777,7,"",markdown,content
+602,3217633,"README.md",775,2,"",markdown,content
+603,3217802,"README.md",763,12,"",markdown,content
+604,3217959,"README.md",759,4,"",markdown,content
+605,3218349,"README.md",758,1,"",markdown,content
+606,3218590,"README.md",758,0,",",markdown,content
+607,3218590,"README.md",759,0,"",markdown,selection_keyboard
+608,3218816,"README.md",759,0," ",markdown,content
+609,3218816,"README.md",760,0,"",markdown,selection_keyboard
+610,3220912,"README.md",759,1,"",markdown,content
+611,3221103,"README.md",758,1,"",markdown,content
+612,3221470,"README.md",758,0," ",markdown,content
+613,3221470,"README.md",759,0,"",markdown,selection_keyboard
+614,3221628,"README.md",759,0,"a",markdown,content
+615,3221628,"README.md",760,0,"",markdown,selection_keyboard
+616,3221642,"README.md",760,0,"n",markdown,content
+617,3221643,"README.md",761,0,"",markdown,selection_keyboard
+618,3221688,"README.md",761,0,"d",markdown,content
+619,3221688,"README.md",762,0,"",markdown,selection_keyboard
+620,3221791,"README.md",762,0," ",markdown,content
+621,3221791,"README.md",763,0,"",markdown,selection_keyboard
+622,3221961,"README.md",763,0,"a",markdown,content
+623,3221961,"README.md",764,0,"",markdown,selection_keyboard
+624,3221984,"README.md",764,0," ",markdown,content
+625,3221985,"README.md",765,0,"",markdown,selection_keyboard
+626,3222024,"README.md",765,0,"m",markdown,content
+627,3222024,"README.md",766,0,"",markdown,selection_keyboard
+628,3222261,"README.md",766,0,"l",markdown,content
+629,3222262,"README.md",767,0,"",markdown,selection_keyboard
+630,3222336,"README.md",767,0,"u",markdown,content
+631,3222337,"README.md",768,0,"",markdown,selection_keyboard
+632,3222805,"README.md",767,1,"",markdown,content
+633,3223010,"README.md",766,1,"",markdown,content
+634,3223078,"README.md",766,0,"u",markdown,content
+635,3223078,"README.md",767,0,"",markdown,selection_keyboard
+636,3223201,"README.md",767,0,"l",markdown,content
+637,3223201,"README.md",768,0,"",markdown,selection_keyboard
+638,3223283,"README.md",768,0,"t",markdown,content
+639,3223283,"README.md",769,0,"",markdown,selection_keyboard
+640,3223373,"README.md",769,0,"i",markdown,content
+641,3223374,"README.md",770,0,"",markdown,selection_keyboard
+642,3223534,"README.md",770,0,"t",markdown,content
+643,3223535,"README.md",771,0,"",markdown,selection_keyboard
+644,3223841,"README.md",771,0,"u",markdown,content
+645,3223841,"README.md",772,0,"",markdown,selection_keyboard
+646,3223960,"README.md",772,0,"d",markdown,content
+647,3223960,"README.md",773,0,"",markdown,selection_keyboard
+648,3224252,"README.md",773,0,"e",markdown,content
+649,3224252,"README.md",774,0,"",markdown,selection_keyboard
+650,3224288,"README.md",774,0,"s",markdown,content
+651,3224288,"README.md",775,0,"",markdown,selection_keyboard
+652,3224775,"README.md",774,1,"",markdown,content
+653,3224791,"README.md",774,0," ",markdown,content
+654,3224791,"README.md",775,0,"",markdown,selection_keyboard
+655,3224908,"README.md",775,0,"o",markdown,content
+656,3224908,"README.md",776,0,"",markdown,selection_keyboard
+657,3225719,"README.md",775,1,"",markdown,content
+658,3225854,"README.md",774,1,"",markdown,content
+659,3225990,"README.md",773,0,"",markdown,selection_command
+660,3226158,"README.md",765,0,"",markdown,selection_command
+661,3226263,"README.md",763,0,"",markdown,selection_command
+662,3226496,"README.md",763,2,"",markdown,content
+663,3226925,"README.md",772,0,"",markdown,selection_command
+664,3227207,"README.md",772,0,"s",markdown,content
+665,3227207,"README.md",773,0,"",markdown,selection_keyboard
+666,3227397,"README.md",773,0," ",markdown,content
+667,3227397,"README.md",774,0,"",markdown,selection_keyboard
+668,3227467,"README.md",774,0,"o",markdown,content
+669,3227467,"README.md",775,0,"",markdown,selection_keyboard
+670,3227518,"README.md",775,0,"f",markdown,content
+671,3227518,"README.md",776,0,"",markdown,selection_keyboard
+672,3227597,"README.md",776,0," ",markdown,content
+673,3227597,"README.md",777,0,"",markdown,selection_keyboard
+674,3227732,"README.md",777,0,"f",markdown,content
+675,3227733,"README.md",778,0,"",markdown,selection_keyboard
+676,3227921,"README.md",778,0,"e",markdown,content
+677,3227921,"README.md",779,0,"",markdown,selection_keyboard
+678,3227985,"README.md",779,0,"a",markdown,content
+679,3227985,"README.md",780,0,"",markdown,selection_keyboard
+680,3228022,"README.md",780,0,"t",markdown,content
+681,3228022,"README.md",781,0,"",markdown,selection_keyboard
+682,3228158,"README.md",781,0,"u",markdown,content
+683,3228159,"README.md",782,0,"",markdown,selection_keyboard
+684,3228255,"README.md",782,0,"r",markdown,content
+685,3228255,"README.md",783,0,"",markdown,selection_keyboard
+686,3228255,"README.md",783,0,"e",markdown,content
+687,3228256,"README.md",784,0,"",markdown,selection_keyboard
+688,3228325,"README.md",784,0,"s",markdown,content
+689,3228325,"README.md",785,0,"",markdown,selection_keyboard
+690,3228809,"README.md",777,8,"",markdown,content
+691,3228970,"README.md",777,0,"a",markdown,content
+692,3228970,"README.md",778,0,"",markdown,selection_keyboard
+693,3228976,"README.md",778,0,"d",markdown,content
+694,3228976,"README.md",779,0,"",markdown,selection_keyboard
+695,3229132,"README.md",779,0,"d",markdown,content
+696,3229132,"README.md",780,0,"",markdown,selection_keyboard
+697,3229215,"README.md",780,0,"i",markdown,content
+698,3229215,"README.md",781,0,"",markdown,selection_keyboard
+699,3229316,"README.md",781,0,"t",markdown,content
+700,3229316,"README.md",782,0,"",markdown,selection_keyboard
+701,3229372,"README.md",782,0,"i",markdown,content
+702,3229372,"README.md",783,0,"",markdown,selection_keyboard
+703,3229494,"README.md",783,0,"o",markdown,content
+704,3229494,"README.md",784,0,"",markdown,selection_keyboard
+705,3229503,"README.md",784,0,"n",markdown,content
+706,3229503,"README.md",785,0,"",markdown,selection_keyboard
+707,3229589,"README.md",785,0,"a",markdown,content
+708,3229589,"README.md",786,0,"",markdown,selection_keyboard
+709,3229720,"README.md",786,0,"l",markdown,content
+710,3229720,"README.md",787,0,"",markdown,selection_keyboard
+711,3229828,"README.md",787,0," ",markdown,content
+712,3229828,"README.md",788,0,"",markdown,selection_keyboard
+713,3229904,"README.md",788,0,"f",markdown,content
+714,3229904,"README.md",789,0,"",markdown,selection_keyboard
+715,3230031,"README.md",789,0,"e",markdown,content
+716,3230031,"README.md",790,0,"",markdown,selection_keyboard
+717,3230542,"README.md",790,0,"a",markdown,content
+718,3230542,"README.md",791,0,"",markdown,selection_keyboard
+719,3230610,"README.md",791,0,"t",markdown,content
+720,3230611,"README.md",792,0,"",markdown,selection_keyboard
+721,3230706,"README.md",792,0,"u",markdown,content
+722,3230706,"README.md",793,0,"",markdown,selection_keyboard
+723,3230771,"README.md",793,0,"r",markdown,content
+724,3230771,"README.md",794,0,"",markdown,selection_keyboard
+725,3230876,"README.md",794,0,"e",markdown,content
+726,3230876,"README.md",795,0,"",markdown,selection_keyboard
+727,3230876,"README.md",795,0,"s",markdown,content
+728,3230877,"README.md",796,0,"",markdown,selection_keyboard
+729,3231777,"README.md",796,0,".",markdown,content
+730,3231777,"README.md",797,0,"",markdown,selection_keyboard
+731,3232853,"README.md",796,0,"",markdown,selection_command
+732,3232975,"README.md",797,0,"\n",markdown,content
+733,3233201,"README.md",798,0,"\n",markdown,content
+734,3233383,"README.md",799,0,"\n",markdown,content
+735,3233709,"README.md",799,1,"",markdown,content
+736,3253089,"README.md",800,0,"",markdown,selection_command
+737,3253157,"README.md",801,0,"",markdown,selection_command
+738,3253766,"README.md",800,0,"",markdown,selection_command
+739,3253949,"README.md",799,0,"",markdown,selection_command
+740,3254140,"README.md",799,0,"\nSetup 🧗
",markdown,content
+741,3254142,"README.md",800,0,"",markdown,selection_command
+742,3254664,"README.md",799,0,"",markdown,selection_command
+743,3254997,"README.md",799,1,"",markdown,content
+744,3255065,"README.md",800,0,"",markdown,selection_command
+745,3255205,"README.md",803,0,"",markdown,selection_command
+746,3255339,"README.md",807,0,"",markdown,selection_command
+747,3255527,"README.md",809,0,"",markdown,selection_command
+748,3255895,"README.md",809,5,"",markdown,content
+749,3257312,"README.md",809,0,"o",markdown,content
+750,3257313,"README.md",810,0,"",markdown,selection_keyboard
+751,3257447,"README.md",810,0,"v",markdown,content
+752,3257447,"README.md",811,0,"",markdown,selection_keyboard
+753,3257490,"README.md",811,0,"e",markdown,content
+754,3257490,"README.md",812,0,"",markdown,selection_keyboard
+755,3257618,"README.md",812,0,"r",markdown,content
+756,3257619,"README.md",813,0,"",markdown,selection_keyboard
+757,3257720,"README.md",813,0,"v",markdown,content
+758,3257720,"README.md",814,0,"",markdown,selection_keyboard
+759,3257810,"README.md",814,0,"i",markdown,content
+760,3257810,"README.md",815,0,"",markdown,selection_keyboard
+761,3257858,"README.md",815,0,"e",markdown,content
+762,3257858,"README.md",816,0,"",markdown,selection_keyboard
+763,3257912,"README.md",816,0,"w",markdown,content
+764,3257912,"README.md",817,0,"",markdown,selection_keyboard
+765,3258143,"README.md",816,0,"",markdown,selection_command
+766,3258669,"README.md",817,0,"",markdown,selection_command
+767,3258858,"README.md",819,0,"",markdown,selection_command
+768,3258945,"README.md",821,0,"",markdown,selection_command
+769,3259075,"README.md",823,0,"",markdown,selection_command
+770,3259380,"README.md",828,0,"",markdown,selection_command
+771,3259624,"README.md",823,0,"",markdown,selection_command
+772,3260239,"README.md",823,5,"",markdown,content
+773,3260428,"README.md",823,0,"o",markdown,content
+774,3260428,"README.md",824,0,"",markdown,selection_keyboard
+775,3260455,"README.md",824,0,"v",markdown,content
+776,3260455,"README.md",825,0,"",markdown,selection_keyboard
+777,3260600,"README.md",825,0,"e",markdown,content
+778,3260600,"README.md",826,0,"",markdown,selection_keyboard
+779,3260647,"README.md",826,0,"r",markdown,content
+780,3260647,"README.md",827,0,"",markdown,selection_keyboard
+781,3260824,"README.md",827,0,"v",markdown,content
+782,3260825,"README.md",828,0,"",markdown,selection_keyboard
+783,3260953,"README.md",828,0,"i",markdown,content
+784,3260953,"README.md",829,0,"",markdown,selection_keyboard
+785,3260988,"README.md",829,0,"e",markdown,content
+786,3260988,"README.md",830,0,"",markdown,selection_keyboard
+787,3261015,"README.md",830,0,"w",markdown,content
+788,3261015,"README.md",831,0,"",markdown,selection_keyboard
+789,3261710,"README.md",830,0,"",markdown,selection_command
+790,3262001,"README.md",831,0,"",markdown,selection_command
+791,3262106,"README.md",833,0,"",markdown,selection_command
+792,3262563,"README.md",833,5,"",markdown,content
+793,3262860,"README.md",833,0,"O",markdown,content
+794,3262860,"README.md",834,0,"",markdown,selection_keyboard
+795,3263049,"README.md",834,0,"v",markdown,content
+796,3263050,"README.md",835,0,"",markdown,selection_keyboard
+797,3263103,"README.md",835,0,"e",markdown,content
+798,3263103,"README.md",836,0,"",markdown,selection_keyboard
+799,3263175,"README.md",836,0,"r",markdown,content
+800,3263175,"README.md",837,0,"",markdown,selection_keyboard
+801,3263382,"README.md",837,0,"v",markdown,content
+802,3263382,"README.md",838,0,"",markdown,selection_keyboard
+803,3263485,"README.md",838,0,"i",markdown,content
+804,3263485,"README.md",839,0,"",markdown,selection_keyboard
+805,3263577,"README.md",839,0,"e",markdown,content
+806,3263577,"README.md",840,0,"",markdown,selection_keyboard
+807,3263578,"README.md",840,0,"w",markdown,content
+808,3263578,"README.md",841,0,"",markdown,selection_keyboard
+809,3263796,"README.md",840,0,"",markdown,selection_command
+810,3263940,"README.md",841,0,"",markdown,selection_command
+811,3264159,"README.md",842,0,"",markdown,selection_command
+812,3267055,"README.md",841,0,"",markdown,selection_command
+813,3267246,"README.md",841,1,"",markdown,content
+814,3267329,"README.md",841,2,"",markdown,content
+815,3268698,"README.md",841,1,"",markdown,content
+816,3269182,"README.md",847,0,"",markdown,selection_command
+817,3269344,"README.md",889,0,"",markdown,selection_command
+818,3269532,"README.md",888,0,"",markdown,selection_command
+819,3269782,"README.md",887,0,"",markdown,selection_command
+820,3269866,"README.md",886,0,"",markdown,selection_command
+821,3269866,"README.md",885,0,"",markdown,selection_command
+822,3269870,"README.md",884,0,"",markdown,selection_command
+823,3269997,"README.md",882,0,"",markdown,selection_command
+824,3270275,"README.md",884,0,"",markdown,selection_command
+825,3270459,"README.md",885,0,"",markdown,selection_command
+826,3270495,"README.md",847,0,"",markdown,selection_command
+827,3270760,"README.md",836,0,"",markdown,selection_command
+828,3270927,"README.md",798,0,"",markdown,selection_command
+829,3271251,"README.md",836,0,"",markdown,selection_command
+830,3272489,"README.md",846,0,"\n",markdown,content
+831,3279835,"README.md",847,0,"Distributed checkpointing & loading\nalso onto a different hardware topology (e.g. initial training on 1 node --> reinitialization onto 4 nodes)\nAsynchronous checkpointing\nOptimized dataloading (each GPU loads its shard in parallel)\nModel+optimizer states+dataloader checkpointing (just resume your training run and everything is taken care of)\nFull reproducibility with exact training curves (seeded dataloading + training)\nAutomatic checkpoint management (automatic deletion/retention according to specified retention policy)\nMixed precision (with correct full precision casting, e.g. before softmax')\nFlash attention (from cudnn, which is more optimized than Tri Dao's)\nint8-quantization is on the roadmap (via https://github.com/google/aqt)\nKV caching for inference of causal Transformer (still in PR)\nCurrently working on KV cache resets for accelerated spatiotemporal attention (I don't think this has ever been done before in the open)\nActivation checkpointing (even onto host memory if desired)\nDistributed Data parallelism (changing to FSDP requires changing one line of code)\nwandb, cli and tensorboard logging (tb logging still in PR)\nJust-in-time compiled train step\nCosine/ WSD learning rate schedules (no need to retrain if you realize that you want to train for longer)\nIndex shuffling during dataloading (doesn't require loading the dataset into memory for shuffling)\n'google-native' stack\nhttps://github.com/google/orbax for checkpointing\nhttps://github.com/google/grain for dataloading\nhttps://github.com/google-deepmind/dm_pix for image manipulation\nhttps://github.com/google/array_record as the data format\nessentially, no other dependencies\nI am currently working on migrating to the new flax.nnx API, after which we will also have:\nsignificantly less boilerplate\neasy model surgery\nmodel inspection\n",markdown,content
+832,3282744,"README.md",2650,0,"",markdown,selection_command
+833,3282993,"README.md",2631,0,"",markdown,selection_command
+834,3283025,"README.md",2600,0,"",markdown,selection_command
+835,3283053,"README.md",2508,0,"",markdown,selection_command
+836,3283080,"README.md",2473,0,"",markdown,selection_command
+837,3283109,"README.md",2415,0,"",markdown,selection_command
+838,3283144,"README.md",2350,0,"",markdown,selection_command
+839,3283177,"README.md",2302,0,"",markdown,selection_command
+840,3283211,"README.md",2252,0,"",markdown,selection_command
+841,3283245,"README.md",2230,0,"",markdown,selection_command
+842,3283278,"README.md",2131,0,"",markdown,selection_command
+843,3283311,"README.md",2025,0,"",markdown,selection_command
+844,3283345,"README.md",1992,0,"",markdown,selection_command
+845,3283380,"README.md",1932,0,"",markdown,selection_command
+846,3283415,"README.md",1849,0,"",markdown,selection_command
+847,3283458,"README.md",1789,0,"",markdown,selection_command
+848,3283481,"README.md",1652,0,"",markdown,selection_command
+849,3283513,"README.md",1591,0,"",markdown,selection_command
+850,3283548,"README.md",1519,0,"",markdown,selection_command
+851,3283587,"README.md",1450,0,"",markdown,selection_command
+852,3283622,"README.md",1374,0,"",markdown,selection_command
+853,3283653,"README.md",1271,0,"",markdown,selection_command
+854,3283685,"README.md",1191,0,"",markdown,selection_command
+855,3283719,"README.md",1079,0,"",markdown,selection_command
+856,3283752,"README.md",1018,0,"",markdown,selection_command
+857,3283786,"README.md",991,0,"",markdown,selection_command
+858,3283907,"README.md",883,0,"",markdown,selection_command
+859,3284080,"README.md",847,0,"",markdown,selection_command
+860,3284428,"README.md",847,1,"D",markdown,selection_command
+861,3284558,"README.md",847,1,"D",markdown,selection_command
+862,3284813,"README.md",847,1,"D",markdown,selection_command
+863,3284846,"README.md",847,1,"D",markdown,selection_command
+864,3284870,"README.md",847,1,"D",markdown,selection_command
+865,3284904,"README.md",847,1,"D",markdown,selection_command
+866,3284937,"README.md",847,1,"D",markdown,selection_command
+867,3284970,"README.md",847,1,"D",markdown,selection_command
+868,3285006,"README.md",847,1,"D",markdown,selection_command
+869,3285036,"README.md",847,1,"D",markdown,selection_command
+870,3285071,"README.md",847,1,"D",markdown,selection_command
+871,3285105,"README.md",847,1,"D",markdown,selection_command
+872,3285187,"README.md",847,1,"D",markdown,selection_command
+873,3285188,"README.md",847,1,"D",markdown,selection_command
+874,3285216,"README.md",847,1,"D",markdown,selection_command
+875,3285235,"README.md",847,1,"D",markdown,selection_command
+876,3285273,"README.md",847,1,"D",markdown,selection_command
+877,3285303,"README.md",847,1,"D",markdown,selection_command
+878,3285335,"README.md",847,1,"D",markdown,selection_command
+879,3285368,"README.md",847,1,"D",markdown,selection_command
+880,3285402,"README.md",847,1,"D",markdown,selection_command
+881,3285441,"README.md",847,1,"D",markdown,selection_command
+882,3285469,"README.md",847,1,"D",markdown,selection_command
+883,3285507,"README.md",847,1,"D",markdown,selection_command
+884,3285535,"README.md",847,1,"D",markdown,selection_command
+885,3285569,"README.md",847,1,"D",markdown,selection_command
+886,3285605,"README.md",847,1,"D",markdown,selection_command
+887,3285637,"README.md",847,1,"D",markdown,selection_command
+888,3285676,"README.md",847,1,"D",markdown,selection_command
+889,3285975,"README.md",847,1,"D",markdown,selection_command
+890,3286196,"README.md",847,1,"D",markdown,selection_command
+891,3286358,"README.md",847,1,"D",markdown,selection_command
+892,3286835,"README.md",847,0,"",markdown,selection_command
+893,3287216,"README.md",2650,0,"-",markdown,content
+894,3287216,"README.md",2631,0,"-",markdown,content
+895,3287216,"README.md",2600,0,"-",markdown,content
+896,3287216,"README.md",2508,0,"-",markdown,content
+897,3287216,"README.md",2473,0,"-",markdown,content
+898,3287216,"README.md",2415,0,"-",markdown,content
+899,3287216,"README.md",2350,0,"-",markdown,content
+900,3287216,"README.md",2302,0,"-",markdown,content
+901,3287216,"README.md",2252,0,"-",markdown,content
+902,3287216,"README.md",2230,0,"-",markdown,content
+903,3287216,"README.md",2131,0,"-",markdown,content
+904,3287216,"README.md",2025,0,"-",markdown,content
+905,3287216,"README.md",1992,0,"-",markdown,content
+906,3287216,"README.md",1932,0,"-",markdown,content
+907,3287216,"README.md",1849,0,"-",markdown,content
+908,3287216,"README.md",1789,0,"-",markdown,content
+909,3287216,"README.md",1652,0,"-",markdown,content
+910,3287216,"README.md",1591,0,"-",markdown,content
+911,3287216,"README.md",1519,0,"-",markdown,content
+912,3287216,"README.md",1450,0,"-",markdown,content
+913,3287216,"README.md",1374,0,"-",markdown,content
+914,3287216,"README.md",1271,0,"-",markdown,content
+915,3287216,"README.md",1191,0,"-",markdown,content
+916,3287216,"README.md",1079,0,"-",markdown,content
+917,3287216,"README.md",1018,0,"-",markdown,content
+918,3287216,"README.md",991,0,"-",markdown,content
+919,3287216,"README.md",883,0,"-",markdown,content
+920,3287216,"README.md",847,0,"-",markdown,content
+921,3287216,"README.md",848,0,"",markdown,selection_keyboard
+922,3287329,"README.md",2678,0," ",markdown,content
+923,3287329,"README.md",2658,0," ",markdown,content
+924,3287330,"README.md",2626,0," ",markdown,content
+925,3287330,"README.md",2533,0," ",markdown,content
+926,3287330,"README.md",2497,0," ",markdown,content
+927,3287330,"README.md",2438,0," ",markdown,content
+928,3287330,"README.md",2372,0," ",markdown,content
+929,3287330,"README.md",2323,0," ",markdown,content
+930,3287330,"README.md",2272,0," ",markdown,content
+931,3287330,"README.md",2249,0," ",markdown,content
+932,3287330,"README.md",2149,0," ",markdown,content
+933,3287330,"README.md",2042,0," ",markdown,content
+934,3287330,"README.md",2008,0," ",markdown,content
+935,3287330,"README.md",1947,0," ",markdown,content
+936,3287330,"README.md",1863,0," ",markdown,content
+937,3287330,"README.md",1802,0," ",markdown,content
+938,3287330,"README.md",1664,0," ",markdown,content
+939,3287330,"README.md",1602,0," ",markdown,content
+940,3287330,"README.md",1529,0," ",markdown,content
+941,3287330,"README.md",1459,0," ",markdown,content
+942,3287330,"README.md",1382,0," ",markdown,content
+943,3287330,"README.md",1278,0," ",markdown,content
+944,3287330,"README.md",1197,0," ",markdown,content
+945,3287330,"README.md",1084,0," ",markdown,content
+946,3287330,"README.md",1022,0," ",markdown,content
+947,3287330,"README.md",994,0," ",markdown,content
+948,3287330,"README.md",885,0," ",markdown,content
+949,3287330,"README.md",848,0," ",markdown,content
+950,3287330,"README.md",849,0,"",markdown,selection_keyboard
+951,3287531,"README.md",848,0,"",markdown,selection_command
+952,3288082,"README.md",849,0,"",markdown,selection_command
+953,3288372,"README.md",887,0,"",markdown,selection_command
+954,3289157,"README.md",887,0," ",markdown,content
+955,3289805,"README.md",888,1,"",markdown,content
+956,3289882,"README.md",887,1,"",markdown,content
+957,3290897,"README.md",886,0,"",markdown,selection_command
+958,3291213,"README.md",885,0,"",markdown,selection_command
+959,3293594,"README.md",885,0," ",markdown,content
+960,3294000,"README.md",888,0,"",markdown,selection_command
+961,3294315,"README.md",1002,0,"",markdown,selection_command
+962,3294463,"README.md",1031,0,"",markdown,selection_command
+963,3295496,"README.md",1094,0,"",markdown,selection_command
+964,3298108,"README.md",1208,0,"",markdown,selection_command
+965,3298358,"README.md",1290,0,"",markdown,selection_command
+966,3298390,"README.md",1395,0,"",markdown,selection_command
+967,3298423,"README.md",1473,0,"",markdown,selection_command
+968,3298457,"README.md",1544,0,"",markdown,selection_command
+969,3298491,"README.md",1618,0,"",markdown,selection_command
+970,3298523,"README.md",1681,0,"",markdown,selection_command
+971,3298558,"README.md",1820,0,"",markdown,selection_command
+972,3298592,"README.md",1882,0,"",markdown,selection_command
+973,3298625,"README.md",1967,0,"",markdown,selection_command
+974,3298659,"README.md",2029,0,"",markdown,selection_command
+975,3298796,"README.md",2064,0,"",markdown,selection_command
+976,3298959,"README.md",2172,0,"",markdown,selection_command
+977,3299111,"README.md",2273,0,"",markdown,selection_command
+978,3299264,"README.md",2297,0,"",markdown,selection_command
+979,3299764,"README.md",2294,0,"",markdown,selection_command
+980,3300156,"README.md",2294,1,"-",markdown,selection_command
+981,3300245,"README.md",2294,1,"-",markdown,selection_command
+982,3300415,"README.md",2294,1,"-",markdown,selection_command
+983,3300561,"README.md",2294,1,"-",markdown,selection_command
+984,3301080,"README.md",2294,0,"",markdown,selection_command
+985,3301345,"README.md",2463,0," ",markdown,content
+986,3301345,"README.md",2396,0," ",markdown,content
+987,3301345,"README.md",2346,0," ",markdown,content
+988,3301345,"README.md",2294,0," ",markdown,content
+989,3301346,"README.md",2295,0,"",markdown,selection_keyboard
+990,3301732,"README.md",2466,1,"",markdown,content
+991,3301732,"README.md",2398,1,"",markdown,content
+992,3301732,"README.md",2347,1,"",markdown,content
+993,3301732,"README.md",2294,1,"",markdown,content
+994,3301825,"README.md",2463,0," ",markdown,content
+995,3301825,"README.md",2396,0," ",markdown,content
+996,3301825,"README.md",2346,0," ",markdown,content
+997,3301825,"README.md",2294,0," ",markdown,content
+998,3302149,"README.md",2297,0,"",markdown,selection_command
+999,3305710,"README.md",2273,0,"",markdown,selection_command
+1000,3305959,"README.md",2172,0,"",markdown,selection_command
+1001,3306046,"README.md",2064,0,"",markdown,selection_command
+1002,3306063,"README.md",2029,0,"",markdown,selection_command
+1003,3306079,"README.md",1967,0,"",markdown,selection_command
+1004,3306093,"README.md",1882,0,"",markdown,selection_command
+1005,3306125,"README.md",1820,0,"",markdown,selection_command
+1006,3306258,"README.md",1681,0,"",markdown,selection_command
+1007,3306570,"README.md",1678,0,"",markdown,selection_command
+1008,3307619,"README.md",1678,0," ",markdown,content
+1009,3307733,"README.md",1681,0,"",markdown,selection_command
+1010,3315144,"README.md",1824,0,"",markdown,selection_command
+1011,3315380,"README.md",1886,0,"",markdown,selection_command
+1012,3315485,"README.md",1971,0,"",markdown,selection_command
+1013,3315486,"README.md",2033,0,"",markdown,selection_command
+1014,3315486,"README.md",2068,0,"",markdown,selection_command
+1015,3315508,"README.md",2176,0,"",markdown,selection_command
+1016,3315543,"README.md",2277,0,"",markdown,selection_command
+1017,3315575,"README.md",2301,0,"",markdown,selection_command
+1018,3315609,"README.md",2357,0,"",markdown,selection_command
+1019,3315643,"README.md",2411,0,"",markdown,selection_command
+1020,3315675,"README.md",2482,0,"",markdown,selection_command
+1021,3315711,"README.md",2546,0,"",markdown,selection_command
+1022,3315819,"README.md",2583,0,"",markdown,selection_command
+1023,3315819,"README.md",2677,0,"",markdown,selection_command
+1024,3315819,"README.md",2710,0,"",markdown,selection_command
+1025,3316010,"README.md",2731,0,"",markdown,selection_command
+1026,3316147,"README.md",2747,0,"",markdown,selection_command
+1027,3316869,"README.md",2747,1,"",markdown,content
+1028,3317110,"README.md",2728,0,"",markdown,selection_command
+1029,3329977,"README.md",0,0,"Jafar: A JAX-based Genie Implementation 🧞
\n\n\n \n
\n \n
\n
\n\nThis is a feature-complete fork of Jafar, a JAX-based implementation of the DeepMind paper ""[Genie: Generative Interactive Environments](https://arxiv.org/abs/2402.15391)"" (Bruce et al., 2024).\n\nJafar supports training of all Genie components and can complete the CoinRun reproducibility experiment (Appendix F) on a single L40S GPU in under a week.\n\nThis repository implements bugfixes and multitudes of additional features.\n\nOverview
\n- Distributed checkpointing & loading\n - also onto a different hardware topology (e.g. initial training on 1 node --> reinitialization onto 4 nodes)\n- Asynchronous checkpointing\n- Optimized dataloading (each GPU loads its shard in parallel)\n- Model+optimizer states+dataloader checkpointing (just resume your training run and everything is taken care of)\n- Full reproducibility with exact training curves (seeded dataloading + training)\n- Automatic checkpoint management (automatic deletion/retention according to specified retention policy)\n- Mixed precision (with correct full precision casting, e.g. before softmax')\n- Flash attention (from cudnn, which is more optimized than Tri Dao's)\n- int8-quantization is on the roadmap (via https://github.com/google/aqt)\n- KV caching for inference of causal Transformer (still in PR)\n - Currently working on KV cache resets for accelerated spatiotemporal attention (I don't think this has ever been done before in the open)\n- Activation checkpointing (even onto host memory if desired)\n- Distributed Data parallelism (changing to FSDP requires changing one line of code)\n- wandb, cli and tensorboard logging (tb logging still in PR)\n- Just-in-time compiled train step\n- Cosine/ WSD learning rate schedules (no need to retrain if you realize that you want to train for longer)\n- Index shuffling during dataloading (doesn't require loading the dataset into memory for shuffling)\n- 'google-native' stack\n - https://github.com/google/orbax for checkpointing\n - https://github.com/google/grain for dataloading\n - https://github.com/google-deepmind/dm_pix for image manipulation\n - https://github.com/google/array_record as the data format\n- essentially, no other dependencies\n- I am currently working on migrating to the new flax.nnx API, after which we will also have:\n- significantly less boilerplate\n- easy model surgery\n- model inspection\n\nSetup 🧗
\n\nJafar was built with `python 3.10` and `jax 0.4.30`. To install requirements, run:\n\n```bash\npip install -r requirements.txt\npre-commit install\n```\n\nBefore training the models, generate the CoinRun dataset by running:\n\n```bash\npython generate_dataset.py --num_episodes 10000\n```\n\nNote: this is a large dataset (around 100GB) and may take a while to generate.\n\nFor performant distributed training, we additionally preprocess the dataset into `TFRecord`s:\n\n```bash\npython preprocess_dataset.py\n```\n\nQuick Start 🚀
\n\nGenie has three components: a [video tokenizer](models/tokenizer.py), a [latent action model](models/lam.py), and a [dynamics model](models/dynamics.py). Each of these components are trained separately, however, the dynamics model requires a pre-trained video tokenizer and latent action model.\n\nTo train the video tokenizer (similar for the LAM), run:\n\n```bash\npython train_tokenizer.py --ckpt_dir \n```\n\nOnce the tokenizer and LAM are trained, the dynamics model can be trained with:\n\n```bash\npython train_dynamics.py --tokenizer_checkpoint --lam_checkpoint \n```\n\nLogging with `wandb` is supported. To enable logging, set the `WANDB_API_KEY` environment variable or run:\n\n```bash\nwandb login\n```\n\nTraining can then be logged by setting the `--log` flag:\n\n```bash\npython train_tokenizer.py --log --entity --project \n```\n\nCiting Jafar 📜
\n\nJafar was built by [Matthew Jackson](https://matthewtjackson.com) and [Timon Willi](https://www.timonwilli.com).\n\nIf you use Jafar in your work, please cite us and the original Genie paper as follows:\n\n```\n@inproceedings{\n willi2024jafar,\n title={Jafar: An Open-Source Genie Reimplemention in Jax},\n author={Timon Willi and Matthew Thomas Jackson and Jakob Nicolaus Foerster},\n booktitle={First Workshop on Controllable Video Generation @ ICML 2024},\n year={2024},\n url={https://openreview.net/forum?id=ZZGaQHs9Jb}\n}\n```\n```\n@inproceedings{\n bruce2024genie,\n title={Genie: Generative Interactive Environments},\n author={Jake Bruce and Michael D Dennis and Ashley Edwards and Jack Parker-Holder and Yuge Shi and Edward Hughes and Matthew Lai and Aditi Mavalankar and Richie Steigerwald and Chris Apps and Yusuf Aytar and Sarah Maria Elisabeth Bechtle and Feryal Behbahani and Stephanie C.Y. Chan and Nicolas Heess and Lucy Gonzalez and Simon Osindero and Sherjil Ozair and Scott Reed and Jingwei Zhang and Konrad Zolna and Jeff Clune and Nando de Freitas and Satinder Singh and Tim Rockt{\""a}schel},\n booktitle={Forty-first International Conference on Machine Learning},\n year={2024},\n url={https://openreview.net/forum?id=bJbSbJskOS}\n}\n```\n",markdown,tab
+1030,3331090,"README.md",2707,0,"",markdown,selection_command
+1031,3331345,"README.md",2674,0,"",markdown,selection_command
+1032,3331373,"README.md",2580,0,"",markdown,selection_command
+1033,3331396,"README.md",2543,0,"",markdown,selection_command
+1034,3331428,"README.md",2479,0,"",markdown,selection_command
+1035,3331546,"README.md",2408,0,"",markdown,selection_command
+1036,3331546,"README.md",2354,0,"",markdown,selection_command
+1037,3331547,"README.md",2298,0,"",markdown,selection_command
+1038,3331564,"README.md",2274,0,"",markdown,selection_command
+1039,3331597,"README.md",2173,0,"",markdown,selection_command
+1040,3331636,"README.md",2065,0,"",markdown,selection_command
+1041,3331669,"README.md",2030,0,"",markdown,selection_command
+1042,3331703,"README.md",1968,0,"",markdown,selection_command
+1043,3331735,"README.md",1883,0,"",markdown,selection_command
+1044,3331769,"README.md",1821,0,"",markdown,selection_command
+1045,3331802,"README.md",1678,0,"",markdown,selection_command
+1046,3331835,"README.md",1615,0,"",markdown,selection_command
+1047,3331869,"README.md",1541,0,"",markdown,selection_command
+1048,3331901,"README.md",1470,0,"",markdown,selection_command
+1049,3331936,"README.md",1392,0,"",markdown,selection_command
+1050,3331967,"README.md",1287,0,"",markdown,selection_command
+1051,3332070,"README.md",1205,0,"",markdown,selection_command
+1052,3332071,"README.md",1091,0,"",markdown,selection_command
+1053,3332071,"README.md",1028,0,"",markdown,selection_command
+1054,3332100,"README.md",999,0,"",markdown,selection_command
+1055,3332134,"README.md",885,0,"",markdown,selection_command
+1056,3332307,"README.md",847,0,"",markdown,selection_command
+1057,3341728,"README.md",885,0,"",markdown,selection_command
+1058,3342349,"README.md",999,0,"",markdown,selection_command
+1059,3343328,"README.md",1027,0,"\n",markdown,content
+1060,3350832,"README.md",0,0,"",markdown,tab
+1061,3351364,"README.md",999,0,"",markdown,selection_command
+1062,3351578,"README.md",1028,0,"",markdown,selection_command
+1063,3351920,"README.md",1028,1,"",markdown,content
+1064,3352067,"README.md",999,0,"",markdown,selection_command
+1065,3352218,"README.md",885,0,"",markdown,selection_command
+1066,3352356,"README.md",847,0,"",markdown,selection_command
+1067,3352511,"README.md",799,0,"",markdown,selection_command
+1068,3352732,"README.md",846,0,"\n",markdown,content
+1069,3364512,"README.md",0,0,"",markdown,tab
+1070,3365701,"README.md",2583,0,"",markdown,selection_command
+1071,3366282,"README.md",2583,1,"I",markdown,selection_command
+1072,3366328,"README.md",2583,4,"I am",markdown,selection_command
+1073,3366495,"README.md",2583,14,"I am currently",markdown,selection_command
+1074,3367026,"README.md",2583,6,"I am c",markdown,selection_command
+1075,3367159,"README.md",2583,3,"I a",markdown,selection_command
+1076,3367445,"README.md",2583,4,"I am",markdown,selection_command
+1077,3367699,"README.md",2583,4,"",markdown,content
+1078,3368027,"README.md",2583,0,"W",markdown,content
+1079,3368027,"README.md",2584,0,"",markdown,selection_keyboard
+1080,3368333,"README.md",2584,0,"e",markdown,content
+1081,3368333,"README.md",2585,0,"",markdown,selection_keyboard
+1082,3368483,"README.md",2585,0," ",markdown,content
+1083,3368483,"README.md",2586,0,"",markdown,selection_keyboard
+1084,3368556,"README.md",2586,0,"a",markdown,content
+1085,3368556,"README.md",2587,0,"",markdown,selection_keyboard
+1086,3368610,"README.md",2587,0,"r",markdown,content
+1087,3368610,"README.md",2588,0,"",markdown,selection_keyboard
+1088,3368701,"README.md",2588,0,"e",markdown,content
+1089,3368701,"README.md",2589,0,"",markdown,selection_keyboard
+1090,3368909,"README.md",2588,0,"",markdown,selection_command
+1091,3369880,"README.md",2684,0,"",markdown,selection_command
+1092,3370106,"README.md",2677,0,"",markdown,selection_command
+1093,3370513,"README.md",2677,1,"-",markdown,selection_command
+1094,3370980,"README.md",2677,1,"-",markdown,selection_command
+1095,3371098,"README.md",2677,1,"-",markdown,selection_command
+1096,3371325,"README.md",2677,0,"",markdown,selection_command
+1097,3372036,"README.md",2731,0," ",markdown,content
+1098,3372036,"README.md",2710,0," ",markdown,content
+1099,3372036,"README.md",2677,0," ",markdown,content
+1100,3372207,"README.md",2680,0,"",markdown,selection_command
+1101,3397669,"README.md",0,0,"",markdown,tab
+1102,3398290,"README.md",2584,0,"",markdown,selection_command
+1103,3398551,"README.md",2547,0,"",markdown,selection_command
+1104,3398573,"README.md",2483,0,"",markdown,selection_command
+1105,3398603,"README.md",2412,0,"",markdown,selection_command
+1106,3398715,"README.md",2358,0,"",markdown,selection_command
+1107,3398715,"README.md",2302,0,"",markdown,selection_command
+1108,3398716,"README.md",2278,0,"",markdown,selection_command
+1109,3398736,"README.md",2177,0,"",markdown,selection_command
+1110,3398769,"README.md",2069,0,"",markdown,selection_command
+1111,3398802,"README.md",2034,0,"",markdown,selection_command
+1112,3398836,"README.md",1972,0,"",markdown,selection_command
+1113,3398870,"README.md",1887,0,"",markdown,selection_command
+1114,3398905,"README.md",1825,0,"",markdown,selection_command
+1115,3398938,"README.md",1682,0,"",markdown,selection_command
+1116,3399048,"README.md",1619,0,"",markdown,selection_command
+1117,3399136,"README.md",1545,0,"",markdown,selection_command
+1118,3399291,"README.md",1474,0,"",markdown,selection_command
+1119,3399424,"README.md",1396,0,"",markdown,selection_command
+1120,3399572,"README.md",1291,0,"",markdown,selection_command
+1121,3399763,"README.md",1396,0,"",markdown,selection_command
+1122,3400926,"README.md",1468,0,"",markdown,selection_command
+1123,3401525,"README.md",1468,1,"",markdown,content
+1124,3414785,"README.md",0,0,"",markdown,tab
+1125,3415307,"README.md",1539,0,"",markdown,selection_command
+1126,3415540,"README.md",1613,0,"",markdown,selection_command
+1127,3415574,"README.md",1676,0,"",markdown,selection_command
+1128,3415603,"README.md",1753,0,"",markdown,selection_command
+1129,3415637,"README.md",1881,0,"",markdown,selection_command
+1130,3415928,"README.md",1753,0,"",markdown,selection_command
+1131,3416061,"README.md",1762,0,"",markdown,selection_command
+1132,3416214,"README.md",1763,0,"",markdown,selection_command
+1133,3416504,"README.md",1762,0,"",markdown,selection_command
+1134,3416644,"README.md",1761,0,"",markdown,selection_command
+1135,3416876,"README.md",1760,0,"",markdown,selection_command
+1136,3417072,"README.md",1761,0,"",markdown,selection_command
+1137,3417306,"README.md",1761,59,"",markdown,content
+1138,3417311,"README.md",1760,0,"",markdown,selection_command
+1139,3417608,"README.md",1678,0,"",markdown,selection_command
+1140,3420025,"README.md",1682,0,"",markdown,selection_command
+1141,3420165,"README.md",1684,0,"",markdown,selection_command
+1142,3420248,"README.md",1694,0,"",markdown,selection_command
+1143,3420391,"README.md",1702,0,"",markdown,selection_command
+1144,3420549,"README.md",1705,0,"",markdown,selection_command
+1145,3422195,"README.md",1705,0,"f",markdown,content
+1146,3422195,"README.md",1706,0,"",markdown,selection_keyboard
+1147,3422339,"README.md",1706,0,"r",markdown,content
+1148,3422339,"README.md",1707,0,"",markdown,selection_keyboard
+1149,3422390,"README.md",1707,0,"a",markdown,content
+1150,3422390,"README.md",1708,0,"",markdown,selection_keyboard
+1151,3422475,"README.md",1708,0,"m",markdown,content
+1152,3422475,"README.md",1709,0,"",markdown,selection_keyboard
+1153,3422646,"README.md",1709,0,"e",markdown,content
+1154,3422646,"README.md",1710,0,"",markdown,selection_keyboard
+1155,3422708,"README.md",1710,0,"-",markdown,content
+1156,3422708,"README.md",1711,0,"",markdown,selection_keyboard
+1157,3423497,"README.md",1711,0,"l",markdown,content
+1158,3423497,"README.md",1712,0,"",markdown,selection_keyboard
+1159,3423555,"README.md",1712,0,"e",markdown,content
+1160,3423556,"README.md",1713,0,"",markdown,selection_keyboard
+1161,3423695,"README.md",1713,0,"v",markdown,content
+1162,3423695,"README.md",1714,0,"",markdown,selection_keyboard
+1163,3423720,"README.md",1714,0,"e",markdown,content
+1164,3423721,"README.md",1715,0,"",markdown,selection_keyboard
+1165,3423742,"README.md",1715,0,"l",markdown,content
+1166,3423742,"README.md",1716,0,"",markdown,selection_keyboard
+1167,3423978,"README.md",1716,0," ",markdown,content
+1168,3423978,"README.md",1717,0,"",markdown,selection_keyboard
+1169,3424220,"README.md",1716,0,"",markdown,selection_command
+1170,3425577,"README.md",1678,0,"",markdown,selection_command
+1171,3425646,"README.md",1682,0,"",markdown,selection_command
+1172,3425907,"README.md",1684,0,"",markdown,selection_command
+1173,3425942,"README.md",1694,0,"",markdown,selection_command
+1174,3425958,"README.md",1702,0,"",markdown,selection_command
+1175,3425989,"README.md",1705,0,"",markdown,selection_command
+1176,3426843,"README.md",1710,0,"",markdown,selection_command
+1177,3428980,"README.md",1678,0,"",markdown,selection_command
+1178,3451073,"README.md",0,0,"",markdown,tab
+1179,3451563,"README.md",1615,0,"",markdown,selection_command
+1180,3451822,"README.md",1541,0,"",markdown,selection_command
+1181,3451854,"README.md",1470,0,"",markdown,selection_command
+1182,3451879,"README.md",1393,0,"",markdown,selection_command
+1183,3451907,"README.md",1288,0,"",markdown,selection_command
+1184,3451940,"README.md",1206,0,"",markdown,selection_command
+1185,3451974,"README.md",1092,0,"",markdown,selection_command
+1186,3452007,"README.md",1029,0,"",markdown,selection_command
+1187,3452040,"README.md",1000,0,"",markdown,selection_command
+1188,3452074,"README.md",886,0,"",markdown,selection_command
+1189,3452107,"README.md",848,0,"",markdown,selection_command
+1190,3452141,"README.md",847,0,"",markdown,selection_command
+1191,3452173,"README.md",799,0,"",markdown,selection_command
+1192,3452207,"README.md",798,0,"",markdown,selection_command
+1193,3452240,"README.md",723,0,"",markdown,selection_command
+1194,3452643,"README.md",797,0,"",markdown,selection_command
+1195,3452823,"README.md",796,1,"",markdown,content
+1196,3452935,"README.md",796,0," ",markdown,content
+1197,3452936,"README.md",797,0,"",markdown,selection_keyboard
+1198,3453018,"README.md",797,0,"d",markdown,content
+1199,3453018,"README.md",798,0,"",markdown,selection_keyboard
+1200,3453192,"README.md",798,0,"e",markdown,content
+1201,3453192,"README.md",799,0,"",markdown,selection_keyboard
+1202,3453509,"README.md",799,0,"s",markdown,content
+1203,3453509,"README.md",800,0,"",markdown,selection_keyboard
+1204,3453561,"README.md",800,0,"c",markdown,content
+1205,3453561,"README.md",801,0,"",markdown,selection_keyboard
+1206,3453846,"README.md",801,0,"r",markdown,content
+1207,3453847,"README.md",802,0,"",markdown,selection_keyboard
+1208,3453847,"README.md",802,0,"i",markdown,content
+1209,3453847,"README.md",803,0,"",markdown,selection_keyboard
+1210,3453894,"README.md",803,0,"b",markdown,content
+1211,3453894,"README.md",804,0,"",markdown,selection_keyboard
+1212,3453951,"README.md",804,0,"e",markdown,content
+1213,3453951,"README.md",805,0,"",markdown,selection_keyboard
+1214,3454018,"README.md",805,0,"d",markdown,content
+1215,3454019,"README.md",806,0,"",markdown,selection_keyboard
+1216,3454104,"README.md",806,0," ",markdown,content
+1217,3454104,"README.md",807,0,"",markdown,selection_keyboard
+1218,3454280,"README.md",807,0,"b",markdown,content
+1219,3454280,"README.md",808,0,"",markdown,selection_keyboard
+1220,3454339,"README.md",808,0,"e",markdown,content
+1221,3454339,"README.md",809,0,"",markdown,selection_keyboard
+1222,3454482,"README.md",809,0,"l",markdown,content
+1223,3454483,"README.md",810,0,"",markdown,selection_keyboard
+1224,3454959,"README.md",810,0,"o",markdown,content
+1225,3454960,"README.md",811,0,"",markdown,selection_keyboard
+1226,3455038,"README.md",811,0,"w",markdown,content
+1227,3455039,"README.md",812,0,"",markdown,selection_keyboard
+1228,3455310,"README.md",811,0,"",markdown,selection_command
+1229,3455982,"README.md",812,0,"",markdown,selection_command
+1230,3456262,"README.md",812,0,".",markdown,content
+1231,3456263,"README.md",813,0,"",markdown,selection_keyboard
+1232,3456326,"README.md",812,0,"",markdown,selection_command
+1233,3481591,"README.md",0,0,"Jafar: A JAX-based Genie Implementation 🧞
\n\n\n \n
\n \n
\n
\n\nThis is a feature-complete fork of Jafar, a JAX-based implementation of the DeepMind paper ""[Genie: Generative Interactive Environments](https://arxiv.org/abs/2402.15391)"" (Bruce et al., 2024).\n\nJafar supports training of all Genie components and can complete the CoinRun reproducibility experiment (Appendix F) on a single L40S GPU in under a week.\n\nThis repository implements bugfixes and multitudes of additional features described below.\n\nOverview
\n\n- Distributed checkpointing & loading\n - also onto a different hardware topology (e.g. initial training on 1 node --> reinitialization onto 4 nodes)\n- Asynchronous checkpointing\n- Optimized dataloading (each GPU loads its shard in parallel)\n- Model+optimizer states+dataloader checkpointing (just resume your training run and everything is taken care of)\n- Full reproducibility with exact training curves (seeded dataloading + training)\n- Automatic checkpoint management (automatic deletion/retention according to specified retention policy)\n- Mixed precision (with correct full precision casting, e.g. before softmax)\n- Flash attention (from cudnn, which is more optimized than Tri Dao's)\n- int8-quantization is on the roadmap (via https://github.com/google/aqt)\n- KV caching for inference of causal Transformer (still in PR)\n - Currently working on frame-level KV cache resets for accelerated spatiotemporal attention\n- Activation checkpointing (even onto host memory if desired)\n- Distributed Data parallelism (changing to FSDP requires changing one line of code)\n- wandb, cli and tensorboard logging (tb logging still in PR)\n- Just-in-time compiled train step\n- Cosine/ WSD learning rate schedules (no need to retrain if you realize that you want to train for longer)\n- Index shuffling during dataloading (doesn't require loading the dataset into memory for shuffling)\n- 'google-native' stack\n - https://github.com/google/orbax for checkpointing\n - https://github.com/google/grain for dataloading\n - https://github.com/google-deepmind/dm_pix for image manipulation\n - https://github.com/google/array_record as the data format\n- essentially, no other dependencies\n- We are currently working on migrating to the new flax.nnx API, after which we will also have:\n - significantly less boilerplate\n - easy model surgery\n - model inspection\n\nSetup 🧗
\n\nJafar was built with `python 3.10` and `jax 0.4.30`. To install requirements, run:\n\n```bash\npip install -r requirements.txt\npre-commit install\n```\n\nBefore training the models, generate the CoinRun dataset by running:\n\n```bash\npython generate_dataset.py --num_episodes 10000\n```\n\nNote: this is a large dataset (around 100GB) and may take a while to generate.\n\nFor performant distributed training, we additionally preprocess the dataset into `TFRecord`s:\n\n```bash\npython preprocess_dataset.py\n```\n\nQuick Start 🚀
\n\nGenie has three components: a [video tokenizer](models/tokenizer.py), a [latent action model](models/lam.py), and a [dynamics model](models/dynamics.py). Each of these components are trained separately, however, the dynamics model requires a pre-trained video tokenizer and latent action model.\n\nTo train the video tokenizer (similar for the LAM), run:\n\n```bash\npython train_tokenizer.py --ckpt_dir \n```\n\nOnce the tokenizer and LAM are trained, the dynamics model can be trained with:\n\n```bash\npython train_dynamics.py --tokenizer_checkpoint --lam_checkpoint \n```\n\nLogging with `wandb` is supported. To enable logging, set the `WANDB_API_KEY` environment variable or run:\n\n```bash\nwandb login\n```\n\nTraining can then be logged by setting the `--log` flag:\n\n```bash\npython train_tokenizer.py --log --entity --project \n```\n\nCiting Jafar 📜
\n\nJafar was built by [Matthew Jackson](https://matthewtjackson.com) and [Timon Willi](https://www.timonwilli.com).\n\nIf you use Jafar in your work, please cite us and the original Genie paper as follows:\n\n```\n@inproceedings{\n willi2024jafar,\n title={Jafar: An Open-Source Genie Reimplemention in Jax},\n author={Timon Willi and Matthew Thomas Jackson and Jakob Nicolaus Foerster},\n booktitle={First Workshop on Controllable Video Generation @ ICML 2024},\n year={2024},\n url={https://openreview.net/forum?id=ZZGaQHs9Jb}\n}\n```\n```\n@inproceedings{\n bruce2024genie,\n title={Genie: Generative Interactive Environments},\n author={Jake Bruce and Michael D Dennis and Ashley Edwards and Jack Parker-Holder and Yuge Shi and Edward Hughes and Matthew Lai and Aditi Mavalankar and Richie Steigerwald and Chris Apps and Yusuf Aytar and Sarah Maria Elisabeth Bechtle and Feryal Behbahani and Stephanie C.Y. Chan and Nicolas Heess and Lucy Gonzalez and Simon Osindero and Sherjil Ozair and Scott Reed and Jingwei Zhang and Konrad Zolna and Jeff Clune and Nando de Freitas and Satinder Singh and Tim Rockt{\""a}schel},\n booktitle={Forty-first International Conference on Machine Learning},\n year={2024},\n url={https://openreview.net/forum?id=bJbSbJskOS}\n}\n```\n",markdown,tab
+1234,3481591,"README.md",372,0,"",markdown,selection_command
+1235,3499311,"README.md",1063,0,"",markdown,selection_mouse
+1236,3605730,"README.md",0,0,"",markdown,tab
+1237,3611358,"README.md",372,2358,"Jafar is a JAX-based implementation of the DeepMind paper ""[Genie: Generative Interactive Environments](https://arxiv.org/abs/2402.15391)"" (Bruce et al., 2024).\n\nJafar supports training of all Genie components and can complete the CoinRun reproducibility experiment (Appendix F) on a single L40S GPU in under a week.\n",markdown,content
+1238,3615536,"README.md",0,0,"Switched from branch 'features-in-readme' to 'flax-nnx-migration'",markdown,git_branch_checkout
+1239,3638269,"README.md",1007,0,"",markdown,selection_mouse
+1240,3638270,"README.md",1006,0,"",markdown,selection_command
+1241,3638929,".gitignore",0,0,"*.pyc\n*.npy\n*.png\n*.gif\n*.array_record\n\nwandb_key\ncheckpoints/\nwandb/\n__pycache__/\nexperiments/\n",ignore,tab
+1242,3660659,"experiments/dynamics_grain_tok_restore.sh",0,0,"#!/usr/bin/env bash\n\n#SBATCH --nodes=2\n#SBATCH --ntasks-per-node=8\n#SBATCH --time=12:00:00\n#SBATCH --cpus-per-task=1\n#SBATCH --gres=gpu:8\n#SBATCH --mem=100GB\n\nsource .venv/bin/activate\n\ndata_dir=""$PWD/data_arrayrecord/dummy""\nckpt_dir=""$PWD/checkpoints/dynamics_openai_grain_tok_lam_restore""\ntokenizer_ckpt_dir=""$PWD/checkpoints/tokenizer_openai_grain_checkpointing""\n\nexport XLA_FLAGS=--xla_gpu_autotune_level=0\nPYTHONUNBUFFERED=1 python train_dynamics.py \\n --restore_ckpt \\n --save_ckpt \\n --log_checkpoint_interval 5 \\n --batch_size 12 \\n --tokenizer_checkpoint $tokenizer_ckpt_dir \\n --ckpt_dir $ckpt_dir \\n --num_steps 300000 \\n --warmup_steps 10000 \\n --seed 0 \\n --init_lr=0.0000866 \\n --max_lr=0.0000866 \\n --data_dir $data_dir",shellscript,tab
+1243,3661389,"experiments/dynamics_grain_tok_restore.sh",750,0,"",shellscript,selection_command
+1244,3687432,"train_dynamics.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom genie import Genie, restore_genie_components\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n\n\nargs = tyro.cli(Args)\n\n\ndef dynamics_loss_fn(model, inputs):\n """"""Compute masked dynamics loss""""""\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n mask = outputs[""mask""]\n outputs[""token_logits""] = outputs[""token_logits""].astype(jnp.float32)\n ce_loss = optax.softmax_cross_entropy_with_integer_labels(\n outputs[""token_logits""], outputs[""video_tokens""]\n )\n ce_loss = (mask * ce_loss).sum() / mask.sum()\n acc = outputs[""token_logits""].argmax(-1) == outputs[""video_tokens""]\n acc = (mask * acc).sum() / mask.sum()\n select_probs = jax.nn.softmax(outputs[""token_logits""])\n gt = inputs[""videos""].clip(0, 1).reshape(-1, *inputs[""videos""].shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n _, index_counts_lam = jnp.unique_counts(\n jnp.ravel(outputs[""lam_indices""]), size=args.num_latent_actions, fill_value=0\n )\n _, index_counts_tokenizer = jnp.unique_counts(\n jnp.ravel(outputs[""video_tokens""]), size=args.num_patch_latents, fill_value=0\n )\n codebook_usage_lam = (index_counts_lam != 0).mean()\n codebook_usage_tokenizer = (index_counts_tokenizer != 0).mean()\n metrics = dict(\n cross_entropy_loss=ce_loss,\n masked_token_accuracy=acc,\n select_logit=outputs[""token_logits""].max(-1).mean(),\n select_p=select_probs.max(-1).mean(),\n entropy=jax.scipy.special.entr(select_probs).sum(-1).mean(),\n psnr=psnr,\n ssim=ssim,\n codebook_usage_lam=codebook_usage_lam,\n codebook_usage_tokenizer=codebook_usage_tokenizer,\n )\n return ce_loss, (outputs[""recon""], metrics)\n\n\n@nnx.jit\ndef train_step(model, optimizer, inputs):\n """"""Update state and compute metrics""""""\n\n def loss_fn(model):\n return dynamics_loss_fn(model, inputs)\n\n (loss, (recon, metrics)), grads = nnx.value_and_grad(loss_fn, has_aux=True)(model)\n optimizer.update(grads)\n if args.log_gradients:\n metrics[""gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""dynamics""]\n )\n return loss, recon, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.StandardSave, ocp.handlers.StandardCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.StandardRestore, ocp.handlers.StandardCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n optimizer_state = nnx.state(optimizer)\n abstract_optimizer = nnx.eval_shape(optimizer_state)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.StandardRestore(abstract_optimizer),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n else:\n # Restore from pre-trained tokenizer (and LAM)\n train_state = restore_genie_components(\n train_state, replicated_sharding, dummy_inputs, rng, args\n )\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng_mask = jax.random.split(rng, 2)\n inputs = dict(videos=videos, mask_rng=_rng_mask)\n loss, recon, metrics = train_step(genie, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[args.seq_len - 1])),\n recon=wandb.Image(np.asarray(recon_seq[args.seq_len - 1])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.StandardSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+1245,3687496,"train_dynamics.py",8492,4877," ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n # FIXME (f.srambical): pass sharding information for restoration onto different topology\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state, partial_restore=True),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n else:\n # Restore from pre-trained tokenizer (and LAM)\n optimizer = restore_genie_components(\n optimizer, replicated_sharding, rng, args\n )\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng_mask = jax.random.split(rng, 2)\n inputs = dict(videos=videos, mask_rng=_rng_mask)\n loss, recon, metrics = train_step(genie, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[args.seq_len - 1])),\n recon=wandb.Image(np.asarray(recon_seq[args.seq_len - 1])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n",python,content
+1246,3730825,"train_dynamics.py",6999,0,"",python,selection_command
+1247,3731828,"train_dynamics.py",8829,0,"",python,selection_command
+1248,3732222,"train_dynamics.py",10906,0,"",python,selection_command
+1249,3732764,"train_dynamics.py",13314,0,"",python,selection_command
+1250,3733264,"train_dynamics.py",13820,0,"",python,selection_command
+1251,3733832,"train_dynamics.py",11798,0,"",python,selection_command
+1252,3733962,"train_dynamics.py",9554,0,"",python,selection_command
+1253,3734096,"train_dynamics.py",7444,0,"",python,selection_command
+1254,3734207,"train_dynamics.py",6035,0,"",python,selection_command
+1255,3734351,"train_dynamics.py",4266,0,"",python,selection_command
+1256,3734505,"train_dynamics.py",2298,0,"",python,selection_command
+1257,3734634,"train_dynamics.py",787,0,"",python,selection_command
+1258,3734771,"train_dynamics.py",0,0,"",python,selection_command
+1259,3735183,"train_dynamics.py",1342,0,"",python,selection_command
+1260,3735524,"train_dynamics.py",2860,0,"",python,selection_command
+1261,3736474,"train_dynamics.py",2810,0,"",python,selection_command
+1262,3736710,"train_dynamics.py",2804,0,"",python,selection_command
+1263,3736736,"train_dynamics.py",2747,0,"",python,selection_command
+1264,3736768,"train_dynamics.py",2684,0,"",python,selection_command
+1265,3736799,"train_dynamics.py",2610,0,"",python,selection_command
+1266,3736834,"train_dynamics.py",2583,0,"",python,selection_command
+1267,3736867,"train_dynamics.py",2540,0,"",python,selection_command
+1268,3736901,"train_dynamics.py",2522,0,"",python,selection_command
+1269,3736933,"train_dynamics.py",2455,0,"",python,selection_command
+1270,3736967,"train_dynamics.py",2416,0,"",python,selection_command
+1271,3737000,"train_dynamics.py",2379,0,"",python,selection_command
+1272,3737034,"train_dynamics.py",2374,0,"",python,selection_command
+1273,3737067,"train_dynamics.py",2373,0,"",python,selection_command
+1274,3737100,"train_dynamics.py",2355,0,"",python,selection_command
+1275,3737304,"train_dynamics.py",2373,0,"",python,selection_command
+1276,3737472,"train_dynamics.py",2374,0,"",python,selection_command
+1277,3751971,"train_dynamics.py",0,0,"",python,selection_command
+1278,3752999,"train_dynamics.py",1684,0,"",python,selection_command
+1279,3754414,"train_dynamics.py",2396,0,"",python,selection_command
+1280,3756921,"train_dynamics.py",2375,0,"",python,selection_command
+1281,3758860,"train_dynamics.py",2974,0,"",python,selection_command
+1282,3759622,"train_dynamics.py",3704,0,"",python,selection_command
+1283,3759961,"train_dynamics.py",4166,0,"",python,selection_command
+1284,3760193,"train_dynamics.py",4593,0,"",python,selection_command
+1285,3760396,"train_dynamics.py",4931,0,"",python,selection_command
+1286,3760630,"train_dynamics.py",5303,0,"",python,selection_command
+1287,3760891,"train_dynamics.py",5859,0,"",python,selection_command
+1288,3760916,"train_dynamics.py",6346,0,"",python,selection_command
+1289,3760941,"train_dynamics.py",6750,0,"",python,selection_command
+1290,3760985,"train_dynamics.py",7050,0,"",python,selection_command
+1291,3761009,"train_dynamics.py",7386,0,"",python,selection_command
+1292,3761041,"train_dynamics.py",7750,0,"",python,selection_command
+1293,3761079,"train_dynamics.py",8386,0,"",python,selection_command
+1294,3761117,"train_dynamics.py",9080,0,"",python,selection_command
+1295,3761144,"train_dynamics.py",9446,0,"",python,selection_command
+1296,3761174,"train_dynamics.py",9941,0,"",python,selection_command
+1297,3761209,"train_dynamics.py",10502,0,"",python,selection_command
+1298,3761249,"train_dynamics.py",11149,0,"",python,selection_command
+1299,3761275,"train_dynamics.py",11752,0,"",python,selection_command
+1300,3761308,"train_dynamics.py",12217,0,"",python,selection_command
+1301,3761347,"train_dynamics.py",12984,0,"",python,selection_command
+1302,3761376,"train_dynamics.py",13625,0,"",python,selection_command
+1303,3761410,"train_dynamics.py",13820,0,"",python,selection_command
+1304,3763583,"train_dynamics.py",0,0,"",python,selection_command
+1305,3764272,"train_dynamics.py",391,0,"",python,selection_command
+1306,3764492,"train_dynamics.py",815,0,"",python,selection_command
+1307,3764962,"train_dynamics.py",8643,0,"",python,selection_command
+1308,3843961,"train_dynamics.py",8693,0,"",python,selection_command
+1309,3844305,"train_dynamics.py",8733,0,"",python,selection_command
+1310,3844306,"train_dynamics.py",8863,0,"",python,selection_command
+1311,3844306,"train_dynamics.py",8958,0,"",python,selection_command
+1312,3844307,"train_dynamics.py",8997,0,"",python,selection_command
+1313,3844333,"train_dynamics.py",9052,0,"",python,selection_command
+1314,3844366,"train_dynamics.py",9093,0,"",python,selection_command
+1315,3844394,"train_dynamics.py",9133,0,"",python,selection_command
+1316,3844433,"train_dynamics.py",9182,0,"",python,selection_command
+1317,3844465,"train_dynamics.py",9220,0,"",python,selection_command
+1318,3844498,"train_dynamics.py",9226,0,"",python,selection_command
+1319,3845057,"train_dynamics.py",9220,0,"",python,selection_command
+1320,3845312,"train_dynamics.py",9182,0,"",python,selection_command
+1321,3845337,"train_dynamics.py",9133,0,"",python,selection_command
+1322,3845386,"train_dynamics.py",9093,0,"",python,selection_command
+1323,3845424,"train_dynamics.py",9052,0,"",python,selection_command
+1324,3845453,"train_dynamics.py",8997,0,"",python,selection_command
+1325,3845465,"train_dynamics.py",8958,0,"",python,selection_command
+1326,3845499,"train_dynamics.py",8863,0,"",python,selection_command
+1327,3845531,"train_dynamics.py",8733,0,"",python,selection_command
+1328,3845565,"train_dynamics.py",8693,0,"",python,selection_command
+1329,3845598,"train_dynamics.py",8643,0,"",python,selection_command
+1330,3845635,"train_dynamics.py",8603,0,"",python,selection_command
+1331,3845666,"train_dynamics.py",8577,0,"",python,selection_command
+1332,3845699,"train_dynamics.py",8530,0,"",python,selection_command
+1333,3845735,"train_dynamics.py",8490,0,"",python,selection_command
+1334,3845856,"train_dynamics.py",8433,0,"",python,selection_command
+1335,3846009,"train_dynamics.py",8393,0,"",python,selection_command
+1336,3846190,"train_dynamics.py",8376,0,"",python,selection_command
+1337,3849471,"train_dynamics.py",8393,0,"",python,selection_command
+1338,3849723,"train_dynamics.py",8433,0,"",python,selection_command
+1339,3849753,"train_dynamics.py",8490,0,"",python,selection_command
+1340,3849771,"train_dynamics.py",8530,0,"",python,selection_command
+1341,3849803,"train_dynamics.py",8577,0,"",python,selection_command
+1342,3849837,"train_dynamics.py",8603,0,"",python,selection_command
+1343,3849870,"train_dynamics.py",8643,0,"",python,selection_command
+1344,3849904,"train_dynamics.py",8693,0,"",python,selection_command
+1345,3849939,"train_dynamics.py",8733,0,"",python,selection_command
+1346,3849972,"train_dynamics.py",8863,0,"",python,selection_command
+1347,3850004,"train_dynamics.py",8958,0,"",python,selection_command
+1348,3850040,"train_dynamics.py",8997,0,"",python,selection_command
+1349,3850073,"train_dynamics.py",9052,0,"",python,selection_command
+1350,3850106,"train_dynamics.py",9093,0,"",python,selection_command
+1351,3850139,"train_dynamics.py",9133,0,"",python,selection_command
+1352,3850178,"train_dynamics.py",9182,0,"",python,selection_command
+1353,3850207,"train_dynamics.py",9220,0,"",python,selection_command
+1354,3850249,"train_dynamics.py",9226,0,"",python,selection_command
+1355,3850283,"train_dynamics.py",9228,0,"",python,selection_command
+1356,3850316,"train_dynamics.py",9267,0,"",python,selection_command
+1357,3850343,"train_dynamics.py",9298,0,"",python,selection_command
+1358,3850373,"train_dynamics.py",9334,0,"",python,selection_command
+1359,3850407,"train_dynamics.py",9374,0,"",python,selection_command
+1360,3850441,"train_dynamics.py",9383,0,"",python,selection_command
+1361,3850474,"train_dynamics.py",9385,0,"",python,selection_command
+1362,3850508,"train_dynamics.py",9424,0,"",python,selection_command
+1363,3853132,"train_dynamics.py",9480,0,"",python,selection_command
+1364,3853370,"train_dynamics.py",9544,0,"",python,selection_command
+1365,3853402,"train_dynamics.py",9583,0,"",python,selection_command
+1366,3853433,"train_dynamics.py",9623,0,"",python,selection_command
+1367,3853466,"train_dynamics.py",9665,0,"",python,selection_command
+1368,3853499,"train_dynamics.py",9671,0,"",python,selection_command
+1369,3853588,"train_dynamics.py",9665,0,"",python,selection_command
+1370,3853855,"train_dynamics.py",9623,0,"",python,selection_command
+1371,3853872,"train_dynamics.py",9583,0,"",python,selection_command
+1372,3853904,"train_dynamics.py",9544,0,"",python,selection_command
+1373,3853937,"train_dynamics.py",9480,0,"",python,selection_command
+1374,3854110,"train_dynamics.py",9424,0,"",python,selection_command
+1375,3854554,"train_dynamics.py",9385,0,"",python,selection_command
+1376,3904594,"train_dynamics.py",0,0,"",python,selection_command
+1377,3905291,"train_dynamics.py",391,0,"",python,selection_command
+1378,3905538,"train_dynamics.py",815,0,"",python,selection_command
+1379,3905842,"train_dynamics.py",8643,0,"",python,selection_command
+1380,3906792,"train_dynamics.py",8897,0,"",python,selection_command
+1381,3907106,"train_dynamics.py",10169,0,"",python,selection_command
+1382,3908094,"train_dynamics.py",10202,0,"",python,selection_command
+1383,3915018,"train_dynamics.py",10228,0,"",python,selection_command
+1384,3915173,"train_dynamics.py",10325,0,"",python,selection_command
+1385,3920503,"train_dynamics.py",10388,0,"",python,selection_command
+1386,3923923,"train_dynamics.py",10325,0,"",python,selection_command
+1387,3923954,"train_dynamics.py",10342,0,"",python,selection_command
+1388,3924118,"train_dynamics.py",10344,0,"",python,selection_command
+1389,3924266,"train_dynamics.py",10347,0,"",python,selection_command
+1390,3924664,"train_dynamics.py",10348,0,"",python,selection_command
+1391,3924815,"train_dynamics.py",10358,0,"",python,selection_command
+1392,3924988,"train_dynamics.py",10359,0,"",python,selection_command
+1393,3925082,"train_dynamics.py",10365,0,"",python,selection_command
+1394,3925242,"train_dynamics.py",10367,0,"",python,selection_command
+1395,3928793,"train_dynamics.py",7569,9,"optimizer",python,selection_command
+1396,3928943,"train_dynamics.py",7577,0,"",python,selection_command
+1397,3929322,"train_dynamics.py",7579,0,"",python,selection_command
+1398,3929494,"train_dynamics.py",7581,0,"",python,selection_command
+1399,3929636,"train_dynamics.py",7584,0,"",python,selection_command
+1400,3930012,"train_dynamics.py",7569,0,"",python,selection_command
+1401,3930440,"train_dynamics.py",7585,0,"",python,selection_command
+1402,3930870,"train_dynamics.py",7991,0,"",python,selection_command
+1403,3931416,"train_dynamics.py",8098,0,"",python,selection_command
+1404,3934427,"train_dynamics.py",8023,0,"",python,selection_command
+1405,3934678,"train_dynamics.py",7978,0,"",python,selection_command
+1406,3934704,"train_dynamics.py",7962,0,"",python,selection_command
+1407,3934734,"train_dynamics.py",7888,0,"",python,selection_command
+1408,3934766,"train_dynamics.py",7825,0,"",python,selection_command
+1409,3934799,"train_dynamics.py",7809,0,"",python,selection_command
+1410,3934833,"train_dynamics.py",7761,0,"",python,selection_command
+1411,3934865,"train_dynamics.py",7704,0,"",python,selection_command
+1412,3934898,"train_dynamics.py",7622,0,"",python,selection_command
+1413,3934933,"train_dynamics.py",7606,0,"",python,selection_command
+1414,3935062,"train_dynamics.py",7580,0,"",python,selection_command
+1415,3935230,"train_dynamics.py",7563,0,"",python,selection_command
+1416,3935459,"train_dynamics.py",7580,0,"",python,selection_command
+1417,3936277,"train_dynamics.py",7581,0,"",python,selection_command
+1418,3936422,"train_dynamics.py",7584,0,"",python,selection_command
+1419,3936575,"train_dynamics.py",7585,0,"",python,selection_command
+1420,3936708,"train_dynamics.py",7594,0,"",python,selection_command
+1421,3936856,"train_dynamics.py",7595,0,"",python,selection_command
+1422,3939873,"train_dynamics.py",5260,0,"",python,selection_command
+1423,3941271,"train_dynamics.py",5266,0,"",python,selection_command
+1424,3941386,"train_dynamics.py",5268,0,"",python,selection_command
+1425,3941874,"genie.py",0,0,"from typing import Dict, Any\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nfrom flax.training.train_state import TrainState\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\nimport grain\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n tokenizer_outputs = self.tokenizer.vq_encode(batch[""videos""], training=False)\n lam_outputs = self.lam.vq_encode(batch[""videos""], training=False)\n latent_actions = jax.lax.cond(\n self.lam_co_train,\n lambda: lam_outputs[""z_q""],\n lambda: jax.lax.stop_gradient(lam_outputs[""z_q""]),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(tokenizer_outputs[""indices""]),\n latent_actions=latent_actions,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_outputs = self.dynamics(outputs, training)\n outputs.update(dyna_outputs)\n mle_indices = jnp.argmax(outputs[""token_logits""], axis=-1)\n outputs[""recon""] = self.tokenizer.decode(\n mle_indices, batch[""videos""].shape[2:4]\n )\n outputs[""lam_indices""] = lam_outputs[""indices""]\n return outputs\n\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n final_carry_maskgit = carry\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None\n\n\n# FIXME (f.srambical): add conversion script for old checkpoints\ndef restore_genie_components(\n optimizer: nnx.Optimizer,\n sharding: jax.sharding.NamedSharding,\n rng: jax.Array,\n args,\n):\n """"""Restore pre-trained Genie components""""""\n rngs = nnx.Rngs(rng)\n\n # dummy values since we only use tx to initialize the dummy train states\n dummy_tx = optax.adamw(\n learning_rate=optax.constant_schedule(args.max_lr),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n )\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n tokenizer_checkpoint_manager = ocp.CheckpointManager(\n directory=args.tokenizer_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.tokenizer_dim,\n ffn_dim=args.tokenizer_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n num_blocks=args.tokenizer_num_blocks,\n num_heads=args.tokenizer_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_tokenizer_optimizer = nnx.Optimizer(dummy_tokenizer, dummy_tx)\n dummy_tokenizer_optimizer_state = nnx.state(dummy_tokenizer_optimizer)\n abstract_sharded_tokenizer_optimizer_state = _create_abstract_sharded_pytree(\n dummy_tokenizer_optimizer_state, sharding\n )\n restored_tokenizer = tokenizer_checkpoint_manager.restore(\n step=tokenizer_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_tokenizer_optimizer.model, restored_tokenizer.model)\n optimizer.model.tokenizer = dummy_tokenizer_optimizer.model\n tokenizer_checkpoint_manager.close()\n\n if args.lam_checkpoint:\n lam_checkpoint_manager = ocp.CheckpointManager(\n directory=args.lam_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.lam_dim,\n ffn_dim=args.lam_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_latent_actions,\n patch_size=args.lam_patch_size,\n num_blocks=args.lam_num_blocks,\n num_heads=args.lam_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_lam_optimizer = nnx.Optimizer(dummy_lam, dummy_tx)\n dummy_lam_optimizer_state = nnx.state(dummy_lam_optimizer)\n abstract_sharded_lam_optimizer_state = _create_abstract_sharded_pytree(\n dummy_lam_optimizer_state, sharding\n )\n restored_lam_optimizer = lam_checkpoint_manager.restore(\n step=lam_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_lam_optimizer.model, restored_lam_optimizer.model)\n optimizer.model.lam = dummy_lam_optimizer.model\n # Remove the LAM decoder to save memory and avoid unnecessary computation.\n del optimizer.model.lam.decoder\n lam_checkpoint_manager.close()\n\n return optimizer\n\n\ndef _create_abstract_sharded_pytree(pytree_template, sharding_spec):\n """"""Replaces arrays in a pytree with ShapeDtypeStructs having the given sharding.""""""\n\n def map_fn(leaf_template):\n if hasattr(leaf_template, ""shape"") and hasattr(leaf_template, ""dtype""):\n return jax.ShapeDtypeStruct(\n leaf_template.shape, leaf_template.dtype, sharding=sharding_spec\n )\n return leaf_template\n\n return jax.tree_util.tree_map(map_fn, pytree_template)\n",python,tab
+1426,3941874,"genie.py",333,0,"",python,selection_command
+1427,3943903,"genie.py",701,0,"",python,selection_command
+1428,3944343,"genie.py",1136,0,"",python,selection_command
+1429,3945140,"genie.py",1719,0,"",python,selection_command
+1430,3945495,"genie.py",2320,0,"",python,selection_command
+1431,3947889,"genie.py",2913,0,"",python,selection_command
+1432,3948425,"genie.py",3446,0,"",python,selection_command
+1433,3948929,"genie.py",3504,0,"",python,selection_command
+1434,3949074,"genie.py",3523,0,"",python,selection_command
+1435,3949225,"genie.py",3537,0,"",python,selection_command
+1436,3949465,"genie.py",3538,0,"",python,selection_command
+1437,3949639,"genie.py",3547,0,"",python,selection_command
+1438,3949776,"genie.py",3549,0,"",python,selection_command
+1439,3950360,"models/dynamics.py",0,0,"from typing import Dict, Any\n\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\n\nfrom utils.nn import STTransformer\n\n\nclass DynamicsMaskGIT(nnx.Module):\n """"""MaskGIT dynamics model""""""\n\n def __init__(\n self,\n model_dim: int,\n ffn_dim: int,\n num_latents: int,\n latent_action_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n mask_limit: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.num_latents = num_latents\n self.latent_action_dim = latent_action_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.mask_limit = mask_limit\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.dynamics = STTransformer(\n self.model_dim,\n self.model_dim,\n self.ffn_dim,\n self.num_latents,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.patch_embed = nnx.Embed(self.num_latents, self.model_dim, rngs=rngs)\n self.mask_token = nnx.Param(\n nnx.initializers.lecun_uniform()(rngs.params(), (1, 1, 1, self.model_dim))\n )\n self.action_up = nnx.Linear(\n self.latent_action_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n # --- Mask videos ---\n vid_embed = self.patch_embed(batch[""video_tokens""])\n if training:\n batch_size = vid_embed.shape[0]\n _rng_prob, *_rngs_mask = jax.random.split(batch[""mask_rng""], batch_size + 1)\n mask_prob = jax.random.uniform(\n _rng_prob, shape=(batch_size,), minval=self.mask_limit\n )\n per_sample_shape = vid_embed.shape[1:-1]\n mask = jax.vmap(\n lambda rng, prob: jax.random.bernoulli(rng, prob, per_sample_shape),\n in_axes=(0, 0),\n )(jnp.asarray(_rngs_mask), mask_prob)\n mask = mask.at[:, 0].set(False)\n vid_embed = jnp.where(\n jnp.expand_dims(mask, -1), self.mask_token.value, vid_embed\n )\n else:\n mask = None\n\n # --- Predict transition ---\n act_embed = self.action_up(batch[""latent_actions""])\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n logits = self.dynamics(vid_embed)\n return dict(token_logits=logits, mask=mask)\n",python,tab
+1440,3950360,"models/dynamics.py",132,0,"",python,selection_command
+1441,3953121,"models/dynamics.py",497,0,"",python,selection_command
+1442,3953538,"models/dynamics.py",981,0,"",python,selection_command
+1443,3954462,"models/dynamics.py",1483,0,"",python,selection_command
+1444,3955237,"models/dynamics.py",1566,0,"",python,selection_command
+1445,3955393,"models/dynamics.py",1580,0,"",python,selection_command
+1446,3955805,"models/dynamics.py",1581,0,"",python,selection_command
+1447,3955952,"models/dynamics.py",1591,0,"",python,selection_command
+1448,3956108,"models/dynamics.py",1593,0,"",python,selection_command
+1449,3956238,"models/dynamics.py",1596,0,"",python,selection_command
+1450,3956390,"models/dynamics.py",1597,0,"",python,selection_command
+1451,7069401,"models/dynamics.py",1568,36," self.action_up = nnx.Linear(",python,selection_command
+1452,7082348,"models/dynamics.py",1597,0,"",python,selection_command
+1453,7149218,"train_lam.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom models.lam import LatentActionModel\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n vq_beta: float = 0.25\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n vq_reset_thresh: int = 50\n # LAM\n model_dim: int = 512\n ffn_dim: int = 2048\n latent_dim: int = 32\n num_latents: int = 6\n patch_size: int = 16\n num_blocks: int = 4\n num_heads: int = 8\n dropout: float = 0.0\n codebook_dropout: float = 0.0\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_lam""\n tags: list[str] = field(default_factory=lambda: [""lam""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 10000\n log_checkpoint_keep_period: int = 20000\n wandb_id: str = """"\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\n\n\ndef lam_loss_fn(model: LatentActionModel, inputs: dict):\n # --- Compute loss ---\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n gt_future_frames = inputs[""videos""][:, 1:]\n mse = jnp.square(gt_future_frames - outputs[""recon""]).mean()\n q_loss = jnp.square(jax.lax.stop_gradient(outputs[""emb""]) - outputs[""z""]).mean()\n commitment_loss = jnp.square(\n outputs[""emb""] - jax.lax.stop_gradient(outputs[""z""])\n ).mean()\n loss = mse + q_loss + args.vq_beta * commitment_loss\n\n # --- Compute validation metrics ---\n gt = gt_future_frames.clip(0, 1).reshape(-1, *gt_future_frames.shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n count_fn = jax.vmap(lambda i: (outputs[""indices""] == i).sum())\n index_counts = count_fn(jnp.arange(args.num_latents))\n metrics = dict(\n loss=loss,\n mse=mse,\n q_loss=q_loss,\n commitment_loss=commitment_loss,\n psnr=psnr,\n ssim=ssim,\n codebook_usage=(index_counts != 0).mean(),\n )\n return loss, (outputs[""recon""], index_counts, metrics)\n\n\n@nnx.jit\ndef train_step(lam, optimizer, inputs, action_last_active, rng):\n def loss_fn(model):\n return lam_loss_fn(model, inputs)\n\n # --- Update model ---\n (loss, (recon, idx_counts, metrics)), grads = nnx.value_and_grad(\n loss_fn, has_aux=True\n )(lam)\n optimizer.update(grads)\n\n # --- Reset inactive latent actions ---\n codebook = lam.vq.codebook\n num_codes = len(codebook)\n active_codes = idx_counts != 0.0\n action_last_active = jnp.where(active_codes, 0, action_last_active + 1)\n p_code = active_codes / active_codes.sum()\n reset_idxs = jax.random.choice(rng, num_codes, shape=(num_codes,), p=p_code)\n do_reset = action_last_active >= args.vq_reset_thresh\n new_codebook = jnp.where(\n jnp.expand_dims(do_reset, -1), codebook[reset_idxs], codebook\n )\n lam.vq.codebook.value = new_codebook\n action_last_active = jnp.where(do_reset, 0, action_last_active)\n return loss, recon, action_last_active, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.model_dim,\n ffn_dim=args.ffn_dim,\n latent_dim=args.latent_dim,\n num_latents=args.num_latents,\n patch_size=args.patch_size,\n num_blocks=args.num_blocks,\n num_heads=args.num_heads,\n dropout=args.dropout,\n codebook_dropout=args.codebook_dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n # Count parameters\n _, params, _ = nnx.split(lam, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(lam, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n action_last_active = jnp.zeros(args.num_latents, dtype=jnp.int32)\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng = jax.random.split(rng)\n\n inputs = dict(videos=videos, rng=_rng)\n rng, _rng = jax.random.split(rng)\n loss, recon, action_last_active, metrics = train_step(\n lam, optimizer, inputs, action_last_active, _rng\n )\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0, 1:].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n # NOTE: Process-dependent control flow deliberately happens\n # after indexing operation since it must not contain code\n # sections that lead to cross-accelerator communication.\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[0])),\n recon=wandb.Image(np.asarray(recon_seq[0])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+1454,7153688,"models/lam.py",0,0,"from typing import Dict, Any\n\nimport jax.numpy as jnp\nimport flax.nnx as nnx\n\nfrom utils.preprocess import patchify, unpatchify\nfrom utils.nn import STTransformer, VectorQuantizer\n\n\nclass LatentActionModel(nnx.Module):\n """"""Latent Action ST-ViVit VQ-VAE""""""\n\n def __init__(\n self,\n in_dim: int,\n model_dim: int,\n ffn_dim: int,\n latent_dim: int,\n num_latents: int,\n patch_size: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n codebook_dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.in_dim = in_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.latent_dim = latent_dim\n self.num_latents = num_latents\n self.patch_size = patch_size\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.codebook_dropout = codebook_dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.patch_token_dim = self.in_dim * self.patch_size**2\n self.encoder = STTransformer(\n self.in_dim * self.patch_size**2,\n self.model_dim,\n self.ffn_dim,\n self.latent_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.action_in = nnx.Param(\n nnx.initializers.lecun_uniform()(\n rngs.params(), (1, 1, 1, self.patch_token_dim)\n )\n )\n self.vq = VectorQuantizer(\n self.latent_dim,\n self.num_latents,\n self.codebook_dropout,\n rngs=rngs,\n )\n self.patch_up = nnx.Linear(\n self.patch_token_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.action_up = nnx.Linear(\n self.latent_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.decoder = STTransformer(\n self.model_dim,\n self.model_dim,\n self.ffn_dim,\n self.patch_token_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n # --- Encode + VQ ---\n H, W = batch[""videos""].shape[2:4]\n outputs = self.vq_encode(batch[""videos""], training)\n video_action_patches = self.action_up(outputs[""z_q""]) + self.patch_up(\n outputs[""patches""][:, :-1]\n )\n del outputs[""patches""]\n\n # --- Decode ---\n video_recon = self.decoder(video_action_patches)\n video_recon = video_recon.astype(jnp.float32)\n video_recon = nnx.sigmoid(video_recon)\n video_recon = video_recon.astype(self.dtype)\n outputs[""recon""] = unpatchify(video_recon, self.patch_size, H, W)\n return outputs\n\n def vq_encode(self, videos: Any, training: bool = True) -> Dict[str, Any]:\n # --- Preprocess videos ---\n B, T = videos.shape[:2]\n patches = patchify(videos, self.patch_size)\n action_pad = jnp.broadcast_to(\n self.action_in.value, (B, T, 1, self.patch_token_dim)\n )\n padded_patches = jnp.concatenate((action_pad, patches), axis=2)\n\n # --- Encode ---\n z = self.encoder(padded_patches) # (B, T, N, E)\n # Get latent action for all future frames\n z = z[:, 1:, 0] # (B, T-1, E)\n\n # --- Vector quantize ---\n z = z.reshape(B * (T - 1), self.latent_dim)\n z_q, z, emb, indices = self.vq(z, training)\n z_q = z_q.reshape(B, T - 1, 1, self.latent_dim)\n return dict(patches=patches, z_q=z_q, z=z, emb=emb, indices=indices)\n",python,tab
+1455,7154006,"models/lam.py",1640,0,"",python,selection_command
+1456,7157773,"models/lam.py",2153,0,"",python,selection_command
+1457,7160905,"models/lam.py",2163,0,"",python,selection_command
+1458,7161037,"models/lam.py",2165,0,"",python,selection_command
+1459,7161325,"models/lam.py",2168,0,"",python,selection_command
+1460,7161494,"models/lam.py",2169,0,"",python,selection_command
+1461,7388065,"train_dynamics.py",0,0,"",python,tab
+1462,7388887,"train_dynamics.py",5859,0,"",python,selection_command
+1463,7388989,"train_dynamics.py",6415,0,"",python,selection_command
+1464,7390005,"train_dynamics.py",6815,0,"",python,selection_command
+1465,7392663,"train_dynamics.py",7203,0,"",python,selection_command
+1466,7394133,"train_dynamics.py",7563,0,"",python,selection_command
+1467,7395897,"train_dynamics.py",7569,0,"",python,selection_command
+1468,7396230,"train_dynamics.py",7606,0,"",python,selection_command
+1469,7396230,"train_dynamics.py",7611,0,"",python,selection_command
+1470,7396230,"train_dynamics.py",7693,0,"",python,selection_command
+1471,7396437,"train_dynamics.py",8399,0,"",python,selection_command
+1472,7397976,"train_dynamics.py",8643,0,"",python,selection_command
+1473,7398160,"train_dynamics.py",8897,0,"",python,selection_command
+1474,7398328,"train_dynamics.py",10169,0,"",python,selection_command
+1475,7401637,"train_dynamics.py",10202,0,"",python,selection_command
+1476,7401745,"train_dynamics.py",10228,0,"",python,selection_command
+1477,7401889,"train_dynamics.py",10325,0,"",python,selection_command
+1478,7402016,"train_dynamics.py",10388,0,"",python,selection_command
+1479,7402265,"train_dynamics.py",10442,0,"\n ",python,content
+1480,7402862,"train_dynamics.py",10451,0,"b",python,content
+1481,7402862,"train_dynamics.py",10452,0,"",python,selection_keyboard
+1482,7403046,"train_dynamics.py",10452,0,"r",python,content
+1483,7403047,"train_dynamics.py",10453,0,"",python,selection_keyboard
+1484,7403048,"train_dynamics.py",10453,0,"e",python,content
+1485,7403048,"train_dynamics.py",10454,0,"",python,selection_keyboard
+1486,7403064,"train_dynamics.py",10454,0,"a",python,content
+1487,7403064,"train_dynamics.py",10455,0,"",python,selection_keyboard
+1488,7403085,"train_dynamics.py",10455,0,"k",python,content
+1489,7403086,"train_dynamics.py",10456,0,"",python,selection_keyboard
+1490,7403236,"train_dynamics.py",10456,0,"p",python,content
+1491,7403237,"train_dynamics.py",10457,0,"",python,selection_keyboard
+1492,7403289,"train_dynamics.py",10457,0,"o",python,content
+1493,7403289,"train_dynamics.py",10458,0,"",python,selection_keyboard
+1494,7403346,"train_dynamics.py",10458,0,"i",python,content
+1495,7403347,"train_dynamics.py",10459,0,"",python,selection_keyboard
+1496,7403387,"train_dynamics.py",10459,0,"n",python,content
+1497,7403387,"train_dynamics.py",10460,0,"",python,selection_keyboard
+1498,7403457,"train_dynamics.py",10460,0,"t",python,content
+1499,7403457,"train_dynamics.py",10461,0,"",python,selection_keyboard
+1500,7403729,"train_dynamics.py",10461,0,"()",python,content
+1501,7403730,"train_dynamics.py",10462,0,"",python,selection_keyboard
+1502,7403730,"train_dynamics.py",10462,1,")",python,content
+1503,7403730,"train_dynamics.py",10463,0,"",python,selection_keyboard
+1504,7403957,"train_dynamics.py",10462,0,"",python,selection_command
+1505,7482972,"genie.py",0,0,"",python,tab
+1506,7528929,"train_dynamics.py",0,0,"",python,tab
+1507,7530342,"train_dynamics.py",0,0,"",python,selection_command
+1508,7531826,"train_dynamics.py",10451,0,"",python,selection_command
+1509,7532092,"train_dynamics.py",10443,21,"",python,content
+1510,7532109,"train_dynamics.py",10451,0,"",python,selection_command
+1511,7537257,"train_dynamics.py",13820,0,"",python,selection_command
+1512,7537657,"train_dynamics.py",13789,0,"",python,selection_command
+1513,7537896,"train_dynamics.py",13788,0,"",python,selection_command
+1514,7537923,"train_dynamics.py",13766,0,"",python,selection_command
+1515,7537957,"train_dynamics.py",13727,0,"",python,selection_command
+1516,7537992,"train_dynamics.py",13669,0,"",python,selection_command
+1517,7538024,"train_dynamics.py",13651,0,"",python,selection_command
+1518,7538058,"train_dynamics.py",13628,0,"",python,selection_command
+1519,7538091,"train_dynamics.py",13601,0,"",python,selection_command
+1520,7538126,"train_dynamics.py",13558,0,"",python,selection_command
+1521,7538181,"train_dynamics.py",13484,0,"",python,selection_command
+1522,7538192,"train_dynamics.py",13410,0,"",python,selection_command
+1523,7538227,"train_dynamics.py",13365,0,"",python,selection_command
+1524,7538266,"train_dynamics.py",13339,0,"",python,selection_command
+1525,7538298,"train_dynamics.py",13298,0,"",python,selection_command
+1526,7538326,"train_dynamics.py",13243,0,"",python,selection_command
+1527,7538359,"train_dynamics.py",13167,0,"",python,selection_command
+1528,7538394,"train_dynamics.py",13131,0,"",python,selection_command
+1529,7538427,"train_dynamics.py",13085,0,"",python,selection_command
+1530,7538468,"train_dynamics.py",13059,0,"",python,selection_command
+1531,7538498,"train_dynamics.py",13028,0,"",python,selection_command
+1532,7538532,"train_dynamics.py",12952,0,"",python,selection_command
+1533,7538654,"train_dynamics.py",13028,0,"",python,selection_command
+1534,7538921,"train_dynamics.py",13059,0,"",python,selection_command
+1535,7538937,"train_dynamics.py",13085,0,"",python,selection_command
+1536,7538969,"train_dynamics.py",13131,0,"",python,selection_command
+1537,7539002,"train_dynamics.py",13167,0,"",python,selection_command
+1538,7539363,"train_dynamics.py",13243,0,"",python,selection_command
+1539,7539562,"train_dynamics.py",13297,0,"\n ",python,content
+1540,7539730,"train_dynamics.py",13314,0,"b",python,content
+1541,7539730,"train_dynamics.py",13315,0,"",python,selection_keyboard
+1542,7539786,"train_dynamics.py",13315,0,"r",python,content
+1543,7539786,"train_dynamics.py",13316,0,"",python,selection_keyboard
+1544,7539840,"train_dynamics.py",13316,0,"e",python,content
+1545,7539841,"train_dynamics.py",13317,0,"",python,selection_keyboard
+1546,7539899,"train_dynamics.py",13317,0,"a",python,content
+1547,7539899,"train_dynamics.py",13318,0,"",python,selection_keyboard
+1548,7539921,"train_dynamics.py",13318,0,"k",python,content
+1549,7539921,"train_dynamics.py",13319,0,"",python,selection_keyboard
+1550,7540090,"train_dynamics.py",13319,0,"p",python,content
+1551,7540090,"train_dynamics.py",13320,0,"",python,selection_keyboard
+1552,7540100,"train_dynamics.py",13320,0,"o",python,content
+1553,7540100,"train_dynamics.py",13321,0,"",python,selection_keyboard
+1554,7540201,"train_dynamics.py",13321,0,"i",python,content
+1555,7540201,"train_dynamics.py",13322,0,"",python,selection_keyboard
+1556,7540238,"train_dynamics.py",13322,0,"n",python,content
+1557,7540239,"train_dynamics.py",13323,0,"",python,selection_keyboard
+1558,7540308,"train_dynamics.py",13323,0,"t",python,content
+1559,7540309,"train_dynamics.py",13324,0,"",python,selection_keyboard
+1560,7540558,"train_dynamics.py",13324,0,"()",python,content
+1561,7540559,"train_dynamics.py",13325,0,"",python,selection_keyboard
+1562,7540576,"train_dynamics.py",13325,1,")",python,content
+1563,7540576,"train_dynamics.py",13326,0,"",python,selection_keyboard
+1564,7540798,"train_dynamics.py",13325,0,"",python,selection_command
+1565,7543443,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+1566,7544261,"experiments/dynamics_grain_tok_restore.sh",725,0,"",shellscript,selection_command
+1567,7544508,"experiments/dynamics_grain_tok_restore.sh",699,0,"",shellscript,selection_command
+1568,7544538,"experiments/dynamics_grain_tok_restore.sh",684,0,"",shellscript,selection_command
+1569,7544567,"experiments/dynamics_grain_tok_restore.sh",657,0,"",shellscript,selection_command
+1570,7544599,"experiments/dynamics_grain_tok_restore.sh",632,0,"",shellscript,selection_command
+1571,7544633,"experiments/dynamics_grain_tok_restore.sh",605,0,"",shellscript,selection_command
+1572,7544665,"experiments/dynamics_grain_tok_restore.sh",556,0,"",shellscript,selection_command
+1573,7544793,"experiments/dynamics_grain_tok_restore.sh",534,0,"",shellscript,selection_command
+1574,7544947,"experiments/dynamics_grain_tok_restore.sh",500,0,"",shellscript,selection_command
+1575,7545102,"experiments/dynamics_grain_tok_restore.sh",482,0,"",shellscript,selection_command
+1576,7545254,"experiments/dynamics_grain_tok_restore.sh",461,0,"",shellscript,selection_command
+1577,7545572,"experiments/dynamics_grain_tok_restore.sh",457,21,"",shellscript,content
+1578,7545580,"experiments/dynamics_grain_tok_restore.sh",461,0,"",shellscript,selection_command
+1579,7548506,"train_dynamics.py",0,0,"",python,tab
+1580,7828858,"train_dynamics.py",10650,0,"",python,selection_command
+1581,7829835,"train_dynamics.py",10649,0,"",python,selection_command
+1582,7830708,"train_dynamics.py",10650,0,"",python,selection_command
+1583,7831404,"train_dynamics.py",10649,0,"",python,selection_command
+1584,7831471,"train_dynamics.py",10648,0,"",python,selection_command
+1585,7831621,"train_dynamics.py",10648,1,",",python,selection_command
+1586,7831667,"train_dynamics.py",10648,17,", partial_restore",python,selection_command
+1587,7831837,"train_dynamics.py",10648,18,", partial_restore=",python,selection_command
+1588,7832124,"train_dynamics.py",10648,22,", partial_restore=True",python,selection_command
+1589,7843558,"train_dynamics.py",10669,0,"",python,selection_command
+1590,7857618,"train_dynamics.py",10589,0,"",python,selection_command
+1591,7857821,"train_dynamics.py",10600,0,"",python,selection_command
+1592,7858333,"train_dynamics.py",10589,0,"",python,selection_command
+1593,7858722,"train_dynamics.py",8614,0,"",python,selection_command
+1594,7860334,"train_dynamics.py",10589,0,"",python,selection_command
+1595,7871580,"train_dynamics.py",13513,0," dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),\n",python,content
+1596,7871581,"train_dynamics.py",10573,99," model_state=ocp.args.PyTreeRestore(\n abstract_optimizer_state, partial_restore=True\n ),",python,content
+1597,7871581,"train_dynamics.py",8695,263,"",python,content
+1598,7871581,"train_dynamics.py",8605,83," ""dataloader_state"",\n save_arg_type=grain.checkpoint.CheckpointSave,\n restore_arg_type=grain.checkpoint.CheckpointRestore,\n handler=grain_handler,",python,content
+1599,7871581,"train_dynamics.py",8492,80," ""model_state"",\n save_arg_type=ocp.args.PyTreeSave,\n restore_arg_type=ocp.args.PyTreeRestore,\n handler=pytree_handler,",python,content
+1600,7871581,"train_dynamics.py",8466,0," pytree_handler = ocp.handlers.PyTreeCheckpointHandler()\n grain_handler = grain.checkpoint.CheckpointHandler()\n",python,content
+1601,7871636,"train_dynamics.py",13652,144,"",python,content
+1602,7930368,"train_dynamics.py",8605,0,"",python,selection_mouse
+1603,7935742,"train_dynamics.py",8609,0,"",python,selection_command
+1604,7938179,"train_dynamics.py",8648,0,"",python,selection_mouse
+1605,7940788,"train_dynamics.py",8692,0,"",python,selection_mouse
+1606,7943753,"train_dynamics.py",8747,0,"",python,selection_mouse
+1607,7946791,"train_dynamics.py",8693,0,"",python,selection_mouse
+1608,7947952,"train_dynamics.py",8605,0,"",python,selection_mouse
+1609,7955966,"train_dynamics.py",8668,0,"",python,selection_mouse
+1610,7960123,"train_dynamics.py",8605,0,"",python,selection_mouse
+1611,7975080,"train_dynamics.py",8645,0,"",python,selection_mouse
+1612,7983040,"train_dynamics.py",8640,0,"",python,selection_command
+1613,7983316,"train_dynamics.py",8640,13,"",python,content
+1614,7983828,"train_dynamics.py",8640,0,"a",python,content
+1615,7983828,"train_dynamics.py",8641,0,"",python,selection_keyboard
+1616,7983902,"train_dynamics.py",8641,0,"r",python,content
+1617,7983902,"train_dynamics.py",8642,0,"",python,selection_keyboard
+1618,7984081,"train_dynamics.py",8642,0,"g",python,content
+1619,7984081,"train_dynamics.py",8643,0,"",python,selection_keyboard
+1620,7984118,"train_dynamics.py",8643,0,"s",python,content
+1621,7984118,"train_dynamics.py",8644,0,"",python,selection_keyboard
+1622,7984432,"train_dynamics.py",8643,0,"",python,selection_command
+1623,7984938,"train_dynamics.py",8677,0,"",python,selection_command
+1624,7994814,"train_dynamics.py",8726,0,"",python,selection_command
+1625,7995058,"train_dynamics.py",8751,0,"",python,selection_command
+1626,7995085,"train_dynamics.py",8764,0,"",python,selection_command
+1627,7995103,"train_dynamics.py",8790,0,"",python,selection_command
+1628,7995177,"train_dynamics.py",8818,0,"",python,selection_command
+1629,7995198,"train_dynamics.py",8873,0,"",python,selection_command
+1630,7995364,"train_dynamics.py",8934,0,"",python,selection_command
+1631,7995523,"train_dynamics.py",8958,0,"",python,selection_command
+1632,7997083,"train_dynamics.py",8960,0," handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n",python,content
+1633,7998222,"train_dynamics.py",8971,0,"",python,selection_command
+1634,7998347,"train_dynamics.py",8980,0,"",python,selection_command
+1635,7998655,"train_dynamics.py",8981,0,"",python,selection_command
+1636,7998655,"train_dynamics.py",8984,0,"",python,selection_command
+1637,7998662,"train_dynamics.py",8986,0,"",python,selection_command
+1638,7998973,"train_dynamics.py",9002,0,"",python,selection_command
+1639,7999071,"train_dynamics.py",9005,0,"",python,selection_command
+1640,7999895,"train_dynamics.py",9004,1,"",python,content
+1641,7999935,"train_dynamics.py",9004,0,"\n ",python,content
+1642,8001685,"train_dynamics.py",9226,0,")",python,content
+1643,8001685,"train_dynamics.py",9220,6,"",python,content
+1644,8001685,"train_dynamics.py",9214,5,"",python,content
+1645,8001685,"train_dynamics.py",9212,1,"",python,content
+1646,8001685,"train_dynamics.py",9210,0,",\n",python,content
+1647,8001685,"train_dynamics.py",9209,1,"",python,content
+1648,8001685,"train_dynamics.py",9183,20,"",python,content
+1649,8001685,"train_dynamics.py",9182,0,"_",python,content
+1650,8001685,"train_dynamics.py",9180,2,"",python,content
+1651,8001685,"train_dynamics.py",9175,0," handler=",python,content
+1652,8001685,"train_dynamics.py",9174,0,"\n",python,content
+1653,8001685,"train_dynamics.py",9139,0," args=",python,content
+1654,8001685,"train_dynamics.py",9138,0,"\n ",python,content
+1655,8001685,"train_dynamics.py",9119,0,"\n ",python,content
+1656,8001685,"train_dynamics.py",9093,0,")",python,content
+1657,8001685,"train_dynamics.py",9087,6,"",python,content
+1658,8001685,"train_dynamics.py",9081,5,"",python,content
+1659,8001685,"train_dynamics.py",9079,1,"",python,content
+1660,8001685,"train_dynamics.py",9077,0,",\n",python,content
+1661,8001685,"train_dynamics.py",9076,1,"",python,content
+1662,8001685,"train_dynamics.py",9050,20,"",python,content
+1663,8001685,"train_dynamics.py",9049,0,"_",python,content
+1664,8001685,"train_dynamics.py",9047,2,"",python,content
+1665,8001685,"train_dynamics.py",9042,0," handler=",python,content
+1666,8001685,"train_dynamics.py",9041,0,"\n",python,content
+1667,8001685,"train_dynamics.py",9009,0," args=",python,content
+1668,8001685,"train_dynamics.py",9005,0," ",python,content
+1669,8001685,"train_dynamics.py",8985,0,"\n ",python,content
+1670,8003092,"train_dynamics.py",9026,0,"",python,selection_command
+1671,8004089,"train_dynamics.py",8960,277,"nt.CheckpointH # type: ignorent.CheckpointH # type: ignore",python,content
+1672,8004091,"train_dynamics.py",8958,0,"",python,selection_command
+1673,8005896,"train_dynamics.py",8779,174," ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler",python,content
+1674,8006195,"train_dynamics.py",8869,60," handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n",python,content
+1675,8006525,"train_dynamics.py",8609,137," ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler",python,content
+1676,8006713,"train_dynamics.py",8466,117,"",python,content
+1677,8007632,"train_dynamics.py",8609,0,"",python,selection_command
+1678,8007793,"train_dynamics.py",8583,0,"",python,selection_command
+1679,8007921,"train_dynamics.py",8577,0,"",python,selection_command
+1680,8008095,"train_dynamics.py",8496,0,"",python,selection_command
+1681,8008187,"train_dynamics.py",8470,0,"",python,selection_command
+1682,8008389,"train_dynamics.py",8496,0,"",python,selection_command
+1683,8009144,"train_dynamics.py",8500,0,"",python,selection_command
+1684,8009359,"train_dynamics.py",8501,0,"",python,selection_command
+1685,8009517,"train_dynamics.py",8512,0,"",python,selection_command
+1686,8009668,"train_dynamics.py",8515,0,"",python,selection_command
+1687,8011860,"train_dynamics.py",8577,0,"",python,selection_command
+1688,8012042,"train_dynamics.py",8602,0,"",python,selection_command
+1689,8012290,"train_dynamics.py",8628,0,"",python,selection_command
+1690,8012333,"train_dynamics.py",8693,0,"",python,selection_command
+1691,8012814,"train_dynamics.py",8718,0,"",python,selection_command
+1692,8013338,"train_dynamics.py",8695,0,"",python,selection_command
+1693,8013577,"train_dynamics.py",8689,0,"",python,selection_command
+1694,8013828,"train_dynamics.py",8605,0,"",python,selection_command
+1695,8013841,"train_dynamics.py",8579,0,"",python,selection_command
+1696,8013868,"train_dynamics.py",8573,0,"",python,selection_command
+1697,8013901,"train_dynamics.py",8492,0,"",python,selection_command
+1698,8013935,"train_dynamics.py",8466,0,"",python,selection_command
+1699,8025511,"train_dynamics.py",10535,0,"",python,selection_mouse
+1700,8025515,"train_dynamics.py",10534,0,"",python,selection_command
+1701,8026350,"train_dynamics.py",10573,137," model_state=ocp.args.PyTreeRestore(abstract_optimizer_state, partial_restore=True),",python,content
+1702,8029802,"train_dynamics.py",13487,0,"",python,selection_mouse
+1703,8034047,"train_dynamics.py",13513,89," dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),",python,content
+1704,8062873,"train_dynamics.py",4197,0,"",python,selection_mouse
+1705,8064306,"train_dynamics.py",0,0,"",python,selection_command
+1706,8065576,"train_dynamics.py",8399,0,"",python,selection_command
+1707,8069504,"train_dynamics.py",8470,0,"",python,selection_command
+1708,8069691,"train_dynamics.py",8583,0,"",python,selection_command
+1709,8069914,"train_dynamics.py",8699,0,"",python,selection_command
+1710,8070184,"train_dynamics.py",8829,0,"",python,selection_command
+1711,8070485,"train_dynamics.py",9344,0,"",python,selection_command
+1712,8071377,"train_dynamics.py",9308,0,"",python,selection_command
+1713,8071501,"train_dynamics.py",9285,0,"",python,selection_command
+1714,8071649,"train_dynamics.py",9237,0,"",python,selection_command
+1715,8071834,"train_dynamics.py",9252,0,"",python,selection_command
+1716,8072064,"train_dynamics.py",9254,0,"",python,selection_command
+1717,8072149,"train_dynamics.py",9257,0,"",python,selection_command
+1718,8072318,"train_dynamics.py",9258,0,"",python,selection_command
+1719,8076817,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",0,0,"# Copyright 2025 The Orbax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n""""""A class providing functionalities for managing a series of checkpoints.""""""\n\nfrom __future__ import annotations\n\nimport concurrent\nimport dataclasses\nimport datetime\nimport threading\nimport time\nimport typing\nfrom typing import Any, Callable, Container, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, Union, overload\n\nfrom absl import logging\nfrom etils import epath\nfrom etils import epy\nimport jax\nfrom jax.experimental.array_serialization import serialization as jax_serialization\nfrom orbax.checkpoint import abstract_checkpoint_manager\nfrom orbax.checkpoint import args as args_lib\nfrom orbax.checkpoint import checkpoint_args\nfrom orbax.checkpoint import options as options_lib\nfrom orbax.checkpoint import utils\nfrom orbax.checkpoint._src import threading as threading_lib\nfrom orbax.checkpoint._src.checkpoint_managers import policy_checkpoint_info\nfrom orbax.checkpoint._src.checkpoint_managers import preservation_policy as preservation_policy_lib\nfrom orbax.checkpoint._src.checkpoint_managers import save_decision_policy as save_decision_policy_lib\nfrom orbax.checkpoint._src.checkpointers import abstract_checkpointer\nfrom orbax.checkpoint._src.checkpointers import async_checkpointer\nfrom orbax.checkpoint._src.checkpointers import checkpointer as checkpointer_lib\nfrom orbax.checkpoint._src.futures import synchronization\nfrom orbax.checkpoint._src.handlers import checkpoint_handler\nfrom orbax.checkpoint._src.handlers import composite_checkpoint_handler\nfrom orbax.checkpoint._src.handlers import handler_registration\nfrom orbax.checkpoint._src.handlers import json_checkpoint_handler\nfrom orbax.checkpoint._src.handlers import proto_checkpoint_handler\nfrom orbax.checkpoint._src.logging import abstract_logger\nfrom orbax.checkpoint._src.logging import standard_logger\nfrom orbax.checkpoint._src.logging import step_statistics\nfrom orbax.checkpoint._src.metadata import checkpoint\nfrom orbax.checkpoint._src.metadata import checkpoint_info\nfrom orbax.checkpoint._src.metadata import root_metadata_serialization\nfrom orbax.checkpoint._src.metadata import step_metadata_serialization\nfrom orbax.checkpoint._src.multihost import multihost\nfrom orbax.checkpoint._src.path import atomicity_types\nfrom orbax.checkpoint._src.path import deleter\nfrom orbax.checkpoint._src.path import step as step_lib\nfrom orbax.checkpoint._src.path import utils as path_utils\nfrom typing_extensions import Self # for Python version < 3.11\n\n\n\nPyTree = Any\nCheckpointDirs = Tuple[str, str]\nSaveParams = Mapping[str, Any]\nRestoreParams = SaveParams\nCheckpointInfo = checkpoint_info.CheckpointInfo\nAbstractCheckpointer = abstract_checkpointer.AbstractCheckpointer\nCheckpointersDict = Mapping[str, AbstractCheckpointer]\nAbstractCheckpointManager = (\n abstract_checkpoint_manager.AbstractCheckpointManager\n)\nStepMetadata = checkpoint.StepMetadata\nRootMetadata = checkpoint.RootMetadata\nItemMetadata = checkpoint.CompositeItemMetadata | checkpoint.SingleItemMetadata\nAsyncCheckpointer = async_checkpointer.AsyncCheckpointer\nCheckpointer = checkpointer_lib.Checkpointer\nJsonCheckpointHandler = json_checkpoint_handler.JsonCheckpointHandler\nProtoCheckpointHandler = proto_checkpoint_handler.ProtoCheckpointHandler\nCompositeCheckpointHandler = (\n composite_checkpoint_handler.CompositeCheckpointHandler\n)\nCheckpointHandler = checkpoint_handler.CheckpointHandler\nCheckpointArgs = checkpoint_args.CheckpointArgs\nCheckpointHandlersDict = Mapping[str, CheckpointHandler]\nCheckpointHandlerRegistry = handler_registration.CheckpointHandlerRegistry\nserialize_root_metadata = root_metadata_serialization.serialize\ndeserialize_root_metadata = root_metadata_serialization.deserialize\n\nAsyncOptions = options_lib.AsyncOptions\nMultiprocessingOptions = options_lib.MultiprocessingOptions\nFileOptions = options_lib.FileOptions\n\nDEFAULT_ITEM_NAME = 'default'\nMETRIC_ITEM_NAME = 'metrics'\nMETADATA_ITEM_NAME = 'metadata'\nRESERVED_ITEM_NAMES = []\n\n_INIT_TIME = datetime.datetime.now(tz=datetime.timezone.utc)\n\n\ndef _metrics_file_exists(metrics_item_path: epath.Path) -> bool:\n """"""True if item directory AND actual file both exist.""""""\n return (\n metrics_item_path.exists()\n and (metrics_item_path / METRIC_ITEM_NAME).exists()\n )\n\n\nclass StepAlreadyExistsError(ValueError):\n """"""Raised when a step is already present for a save request.""""""\n\n pass\n\n\nclass _FinalizeThread(threading.Thread):\n """"""Thread wrapper that raises an exception if encountered.""""""\n\n exception = None\n\n def __init__(\n self,\n step: int,\n target: Callable[..., object],\n name: str,\n args=(),\n kwargs=None,\n *,\n daemon=None,\n ):\n super().__init__(\n target=target,\n name=name,\n args=args,\n kwargs=kwargs,\n daemon=daemon,\n )\n self._step = step\n self._thread_local = threading.local()\n\n def step(self) -> int:\n return self._step\n\n def run(self):\n try:\n super().run()\n except BaseException as e: # pylint:disable=broad-exception-caught\n self.exception = e\n\n def join(self, *args, **kwargs):\n super().join(*args, **kwargs)\n\n # Keep track of whether the calling thread should raise the exception.\n if not hasattr(self._thread_local, 'should_raise'):\n self._thread_local.should_raise = True\n if self.exception and self._thread_local.should_raise:\n # Each thread should only raise once.\n self._thread_local.should_raise = False\n raise self.exception\n\n\n@dataclasses.dataclass\nclass _ShouldSaveFnPolicy(save_decision_policy_lib.SaveDecisionPolicy):\n """"""A policy that uses a user-provided should_save_fn.""""""\n\n should_save_fn: Callable[[int, Optional[int]], bool]\n\n def should_save(\n self,\n step: policy_checkpoint_info.PolicyCheckpointInfo,\n previous_steps: Sequence[policy_checkpoint_info.PolicyCheckpointInfo],\n *,\n context: save_decision_policy_lib.DecisionContext,\n ) -> bool:\n return self.should_save_fn(\n step.step, previous_steps[-1].step if previous_steps else None\n )\n\n\ndef _get_default_save_decision_policy(\n options: CheckpointManagerOptions,\n) -> save_decision_policy_lib.SaveDecisionPolicy:\n """"""Creates a default policy from CheckpointManagerOptions.""""""\n save_interval_policies = []\n if options.should_save_fn is not None:\n save_interval_policies.append(_ShouldSaveFnPolicy(options.should_save_fn))\n save_interval_policies.append(\n save_decision_policy_lib.PreemptionCheckpointingPolicy()\n )\n else:\n if options.save_interval_steps is not None:\n save_interval_policies.append(\n save_decision_policy_lib.FixedIntervalPolicy(\n options.save_interval_steps\n )\n )\n if options.save_on_steps is not None:\n save_interval_policies.append(\n save_decision_policy_lib.SpecificStepsPolicy(options.save_on_steps)\n )\n save_interval_policies.append(\n save_decision_policy_lib.PreemptionCheckpointingPolicy()\n )\n save_interval_policies.append(save_decision_policy_lib.InitialSavePolicy())\n return save_decision_policy_lib.AnySavePolicy(save_interval_policies)\n\n\ndef _get_default_preservation_policy(\n options: CheckpointManagerOptions,\n) -> preservation_policy_lib.PreservationPolicy:\n """"""Returns a default preservation policy.""""""\n preservation_policies = []\n if options.keep_period is not None:\n preservation_policies.append(\n preservation_policy_lib.EveryNSteps(options.keep_period)\n )\n if options.keep_time_interval is not None:\n total_seconds = int(options.keep_time_interval.total_seconds())\n preservation_policies.append(\n preservation_policy_lib.EveryNSeconds(interval_secs=total_seconds)\n )\n if options.best_fn is not None:\n preservation_policies.append(\n preservation_policy_lib.BestN(\n get_metric_fn=options.best_fn,\n reverse=(options.best_mode == 'min'),\n n=options.max_to_keep,\n keep_checkpoints_without_metrics=options.keep_checkpoints_without_metrics,\n )\n )\n else:\n preservation_policies.append(\n preservation_policy_lib.LatestN(n=options.max_to_keep)\n )\n return preservation_policy_lib.AnyPreservationPolicy(preservation_policies)\n\n\n# TODO(b/268051457) Clean up when no longer depended upon by internal users.\ndef is_async_checkpointer(checkpointer: AbstractCheckpointer):\n return isinstance(\n checkpointer, async_checkpointer.AsyncCheckpointer\n ) or isinstance(\n checkpointer,\n jax_serialization.GlobalAsyncCheckpointManagerBase,\n )\n\n\n# TODO(b/309965339) Set todelete_subdir defaults if directory is on CNS.\n@dataclasses.dataclass\nclass CheckpointManagerOptions:\n """"""Optional arguments for :py:class:`.CheckpointManager`.\n\n save_interval_steps:\n The interval at which checkpoints should be saved.\n Ensures checkpoints will only be saved every n steps. Defaults to 1.\n max_to_keep:\n deprecated, do not use. use `preservation_policy` instead.\n keep_time_interval:\n deprecated, do not use. use `preservation_policy` instead.\n keep_period:\n deprecated, do not use. use `preservation_policy` instead.\n should_keep_fn:\n deprecated, do not use. use `preservation_policy` instead.\n best_fn:\n If set, maintains checkpoints based on the quality of given\n metrics rather than recency. The function should accept a PyTree of metrics,\n and return a scalar value that can be used to determine the quality score\n of the checkpoint. If `max_to_keep` is also set, then the retained\n checkpoints will be kept based on their quality, as measured by this\n function.\n best_mode:\n One of ['max', 'min']. The best metric is determine on the basis of this\n value.\n keep_checkpoints_without_metrics:\n If False, checkpoints without metrics present\n are eligible for cleanup. Otherwise, they will never be deleted.\n step_prefix:\n If provided, step directories will take the form\n f'{step_prefix}_'. Otherwise, they will simply be an integer .\n step_format_fixed_length:\n If set, formats step with n digits (leading zeros).\n This makes sorting steps easier. Otherwise, step has no leading zeros.\n step_name_format:\n NameFormat to build or find steps under input root directory. If provided,\n `step_prefix`, `step_format_fixed_length` are ignored.\n create:\n If True, creates the top-level directory if it does not already exist.\n cleanup_tmp_directories:\n If True, cleans up any existing temporary directories\n on CheckpointManager creation.\n save_on_steps:\n Optional set of steps at which checkpoints should be saved.\n Useful to save checkpoints on a fixed set of steps that are not multiple of\n `save_interval_steps`.\n single_host_load_and_broadcast:\n If True, calling `all_steps(read=True)` will load on only a single host, and\n will then be broadcast to other hosts. Otherwise, I/O will be performed on\n every host. This can be helpful to reduce QPS to the filesystem if there\n are a large number of hosts.\n todelete_subdir: If set, checkpoints to be deleted will be only renamed into a\n subdirectory with the provided string. Otherwise, they will be directly\n deleted from the file system. Useful if checkpoint deletion is time\n consuming. By default, delete the checkpoint assets. Ignored if file system\n is Google Cloud Storage (directory is prefixed with gs://)\n enable_hns_rmtree: If True, enables additional step of HNS bucket empty folder\n deletion.\n enable_background_delete: If True, old checkpoint deletions will be done in a\n background thread, otherwise, it will be done at the end of each save. When\n it's enabled, make sure to call CheckpointManager.close() or use context to\n make sure all old steps are deleted before exit.\n read_only: If True, then checkpoints save and delete are skipped. However,\n checkpoints restore works as usual.\n enable_async_checkpointing:\n If True, enables async checkpointing.\n async_options:\n Used to configure properties of async behavior. See above.\n multiprocessing_options: MultiprocessingOptions instance to configure\n multiprocessing behavior.\n should_save_fn:\n Predicate callable to check if given step can be saved. This callable\n accepts step number and optional latest step number as param and returns\n bool. If present then `save_interval_steps` and `save_on_steps` options are\n ignored.\n file_options: Options to configure checkpoint directories and files.\n default=FileOptions().\n save_root_metadata: If True, saves root-level metadata about checkpoints.\n This metadata is not step-specific and is written only once.\n temporary_path_class:\n Optional. The concrete :py:class:`.atomicity_types.TemporaryPath` class to\n be used by the underlying :py:class:`.Checkpointer`.\n save_decision_policy: An object used to determine when a checkpoint should be\n saved. If provided, overrides any other options dealing with this subject,\n including `save_interval_steps`, `save_on_steps`, and `should_save_fn`, and\n is the sole means of determining when a checkpoint should be saved. If not\n provided, these other options are used instead. Prefer to use this option\n over others.\n preservation_policy: An object used to determine which checkpoints to\n preserve. If provided, overrides any other options dealing with this\n subject, including `max_to_keep`, `keep_time_interval`, `keep_period`, and\n `should_keep_fn`, `best_fn`, and is the sole means of determining which\n checkpoints to preserve. If not provided, these other options are used\n instead. Prefer to use this option over others.\n prevent_write_metrics: False by default. If True, metrics will not be written.\n enable_should_save_is_saving_in_progress_check: True by default. If False,\n `should_save_fn` will not check `is_saving_in_progress`, and will assume\n that no save is in progress. This only affects users of\n `ContinuousCheckpointingPolicy` - otherwise the value is ignored.\n This is an interim workaround for b/428061876. Do not use\n without explicit approval.\n """"""\n\n save_interval_steps: int = 1\n max_to_keep: Optional[int] = None\n keep_time_interval: Optional[datetime.timedelta] = None\n keep_period: Optional[int] = None\n should_keep_fn: Optional[Callable[[int], bool]] = None\n best_fn: Optional[Callable[[PyTree], float]] = None\n best_mode: str = 'max'\n keep_checkpoints_without_metrics: bool = True\n step_prefix: Optional[str] = None\n step_format_fixed_length: Optional[int] = None\n step_name_format: Optional[step_lib.NameFormat[step_lib.Metadata]] = None\n create: bool = True\n cleanup_tmp_directories: bool = False\n save_on_steps: Optional[Container[int]] = None\n single_host_load_and_broadcast: bool = False\n todelete_subdir: Optional[str] = None\n enable_hns_rmtree: bool = False\n enable_background_delete: bool = False\n read_only: bool = False\n enable_async_checkpointing: bool = True\n async_options: Optional[AsyncOptions] = None\n multiprocessing_options: MultiprocessingOptions = dataclasses.field(\n default_factory=MultiprocessingOptions\n )\n should_save_fn: Optional[Callable[[int, Optional[int]], bool]] = None\n file_options: FileOptions = dataclasses.field(default_factory=FileOptions)\n save_root_metadata: bool = True\n temporary_path_class: Optional[Type[atomicity_types.TemporaryPath]] = None\n save_decision_policy: Optional[\n save_decision_policy_lib.SaveDecisionPolicy\n ] = None\n preservation_policy: Optional[preservation_policy_lib.PreservationPolicy] = (\n None\n )\n prevent_write_metrics: bool = False\n # TODO(b/428061876) Remove this option.\n enable_should_save_is_saving_in_progress_check: bool = True\n\n def __post_init__(self):\n step_name_format_single_host_load_and_broadcast = (\n hasattr(self.step_name_format, 'single_host_load_and_broadcast')\n and self.step_name_format.single_host_load_and_broadcast\n )\n if self.single_host_load_and_broadcast and self.step_name_format:\n if not step_name_format_single_host_load_and_broadcast:\n raise ValueError(\n '`CheckpointManagerOptions.single_host_load_and_broadcast=True`'\n ' requires `step_name_format.single_host_load_and_broadcast` to be'\n ' set to True.'\n )\n if (\n step_name_format_single_host_load_and_broadcast\n and not self.single_host_load_and_broadcast\n ):\n raise ValueError(\n '`step_name_format.single_host_load_and_broadcast=True` but'\n ' `CheckpointManagerOptions.single_host_load_and_broadcast=False`.'\n ' Please set'\n ' CheckpointManagerOptions.single_host_load_and_broadcast=True.'\n )\n if self.best_mode not in ('min', 'max'):\n msg = (\n ""`CheckpointManagerOptions.best_mode` must be one of None, 'min' ""\n f""or 'max'. Got {self.best_mode}.""\n )\n raise ValueError(msg)\n if (\n self.preservation_policy is None\n and self.max_to_keep is not None\n and self.max_to_keep < 0\n ):\n raise ValueError('Setting of `max_to_keep` must be None or non-negative.')\n if self.read_only and self.save_interval_steps > 0:\n self.save_interval_steps = 0\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting'\n ' save_interval_steps=0.'\n )\n if self.read_only and self.max_to_keep is not None:\n self.max_to_keep = None\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting max_to_keep=None.'\n )\n if self.read_only and self.keep_time_interval is not None:\n self.keep_time_interval = None\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting'\n ' keep_time_interval=None.'\n )\n if self.read_only and self.keep_period is not None:\n self.keep_period = None\n self.should_keep_fn = None\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting keep_period=None'\n ' and should_keep_fn=None.'\n )\n if self.read_only and self.create:\n self.create = False\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting create=False.'\n )\n if self.read_only and self.cleanup_tmp_directories:\n self.cleanup_tmp_directories = False\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting'\n ' cleanup_tmp_directories=False.'\n )\n if self.read_only and self.save_on_steps:\n self.save_on_steps = None\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting save_on_steps=None.'\n )\n if self.read_only and self.todelete_subdir is not None:\n self.todelete_subdir = None\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting'\n ' todelete_subdir=None.'\n )\n if self.read_only and self.should_save_fn is not None:\n self.should_save_fn = None\n logging.warning(\n 'CheckpointManagerOptions.read_only=True, setting'\n ' should_save_fn=None.'\n )\n if self.preservation_policy is None and self.should_keep_fn is not None:\n logging.warning(\n 'CheckpointManagerOptions.should_keep_fn is set, setting'\n ' keep_period=None (was %s).',\n self.keep_period,\n )\n self.keep_period = None\n self.save_on_steps = frozenset(self.save_on_steps or ())\n\n\ndef _get_args_for_key(\n handler: CheckpointHandler, item_name: str\n) -> Tuple[Type[CheckpointArgs], Type[CheckpointArgs]]:\n """"""Returns the (save, restore) args for the given item name.""""""\n\n if not isinstance(handler, CompositeCheckpointHandler):\n raise ValueError(\n 'Expected handler to be a `CompositeCheckpointHandler`, but got'\n f' {type(handler)}.'\n )\n\n registry = handler._handler_registry # pylint: disable=protected-access\n for (registered_item, _), handler in registry.get_all_entries().items():\n if registered_item == item_name:\n return checkpoint_args.get_registered_args_cls(handler)\n raise ValueError(f'Unknown key ""{item_name}"" in CompositeCheckpointHandler.')\n\n\ndef _create_root_directory(\n directory: epath.PathLike,\n multiprocessing_options: MultiprocessingOptions,\n file_options: Optional[FileOptions] = None,\n) -> None:\n """"""Creates the top-level directory if it does not already exist.""""""\n if multiprocessing_options.active_processes is not None:\n raise NotImplementedError(\n 'Option `create=True` with `active_processes` set is not'\n ' supported. Please create the root directory yourself.'\n )\n directory = epath.Path(directory)\n if not directory.exists() and utils.is_primary_host(\n multiprocessing_options.primary_host\n ):\n # exists_ok=True is required, see b/362903314.\n directory.mkdir(parents=True, exist_ok=True)\n logging.info('Created directory=%s', directory)\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'CheckpointManager:create_directory',\n prefix=multiprocessing_options.barrier_sync_key_prefix,\n # suffix=None,\n ),\n timeout=multihost.DIRECTORY_CREATION_TIMEOUT,\n processes=multiprocessing_options.active_processes,\n )\n\n\ndef determine_default_item_mode_from_args(\n args: args_lib.CheckpointArgs,\n) -> bool:\n if isinstance(args, args_lib.Composite):\n return False\n else:\n return True\n\n\ndef _determine_default_item_mode_from_directory(step_path: epath.Path) -> bool:\n return (step_path / DEFAULT_ITEM_NAME).exists()\n\n\nclass CheckpointManager(AbstractCheckpointManager, epy.ContextManager):\n """"""A generic, synchronous AbstractCheckpointManager implementation.""""""\n\n def __init__(\n self,\n directory: epath.PathLike,\n checkpointers: Optional[\n Union[AbstractCheckpointer, CheckpointersDict]\n ] = None,\n options: Optional[CheckpointManagerOptions] = None,\n metadata: Optional[Mapping[str, Any]] = None,\n item_names: Optional[Sequence[str]] = None,\n item_handlers: Optional[\n Union[CheckpointHandler, CheckpointHandlersDict]\n ] = None,\n logger: Optional[abstract_logger.AbstractLogger] = None,\n handler_registry: Optional[CheckpointHandlerRegistry] = None,\n ):\n """"""CheckpointManager constructor.\n\n IMPORTANT: `CheckpointManager` has been refactored to provide a new API.\n Please ensure you have migrated all existing use cases to the newer style by\n August 1st, 2024. Please see\n https://orbax.readthedocs.io/en/latest/guides/checkpoint/api_refactor.html\n for technical details.\n\n The `CheckpointManager` is ultimately backed by a single\n :py:class:`.Checkpointer`, to which saving and restoring is delegated.\n Behind\n step management options, metrics-related logic, and other frills, saving and\n restoring with `CheckpointManager` is quite similar to using\n `Checkpointer(CompositeCheckpointHandler)`.\n\n Example::\n\n # Multiple items.\n with CheckpointManager(\n 'path/to/dir/',\n metadata={'version': 1.1, 'lang': 'en'},\n ) as mngr:\n mngr.save(0, args=args.Composite(\n train_state=args.StandardSave(train_state),\n custom_metadata=args.JsonSave(custom_metadata),\n )\n )\n restored = mngr.restore(0)\n print(restored.train_state)\n print(restored.custom_metadata)\n restored = mngr.restore(0, args=args.Composite(\n train_state=args.StandardRestore(abstract_train_state),\n )\n )\n print(restored.train_state)\n print(restored.custom_metadata) # Error, not restored\n\n # Single, unnamed (default) item.\n with CheckpointManager(\n 'path/to/dir/',\n options = CheckpointManagerOptions(max_to_keep=5, ...),\n ) as mngr:\n mngr.save(0, args=StandardSave(train_state))\n train_state = mngr.restore(0)\n train_state = mngr.restore(0,\n args=StandardRestore(abstract_train_state))\n\n IMPORTANT: Don't forget to use the keyword `args=...` for save and restore!\n Otherwise you will get the legacy API. This will not be necessary forever,\n but only until the legacy API is removed.\n\n IMPORTANT: The CheckpointManager is designed to be used as a context\n manager. Use `with CheckpointManager` schematic for automatic cleanup. If\n you can't use a context manager, always call `close()` to release resources\n properly. Otherwise, background operations such as deleting old checkpoints\n might not finish before your program exits.\n\n CheckpointManager:\n - is NOT thread-safe.\n - IS multi-process-safe.\n - is NOT multi-job-safe.\n This means that CheckpointManager is intended to be created and called\n across all processes within a single job, where each process is\n single-threaded, but is not safe to use when multiple jobs each have\n CheckpointManager instances pointing to the same root directory. Concretely,\n this means that if you have a trainer job and one or more evaluator jobs,\n the CheckpointManager should be created and called across all processes\n in the trainer, but a CheckpointManager cannot be used in the evaluators.\n Instead, utilities used during evaluation can be found in\n `checkpoint_utils` (see\n https://orbax.readthedocs.io/en/latest/api_reference/checkpoint.checkpoint_utils.html).\n\n Args:\n directory: the top level directory in which to save all files.\n checkpointers: deprecated, do not use. use `handler_registry` instead.\n options: CheckpointManagerOptions. May be provided to specify additional\n arguments. If None, uses default values of CheckpointManagerOptions.\n metadata: High-level metadata that does not depend on step number. If\n `directory` is write enabled then given metadata is saved only once. A\n new CheckpointManager instance with that `directory` does not overwrite\n the existing metadata and ignores the current given metadata. If\n `directory` is read-only then the current given metadata is not saved as\n expected. A CheckpointManager instance with a read-only `directory` uses\n the metadata if already present, otherwise always uses the current given\n metadata.\n item_names: deprecated, do not use. use `handler_registry` instead.\n item_handlers: deprecated, do not use. use `handler_registry` instead.\n logger: A logger to log checkpointing events.\n handler_registry: A registry of handlers to use for checkpointing. This\n option is mutually exclusive with `checkpointers`,`item_handlers`, and\n 'item_names'. See :py:class:`CheckpointHandlerRegistry` for more\n details.\n """"""\n jax.monitoring.record_event('/jax/orbax/checkpoint_manager/init')\n logging.info(\n '[process=%s][thread=%s] CheckpointManager init: checkpointers=%s,'\n ' item_names=%s, item_handlers=%s, handler_registry=%s',\n multihost.process_index(),\n threading.current_thread().name,\n checkpointers,\n item_names,\n item_handlers,\n handler_registry,\n )\n\n self._options = options or CheckpointManagerOptions()\n self._multiprocessing_options = self._options.multiprocessing_options\n self._save_decision_policy = (\n self._options.save_decision_policy\n or _get_default_save_decision_policy(self._options)\n )\n\n if self._options.preservation_policy and (\n self._options.keep_time_interval\n or self._options.max_to_keep\n or self._options.keep_period\n or self._options.should_keep_fn\n ):\n raise ValueError(\n '`preservation_policy` and `delete options` are mutually exclusive'\n ' - do not use together.'\n )\n\n self._preservation_policy = (\n self._options.preservation_policy\n or _get_default_preservation_policy(self._options)\n )\n\n if self._options.best_mode not in ['min', 'max']:\n raise ValueError('`best_mode` must be one of: ""min"", ""max""')\n\n self._logger = logger or standard_logger.StandardLogger()\n\n if checkpointers and item_names:\n raise ValueError(\n '`item_names` and `checkpointers` are mutually exclusive - do not use'\n ' together.'\n )\n if checkpointers and item_handlers:\n raise ValueError(\n '`item_handlers` and `checkpointers` are mutually exclusive - do not'\n ' use together.'\n )\n if item_names and isinstance(item_handlers, CheckpointHandler):\n raise ValueError(\n '`item_handlers` in default item mode and `item_names` should not be'\n ' provided together.'\n )\n if checkpointers is not None and handler_registry is not None:\n raise ValueError(\n 'Deprecated `checkpointers` can not be used with `handler_registry`.'\n ' Please follow the instructions at'\n ' https://orbax.readthedocs.io/en/latest/api_refactor.html to'\n ' migrate.'\n )\n\n if item_handlers is not None and handler_registry is not None:\n raise ValueError(\n '`item_handlers` and `handler_registry` are mutually exclusive -'\n ' prefer configuring the handler registry.'\n )\n\n if item_names is not None and handler_registry is not None:\n raise ValueError(\n '`item_names` and `handler_registry` are mutually exclusive - prefer'\n ' configuring the handler registry.'\n )\n\n # For async_checkpointer.\n self._non_blocking_metadata_store = checkpoint.metadata_store(\n enable_write=True\n )\n # For metadata checkpointer and regular checkpointer.\n self._blocking_metadata_store = checkpoint.metadata_store(\n enable_write=True, blocking_write=True\n )\n\n self._default_item = threading_lib.OptionalRef[bool]()\n if checkpointers is not None:\n jax.monitoring.record_event(\n '/jax/orbax/deprecation/checkpoint_manager_legacy_init'\n )\n logging.warning(\n 'Configured `CheckpointManager` using deprecated legacy API. Please'\n ' follow the instructions at'\n ' https://orbax.readthedocs.io/en/latest/api_refactor.html to'\n ' migrate.'\n )\n self._default_item.set(isinstance(checkpointers, AbstractCheckpointer))\n self._checkpointer = self._configure_checkpointer_legacy_init(\n checkpointers, self._options\n )\n elif handler_registry is not None:\n # There is no way to know if this is a single, unnamed (default) item or\n # not, detemine this lazily instead on the first call to `save`, `restore`\n # or `item_metadata`. Once locked-in, the value of `_default_item` will\n # not change.\n self._default_item.set(None)\n self._checkpointer = self._configure_checkpointer_from_handler_registry(\n handler_registry,\n self._options,\n )\n elif item_names is None and item_handlers is None:\n # In this case, we can just default construct the\n # CheckpointHandlerRegistry and allow the user to lazily specify default\n # vs. multi-item mode.\n self._default_item.set(None)\n handler_registry = handler_registration.DefaultCheckpointHandlerRegistry()\n self._checkpointer = self._configure_checkpointer_from_handler_registry(\n handler_registry,\n self._options,\n )\n else:\n default_item = isinstance(item_handlers, CheckpointHandler)\n self._default_item.set(default_item)\n self._checkpointer = (\n self._configure_checkpointer_from_item_names_and_handlers(\n item_names,\n item_handlers,\n self._options,\n default_item,\n )\n )\n\n if (\n self._options.async_options is not None\n and self._options.async_options.post_finalization_callback is not None\n and not isinstance(self._checkpointer, AsyncCheckpointer)\n ):\n raise ValueError(\n 'AsyncOptions.post_finalization_callback is only supported with'\n ' AsyncCheckpointer. But final resolved checkpointer is: '\n f' {self._checkpointer}'\n )\n\n self._directory = epath.Path(directory)\n self._save_tracker = synchronization.OpTrackerFactory.create_tracker(\n 'checkpoint_manager_save'\n )\n if self._options.read_only:\n logging.warning('Given directory is read only=%s', self._directory)\n if self._options.create:\n _create_root_directory(\n self._directory,\n self._multiprocessing_options,\n self._options.file_options,\n )\n\n\n # Cleanup directories from previous runs that may not have been finalized.\n if self._options.cleanup_tmp_directories:\n self._cleanup_tmp_directories()\n\n self._step_name_format = (\n self._options.step_name_format\n or step_lib.standard_name_format(\n step_prefix=self._options.step_prefix,\n step_format_fixed_length=self._options.step_format_fixed_length,\n single_host_load_and_broadcast=(\n self._options.single_host_load_and_broadcast\n ),\n )\n )\n\n self._checkpoints = checkpoint_info.CheckpointInfos(\n self._load_checkpoint_infos()\n )\n\n self._metadata_dir = self.directory / METADATA_ITEM_NAME\n if self._options.read_only and not self._metadata_dir.exists():\n custom_metadata = {} if metadata is None else dict(metadata)\n else:\n custom_metadata = None\n self._root_metadata = threading_lib.Ref(\n RootMetadata(\n custom_metadata=custom_metadata,\n )\n )\n\n self._maybe_save_root_metadata(metadata)\n\n # TODO: b/359854428 - Move Finalize biz logic to a separate class/module.\n self._finalize_thread = threading_lib.OptionalRef[_FinalizeThread]()\n\n self._checkpoint_deleter: deleter.CheckpointDeleter = (\n deleter.create_checkpoint_deleter(\n self._multiprocessing_options.primary_host,\n self._directory,\n self._options.todelete_subdir,\n self._step_name_format,\n self._options.enable_hns_rmtree,\n self._options.enable_background_delete,\n )\n )\n\n logging.info(\n '[process=%s][thread=%s] CheckpointManager created, primary_host=%s,'\n ' CheckpointManagerOptions=%s, root_directory=%s: %s',\n multihost.process_index(),\n threading.current_thread().name,\n self._multiprocessing_options.primary_host,\n self._options,\n self.directory,\n self,\n )\n\n def _create_thread_safe_barrier_sync_fn(self) -> Callable[[str], None]:\n """"""Returns a barrier sync function to be called from threads.\n\n The function accepts a key, but the timeout is already set up using\n `AsyncOptions.timeout_secs` attribute.\n\n The Jax based barrier sync util, `sync_global_devices`, should not be called\n concurrently. Otherwise, it may cause a deadlock.\n\n In general, any Jax function with `collectives` should not be called\n concurrently to avoid deadlocks.\n """"""\n async_options = self._options.async_options or AsyncOptions()\n timeout_secs = async_options.timeout_secs\n barrier_sync_fn = (\n async_options.barrier_sync_fn\n or multihost.get_barrier_sync_fn(\n processes=self._multiprocessing_options.active_processes\n )\n )\n return lambda key: barrier_sync_fn(key=key, timeout_ms=timeout_secs * 1000)\n\n def _configure_checkpointer_common(\n self,\n handler: CompositeCheckpointHandler,\n options: CheckpointManagerOptions,\n use_async: bool,\n ) -> Checkpointer:\n if use_async:\n return async_checkpointer.AsyncCheckpointer(\n handler,\n multiprocessing_options=options.multiprocessing_options,\n async_options=options.async_options or AsyncOptions(),\n file_options=options.file_options,\n checkpoint_metadata_store=self._non_blocking_metadata_store,\n temporary_path_class=options.temporary_path_class,\n )\n else:\n return Checkpointer(\n handler,\n multiprocessing_options=options.multiprocessing_options,\n file_options=options.file_options,\n checkpoint_metadata_store=self._blocking_metadata_store,\n temporary_path_class=options.temporary_path_class,\n )\n\n def _configure_checkpointer_legacy_init(\n self,\n checkpointers: Union[AbstractCheckpointer, CheckpointersDict],\n options: CheckpointManagerOptions,\n ) -> Checkpointer:\n """"""Initializes _CompositeCheckpointer with legacy style checkpointers.""""""\n if self._multiprocessing_options.primary_host != 0:\n raise ValueError(\n f'`primary_host`={self._multiprocessing_options.primary_host} is not'\n ' supported in legacy API.'\n )\n\n item_handlers = {}\n if isinstance(checkpointers, Checkpointer):\n use_async = is_async_checkpointer(checkpointers)\n if isinstance(checkpointers, async_checkpointer.AsyncCheckpointer):\n async_timeout = checkpointers._async_manager._timeout_secs # pylint: disable=protected-access\n else:\n async_timeout = None\n item_handlers[DEFAULT_ITEM_NAME] = checkpointers.handler\n elif isinstance(checkpointers, dict):\n individual_use_async = []\n async_timeout = 0\n for item_name, checkpointer in checkpointers.items():\n if not isinstance(checkpointer, Checkpointer):\n raise ValueError(\n f'Value corresponding to {item_name} in `checkpointers` is not a'\n f' Checkpointer. Found {type(checkpointer)}.'\n )\n individual_use_async.append(is_async_checkpointer(checkpointer))\n if isinstance(checkpointer, async_checkpointer.AsyncCheckpointer):\n async_timeout = max(\n async_timeout, checkpointer._async_manager._timeout_secs # pylint: disable=protected-access\n )\n if item_name in RESERVED_ITEM_NAMES:\n raise ValueError(\n f'Found {item_name} in `checkpointers`; this is a reserved key.'\n )\n item_handlers[item_name] = checkpointer.handler\n if any(individual_use_async) and not all(individual_use_async):\n logging.error(\n 'Orbax `CheckpointManager` is transitioning toward using'\n ' asynchronous saving logic under the hood in all cases. Users that'\n ' configure `CheckpointManager` with some `Checkpointer`s and some'\n ' `AsyncCheckpointer`s will now see asynchronous logic used to save'\n ' all items. This may result in breakages if the code is assuming'\n ' that certain objects will be available immediately after saving.'\n ' Ensure that if you depend on the result of `save` being fully'\n ' written at a particular moment, use `wait_until_finished()`.'\n )\n use_async = any(individual_use_async)\n async_timeout = async_timeout or None\n else:\n raise ValueError(\n f'Invalid type for `checkpointers`. Found {checkpointers}.'\n )\n\n item_handlers[METRIC_ITEM_NAME] = self._metrics_handler\n if options.async_options is None:\n options.async_options = (\n AsyncOptions(timeout_secs=async_timeout)\n if async_timeout is not None\n else AsyncOptions()\n )\n return self._configure_checkpointer_common(\n CompositeCheckpointHandler(\n composite_options=composite_checkpoint_handler.CompositeOptions(\n multiprocessing_options=options.multiprocessing_options,\n file_options=options.file_options,\n async_options=options.async_options,\n ),\n **item_handlers,\n ),\n options,\n use_async,\n )\n\n\n def _configure_checkpointer_from_item_names_and_handlers(\n self,\n item_names: Optional[Sequence[str]],\n item_handlers: Optional[Union[CheckpointHandler, CheckpointHandlersDict]],\n options: CheckpointManagerOptions,\n default_item: bool,\n ) -> Checkpointer:\n """"""Initializes _CompositeCheckpointer given `item_names`.""""""\n if (\n self._multiprocessing_options.primary_host is None\n and item_handlers is None\n ):\n raise ValueError(\n 'When primary_host is set to None, item_handlers must be provided to'\n ' match with the primary_host setting.'\n )\n if default_item:\n item_handler = (\n item_handlers\n if isinstance(item_handlers, CheckpointHandler)\n else None\n )\n all_item_handlers = {DEFAULT_ITEM_NAME: item_handler}\n else:\n # Initialize all_item_handlers with None or empty.\n if item_names:\n all_item_handlers = {item_name: None for item_name in item_names}\n else:\n all_item_handlers = {}\n # Update all_item_handlers with provided CheckpointHandlers.\n if item_handlers and isinstance(item_handlers, Mapping):\n for item_name, handler in item_handlers.items():\n all_item_handlers[item_name] = handler\n\n for item_name in all_item_handlers:\n if item_name in RESERVED_ITEM_NAMES:\n raise ValueError(\n f'Found {item_name} in `checkpointers`; this is a reserved key.'\n )\n all_item_handlers[METRIC_ITEM_NAME] = self._metrics_handler\n # CompositeCheckpointHandler defers per-item handler creation until\n # save/restore time.\n async_options = options.async_options or AsyncOptions()\n async_options.create_directories_asynchronously &= (\n options.enable_async_checkpointing\n )\n return self._configure_checkpointer_common(\n CompositeCheckpointHandler(\n composite_options=composite_checkpoint_handler.CompositeOptions(\n multiprocessing_options=options.multiprocessing_options,\n file_options=options.file_options,\n async_options=async_options,\n ),\n **all_item_handlers,\n ),\n options,\n options.enable_async_checkpointing,\n )\n\n def _configure_checkpointer_from_handler_registry(\n self,\n handler_registry: CheckpointHandlerRegistry,\n options: CheckpointManagerOptions,\n ) -> Checkpointer:\n """"""Initializes _CompositeCheckpointer given a `handler_registry`.""""""\n metrics_handler = self._metrics_handler\n if not handler_registry.has(METRIC_ITEM_NAME, args_lib.JsonSave):\n handler_registry.add(METRIC_ITEM_NAME, args_lib.JsonSave, metrics_handler)\n if not handler_registry.has(METRIC_ITEM_NAME, args_lib.JsonRestore):\n handler_registry.add(\n METRIC_ITEM_NAME, args_lib.JsonRestore, metrics_handler\n )\n\n # CompositeCheckpointHandler defers per-item handler creation until\n # save/restore time.\n async_options = options.async_options or AsyncOptions()\n async_options.create_directories_asynchronously &= (\n options.enable_async_checkpointing\n )\n return self._configure_checkpointer_common(\n CompositeCheckpointHandler(\n composite_options=composite_checkpoint_handler.CompositeOptions(\n multiprocessing_options=options.multiprocessing_options,\n async_options=async_options,\n ),\n handler_registry=handler_registry,\n ),\n options,\n options.enable_async_checkpointing,\n )\n\n @property\n def directory(self) -> epath.Path:\n """"""Returns the top-level directory containing checkpoints for all items.""""""\n return self._directory\n\n def all_steps(self, read: bool = False) -> Sequence[int]:\n """"""Returns all steps tracked by the manager.\n\n Args:\n read: If True, forces a read directly from the storage location.\n Otherwise, a cached result can be returned.\n\n Returns:\n A sequence of steps (integers)\n """"""\n if read:\n logging.warning(\n '`read` option is deprecated. Use `reload` to read from disk.'\n )\n self._checkpoints.set(self._load_checkpoint_infos())\n return [ckpt.step for ckpt in self._checkpoints]\n\n def latest_step(self) -> Optional[int]:\n """"""Returns the latest step saved.\n\n Returns None if no steps have been saved.\n\n Returns:\n A step (int) or None if no steps are present.\n """"""\n latest = self._checkpoints.latest()\n return latest.step if latest else None\n\n def best_step(self) -> Optional[int]:\n """"""Returns the best step saved, as defined by `options.best_fn`.\n\n Returns None if no steps have been saved.\n\n Returns:\n A step (int) or None if no steps are present.\n """"""\n if not self._track_best:\n return self.latest_step()\n if self._checkpoints.empty():\n return None\n _, sorted_checkpoints = self._sort_checkpoints_by_metrics(self._checkpoints)\n if not sorted_checkpoints:\n return None\n return sorted_checkpoints[-1].step\n\n def reload(self):\n """"""Reloads internal properties.\n\n Resets internal cache of checkpoint steps, in case the directory managed\n by this object has been updated externally.\n """"""\n self._checkpoints.set(self._load_checkpoint_infos())\n\n def reached_preemption(self, step: int) -> bool:\n """"""Returns True if a preemption sync point has been reached.""""""\n return utils.reached_preemption(step)\n\n def should_save(self, step: int) -> bool:\n """"""Returns True if a checkpoint should be saved for the current step.\n\n This depends the previous step and SaveDecisionPolicy.\n\n Args:\n step: int\n\n Returns:\n True if the checkpoint should be saved.\n """"""\n if self._options.read_only:\n logging.warning('%s is read only, save will be skipped', self.directory)\n return False\n last_checkpoint_step = self.latest_step()\n # Ensure current step is between the last step and next step (accounting for\n # save interval).\n if last_checkpoint_step is not None and last_checkpoint_step >= step:\n return False\n\n if self._options.enable_should_save_is_saving_in_progress_check:\n is_saving_in_progress = self.is_saving_in_progress()\n else:\n is_saving_in_progress = False\n reached_preemption = self.reached_preemption(step)\n current_step_info = checkpoint_info.CheckpointInfo(\n step=step,\n time=datetime.datetime.now(tz=datetime.timezone.utc),\n metrics=None,\n )\n context = save_decision_policy_lib.DecisionContext(\n is_saving_in_progress=is_saving_in_progress,\n reached_preemption=reached_preemption,\n multiprocessing_options=self._multiprocessing_options,\n )\n return self._save_decision_policy.should_save(\n current_step_info, previous_steps=self._checkpoints, context=context\n )\n\n def _get_save_directory(\n self,\n step: int,\n directory: epath.Path,\n ) -> epath.Path:\n """"""Returns the standardized path to a save directory for a single item.""""""\n\n return step_lib.build_step_path(directory, self._step_name_format, step)\n\n def _get_write_step_directory(\n self, step: int, root_dir: epath.Path\n ) -> epath.Path:\n return self._get_save_directory(step, root_dir)\n\n def _get_read_step_directory(\n self, step: int, root_dir: epath.Path\n ) -> epath.Path:\n if self._options.step_name_format is not None:\n return self._options.step_name_format.find_step(root_dir, step).path\n else:\n return self._get_save_directory(step, root_dir)\n\n def delete(self, step: int):\n """"""See superclass documentation.\n\n Delete can be run asynchronously if\n CheckpointManagerOptions.enable_background_delete is set to True.\n\n Args:\n step: The step to delete.\n\n Raises:\n FileNotFoundError: If the step does not exist.\n """"""\n if self._options.read_only:\n logging.warning('%s is read only, delete will be skipped', self.directory)\n return\n if step not in self.all_steps():\n raise FileNotFoundError(\n f'Requested deleting a non-existent step: {step}.'\n )\n self._checkpoint_deleter.delete(step)\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'CheckpointManager:deleted_step',\n prefix=self._multiprocessing_options.barrier_sync_key_prefix,\n # suffix=str(step),\n ),\n timeout=multihost.DIRECTORY_DELETION_TIMEOUT,\n processes=self._multiprocessing_options.active_processes,\n )\n self._checkpoints.delete_if(lambda info: info.step == step)\n\n def _validate_args(\n self,\n items: Optional[Union[Any, Mapping[str, Any]]],\n args: Optional[args_lib.CheckpointArgs],\n ):\n if isinstance(items, args_lib.CheckpointArgs):\n raise ValueError(\n 'Found an instance of `CheckpointArgs` provided for `items`. This may'\n ' be due to misuse of the newer API - make sure to specify the'\n ' argument keyword (e.g. `args=args`).'\n )\n if args is not None:\n if not isinstance(args, args_lib.CheckpointArgs):\n raise ValueError(\n f'Expected args of type `CheckpointArgs`; found {type(args)}.'\n )\n if self._default_item.get():\n if isinstance(args, args_lib.Composite):\n raise ValueError(\n 'Cannot provide `args` of type `Composite` when dealing with a'\n ' single, unnamed (default) checkpointable object.'\n )\n else:\n if not isinstance(args, args_lib.Composite):\n raise ValueError(\n 'Must provide `args` of type `Composite` when dealing with'\n ' multiple checkpointable objects.'\n )\n\n def save(\n self,\n step: int,\n items: Optional[Union[Any, Mapping[str, Any]]] = None,\n save_kwargs: Optional[Union[SaveParams, Mapping[str, SaveParams]]] = None,\n metrics: Optional[PyTree] = None,\n force: Optional[bool] = False,\n args: Optional[args_lib.CheckpointArgs] = None,\n custom_metadata: dict[str, Any] | None = None,\n ) -> bool:\n """"""Saves the provided items.\n\n This method should be called by all hosts - process synchronization and\n actions that need to be performed on only one host are managed internally.\n\n NOTE: The `items` and `save_kwargs` arguments are deprecated, use `args`\n instead. Make sure to configure `CheckpointManager` with `item_names`.\n\n `args` should be a subclass of\n `orbax.checkpoint.args.CheckpointArgs`, the specific type of which is used\n to indicate what logic is used to save the object. For a typical, PyTree of\n arrays, use `StandardSave`/`StandardRestore`.\n\n When constructing the `CheckpointManager`, if no `item_names` were provided,\n it is assumed that we are managing a single object. If `item_names` were\n provided, it is assumed that we are managing multiple objects, and `args`\n must be `orbax.checkpoint.args.CompositeArgs`. See below for details.\n\n Example::\n\n # Single item\n mngr = ocp.CheckpointManager(directory)\n mngr.save(step, args=ocp.args.StandardSave(my_train_state))\n\n # Multiple items\n mngr = ocp.CheckpointManager(directory, item_names=('state', 'meta'))\n mngr.save(step, args=ocp.args.Composite(\n state=ocp.args.StandardSave(my_train_state),\n meta=ocp.args.JsonSave(my_metadata)\n ))\n\n Args:\n step: current step, int\n items: a savable object, or a dictionary of object name to savable object.\n save_kwargs: save kwargs for a single Checkpointer, or a dictionary of\n object name to kwargs needed by the Checkpointer implementation to save\n the object.\n metrics: a dictionary of metric name (string) to numeric value to be\n tracked along with this checkpoint. Required if `options.best_fn` is\n set. Allows users to specify a metric value to determine which\n checkpoints are best and should be kept (in conjunction with\n `options.max_to_keep`).\n force: if `True`, this method will attempt to save a checkpoint regardless\n of the result of `AbstractCheckpointManager.should_save(step)`. By\n default, `save` will only write a checkpoint to disk when the options\n permit, e.g. when `step` is in `options.save_interval_steps` or\n `options.save_on_steps`. Setting `force=True` will not overwrite\n existing checkpoints.\n args: `CheckpointArgs` which is used to save checkpointable objects with\n the appropriate logic.\n custom_metadata: a dictionary of custom metadata to be written to the\n checkpoint directory via StepMetadata.\n\n Returns:\n bool indicating whether a save operation was performed.\n Raises:\n ValueError: if `track_best` was indicated but `metrics` is not provided.\n ValueError: directory creation failed.\n ValueError: if an item is provided for which no `Checkpointer` is\n found.\n ValueError: if the checkpoint already exists.\n """"""\n process_index = multihost.process_index()\n step_stats = step_statistics.SaveStepStatistics()\n step_stats.step = step\n step_stats.checkpoint_manager_blocking_start_time = time.time()\n step_stats.directory = str(self.directory)\n\n if items is None and args is None:\n raise ValueError('Must provide `args` for `save`.')\n self._default_item.set_if_none(determine_default_item_mode_from_args(args))\n self._validate_args(items, args)\n if not force and not self.should_save(step):\n return False\n\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'CheckpointManager:save_start',\n prefix=self._multiprocessing_options.barrier_sync_key_prefix,\n ),\n processes=self._multiprocessing_options.active_processes,\n record_event_name=(\n '/jax/orbax/write/checkpoint_start_sync_duration_secs'\n ),\n )\n if self.reached_preemption(step):\n logging.info(\n '[process=%s] Saving checkpoint at step %d due to preemption.',\n process_index,\n step,\n )\n step_stats.reached_preemption = True\n step_stats.preemption_received_at = time.time()\n\n # Wait for ongoing saves to complete. Only applicable if some of the\n # checkpointers are AsyncCheckpointers.\n # Must happen after `should_save` to avoid blocking callers.\n step_stats.wait_for_prev_start_time = time.time()\n self.wait_until_finished()\n step_stats.wait_for_prev_duration_secs = (\n time.time() - step_stats.wait_for_prev_start_time\n )\n\n jax.monitoring.record_event_duration_secs(\n '/jax/checkpoint/write/wait_for_prev_duration_secs',\n step_stats.wait_for_prev_duration_secs,\n )\n self._save_tracker = synchronization.OpTrackerFactory.create_tracker(\n 'checkpoint_manager_save'\n )\n self._save_tracker.start()\n if step in self.all_steps():\n raise StepAlreadyExistsError(\n f'Checkpoint for step {step} already exists.'\n )\n\n if items is None:\n items = {}\n if save_kwargs is None:\n save_kwargs = {}\n if self._default_item.get():\n items = {DEFAULT_ITEM_NAME: items}\n save_kwargs = {DEFAULT_ITEM_NAME: save_kwargs}\n\n if self._track_best and metrics is None:\n logging.warning('Requested `tracked_metric`; did not provide metrics.')\n\n if args is None:\n args_dict = {}\n for key, item in items.items():\n save_ckpt_arg_cls, _ = _get_args_for_key(\n self._checkpointer.handler,\n key,\n )\n extra_args = save_kwargs[key] if key in save_kwargs else {}\n extra_args = extra_args or {}\n args_dict[key] = save_ckpt_arg_cls(item, **extra_args) # pylint: disable=too-many-function-args # pytype: disable=wrong-arg-count\n args = args_lib.Composite(**args_dict)\n else:\n if self._default_item.get():\n args = args_lib.Composite(**{DEFAULT_ITEM_NAME: args})\n else:\n if not isinstance(args, args_lib.Composite):\n raise ValueError(\n f'Expected args of type `Composite`; found {type(args)}.'\n )\n args = typing.cast(args_lib.Composite, args)\n\n args_dict = dict(args.items())\n if any(\n [item_name in RESERVED_ITEM_NAMES for item_name in args_dict.keys()]\n ):\n raise ValueError(\n 'Some provided items have prohibited reserved names:'\n f' {args_dict.keys()}. Reserved names: {RESERVED_ITEM_NAMES}.'\n )\n if (\n metrics is not None and self._track_best\n ) and not self._options.prevent_write_metrics:\n args_dict[METRIC_ITEM_NAME] = args_lib.JsonSave(metrics)\n args = args_lib.Composite(**args_dict)\n\n save_directory = self._get_write_step_directory(step, self.directory)\n logging.info(\n '[process=%s] Saving checkpoint at step %d', process_index, step\n )\n step_stats.checkpointer_blocking_start_time = time.time()\n self._checkpointer.save(\n save_directory, args=args, custom_metadata=custom_metadata, force=True\n )\n step_stats.checkpointer_blocking_duration_secs = (\n time.time() - step_stats.checkpointer_blocking_start_time\n )\n\n self._add_checkpoint_info(step, metrics)\n step_stats.get_old_steps_start_time = time.time()\n steps_to_remove = self._get_old_steps_to_remove()\n step_stats.get_old_steps_duration_secs = (\n time.time() - step_stats.get_old_steps_start_time\n )\n\n jax.monitoring.record_event_duration_secs(\n '/jax/checkpoint/write/get_old_steps_duration_secs',\n step_stats.get_old_steps_duration_secs,\n )\n\n self._checkpoints.delete_if(lambda info: info.step in steps_to_remove)\n # Sync needed to ensure that old steps to remove are retrieved before\n # actually deleting them during finalize, since retrieval can involve\n # looking at the directory.\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'CheckpointManager:old_steps_to_remove',\n prefix=self._multiprocessing_options.barrier_sync_key_prefix,\n # suffix=str(step),\n ),\n processes=self._multiprocessing_options.active_processes,\n )\n\n current_thread = threading.current_thread()\n if is_async_checkpointer(self._checkpointer):\n\n def launch_finalize_thread() -> _FinalizeThread:\n is_finalize_in_progress = self._finalize_thread.map(\n lambda t: t is not None and t.is_alive()\n )\n assert not is_finalize_in_progress, (\n 'Save finalization already in progress for'\n f' step={self._finalize_thread.get_not_none().step()}'\n )\n finalize_thread_name = 'save_finalize'\n logging.info(\n '[process=%s][thread=%s][step=%s] Starting CheckpointManager Save'\n ' Finalize thread=%s',\n process_index,\n current_thread.name,\n step,\n finalize_thread_name,\n )\n finalize_thread = _FinalizeThread(\n step=step,\n name=finalize_thread_name,\n target=self._finalize,\n args=(step, steps_to_remove),\n )\n finalize_thread.start()\n return finalize_thread\n\n self._finalize_thread.set_from(launch_finalize_thread)\n\n else:\n self._finalize(step, steps_to_remove)\n logging.info(\n '[process=%s][thread=%s][step=%s] Finished synchronous save.',\n process_index,\n current_thread.name,\n step,\n )\n\n step_stats.synchronous = not is_async_checkpointer(self._checkpointer)\n step_stats.checkpoint_manager_blocking_duration_secs = (\n time.time() - step_stats.checkpoint_manager_blocking_start_time\n )\n self._logger.log_entry(dataclasses.asdict(step_stats))\n return True\n\n def _maybe_get_default_item(\n self, composite_result: args_lib.Composite\n ) -> Union[Any, args_lib.Composite]:\n if self._default_item.get():\n if DEFAULT_ITEM_NAME not in composite_result:\n raise ValueError(\n 'Unable to retrieve default item. Please ensure that a handler for'\n ' the default item is registered using `handler_registry` when'\n ' initializing the `CheckpointManager`.'\n )\n return composite_result[DEFAULT_ITEM_NAME]\n return composite_result\n\n def restore(\n self,\n step: Optional[int],\n items: Optional[Union[Any, Mapping[str, Any]]] = None,\n restore_kwargs: Optional[\n Union[RestoreParams, Mapping[str, RestoreParams]]\n ] = None,\n directory: Optional[epath.PathLike] = None,\n args: Optional[args_lib.CheckpointArgs] = None,\n ) -> Union[Any, Mapping[str, Any]]:\n """"""Restores from the given step and provided items.\n\n This method should be called by all hosts - process synchronization and\n actions that need to be performed on only one host are managed internally.\n\n NOTE: The `items` and `restore_kwargs` arguments are deprecated, use `args`\n instead. Make sure to configure `CheckpointManager` with `item_names`.\n See `save` docstring for additional details.\n\n Example::\n\n # Single item\n mngr = ocp.CheckpointManager(directory)\n mngr.restore(step, args=ocp.args.StandardRestore(abstract_train_state))\n\n # Multiple items\n mngr = ocp.CheckpointManager(directory, item_names=('state', 'meta'))\n mngr.restore(step, args=ocp.args.Composite(\n state=ocp.args.StandardRestore(abstract_train_state),\n meta=ocp.args.JsonRestore(),\n ))\n # If it is acceptable to restore without providing additional arguments,\n # and if a save has already been performed, it is ok to do the following:\n mngr.restore(step, args=ocp.args.Composite(state=None, meta=None))\n # If a save has not already been performed, there is no way for Orbax to\n # know how to restore the objects. If a save has already been performed,\n # it remembers the logic used to save the objects.\n\n Args:\n step: current step, int\n items: a restoreable object, or a dictionary of object name to restorable\n object.\n restore_kwargs: restore kwargs for a single Checkpointer, or a dictionary\n of object name to kwargs needed by the Checkpointer implementation to\n restore the object.\n directory: if provided, uses the given directory rather than the\n `directory` property of this class. Can be used to restore checkpoints\n from an independent location.\n args: `CheckpointArgs` which is used to restore checkpointable objects\n with the appropriate logic.\n\n Returns:\n If managing a single item, returns a single checkpointable object.\n If managing multiple items, returns ocp.args.Composite, where the keys\n are item names, and values are checkpointable objects.\n\n Raises:\n FileNotFoundError: If no steps are found in the directory.\n """"""\n if step is None:\n step = self.latest_step()\n if step is None:\n raise FileNotFoundError(f'No steps found in {self.directory}.')\n directory = directory or self.directory\n directory = epath.Path(directory)\n step_stats = step_statistics.RestoreStepStatistics()\n step_stats.step = step\n step_stats.checkpoint_manager_start_time = time.time()\n step_stats.directory = str(directory)\n\n self._default_item.set_if_none(\n _determine_default_item_mode_from_directory(\n self._get_read_step_directory(step, directory)\n )\n )\n self._validate_args(items, args)\n\n if items is None:\n items = {}\n elif self._default_item.get():\n items = {DEFAULT_ITEM_NAME: items}\n if restore_kwargs is None:\n restore_kwargs = {}\n elif self._default_item.get():\n restore_kwargs = {DEFAULT_ITEM_NAME: restore_kwargs}\n\n if args is None:\n args_dict = {}\n item_keys = set(items.keys()) | set(restore_kwargs.keys())\n for key in item_keys:\n _, restore_ckpt_arg_cls = _get_args_for_key(\n self._checkpointer.handler,\n key,\n )\n item = items[key] if key in items else None\n extra_args = restore_kwargs[key] if key in restore_kwargs else {}\n extra_args = extra_args or {}\n args_dict[key] = restore_ckpt_arg_cls(item, **extra_args) # pylint: disable=too-many-function-args # pytype: disable=wrong-arg-count\n args = args_lib.Composite(**args_dict)\n else:\n if self._default_item.get():\n args = args_lib.Composite(**{DEFAULT_ITEM_NAME: args})\n else:\n args = typing.cast(args_lib.Composite, args)\n\n restore_directory = self._get_read_step_directory(step, directory)\n step_stats.checkpointer_start_time = time.time()\n restored = self._checkpointer.restore(restore_directory, args=args)\n step_stats.checkpointer_duration_secs = (\n time.time() - step_stats.checkpointer_start_time\n )\n\n step_stats.checkpoint_manager_duration_secs = (\n time.time() - step_stats.checkpoint_manager_start_time\n )\n self._logger.log_entry(dataclasses.asdict(step_stats))\n\n return self._maybe_get_default_item(restored)\n\n def item_metadata(\n self, step: int\n ) -> Union[Any, args_lib.Composite, ItemMetadata]:\n """"""Retrieves metadata for all known items.\n\n Important note: This method will soon be deprecated in favor of\n `metadata().item_metadata`. Please use that method instead.\n\n Note that metadata will only be returned for items that can actually be\n interpreted. If an item is present in the checkpoint but not registered\n (using a prior save or restore, or with `handler_registry` at init), the\n item will not be returned.\n\n Args:\n step: The step to retrieve metadata for.\n\n Returns:\n Either metadata for the item itself, if in default-item mode, or a\n Composite of metadata for each item.\n """"""\n return self.metadata(step).item_metadata\n\n # TODO(b/370812224): Deprecate in favor of StepMetadata.metrics\n def metrics(self, step: int) -> Optional[PyTree]:\n return self._get_metrics(step)\n\n @property\n def _metrics_handler(self) -> CheckpointHandler:\n return JsonCheckpointHandler(\n filename=METRIC_ITEM_NAME,\n multiprocessing_options=self._multiprocessing_options,\n )\n\n @property\n def _track_best(self):\n """"""Returns true if we should track the best checkpoints by given metric.""""""\n return self._options.best_fn is not None\n\n def _load_checkpoint_infos(self) -> List[CheckpointInfo]:\n """"""Loads a list of CheckpointInfo for existing checkpoints.\n\n If none are present, returns empty list.\n\n Returns:\n a list of CheckpointInfo, sorted by increasing step.\n """"""\n if not self.directory.exists():\n return []\n start = time.time()\n step_metadatas = self._step_name_format.find_all(self.directory)\n\n def build_checkpoint_info(step_metadata):\n return CheckpointInfo(\n step=step_metadata.step,\n time=step_metadata.commit_timestamp,\n metrics=self.metrics(step_metadata.step),\n )\n\n with concurrent.futures.ThreadPoolExecutor() as executor:\n checkpoint_infos = list(\n executor.map(build_checkpoint_info, step_metadatas)\n )\n checkpoint_infos.sort(key=lambda x: x.step) # Prefer in-place sort.\n jax.monitoring.record_event_duration_secs(\n '/jax/checkpoint/read/load_all_step_metadata_duration_secs',\n time.time() - start,\n )\n logging.info(\n 'Found %d checkpoint steps in %s',\n len(checkpoint_infos),\n self.directory,\n )\n return checkpoint_infos\n\n def _add_checkpoint_info(self, step: int, metrics: Optional[PyTree]):\n self._checkpoints.append(\n CheckpointInfo(\n step, datetime.datetime.now(tz=datetime.timezone.utc), metrics\n )\n )\n\n def _root_metadata_file_path(self, legacy: bool = False) -> epath.Path:\n if not self._metadata_dir.exists():\n raise ValueError(\n f'Root Metadata directory is not initialized: {self._metadata_dir}'\n )\n return checkpoint.root_metadata_file_path(self._metadata_dir, legacy=legacy)\n\n def _maybe_save_root_metadata(\n self, custom_metadata: Mapping[str, Any] | None\n ):\n """"""Saves CheckpointManager level metadata, skips if already present.""""""\n if self._options.save_root_metadata:\n if (\n custom_metadata is not None\n and not self._options.read_only\n and utils.is_primary_host(self._multiprocessing_options.primary_host)\n ):\n self._metadata_dir.mkdir(parents=True, exist_ok=True)\n file_path = self._root_metadata_file_path()\n if not file_path.exists(): # May have been created by a previous run.\n metadata_to_save = self._root_metadata.get()\n if custom_metadata is not None:\n metadata_to_save.custom_metadata = dict(custom_metadata)\n self._blocking_metadata_store.write(\n file_path, serialize_root_metadata(metadata_to_save)\n )\n\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'CheckpointManager:save_root_metadata',\n prefix=self._multiprocessing_options.barrier_sync_key_prefix,\n ),\n processes=self._multiprocessing_options.active_processes,\n )\n\n def _get_metrics(self, step: int) -> PyTree | None:\n try:\n # Use handler directly, since this happens in a background thread and\n # barriers cannot be used. This usage pattern is not\n # recommended in other contexts.\n metrics = self._metrics_handler.restore(\n self._get_read_step_directory(step, self.directory) / METRIC_ITEM_NAME\n )\n return metrics\n except FileNotFoundError:\n logging.log_first_n(\n logging.INFO,\n 'Missing metrics for step %d',\n 1, # log only once\n step,\n )\n return None\n\n def _get_step_metadata(self, step: int) -> StepMetadata:\n step_metadata = self._checkpointer.metadata(\n self._get_read_step_directory(step, self.directory),\n )\n\n self._default_item.set_if_none(\n _determine_default_item_mode_from_directory(\n self._get_read_step_directory(step, self.directory)\n )\n )\n step_metadata.item_metadata = self._maybe_get_default_item(\n step_metadata.item_metadata\n )\n\n metrics = self._get_metrics(step)\n if metrics is not None:\n validated_metrics = step_metadata_serialization.deserialize(\n {}, metrics=dict(metrics)\n ).metrics\n step_metadata = dataclasses.replace(\n step_metadata,\n metrics=validated_metrics,\n )\n\n return step_metadata\n\n def _get_root_metadata(self) -> RootMetadata:\n if self._root_metadata.get().custom_metadata is None:\n if self._metadata_dir.exists():\n file_path = self._root_metadata_file_path()\n if not file_path.exists():\n logging.warning(\n 'New root metadata file not found in directory: %s. '\n 'Will try to read legacy file.',\n self._metadata_dir,\n )\n file_path = self._root_metadata_file_path(legacy=True)\n serialized_metadata = self._blocking_metadata_store.read(file_path)\n if serialized_metadata is None:\n raise IOError(f'Failed to read metadata from {file_path}')\n self._root_metadata.set(\n root_metadata_serialization.deserialize(serialized_metadata)\n )\n else:\n self._root_metadata.get().custom_metadata = {}\n return self._root_metadata.get()\n\n @overload\n def metadata(self, step: None = None) -> RootMetadata:\n ...\n\n @overload\n def metadata(self, step: int) -> StepMetadata:\n ...\n\n def metadata(self, step: int | None = None) -> RootMetadata | StepMetadata:\n """"""See superclass documentation.""""""\n if step is not None:\n return self._get_step_metadata(step)\n return self._get_root_metadata()\n\n def _sort_checkpoints_by_metrics(\n self, checkpoints: checkpoint_info.CheckpointInfos\n ) -> Tuple[List[CheckpointInfo], List[CheckpointInfo]]:\n """"""Sorts `checkpoints` in order of increasing metric quality.\n\n Checkpoints without corresponding metrics set will be at the beginning.\n\n Args:\n checkpoints: CheckpointInfos to sort.\n\n Returns:\n Tuple of CheckpointInfo lists:\n (checkpoints_without_metrics, checkpoints_sorted_by_metrics)\n """"""\n without_metrics = [info for info in checkpoints if info.metrics is None]\n with_metrics = [info for info in checkpoints if info.metrics is not None]\n\n return without_metrics, sorted(\n with_metrics,\n key=lambda info: self._options.best_fn(info.metrics),\n reverse=(self._options.best_mode == 'min'),\n )\n\n def _cleanup_tmp_directories(self):\n utils.cleanup_tmp_directories(\n self.directory,\n primary_host=self._multiprocessing_options.primary_host,\n active_processes=self._multiprocessing_options.active_processes,\n barrier_sync_key_prefix=self._multiprocessing_options.barrier_sync_key_prefix,\n )\n\n def _get_old_steps_to_remove(self) -> List[int]:\n """"""Returns checkpoints that should be deleted.""""""\n # This isn't a duration but there isn't a general counter that we can use so\n # we abuse a duration metric to count the number of steps examined.\n jax.monitoring.record_event_duration_secs(\n '/jax/checkpoint/write/old_steps_examined_count',\n self._checkpoints.size(),\n )\n preservation_result = self._preservation_policy.should_preserve(\n [info for info in self._checkpoints],\n context=preservation_policy_lib.PreservationContext(),\n )\n return [\n checkpoint.step\n for checkpoint, should_preserve in zip(\n self._checkpoints, preservation_result\n )\n if not should_preserve\n and (\n self._options.should_keep_fn is None\n or not self._options.should_keep_fn(checkpoint.step)\n )\n ]\n\n def _wait_for_checkpointers(self):\n if is_async_checkpointer(self._checkpointer):\n self._checkpointer.wait_until_finished() # pytype: disable=attribute-error\n\n def wait_until_finished(self):\n """"""Blocks until any incomplete save operations are completed.\n\n Note that this method will typically be a no-op if all checkpointers are\n synchronous, since old checkpoints are already cleaned up immediately after\n completing `save`, and there is no background thread to wait for.\n\n If some checkpointers are of type :py:class:`.AsyncCheckpointer`, however,\n this method will wait until each of these checkpointers is finished.\n """"""\n process_index = multihost.process_index()\n current_thread = threading.current_thread()\n\n if self._finalize_thread.map(\n lambda t: t is None or (not t.is_alive() and t.exception is None)\n ):\n logging.info(\n '[process=%s][thread=%s][wait_until_finished] No Save Finalize'\n ' thread to wait for. Returning.',\n process_index,\n current_thread.name,\n )\n return\n\n step = self._finalize_thread.get_not_none().step()\n finalize_thread_name = self._finalize_thread.get_not_none().name\n try:\n logging.info(\n '[process=%s][thread=%s][step=%s][wait_until_finished] Waiting for'\n ' Save Finalize thread (%s) to complete.',\n process_index,\n current_thread.name,\n step,\n finalize_thread_name,\n )\n # Let all threads join and wait for the finalize thread to complete.\n # Don't call join() with a lock otherwise we will end up serializing the\n # access to the finalize thread.\n self._finalize_thread.get_not_none().join()\n logging.info(\n '[process=%s][thread=%s][step=%s][wait_until_finished] Done'\n ' waiting for Save Finalize thread (%s) running at step=%d.',\n process_index,\n current_thread.name,\n step,\n finalize_thread_name,\n step,\n )\n except BaseException: # pylint:disable=broad-exception-caught\n logging.exception(\n '[process=%s][thread=%s][step=%s][wait_until_finished] Save'\n ' Finalize thread (%s) failed.',\n process_index,\n current_thread.name,\n step,\n finalize_thread_name,\n )\n self._checkpoints.delete_if(lambda info: info.step == step)\n raise\n\n def is_saving_in_progress(self) -> bool:\n """"""Returns whether a checkpoint save is in progress.""""""\n processes_saving = self._save_tracker.get_in_progress_ids()\n logging.vlog(\n 1,\n '[process=%s][is_saving_in_progress] Processes saving: %s',\n multihost.process_index(),\n processes_saving,\n )\n return bool(processes_saving)\n\n def check_for_errors(self):\n """"""Checks for any outstanding errors in completed asynchronous save operations.\n\n Delegates to underlying Checkpointer.\n """"""\n if is_async_checkpointer(self._checkpointer):\n self._checkpointer.check_for_errors() # pytype: disable=attribute-error\n\n def _finalize_checkpoint(self, step: int):\n """"""Executes final actions just before the checkpoint write completes.\n\n * Logs error if any.\n * Records duration saved due to preemption if any.\n\n Args:\n step: finalized checkpoint step.\n """"""\n if utils.is_primary_host(self._multiprocessing_options.primary_host):\n try:\n self.check_for_errors()\n except Exception: # pylint: disable=broad-except\n logging.exception(\n (\n '[step=%s] Checkpointer failed: one or more items may not be'\n ' finalized. Skipping finalization of step checkpoint.'\n ),\n step,\n )\n return None\n # If at a preemption step, record the time since the previous checkpoint.\n # This represents training time that would otherwise have been wasted.\n # If another checkpoint has not been previously saved, measures the time\n # since program start.\n if self.reached_preemption(step):\n if self._checkpoints.size() > 1:\n previous_time = self._checkpoints[-2].time\n else:\n previous_time = _INIT_TIME\n assert not self._checkpoints.empty()\n duration = self._checkpoints[-1].time - previous_time\n jax.monitoring.record_event_duration_secs(\n '/jax/checkpoint/write/preempt/duration_saved_secs',\n duration.total_seconds(),\n )\n\n def _finalize(self, step: int, steps_to_remove: List[int]):\n """"""Finalizes individual items and starts garbage collection.""""""\n process_index = multihost.process_index()\n current_thread = threading.current_thread()\n try:\n self._non_blocking_metadata_store.wait_until_finished()\n self._wait_for_checkpointers()\n # If an error is encountered while waiting for commit futures to complete,\n # we will not proceed past this point.\n self._finalize_checkpoint(step)\n remove_steps_start_time = time.time()\n self._checkpoint_deleter.delete_steps(steps_to_remove)\n jax.monitoring.record_event_duration_secs(\n '/jax/checkpoint/write/remove_steps_duration_secs',\n time.time() - remove_steps_start_time,\n )\n finally:\n self._save_tracker.complete()\n logging.info(\n '[process=%s][thread=%s][step=%s] CheckpointManager Save Finalize is'\n ' syncing with other hosts...',\n process_index,\n current_thread.name,\n step,\n )\n barrier_sync_fn = self._create_thread_safe_barrier_sync_fn()\n barrier_sync_fn(\n multihost.unique_barrier_key(\n 'CheckpointManager:finalize',\n prefix=self._multiprocessing_options.barrier_sync_key_prefix,\n suffix=str(step),\n )\n )\n logging.info(\n '[process=%s][thread=%s][step=%s] CheckpointManager Save Finalize is'\n ' done on all hosts.',\n process_index,\n current_thread.name,\n step,\n )\n\n def close(self):\n """"""Waits for outstanding operations to finish and closes internal objects.""""""\n self.wait_until_finished()\n self._checkpointer.close()\n # Call after checkpointer.close().\n self._non_blocking_metadata_store.close()\n self._blocking_metadata_store.close()\n self._checkpoint_deleter.close()\n\n def __contextmanager__(\n self,\n ) -> Iterable[Self]:\n try:\n yield self\n finally:\n self.close()\n",python,tab
+1720,8076818,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22106,0,"",python,selection_command
+1721,8078964,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22178,0,"",python,selection_command
+1722,8079217,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22245,0,"",python,selection_command
+1723,8079250,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22252,0,"",python,selection_command
+1724,8079274,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22268,0,"",python,selection_command
+1725,8079308,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22280,0,"",python,selection_command
+1726,8079402,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22313,0,"",python,selection_command
+1727,8079403,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22344,0,"",python,selection_command
+1728,8079413,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22401,0,"",python,selection_command
+1729,8079446,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22417,0,"",python,selection_command
+1730,8079479,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22475,0,"",python,selection_command
+1731,8079590,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22527,0,"",python,selection_command
+1732,8079590,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22577,0,"",python,selection_command
+1733,8079598,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22608,0,"",python,selection_command
+1734,8079691,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22667,0,"",python,selection_command
+1735,8079923,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22683,0,"",python,selection_command
+1736,8079980,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22746,0,"",python,selection_command
+1737,8080449,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",26072,0,"",python,selection_command
+1738,8107336,".venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py",22746,0,"",python,selection_command
+1739,8108262,"train_dynamics.py",0,0,"",python,tab
+1740,8108262,"train_dynamics.py",9258,0,"",python,selection_command
+1741,8110809,"train_dynamics.py",10169,0,"",python,selection_command
+1742,8111956,"train_dynamics.py",10202,0,"",python,selection_command
+1743,8112222,"train_dynamics.py",10228,0,"",python,selection_command
+1744,8112233,"train_dynamics.py",10325,0,"",python,selection_command
+1745,8112269,"train_dynamics.py",10388,0,"",python,selection_command
+1746,8112298,"train_dynamics.py",10453,0,"",python,selection_command
+1747,8112467,"train_dynamics.py",10500,0,"",python,selection_command
+1748,8112821,"train_dynamics.py",10546,0,"",python,selection_command
+1749,8113016,"train_dynamics.py",10583,0,"",python,selection_command
+1750,8113085,"train_dynamics.py",10683,0,"",python,selection_command
+1751,8118203,"train_dynamics.py",10768,0,"",python,selection_command
+1752,8118375,"train_dynamics.py",10758,14," ),",python,selection_command
+1753,8118449,"train_dynamics.py",10673,99," dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),",python,selection_command
+1754,8118624,"train_dynamics.py",10573,199," model_state=ocp.args.PyTreeRestore(abstract_optimizer_state, partial_restore=True),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),",python,selection_command
+1755,8118770,"train_dynamics.py",10536,236," args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state, partial_restore=True),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),",python,selection_command
+1756,8126256,"train_dynamics.py",10546,0,"",python,selection_command
+1757,8126869,"train_dynamics.py",0,0,"",python,selection_command
+1758,8127205,"train_dynamics.py",710,0,"",python,selection_command
+1759,8127524,"train_dynamics.py",1598,0,"",python,selection_command
+1760,8127867,"train_dynamics.py",2374,0,"",python,selection_command
+1761,8128621,"train_dynamics.py",3799,0,"",python,selection_command
+1762,8129072,"train_dynamics.py",4730,0,"",python,selection_command
+1763,8130024,"train_dynamics.py",4755,0,"",python,selection_command
+1764,8130273,"train_dynamics.py",4805,0,"",python,selection_command
+1765,8130305,"train_dynamics.py",4849,0,"",python,selection_command
+1766,8130334,"train_dynamics.py",4854,0,"",python,selection_command
+1767,8130374,"train_dynamics.py",4897,0,"",python,selection_command
+1768,8130406,"train_dynamics.py",4923,0,"",python,selection_command
+1769,8130439,"train_dynamics.py",4996,0,"",python,selection_command
+1770,8130474,"train_dynamics.py",5044,0,"",python,selection_command
+1771,8130630,"train_dynamics.py",6086,0,"",python,selection_command
+1772,8132506,"train_dynamics.py",6999,0,"",python,selection_command
+1773,8133149,"train_dynamics.py",7809,0,"",python,selection_command
+1774,8134088,"train_dynamics.py",7810,0,"",python,selection_command
+1775,8134334,"train_dynamics.py",7873,0,"",python,selection_command
+1776,8134367,"train_dynamics.py",7962,0,"",python,selection_command
+1777,8134400,"train_dynamics.py",7963,0,"",python,selection_command
+1778,8134432,"train_dynamics.py",8008,0,"",python,selection_command
+1779,8134466,"train_dynamics.py",8083,0,"",python,selection_command
+1780,8134500,"train_dynamics.py",8136,0,"",python,selection_command
+1781,8134534,"train_dynamics.py",8203,0,"",python,selection_command
+1782,8134568,"train_dynamics.py",8286,0,"",python,selection_command
+1783,8134601,"train_dynamics.py",8337,0,"",python,selection_command
+1784,8134640,"train_dynamics.py",8338,0,"",python,selection_command
+1785,8134673,"train_dynamics.py",8382,0,"",python,selection_command
+1786,8134706,"train_dynamics.py",8395,0,"",python,selection_command
+1787,8134739,"train_dynamics.py",8466,0,"",python,selection_command
+1788,8134773,"train_dynamics.py",8492,0,"",python,selection_command
+1789,8136957,"train_dynamics.py",8466,0,"",python,selection_command
+1790,8137122,"train_dynamics.py",8395,0,"",python,selection_command
+1791,8141381,"train_dynamics.py",8399,0,"",python,selection_command
+1792,8141617,"train_dynamics.py",8416,0,"",python,selection_command
+1793,8141648,"train_dynamics.py",8418,0,"",python,selection_command
+1794,8141680,"train_dynamics.py",8421,0,"",python,selection_command
+1795,8141712,"train_dynamics.py",8422,0,"",python,selection_command
+1796,8141746,"train_dynamics.py",8430,0,"",python,selection_command
+1797,8142051,"train_dynamics.py",8422,0,"",python,selection_command
+1798,8142319,".venv/lib/python3.10/site-packages/orbax/checkpoint/handlers.py",0,0,"# Copyright 2025 The Orbax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n""""""Defines exported :py:class:`CheckpointHandler` s and their arguments.\n\n:py:class:`CheckpointHandler` subclasses define logic used to save and restore\nan object to and from a checkpoint. Each :py:class:`CheckpointHandler` has\ncorresponding :py:class:`.SaveArgs` and :py:class:`.RestoreArgs` classes that\ndefine the arguments used to call the handler.\nPrefer to use `ocp.args` to reference these objects.\n""""""\n\n# pylint: disable=g-importing-member, unused-import, g-bad-import-order\n\nfrom orbax.checkpoint._src.handlers.checkpoint_handler import CheckpointHandler\nfrom orbax.checkpoint._src.handlers.async_checkpoint_handler import AsyncCheckpointHandler\n\nfrom orbax.checkpoint._src.handlers import handler_registration\nfrom orbax.checkpoint._src.handlers.handler_registration import DefaultCheckpointHandlerRegistry\nfrom orbax.checkpoint._src.handlers.handler_registration import CheckpointHandlerRegistry\nfrom orbax.checkpoint._src.handlers.handler_registration import create_default_handler_registry\n\nfrom orbax.checkpoint._src.handlers.array_checkpoint_handler import ArrayCheckpointHandler\nfrom orbax.checkpoint._src.handlers.composite_checkpoint_handler import CompositeCheckpointHandler\nfrom orbax.checkpoint._src.handlers.json_checkpoint_handler import JsonCheckpointHandler\nfrom orbax.checkpoint._src.handlers.proto_checkpoint_handler import ProtoCheckpointHandler\nfrom orbax.checkpoint._src.handlers.pytree_checkpoint_handler import PyTreeCheckpointHandler\nfrom orbax.checkpoint._src.handlers.random_key_checkpoint_handler import JaxRandomKeyCheckpointHandler\nfrom orbax.checkpoint._src.handlers.random_key_checkpoint_handler import NumpyRandomKeyCheckpointHandler\nfrom orbax.checkpoint._src.handlers.standard_checkpoint_handler import StandardCheckpointHandler\n\nfrom orbax.checkpoint._src.handlers.array_checkpoint_handler import ArraySaveArgs\nfrom orbax.checkpoint._src.handlers.array_checkpoint_handler import ArrayRestoreArgs\nfrom orbax.checkpoint._src.handlers.composite_checkpoint_handler import CompositeArgs\nfrom orbax.checkpoint._src.handlers.composite_checkpoint_handler import CompositeResults\nfrom orbax.checkpoint._src.handlers.json_checkpoint_handler import JsonSaveArgs\nfrom orbax.checkpoint._src.handlers.json_checkpoint_handler import JsonRestoreArgs\nfrom orbax.checkpoint._src.handlers.proto_checkpoint_handler import ProtoSaveArgs\nfrom orbax.checkpoint._src.handlers.proto_checkpoint_handler import ProtoRestoreArgs\nfrom orbax.checkpoint._src.handlers.pytree_checkpoint_handler import PyTreeSaveArgs\nfrom orbax.checkpoint._src.handlers.pytree_checkpoint_handler import PyTreeRestoreArgs\nfrom orbax.checkpoint._src.handlers.random_key_checkpoint_handler import JaxRandomKeySaveArgs\nfrom orbax.checkpoint._src.handlers.random_key_checkpoint_handler import JaxRandomKeyRestoreArgs\nfrom orbax.checkpoint._src.handlers.random_key_checkpoint_handler import NumpyRandomKeySaveArgs\nfrom orbax.checkpoint._src.handlers.random_key_checkpoint_handler import NumpyRandomKeyRestoreArgs\nfrom orbax.checkpoint._src.handlers.standard_checkpoint_handler import StandardSaveArgs\nfrom orbax.checkpoint._src.handlers.standard_checkpoint_handler import StandardRestoreArgs\n",python,tab
+1799,8148660,".venv/lib/python3.10/site-packages/orbax/checkpoint/handlers.py",1367,0,"",python,selection_command
+1800,8149152,".venv/lib/python3.10/site-packages/orbax/checkpoint/handlers.py",0,0,"",python,selection_command
+1801,8149909,"train_dynamics.py",0,0,"",python,tab
+1802,8149910,"train_dynamics.py",8422,0,"",python,selection_command
+1803,8150905,"train_dynamics.py",13513,0," dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),\n ),\n",python,content
+1804,8150905,"train_dynamics.py",10573,99," model_state=ocp.args.PyTreeRestore(\n abstract_optimizer_state, partial_restore=True\n ),",python,content
+1805,8150905,"train_dynamics.py",8695,263,"",python,content
+1806,8150905,"train_dynamics.py",8605,83," ""dataloader_state"",\n save_arg_type=grain.checkpoint.CheckpointSave,\n restore_arg_type=grain.checkpoint.CheckpointRestore,\n handler=grain_handler,",python,content
+1807,8150905,"train_dynamics.py",8492,80," ""model_state"",\n save_arg_type=ocp.args.PyTreeSave,\n restore_arg_type=ocp.args.PyTreeRestore,\n handler=pytree_handler,",python,content
+1808,8150905,"train_dynamics.py",8466,0," pytree_handler = ocp.handlers.PyTreeCheckpointHandler()\n grain_handler = grain.checkpoint.CheckpointHandler()\n",python,content
+1809,8150925,"train_dynamics.py",13675,167,"",python,content
+1810,8151410,".venv/lib/python3.10/site-packages/orbax/checkpoint/handlers.py",0,0,"",python,tab
+1811,8151952,"train_dynamics.py",0,0,"",python,tab
+1812,8151952,"train_dynamics.py",8422,0,"",python,selection_command
+1813,8175658,"train_dynamics.py",8493,0,"",python,selection_command
+1814,8175872,"train_dynamics.py",8553,0,"",python,selection_command
+1815,8176172,"train_dynamics.py",8530,0,"",python,selection_command
+1816,8180659,"train_dynamics.py",8587,0,"",python,selection_command
+1817,8180890,"train_dynamics.py",8613,0,"",python,selection_command
+1818,8180932,"train_dynamics.py",8636,0,"",python,selection_command
+1819,8181100,"train_dynamics.py",8613,0,"",python,selection_command
+1820,8181313,"train_dynamics.py",8587,0,"",python,selection_command
+1821,8181332,"train_dynamics.py",8530,0,"",python,selection_command
+1822,8181357,"train_dynamics.py",8470,0,"",python,selection_command
+1823,8181632,"train_dynamics.py",8530,0,"",python,selection_command
+1824,8181756,"train_dynamics.py",8544,0,"",python,selection_command
+1825,8182056,"train_dynamics.py",8546,0,"",python,selection_command
+1826,8182342,"train_dynamics.py",8603,0,"",python,selection_command
+1827,8182525,"train_dynamics.py",8604,0,"",python,selection_command
+1828,8210436,"train_dynamics.py",8466,117,"",python,content
+1829,8210772,"train_dynamics.py",8492,146," ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler",python,content
+1830,8211134,"train_dynamics.py",8605,174," ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler",python,content
+1831,8211685,"train_dynamics.py",8695,0," handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n",python,content
+1832,8212675,"train_dynamics.py",8466,0,"",python,selection_command
+1833,8226220,"train_dynamics.py",9677,0,"",python,selection_command
+1834,8226432,"train_dynamics.py",10888,0,"",python,selection_command
+1835,8227653,"train_dynamics.py",10573,137," model_state=ocp.args.PyTreeRestore(abstract_optimizer_state, partial_restore=True),",python,content
+1836,8229140,"train_dynamics.py",10791,0,"",python,selection_command
+1837,8229373,"train_dynamics.py",10781,0,"",python,selection_command
+1838,8229404,"train_dynamics.py",10766,0,"",python,selection_command
+1839,8229592,"train_dynamics.py",10681,0,"",python,selection_command
+1840,8233260,"train_dynamics.py",0,0,"",python,selection_command
+1841,8236804,"train_dynamics.py",1500,0,"",python,selection_mouse
+1842,8236805,"train_dynamics.py",1499,0,"",python,selection_command
+1843,8237075,"train_dynamics.py",2330,0,"",python,selection_command
+1844,8237244,"train_dynamics.py",3580,0,"",python,selection_command
+1845,8239372,"train_dynamics.py",8524,0,"",python,selection_command
+1846,8245416,"train_dynamics.py",10650,0,"",python,selection_command
+1847,8245986,"train_dynamics.py",10649,0,"",python,selection_command
+1848,8246340,"train_dynamics.py",10648,0,"",python,selection_command
+1849,8246845,"train_dynamics.py",10648,1,",",python,selection_command
+1850,8246902,"train_dynamics.py",10648,17,", partial_restore",python,selection_command
+1851,8247091,"train_dynamics.py",10648,18,", partial_restore=",python,selection_command
+1852,8247438,"train_dynamics.py",10648,19,", partial_restore=T",python,selection_command
+1853,8247705,"train_dynamics.py",10648,22,", partial_restore=True",python,selection_command
+1854,8248060,"train_dynamics.py",10648,22,"",python,content
+1855,8254372,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+1856,8255083,"experiments/dynamics_grain_tok_restore.sh",456,0,"\n",shellscript,content
+1857,8255086,"experiments/dynamics_grain_tok_restore.sh",457,0," ",shellscript,content
+1858,8255883,"experiments/dynamics_grain_tok_restore.sh",461,0,"--restore_ckpt \",shellscript,content
+1859,8256092,"experiments/dynamics_grain_tok_restore.sh",476,0,"",shellscript,selection_command
+1860,8258904,"train_dynamics.py",0,0,"",python,tab
+1861,8259589,"train_dynamics.py",10573,0,"",python,selection_command
+1862,8283011,"train_dynamics.py",10536,0,"",python,selection_command
+1863,8283194,"train_dynamics.py",10490,0,"",python,selection_command
+1864,8283270,"train_dynamics.py",10443,0,"",python,selection_command
+1865,8283399,"train_dynamics.py",10378,0,"",python,selection_command
+1866,8285641,"train_dynamics.py",10315,0,"",python,selection_command
+1867,8285803,"train_dynamics.py",10218,0,"",python,selection_command
+1868,8285978,"train_dynamics.py",10314,0,"\n ",python,content
+1869,8286178,"train_dynamics.py",10323,0,"p",python,content
+1870,8286179,"train_dynamics.py",10324,0,"",python,selection_keyboard
+1871,8286595,"train_dynamics.py",10323,1,"",python,content
+1872,8286734,"train_dynamics.py",10323,0,"o",python,content
+1873,8286735,"train_dynamics.py",10324,0,"",python,selection_keyboard
+1874,8286784,"train_dynamics.py",10324,0,"p",python,content
+1875,8286785,"train_dynamics.py",10325,0,"",python,selection_keyboard
+1876,8286834,"train_dynamics.py",10325,0,"t",python,content
+1877,8286834,"train_dynamics.py",10326,0,"",python,selection_keyboard
+1878,8286967,"train_dynamics.py",10326,0,"i",python,content
+1879,8286968,"train_dynamics.py",10327,0,"",python,selection_keyboard
+1880,8287032,"train_dynamics.py",10327,0,"m",python,content
+1881,8287032,"train_dynamics.py",10328,0,"",python,selection_keyboard
+1882,8287131,"train_dynamics.py",10328,0,"i",python,content
+1883,8287132,"train_dynamics.py",10329,0,"",python,selection_keyboard
+1884,8287171,"train_dynamics.py",10329,0,"z",python,content
+1885,8287172,"train_dynamics.py",10330,0,"",python,selection_keyboard
+1886,8287290,"train_dynamics.py",10330,0,"e",python,content
+1887,8287291,"train_dynamics.py",10331,0,"",python,selection_keyboard
+1888,8287366,"train_dynamics.py",10331,0,"r",python,content
+1889,8287367,"train_dynamics.py",10332,0,"",python,selection_keyboard
+1890,8288620,"train_dynamics.py",10332,0,".",python,content
+1891,8288620,"train_dynamics.py",10333,0,"",python,selection_keyboard
+1892,8291296,"train_dynamics.py",10333,0,"m",python,content
+1893,8291296,"train_dynamics.py",10334,0,"",python,selection_keyboard
+1894,8291363,"train_dynamics.py",10334,0,"o",python,content
+1895,8291364,"train_dynamics.py",10335,0,"",python,selection_keyboard
+1896,8291439,"train_dynamics.py",10335,0,"d",python,content
+1897,8291440,"train_dynamics.py",10336,0,"",python,selection_keyboard
+1898,8291590,"train_dynamics.py",10336,0,"e",python,content
+1899,8291590,"train_dynamics.py",10337,0,"",python,selection_keyboard
+1900,8291659,"train_dynamics.py",10337,0,"l",python,content
+1901,8291659,"train_dynamics.py",10338,0,"",python,selection_keyboard
+1902,8291845,"train_dynamics.py",10338,0,".",python,content
+1903,8291846,"train_dynamics.py",10339,0,"",python,selection_keyboard
+1904,8291981,"train_dynamics.py",10339,0,"t",python,content
+1905,8291982,"train_dynamics.py",10340,0,"",python,selection_keyboard
+1906,8292021,"train_dynamics.py",10340,0,"o",python,content
+1907,8292022,"train_dynamics.py",10341,0,"",python,selection_keyboard
+1908,8292086,"train_dynamics.py",10341,0,"k",python,content
+1909,8292087,"train_dynamics.py",10342,0,"",python,selection_keyboard
+1910,8292185,"train_dynamics.py",10342,0,"e",python,content
+1911,8292186,"train_dynamics.py",10343,0,"",python,selection_keyboard
+1912,8292298,"train_dynamics.py",10343,0,"n",python,content
+1913,8292298,"train_dynamics.py",10344,0,"",python,selection_keyboard
+1914,8292322,"train_dynamics.py",10344,0,"i",python,content
+1915,8292322,"train_dynamics.py",10345,0,"",python,selection_keyboard
+1916,8292417,"train_dynamics.py",10345,0,"z",python,content
+1917,8292417,"train_dynamics.py",10346,0,"",python,selection_keyboard
+1918,8292502,"train_dynamics.py",10346,0,"e",python,content
+1919,8292503,"train_dynamics.py",10347,0,"",python,selection_keyboard
+1920,8292600,"train_dynamics.py",10347,0,"r",python,content
+1921,8292601,"train_dynamics.py",10348,0,"",python,selection_keyboard
+1922,8292662,"train_dynamics.py",10348,0,".",python,content
+1923,8292663,"train_dynamics.py",10349,0,"",python,selection_keyboard
+1924,8294489,"train_dynamics.py",10349,0,"v",python,content
+1925,8294490,"train_dynamics.py",10350,0,"",python,selection_keyboard
+1926,8294568,"train_dynamics.py",10350,0,"q",python,content
+1927,8294568,"train_dynamics.py",10351,0,"",python,selection_keyboard
+1928,8294741,"train_dynamics.py",10351,0,".",python,content
+1929,8294741,"train_dynamics.py",10352,0,"",python,selection_keyboard
+1930,8295126,"train_dynamics.py",10352,0,"d",python,content
+1931,8295126,"train_dynamics.py",10353,0,"",python,selection_keyboard
+1932,8295311,"train_dynamics.py",10353,0,"o",python,content
+1933,8295311,"train_dynamics.py",10354,0,"",python,selection_keyboard
+1934,8295379,"train_dynamics.py",10354,0,"p",python,content
+1935,8295379,"train_dynamics.py",10355,0,"",python,selection_keyboard
+1936,8295701,"train_dynamics.py",10354,1,"",python,content
+1937,8295832,"train_dynamics.py",10353,1,"",python,content
+1938,8295898,"train_dynamics.py",10353,0,"r",python,content
+1939,8295899,"train_dynamics.py",10354,0,"",python,selection_keyboard
+1940,8296000,"train_dynamics.py",10354,0,"o",python,content
+1941,8296001,"train_dynamics.py",10355,0,"",python,selection_keyboard
+1942,8296048,"train_dynamics.py",10355,0,"p",python,content
+1943,8296049,"train_dynamics.py",10356,0,"",python,selection_keyboard
+1944,8303667,"train_dynamics.py",10355,0,"",python,selection_command
+1945,8308186,"utils/nn.py",0,0,"import math\nfrom typing import Tuple\n\nfrom flax import nnx\nimport jax\nimport jax.numpy as jnp\nimport einops\n\n\nclass PositionalEncoding(nnx.Module):\n """"""https://uvadlc-notebooks.readthedocs.io/en/latest/tutorial_notebooks/JAX/tutorial6/Transformers_and_MHAttention.html""""""\n\n def __init__(self, d_model: int, max_len: int = 5000):\n self.d_model = d_model\n self.max_len = max_len\n\n pe = jnp.zeros((self.max_len, self.d_model))\n position = jnp.arange(0, self.max_len, dtype=jnp.float32)[:, None]\n div_term = jnp.exp(\n jnp.arange(0, self.d_model, 2) * (-math.log(10000.0) / self.d_model)\n )\n pe = pe.at[:, 0::2].set(jnp.sin(position * div_term))\n pe = pe.at[:, 1::2].set(jnp.cos(position * div_term))\n self.pe = nnx.Variable(pe)\n\n def __call__(self, x):\n x = x + self.pe[: x.shape[2]]\n return x\n\n\nclass STBlock(nnx.Module):\n def __init__(\n self,\n dim: int,\n ffn_dim: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.dim = dim\n self.ffn_dim = ffn_dim\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.spatial_pos_enc = PositionalEncoding(self.dim)\n self.spatial_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.spatial_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.dim,\n qkv_features=self.dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=False\n ),\n rngs=rngs,\n # FIXME (f.srambical): Propagate this up and change during sampling\n decode=False,\n )\n\n self.temporal_pos_enc = PositionalEncoding(self.dim)\n self.temporal_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.temporal_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.dim,\n qkv_features=self.dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=True\n ),\n rngs=rngs,\n decode=False,\n )\n\n self.ffn_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_dense1 = nnx.Linear(\n in_features=self.dim,\n out_features=self.ffn_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_dense2 = nnx.Linear(\n in_features=self.ffn_dim,\n out_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n @nnx.remat\n def __call__(self, x: jax.Array) -> jax.Array:\n # --- Spatial attention ---\n z = self.spatial_pos_enc(x)\n z = self.spatial_norm(z)\n z = self.spatial_attention(z)\n x = x + z\n\n # --- Temporal attention ---\n x = x.swapaxes(1, 2)\n z = self.temporal_pos_enc(x)\n z = self.temporal_norm(z)\n causal_mask = jnp.tri(z.shape[-2])\n z = self.temporal_attention(z, mask=causal_mask)\n x = x + z\n x = x.swapaxes(1, 2)\n\n # --- Feedforward ---\n z = self.ffn_norm(x)\n z = self.ffn_dense1(z)\n z = jax.nn.gelu(z)\n z = self.ffn_dense2(z)\n x = x + z\n\n return x\n\n\nclass STTransformer(nnx.Module):\n def __init__(\n self,\n input_dim: int,\n model_dim: int,\n ffn_dim: int,\n out_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.input_dim = input_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.out_dim = out_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.input_norm1 = nnx.LayerNorm(\n num_features=self.input_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_dense = nnx.Linear(\n in_features=self.input_dim,\n out_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_norm2 = nnx.LayerNorm(\n num_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n self.blocks = []\n for _ in range(self.num_blocks):\n self.blocks.append(\n STBlock(\n dim=self.model_dim,\n ffn_dim=self.ffn_dim,\n num_heads=self.num_heads,\n dropout=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n )\n\n self.output_dense = nnx.Linear(\n in_features=self.model_dim,\n out_features=self.out_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(self, x: jax.Array) -> jax.Array:\n x = self.input_norm1(x)\n x = self.input_dense(x)\n x = self.input_norm2(x)\n\n for block in self.blocks:\n x = block(x)\n\n x = self.output_dense(x)\n return x # (B, T, E)\n\n\ndef normalize(x):\n return x / (jnp.linalg.norm(x, ord=2, axis=-1, keepdims=True) + 1e-8)\n\n\nclass VectorQuantizer(nnx.Module):\n def __init__(\n self, latent_dim: int, num_latents: int, dropout: float, rngs: nnx.Rngs\n ):\n self.latent_dim = latent_dim\n self.num_latents = num_latents\n self.dropout = dropout\n\n self.codebook = nnx.Param(\n normalize(\n nnx.initializers.lecun_uniform()(\n rngs.params(), (self.num_latents, self.latent_dim)\n )\n )\n )\n self.drop = nnx.Dropout(self.dropout, rngs=rngs)\n\n def __call__(\n self, x: jax.Array, training: bool\n ) -> Tuple[jax.Array, jax.Array, jax.Array, jax.Array]:\n # --- Compute distances ---\n x = normalize(x)\n normalized_codebook = normalize(self.codebook)\n distance = -jnp.matmul(x, normalized_codebook.T)\n if training:\n distance = self.drop(distance)\n\n # --- Get indices and embeddings ---\n indices = jnp.argmin(distance, axis=-1)\n z = self.codebook[indices]\n\n # --- Straight through estimator ---\n z_q = x + jax.lax.stop_gradient(z - x)\n return z_q, z, x, indices\n\n def get_codes(self, indices: jax.Array):\n return self.codebook[indices]\n\n\ndef _create_flash_attention_fn(use_flash_attention: bool, is_causal: bool):\n """"""\n Create an attention function that uses flash attention if enabled.\n\n Flax MultiHeadAttention provides tensors with shape (batch..., length, num_heads, head_dim)\n jax.nn.dot_product_attention expects (batch, length, num_heads, head_dim).\n\n We need to reshape to ensure compatibility. cuDNN's flash attention additionally\n requires a sequence length that is a multiple of 4. We pad the sequence length to the nearest\n multiple of 4 and mask accordingly.\n """"""\n\n def attention_fn(query, key, value, bias=None, mask=None, **kwargs):\n implementation = ""cudnn"" if use_flash_attention else None\n\n def _rearrange(x):\n return einops.rearrange(x, ""... l h d -> (...) l h d"")\n\n def _pad(x):\n return jnp.pad(x, ((0, 0), (0, pad_size), (0, 0), (0, 0)))\n\n def _fuse_masks(mask: jax.Array, attention_mask: jax.Array) -> jax.Array:\n mask_bool = mask.astype(jnp.bool_)\n expanded_mask = jnp.pad(\n mask_bool, ((0, pad_size), (0, pad_size)), constant_values=False\n )\n return jnp.logical_and(attention_mask, expanded_mask)\n\n original_shape = query.shape\n original_seq_len = query.shape[-3]\n\n # Pad to nearest multiple of 4\n target_seq_len = ((original_seq_len + 3) // 4) * 4\n pad_size = target_seq_len - original_seq_len\n\n query_4d = _pad(_rearrange(query))\n key_4d = _pad(_rearrange(key))\n value_4d = _pad(_rearrange(value))\n\n attention_mask = jnp.ones((target_seq_len, target_seq_len), dtype=jnp.bool_)\n attention_mask = attention_mask.at[original_seq_len:, :].set(False)\n attention_mask = attention_mask.at[:, original_seq_len:].set(False)\n\n mask_4d = (\n _fuse_masks(mask, attention_mask) if mask is not None else attention_mask\n )\n mask_4d = mask_4d[jnp.newaxis, jnp.newaxis, :, :] # (1, 1, seq_len, seq_len)\n\n bias_4d = _pad(_rearrange(bias)) if bias is not None else None\n\n # NOTE: jax.nn.dot_product_attention does not support dropout\n output_4d = jax.nn.dot_product_attention(\n query=query_4d,\n key=key_4d,\n value=value_4d,\n bias=bias_4d,\n mask=mask_4d,\n implementation=implementation,\n is_causal=is_causal,\n )\n return output_4d[..., :original_seq_len, :, :].reshape(original_shape)\n\n return attention_fn\n",python,tab
+1946,8310036,"utils/nn.py",7058,0,"",python,selection_command
+1947,8310282,"utils/nn.py",6987,0,"",python,selection_command
+1948,8310313,"utils/nn.py",6937,0,"",python,selection_command
+1949,8310345,"utils/nn.py",6914,0,"",python,selection_command
+1950,8310373,"utils/nn.py",6879,0,"",python,selection_command
+1951,8310404,"utils/nn.py",6866,0,"",python,selection_command
+1952,8310436,"utils/nn.py",6847,0,"",python,selection_command
+1953,8310470,"utils/nn.py",6808,0,"",python,selection_command
+1954,8310505,"utils/nn.py",6771,0,"",python,selection_command
+1955,8310542,"utils/nn.py",6757,0,"",python,selection_command
+1956,8310570,"utils/nn.py",6684,0,"",python,selection_command
+1957,8310684,"utils/nn.py",6757,0,"",python,selection_command
+1958,8310829,"utils/nn.py",6771,0,"",python,selection_command
+1959,8311020,"utils/nn.py",6808,0,"",python,selection_command
+1960,8311166,"utils/nn.py",6847,0,"",python,selection_command
+1961,8311903,"train_dynamics.py",0,0,"",python,tab
+1962,8358419,"utils/nn.py",0,0,"",python,tab
+1963,8358419,"utils/nn.py",7101,0,"",python,selection_command
+1964,8366350,"train_dynamics.py",0,0,"",python,tab
+1965,8366350,"train_dynamics.py",10355,0,"",python,selection_command
+1966,8367000,"train_dynamics.py",10356,0,"",python,selection_command
+1967,8367258,"train_dynamics.py",10356,0,".",python,content
+1968,8367258,"train_dynamics.py",10357,0,"",python,selection_keyboard
+1969,8367768,"train_dynamics.py",10357,0,"r",python,content
+1970,8367768,"train_dynamics.py",10358,0,"",python,selection_keyboard
+1971,8367817,"train_dynamics.py",10358,0,"n",python,content
+1972,8367817,"train_dynamics.py",10359,0,"",python,selection_keyboard
+1973,8367901,"train_dynamics.py",10359,0,"g",python,content
+1974,8367902,"train_dynamics.py",10360,0,"",python,selection_keyboard
+1975,8367968,"train_dynamics.py",10360,0,"s",python,content
+1976,8367969,"train_dynamics.py",10361,0,"",python,selection_keyboard
+1977,8368536,"train_dynamics.py",10361,0," ",python,content
+1978,8368536,"train_dynamics.py",10362,0,"",python,selection_keyboard
+1979,8368671,"train_dynamics.py",10362,0,"=",python,content
+1980,8368672,"train_dynamics.py",10363,0,"",python,selection_keyboard
+1981,8368815,"train_dynamics.py",10363,0," ",python,content
+1982,8368815,"train_dynamics.py",10364,0,"",python,selection_keyboard
+1983,8369341,"train_dynamics.py",10364,0,"r",python,content
+1984,8369341,"train_dynamics.py",10365,0,"",python,selection_keyboard
+1985,8369383,"train_dynamics.py",10365,0,"n",python,content
+1986,8369383,"train_dynamics.py",10366,0,"",python,selection_keyboard
+1987,8369436,"train_dynamics.py",10366,0,"g",python,content
+1988,8369436,"train_dynamics.py",10367,0,"",python,selection_keyboard
+1989,8369500,"train_dynamics.py",10367,0,"s",python,content
+1990,8369500,"train_dynamics.py",10368,0,"",python,selection_keyboard
+1991,8369683,"train_dynamics.py",10368,0,".",python,content
+1992,8369684,"train_dynamics.py",10369,0,"",python,selection_keyboard
+1993,8371244,"train_dynamics.py",10369,0,"params()",python,content
+1994,8371464,"train_dynamics.py",10376,0,"",python,selection_command
+1995,8371735,"train_dynamics.py",10375,0,"",python,selection_command
+1996,8371960,"train_dynamics.py",10369,0,"",python,selection_command
+1997,8374414,"train_dynamics.py",10368,0,"",python,selection_command
+1998,8374705,"train_dynamics.py",10368,9,"",python,content
+1999,8375331,"train_dynamics.py",10367,0,"",python,selection_command
+2000,8375632,"train_dynamics.py",10421,0,"",python,selection_command
+2001,8375833,"train_dynamics.py",10367,0,"",python,selection_command
+2002,8401696,"test.ipynb",0,0,"nnx.display(model_no_bias)",python,tab
+2003,8404540,"test.ipynb",0,0,"import os\nimport shutil\n\nimport jax.numpy as jnp\nfrom flax import nnx\nimport orbax.checkpoint as ocp\n\n# The hunch is that parameters like biases in Linear layers are only created if\n# they are used (e.g. `use_bias=True`). When checkpointing a model created with\n# `use_bias=False`, the bias parameter is not saved.\n#\n# Attempting to restore this checkpoint into a model instance created with\n# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)\n\n\nclass MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)\n\n\nrngs = nnx.Rngs(0)\nmodel_no_bias = MyModel(use_bias=False, rngs=rngs)\n\ndummy_input = jnp.ones((1, 10))\nmodel_no_bias(dummy_input)\n",python,tab
+2004,8404540,"test.ipynb",581,0,"",python,selection_mouse
+2005,8404978,"test.ipynb",664,0,"",python,selection_mouse
+2006,8406935,"test.ipynb",868,0,"",python,selection_mouse
+2007,8453810,"test.ipynb",0,0,"",python,selection_command
+2008,8455031,"test.ipynb",548,0,"",python,selection_command
+2009,8455458,"test.ipynb",549,0,"",python,selection_command
+2010,8455696,"test.ipynb",585,0,"",python,selection_command
+2011,8455729,"test.ipynb",614,0,"",python,selection_command
+2012,8455761,"test.ipynb",642,0,"",python,selection_command
+2013,8455850,"test.ipynb",664,0,"",python,selection_command
+2014,8455974,"test.ipynb",665,0,"",python,selection_command
+2015,8456138,"test.ipynb",666,0,"",python,selection_command
+2016,8456424,"test.ipynb",666,26,"class MyModel(nnx.Module):",python,selection_command
+2017,8456530,"test.ipynb",666,76,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""",python,selection_command
+2018,8456786,"test.ipynb",666,77,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n",python,selection_command
+2019,8456898,"test.ipynb",666,134,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):",python,selection_command
+2020,8456899,"test.ipynb",666,201,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)",python,selection_command
+2021,8456899,"test.ipynb",666,202,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n",python,selection_command
+2022,8456911,"test.ipynb",666,227,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):",python,selection_command
+2023,8457033,"test.ipynb",666,253,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2024,8464417,"test.ipynb",894,0,"",python,selection_command
+2025,8464622,"test.ipynb",869,0,"",python,selection_command
+2026,8465044,"test.ipynb",894,0,"",python,selection_command
+2027,8465287,"test.ipynb",894,25," return self.linear(x)",python,selection_command
+2028,8465402,"test.ipynb",869,50," def __call__(self, x):\n return self.linear(x)",python,selection_command
+2029,8465643,"test.ipynb",868,51,"\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2030,8465679,"test.ipynb",801,118," self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2031,8465711,"test.ipynb",744,175," def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2032,8465812,"test.ipynb",743,176,"\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2033,8465813,"test.ipynb",693,226," """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2034,8465898,"test.ipynb",666,253,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2035,8466196,"test.ipynb",666,0,"",python,selection_command
+2036,8469918,"test.ipynb",693,0," """"""A simple model containing a Linear layer and dropout.""""""\n",python,content
+2037,8469921,"test.ipynb",755,50,"",python,content
+2038,8470665,"test.ipynb",880,0," self.dropout = nnx.Dropout(0.5, rngs=rngs) # 0.5 dropout rate as example\n",python,content
+2039,8470934,"test.ipynb",959,0," def __call__(self, x, training: bool = True):\n",python,content
+2040,8471070,"test.ipynb",1007,0," x = self.linear(x)\n",python,content
+2041,8471226,"test.ipynb",1030,0," x = self.dropout(x, training=training)\n",python,content
+2042,8471299,"test.ipynb",1073,0," return x\n",python,content
+2043,8471300,"test.ipynb",1086,51,"",python,content
+2044,8472734,"test.ipynb",959,126," def __call__(self, x):\n return self.linear(x)",python,content
+2045,8472734,"test.ipynb",880,78,"",python,content
+2046,8472734,"test.ipynb",693,61," """"""A simple model containing a Linear layer.""""""",python,content
+2047,8474254,"test.ipynb",666,229,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n ",python,selection_command
+2048,8474742,"test.ipynb",666,0,"",python,selection_command
+2049,8475500,"test.ipynb",666,26,"class MyModel(nnx.Module):",python,selection_command
+2050,8475681,"test.ipynb",666,76,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""",python,selection_command
+2051,8475953,"test.ipynb",666,77,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n",python,selection_command
+2052,8476750,"test.ipynb",666,134,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):",python,selection_command
+2053,8476989,"test.ipynb",666,201,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)",python,selection_command
+2054,8477017,"test.ipynb",666,202,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n",python,selection_command
+2055,8477117,"test.ipynb",666,227,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):",python,selection_command
+2056,8477290,"test.ipynb",666,253,"class MyModel(nnx.Module):\n """"""A simple model containing a Linear layer.""""""\n\n def __init__(self, use_bias: bool, *, rngs: nnx.Rngs):\n self.linear = nnx.Linear(10, 20, use_bias=use_bias, rngs=rngs)\n\n def __call__(self, x):\n return self.linear(x)",python,selection_command
+2057,8477540,"test.ipynb",666,0,"",python,selection_command
+2058,8480394,"test.ipynb",693,0," """"""A simple model containing a Linear layer and dropout.""""""\n",python,content
+2059,8480395,"test.ipynb",755,50,"",python,content
+2060,8481346,"test.ipynb",880,0," self.dropout = nnx.Dropout(0.5, rngs=rngs) # 0.5 dropout rate as example\n",python,content
+2061,8481437,"test.ipynb",959,0," def __call__(self, x, training: bool = True):\n",python,content
+2062,8481499,"test.ipynb",1007,0," x = self.linear(x)\n",python,content
+2063,8481650,"test.ipynb",1030,0," x = self.dropout(x, training=training)\n",python,content
+2064,8481693,"test.ipynb",1073,0," return x\n",python,content
+2065,8481693,"test.ipynb",1086,51,"",python,content
+2066,8486010,"test.ipynb",959,0,"",python,selection_command
+2067,8486182,"test.ipynb",958,0,"",python,selection_command
+2068,8486648,"test.ipynb",880,0,"",python,selection_command
+2069,8486832,"test.ipynb",884,0,"",python,selection_command
+2070,8487133,"test.ipynb",888,0,"",python,selection_command
+2071,8487350,"test.ipynb",889,0,"",python,selection_command
+2072,8487562,"test.ipynb",897,0,"",python,selection_command
+2073,8487672,"test.ipynb",899,0,"",python,selection_command
+2074,8488006,"test.ipynb",902,0,"",python,selection_command
+2075,8488620,"test.ipynb",903,0,"",python,selection_command
+2076,8488817,"test.ipynb",910,0,"",python,selection_command
+2077,8488989,"test.ipynb",911,0,"",python,selection_command
+2078,8490659,"test.ipynb",844,0,"",python,selection_command
+2079,8490812,"test.ipynb",787,0,"",python,selection_command
+2080,8491239,"test.ipynb",790,0,"",python,selection_command
+2081,8491404,"test.ipynb",791,0,"",python,selection_command
+2082,8492333,"test.ipynb",792,0,"",python,selection_command
+2083,8492481,"test.ipynb",793,0,"",python,selection_command
+2084,8493474,"test.ipynb",794,0,"",python,selection_command
+2085,8493667,"test.ipynb",799,0,"",python,selection_command
+2086,8494386,"test.ipynb",798,0,"",python,selection_command
+2087,8494551,"test.ipynb",797,0,"",python,selection_command
+2088,8494666,"test.ipynb",796,0,"",python,selection_command
+2089,8494819,"test.ipynb",795,0,"",python,selection_command
+2090,8496609,"test.ipynb",794,0,"",python,selection_command
+2091,8496747,"test.ipynb",793,0,"",python,selection_command
+2092,8496885,"test.ipynb",792,0,"",python,selection_command
+2093,8497232,"test.ipynb",793,0,"",python,selection_command
+2094,8498296,"test.ipynb",793,0,"d",python,content
+2095,8498296,"test.ipynb",794,0,"",python,selection_keyboard
+2096,8498363,"test.ipynb",794,0,"r",python,content
+2097,8498363,"test.ipynb",795,0,"",python,selection_keyboard
+2098,8498463,"test.ipynb",795,0,"o",python,content
+2099,8498463,"test.ipynb",796,0,"",python,selection_keyboard
+2100,8498549,"test.ipynb",796,0,"p",python,content
+2101,8498549,"test.ipynb",797,0,"",python,selection_keyboard
+2102,8498629,"test.ipynb",797,0,"o",python,content
+2103,8498629,"test.ipynb",798,0,"",python,selection_keyboard
+2104,8498696,"test.ipynb",798,0,"u",python,content
+2105,8498696,"test.ipynb",799,0,"",python,selection_keyboard
+2106,8498784,"test.ipynb",799,0,"t",python,content
+2107,8498784,"test.ipynb",800,0,"",python,selection_keyboard
+2108,8499838,"test.ipynb",800,0,":",python,content
+2109,8499839,"test.ipynb",801,0,"",python,selection_keyboard
+2110,8499992,"test.ipynb",801,0," ",python,content
+2111,8499993,"test.ipynb",802,0,"",python,selection_keyboard
+2112,8500116,"test.ipynb",802,0,"f",python,content
+2113,8500117,"test.ipynb",803,0,"",python,selection_keyboard
+2114,8500205,"test.ipynb",803,0,"l",python,content
+2115,8500205,"test.ipynb",804,0,"",python,selection_keyboard
+2116,8500351,"test.ipynb",804,0,"o",python,content
+2117,8500351,"test.ipynb",805,0,"",python,selection_keyboard
+2118,8500398,"test.ipynb",805,0,"a",python,content
+2119,8500398,"test.ipynb",806,0,"",python,selection_keyboard
+2120,8500515,"test.ipynb",806,0,"t",python,content
+2121,8500516,"test.ipynb",807,0,"",python,selection_keyboard
+2122,8500586,"test.ipynb",807,0,",",python,content
+2123,8500586,"test.ipynb",808,0,"",python,selection_keyboard
+2124,8500753,"test.ipynb",807,0,"",python,selection_command
+2125,8501192,"test.ipynb",808,0,"",python,selection_command
+2126,8501249,"test.ipynb",808,0," ",python,content
+2127,8501250,"test.ipynb",809,0,"",python,selection_keyboard
+2128,8501406,"test.ipynb",808,0,"",python,selection_command
+2129,8501896,"test.ipynb",881,0,"",python,selection_command
+2130,8502846,"test.ipynb",930,0,"dropout",python,content
+2131,8502846,"test.ipynb",927,3,"",python,content
+2132,8503448,"test.ipynb",948,0,"",python,selection_command
+2133,8504817,"test.ipynb",947,0,"",python,selection_command
+2134,8504963,"test.ipynb",946,0,"",python,selection_command
+2135,8505123,"test.ipynb",946,31,"",python,content
+2136,8505124,"test.ipynb",945,0,"",python,selection_command
+2137,8507170,"test.ipynb",947,0,"",python,selection_command
+2138,8507421,"test.ipynb",994,0,"",python,selection_command
+2139,8507444,"test.ipynb",1017,0,"",python,selection_command
+2140,8507479,"test.ipynb",1060,0,"",python,selection_command
+2141,8507510,"test.ipynb",1073,0,"",python,selection_command
+2142,8507544,"test.ipynb",1075,0,"",python,selection_command
+2143,8507577,"test.ipynb",1076,0,"",python,selection_command
+2144,8507611,"test.ipynb",1094,0,"",python,selection_command
+2145,8507898,"test.ipynb",1076,0,"",python,selection_command
+2146,8508338,"test.ipynb",1094,0,"",python,selection_command
+2147,8508776,"test.ipynb",1076,0,"",python,selection_command
+2148,8509069,"test.ipynb",1076,19,"\nrngs = nnx.Rngs(0)",python,selection_command
+2149,8509206,"test.ipynb",1076,70,"\nrngs = nnx.Rngs(0)\nmodel_no_bias = MyModel(use_bias=False, rngs=rngs)",python,selection_command
+2150,8509349,"test.ipynb",1076,71,"\nrngs = nnx.Rngs(0)\nmodel_no_bias = MyModel(use_bias=False, rngs=rngs)\n",python,selection_command
+2151,8509500,"test.ipynb",1076,103,"\nrngs = nnx.Rngs(0)\nmodel_no_bias = MyModel(use_bias=False, rngs=rngs)\n\ndummy_input = jnp.ones((1, 10))",python,selection_command
+2152,8509636,"test.ipynb",1076,130,"\nrngs = nnx.Rngs(0)\nmodel_no_bias = MyModel(use_bias=False, rngs=rngs)\n\ndummy_input = jnp.ones((1, 10))\nmodel_no_bias(dummy_input)",python,selection_command
+2153,8509835,"test.ipynb",1076,131,"\nrngs = nnx.Rngs(0)\nmodel_no_bias = MyModel(use_bias=False, rngs=rngs)\n\ndummy_input = jnp.ones((1, 10))\nmodel_no_bias(dummy_input)\n",python,selection_command
+2154,8510780,"test.ipynb",1075,132,"",python,content
+2155,8511739,"test.ipynb",1074,1,"",python,content
+2156,8511752,"test.ipynb",1066,0,"",python,selection_command
+2157,8512258,"test.ipynb",1023,0,"",python,selection_command
+2158,8517165,"test.ipynb",1042,0,"",python,selection_command
+2159,8517312,"test.ipynb",1041,0,"",python,selection_command
+2160,8517438,"test.ipynb",1041,1,",",python,selection_command
+2161,8517999,"test.ipynb",1041,10,", training",python,selection_command
+2162,8518186,"test.ipynb",1041,11,", training=",python,selection_command
+2163,8518382,"test.ipynb",1041,19,", training=training",python,selection_command
+2164,8518686,"test.ipynb",1041,19,"",python,content
+2165,8521969,"test.ipynb",1017,0,"",python,selection_command
+2166,8522132,"test.ipynb",970,0,"",python,selection_command
+2167,8522410,"test.ipynb",970,1,",",python,selection_command
+2168,8522499,"test.ipynb",970,10,", training",python,selection_command
+2169,8522672,"test.ipynb",970,11,", training:",python,selection_command
+2170,8522823,"test.ipynb",970,16,", training: bool",python,selection_command
+2171,8522952,"test.ipynb",970,18,", training: bool =",python,selection_command
+2172,8523290,"test.ipynb",970,23,", training: bool = True",python,selection_command
+2173,8523619,"test.ipynb",970,23,"",python,content
+2174,8527867,"test.ipynb",0,0,"",python,tab
+2175,8528372,"test.ipynb",0,0,"",python,tab
+2176,8528539,"test.ipynb",0,0,"model_no_bias = MyModel(use_bias=False, rngs=rngs)\nmodel_no_bias(dummy_input)\n\nstate_no_bias = nnx.split(model_no_bias)\nnnx.display(state_no_bias)",python,tab
+2177,8528703,"test.ipynb",0,0,"model_with_bias = MyModel(use_bias=True, rngs=rngs)\nmodel_with_bias(dummy_input)\n\nstate_with_bias = nnx.split(model_with_bias)\nnnx.display(state_with_bias)",python,tab
+2178,8528966,"test.ipynb",0,0,"",python,tab
+2179,8529090,"test.ipynb",0,0,"",python,tab
+2180,8530496,"test.ipynb",0,0,"",python,selection_command
+2181,8531030,"test.ipynb",10,0,"",python,selection_command
+2182,8531172,"test.ipynb",24,0,"",python,selection_command
+2183,8531357,"test.ipynb",25,0,"",python,selection_command
+2184,8531885,"test.ipynb",25,24,"",python,content
+2185,8532075,"test.ipynb",46,0,"",python,selection_command
+2186,8532403,"test.ipynb",46,31,"",python,content
+2187,8535930,"test.ipynb",47,0,"",python,selection_command
+2188,8536179,"test.ipynb",127,0,"",python,selection_command
+2189,8536264,"test.ipynb",207,0,"",python,selection_command
+2190,8536264,"test.ipynb",260,0,"",python,selection_command
+2191,8536279,"test.ipynb",262,0,"",python,selection_command
+2192,8536304,"test.ipynb",337,0,"",python,selection_command
+2193,8536337,"test.ipynb",408,0,"",python,selection_command
+2194,8536374,"test.ipynb",493,0,"",python,selection_command
+2195,8536410,"test.ipynb",494,0,"",python,selection_command
+2196,8536438,"test.ipynb",530,0,"",python,selection_command
+2197,8536470,"test.ipynb",559,0,"",python,selection_command
+2198,8536505,"test.ipynb",587,0,"",python,selection_command
+2199,8536597,"test.ipynb",609,0,"",python,selection_command
+2200,8536598,"test.ipynb",610,0,"",python,selection_command
+2201,8536790,"test.ipynb",609,0,"",python,selection_command
+2202,8536942,"test.ipynb",587,0,"",python,selection_command
+2203,8537156,"test.ipynb",587,21,"os.makedirs(ckpt_dir)",python,selection_command
+2204,8537219,"test.ipynb",559,49," shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2205,8537481,"test.ipynb",530,78,"if os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2206,8537513,"test.ipynb",494,114,"ckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2207,8537539,"test.ipynb",493,115,"\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2208,8537645,"test.ipynb",408,200,"# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2209,8537646,"test.ipynb",337,271,"# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2210,8537646,"test.ipynb",262,346,"# Attempting to restore this checkpoint into a model instance created with\n# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2211,8537671,"test.ipynb",260,348,"#\n# Attempting to restore this checkpoint into a model instance created with\n# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2212,8537711,"test.ipynb",207,401,"# `use_bias=False`, the bias parameter is not saved.\n#\n# Attempting to restore this checkpoint into a model instance created with\n# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2213,8537880,"test.ipynb",127,481,"# they are used (e.g. `use_bias=True`). When checkpointing a model created with\n# `use_bias=False`, the bias parameter is not saved.\n#\n# Attempting to restore this checkpoint into a model instance created with\n# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2214,8538051,"test.ipynb",47,561,"# The hunch is that parameters like biases in Linear layers are only created if\n# they are used (e.g. `use_bias=True`). When checkpointing a model created with\n# `use_bias=False`, the bias parameter is not saved.\n#\n# Attempting to restore this checkpoint into a model instance created with\n# `use_bias=True` is expected to fail, as the checkpointed state has a\n# different structure (missing the 'bias' leaf in the PyTree) from the target model.\n\nckpt_dir = '/tmp/flax_nnx_bug_ckpt'\nif os.path.exists(ckpt_dir):\n shutil.rmtree(ckpt_dir)\nos.makedirs(ckpt_dir)",python,selection_command
+2215,8538251,"test.ipynb",47,562,"",python,content
+2216,8538885,"test.ipynb",46,0,"",python,selection_command
+2217,8539110,"test.ipynb",46,1,"",python,content
+2218,8539437,"test.ipynb",46,1,"",python,content
+2219,8540792,"test.ipynb",25,0,"",python,selection_command
+2220,8540898,"test.ipynb",24,0,"",python,selection_command
+2221,8541031,"test.ipynb",10,0,"",python,selection_command
+2222,8541374,"test.ipynb",10,14,"",python,content
+2223,8541550,"test.ipynb",0,0,"",python,selection_command
+2224,8541841,"test.ipynb",0,10,"",python,content
+2225,8542173,"test.ipynb",0,1,"",python,content
+2226,8547087,"test.ipynb",0,0,"",python,tab
+2227,8547844,"test.ipynb",0,0,"",python,tab
+2228,8556176,"test.ipynb",0,0,"",python,tab
+2229,8556603,"test.ipynb",0,0,"",python,tab
+2230,8558143,"test.ipynb",0,0,"",python,tab
+2231,8559088,"test.ipynb",0,0,"m",python,content
+2232,8559089,"test.ipynb",1,0,"",python,selection_keyboard
+2233,8559147,"test.ipynb",1,0,"o",python,content
+2234,8559147,"test.ipynb",2,0,"",python,selection_keyboard
+2235,8559201,"test.ipynb",2,0,"d",python,content
+2236,8559201,"test.ipynb",3,0,"",python,selection_keyboard
+2237,8559217,"test.ipynb",3,0,"e",python,content
+2238,8559217,"test.ipynb",4,0,"",python,selection_keyboard
+2239,8564272,"test.ipynb",4,0,"l",python,content
+2240,8564273,"test.ipynb",5,0,"",python,selection_keyboard
+2241,8564274,"test.ipynb",5,0,"_",python,content
+2242,8564275,"test.ipynb",6,0,"",python,selection_keyboard
+2243,8564276,"test.ipynb",6,0,"n",python,content
+2244,8564276,"test.ipynb",7,0,"",python,selection_keyboard
+2245,8564289,"test.ipynb",7,0,"o",python,content
+2246,8564289,"test.ipynb",8,0,"",python,selection_keyboard
+2247,8564293,"test.ipynb",8,0,"_",python,content
+2248,8564294,"test.ipynb",9,0,"",python,selection_keyboard
+2249,8564296,"test.ipynb",9,0,"d",python,content
+2250,8564296,"test.ipynb",10,0,"",python,selection_keyboard
+2251,8564298,"test.ipynb",10,0,"r",python,content
+2252,8564298,"test.ipynb",11,0,"",python,selection_keyboard
+2253,8564299,"test.ipynb",11,0,"o",python,content
+2254,8564300,"test.ipynb",12,0,"",python,selection_keyboard
+2255,8564302,"test.ipynb",12,0,"p",python,content
+2256,8564303,"test.ipynb",13,0,"",python,selection_keyboard
+2257,8564305,"test.ipynb",13,0,"o",python,content
+2258,8564305,"test.ipynb",14,0,"",python,selection_keyboard
+2259,8564308,"test.ipynb",14,0,"u",python,content
+2260,8564308,"test.ipynb",15,0,"",python,selection_keyboard
+2261,8564310,"test.ipynb",15,0,"t",python,content
+2262,8564311,"test.ipynb",16,0,"",python,selection_keyboard
+2263,8564312,"test.ipynb",16,0," ",python,content
+2264,8564313,"test.ipynb",17,0,"",python,selection_keyboard
+2265,8564317,"test.ipynb",17,0,"= MyModel(use_bias=False, dropout=0.0, rngs=rngs)",python,content
+2266,8565133,"test.ipynb",66,0,"\nmodel_no_dropout(dummy_input)\n\nstate_no_dropout = nnx.split(model_no_dropout)\nnnx.display(state_no_dropout)\n\nmodel_with_dropout = MyModel(use_bias=False, dropout=0.5, rngs=rngs)\nmodel_with_dropout(dummy_input)\n\nstate_with_dropout = nnx.split(model_with_dropout)\nnnx.display(state_with_dropout)",python,content
+2267,8565636,"test.ipynb",359,0,"",python,selection_command
+2268,8566536,"test.ipynb",308,0,"",python,selection_command
+2269,8566719,"test.ipynb",277,0,"",python,selection_command
+2270,8566843,"test.ipynb",275,0,"",python,selection_command
+2271,8567148,"test.ipynb",206,0,"",python,selection_command
+2272,8567289,"test.ipynb",175,0,"",python,selection_command
+2273,8569608,"test.ipynb",0,0,"",python,tab
+2274,8571745,"test.ipynb",0,0,"",python,tab
+2275,8571983,"test.ipynb",206,0,"",python,selection_command
+2276,8572271,"test.ipynb",176,68,"model_with_dropout = MyModel(use_bias=False, dropout=0.5, rngs=rngs)",python,selection_command
+2277,8572403,"test.ipynb",176,100,"model_with_dropout = MyModel(use_bias=False, dropout=0.5, rngs=rngs)\nmodel_with_dropout(dummy_input)",python,selection_command
+2278,8572666,"test.ipynb",176,101,"model_with_dropout = MyModel(use_bias=False, dropout=0.5, rngs=rngs)\nmodel_with_dropout(dummy_input)\n",python,selection_command
+2279,8572694,"test.ipynb",176,152,"model_with_dropout = MyModel(use_bias=False, dropout=0.5, rngs=rngs)\nmodel_with_dropout(dummy_input)\n\nstate_with_dropout = nnx.split(model_with_dropout)",python,selection_command
+2280,8572720,"test.ipynb",176,184,"model_with_dropout = MyModel(use_bias=False, dropout=0.5, rngs=rngs)\nmodel_with_dropout(dummy_input)\n\nstate_with_dropout = nnx.split(model_with_dropout)\nnnx.display(state_with_dropout)",python,selection_command
+2281,8572926,"test.ipynb",175,185,"",python,content
+2282,8573999,"test.ipynb",0,0,"",python,tab
+2283,8575223,"test.ipynb",0,0,"\nmodel_with_dropout = MyModel(use_bias=False, dropout=0.5, rngs=rngs)\nmodel_with_dropout(dummy_input)\n\nstate_with_dropout = nnx.split(model_with_dropout)\nnnx.display(state_with_dropout)",python,content
+2284,8575231,"test.ipynb",1,0,"",python,selection_command
+2285,8575697,"test.ipynb",0,0,"",python,selection_command
+2286,8575941,"test.ipynb",0,1,"",python,content
+2287,8579028,"test.ipynb",0,0,"",python,tab
+2288,8579631,"test.ipynb",145,0,"",python,selection_command
+2289,8581071,"test.ipynb",0,0,"",python,tab
+2290,8581071,"test.ipynb",388,0,"",python,selection_mouse
+2291,8581076,"test.ipynb",387,0,"",python,selection_command
+2292,8582667,"test.ipynb",0,0,"",python,tab
+2293,8583574,"test.ipynb",0,0,"d",python,content
+2294,8583574,"test.ipynb",1,0,"",python,selection_keyboard
+2295,8583663,"test.ipynb",1,0,"u",python,content
+2296,8583664,"test.ipynb",2,0,"",python,selection_keyboard
+2297,8583815,"test.ipynb",2,0,"m",python,content
+2298,8583815,"test.ipynb",3,0,"",python,selection_keyboard
+2299,8583948,"test.ipynb",3,0,"m",python,content
+2300,8583949,"test.ipynb",4,0,"",python,selection_keyboard
+2301,8584638,"test.ipynb",4,0,"y_input = jnp.ones((1, 10))",python,content
+2302,8584885,"test.ipynb",30,0,"",python,selection_command
+2303,8587141,"test.ipynb",0,0,"\n",python,content
+2304,8587571,"test.ipynb",0,0,"i",python,content
+2305,8587571,"test.ipynb",1,0,"",python,selection_keyboard
+2306,8587649,"test.ipynb",1,0,"m",python,content
+2307,8587649,"test.ipynb",2,0,"",python,selection_keyboard
+2308,8587712,"test.ipynb",2,0,"p",python,content
+2309,8587713,"test.ipynb",3,0,"",python,selection_keyboard
+2310,8587835,"test.ipynb",3,0,"o",python,content
+2311,8587836,"test.ipynb",4,0,"",python,selection_keyboard
+2312,8587879,"test.ipynb",4,0,"r",python,content
+2313,8587880,"test.ipynb",5,0,"",python,selection_keyboard
+2314,8588030,"test.ipynb",5,0,"t",python,content
+2315,8588031,"test.ipynb",6,0,"",python,selection_keyboard
+2316,8588383,"test.ipynb",6,0," jax.numpy as jnp",python,content
+2317,8588540,"test.ipynb",22,0,"",python,selection_command
+2318,8589990,"test.ipynb",0,0,"",python,tab
+2319,8592806,"test.ipynb",0,0,"",python,tab
+2320,8594543,"test.ipynb",0,0,"",python,tab
+2321,8595766,"test.ipynb",46,0,"",python,selection_command
+2322,8595949,"test.ipynb",55,0,"\n",python,content
+2323,8596137,"test.ipynb",56,0,"\n",python,content
+2324,8596864,"test.ipynb",57,0,"r",python,content
+2325,8596864,"test.ipynb",58,0,"",python,selection_keyboard
+2326,8596951,"test.ipynb",58,0,"n",python,content
+2327,8596951,"test.ipynb",59,0,"",python,selection_keyboard
+2328,8597029,"test.ipynb",59,0,"g",python,content
+2329,8597030,"test.ipynb",60,0,"",python,selection_keyboard
+2330,8597113,"test.ipynb",60,0,"s",python,content
+2331,8597113,"test.ipynb",61,0,"",python,selection_keyboard
+2332,8597210,"test.ipynb",61,0," ",python,content
+2333,8597210,"test.ipynb",62,0,"",python,selection_keyboard
+2334,8597698,"test.ipynb",62,0,"= nnx.Rngs(0)",python,content
+2335,8597907,"test.ipynb",74,0,"",python,selection_command
+2336,8600066,"test.ipynb",0,0,"",python,tab
+2337,8600744,"test.ipynb",0,0,"",python,tab
+2338,8603437,"test.ipynb",0,0,"",python,tab
+2339,8603625,"test.ipynb",0,0,"",python,tab
+2340,8604734,"test.ipynb",0,0,"",python,tab
+2341,8605275,"test.ipynb",0,0,"",python,tab
+2342,8608689,"test.ipynb",63,0,"",python,selection_mouse
+2343,8611434,"test.ipynb",0,0,"",python,tab
+2344,8612415,"test.ipynb",0,0,"",python,tab
+2345,8649679,"test.ipynb",0,0,"",python,tab
+2346,8649679,"test.ipynb",122,0,"",python,selection_mouse
+2347,8650507,"test.ipynb",121,0,"",python,selection_command
+2348,8650651,"test.ipynb",121,5,"",python,content
+2349,8650961,"test.ipynb",121,0,"s",python,content
+2350,8650962,"test.ipynb",122,0,"",python,selection_keyboard
+2351,8651101,"test.ipynb",122,0,"t",python,content
+2352,8651101,"test.ipynb",123,0,"",python,selection_keyboard
+2353,8651135,"test.ipynb",123,0,"a",python,content
+2354,8651135,"test.ipynb",124,0,"",python,selection_keyboard
+2355,8651247,"test.ipynb",124,0,"t",python,content
+2356,8651248,"test.ipynb",125,0,"",python,selection_keyboard
+2357,8651309,"test.ipynb",125,0,"e",python,content
+2358,8651310,"test.ipynb",126,0,"",python,selection_keyboard
+2359,8651530,"test.ipynb",125,0,"",python,selection_command
+2360,8653188,"test.ipynb",0,0,"",python,tab
+2361,8655803,"test.ipynb",99,0,"",python,selection_command
+2362,8655945,"test.ipynb",101,0,"",python,selection_command
+2363,8656069,"test.ipynb",151,0,"",python,selection_command
+2364,8656448,"test.ipynb",133,0,"",python,selection_command
+2365,8656580,"test.ipynb",132,0,"",python,selection_command
+2366,8656718,"test.ipynb",127,0,"",python,selection_command
+2367,8656895,"test.ipynb",126,0,"",python,selection_command
+2368,8657163,"test.ipynb",127,0,"",python,selection_command
+2369,8657356,"test.ipynb",127,5,"",python,content
+2370,8657503,"test.ipynb",127,0,"s",python,content
+2371,8657503,"test.ipynb",128,0,"",python,selection_keyboard
+2372,8657602,"test.ipynb",128,0,"t",python,content
+2373,8657603,"test.ipynb",129,0,"",python,selection_keyboard
+2374,8657644,"test.ipynb",129,0,"a",python,content
+2375,8657645,"test.ipynb",130,0,"",python,selection_keyboard
+2376,8657732,"test.ipynb",130,0,"t",python,content
+2377,8657732,"test.ipynb",131,0,"",python,selection_keyboard
+2378,8657795,"test.ipynb",131,0,"e",python,content
+2379,8657796,"test.ipynb",132,0,"",python,selection_keyboard
+2380,8696628,"test.ipynb",0,0,"",python,tab
+2381,8697959,"test.ipynb",0,0,"j",python,content
+2382,8697959,"test.ipynb",1,0,"",python,selection_keyboard
+2383,8698102,"test.ipynb",1,0,"n",python,content
+2384,8698102,"test.ipynb",2,0,"",python,selection_keyboard
+2385,8698146,"test.ipynb",2,0,"p",python,content
+2386,8698146,"test.ipynb",3,0,"",python,selection_keyboard
+2387,8698620,"test.ipynb",3,0,".",python,content
+2388,8698620,"test.ipynb",4,0,"",python,selection_keyboard
+2389,8698833,"test.ipynb",4,0,"a",python,content
+2390,8698833,"test.ipynb",5,0,"",python,selection_keyboard
+2391,8698885,"test.ipynb",5,0,"s",python,content
+2392,8698886,"test.ipynb",6,0,"",python,selection_keyboard
+2393,8699134,"test.ipynb",6,0,"s",python,content
+2394,8699134,"test.ipynb",7,0,"",python,selection_keyboard
+2395,8699323,"test.ipynb",7,0,"e",python,content
+2396,8699324,"test.ipynb",8,0,"",python,selection_keyboard
+2397,8699328,"test.ipynb",8,0,"r",python,content
+2398,8699328,"test.ipynb",9,0,"",python,selection_keyboard
+2399,8699498,"test.ipynb",9,0,"t",python,content
+2400,8699498,"test.ipynb",10,0,"",python,selection_keyboard
+2401,8700495,"test.ipynb",10,0,"t",python,content
+2402,8700495,"test.ipynb",11,0,"",python,selection_keyboard
+2403,8700907,"test.ipynb",10,1,"",python,content
+2404,8701230,"test.ipynb",10,0,"_",python,content
+2405,8701230,"test.ipynb",11,0,"",python,selection_keyboard
+2406,8703851,"test.ipynb",11,0,"allclose(jnp.array([1, 2, 3]), jnp.array([1, 2, 3]))",python,content
+2407,8703851,"test.ipynb",3,0,"\n\njnp.testing",python,content
+2408,8703851,"test.ipynb",0,0,"import jax.numpy as ",python,content
+2409,8704375,"test.ipynb",95,0,"",python,selection_command
+2410,8705423,"test.ipynb",25,0,"",python,selection_command
+2411,8706490,"test.ipynb",28,0,"",python,selection_command
+2412,8707020,"test.ipynb",24,0,"",python,selection_command
+2413,8707192,"test.ipynb",3,0,"",python,selection_command
+2414,8707548,"test.ipynb",23,0,"\n",python,content
+2415,8708760,"test.ipynb",24,0,"i",python,content
+2416,8708761,"test.ipynb",25,0,"",python,selection_keyboard
+2417,8708767,"test.ipynb",25,0,"m",python,content
+2418,8708767,"test.ipynb",26,0,"",python,selection_keyboard
+2419,8708919,"test.ipynb",26,0,"p",python,content
+2420,8708920,"test.ipynb",27,0,"",python,selection_keyboard
+2421,8709014,"test.ipynb",27,0,"o",python,content
+2422,8709015,"test.ipynb",28,0,"",python,selection_keyboard
+2423,8709123,"test.ipynb",28,0,"r",python,content
+2424,8709124,"test.ipynb",29,0,"",python,selection_keyboard
+2425,8709124,"test.ipynb",29,0,"t",python,content
+2426,8709125,"test.ipynb",30,0,"",python,selection_keyboard
+2427,8709285,"test.ipynb",30,0," ",python,content
+2428,8709286,"test.ipynb",31,0,"",python,selection_keyboard
+2429,8709821,"test.ipynb",30,0,"",python,selection_command
+2430,8710172,"test.ipynb",24,8,"",python,content
+2431,8710667,"test.ipynb",25,0,"",python,selection_command
+2432,8710949,"test.ipynb",28,0,"",python,selection_command
+2433,8711104,"test.ipynb",29,0,"",python,selection_command
+2434,8713307,"test.ipynb",0,0,"",python,tab
+2435,8714733,"test.ipynb",0,0,"",python,tab
+2436,8715914,"test.ipynb",28,0,"",python,selection_command
+2437,8716065,"test.ipynb",25,0,"",python,selection_command
+2438,8716263,"test.ipynb",25,3,"",python,content
+2439,8716353,"test.ipynb",25,0,"j",python,content
+2440,8716353,"test.ipynb",26,0,"",python,selection_keyboard
+2441,8716447,"test.ipynb",26,0,"a",python,content
+2442,8716448,"test.ipynb",27,0,"",python,selection_keyboard
+2443,8716568,"test.ipynb",27,0,"x",python,content
+2444,8716569,"test.ipynb",28,0,"",python,selection_keyboard
+2445,8716714,"test.ipynb",28,0,".",python,content
+2446,8716715,"test.ipynb",29,0,"",python,selection_keyboard
+2447,8717102,"test.ipynb",28,1,"",python,content
+2448,8717167,"test.ipynb",27,0,"",python,selection_command
+2449,8727739,"test.ipynb",25,0,"",python,selection_command
+2450,8727832,"test.ipynb",25,1,"j",python,selection_command
+2451,8727877,"test.ipynb",25,3,"jax",python,selection_command
+2452,8728146,"test.ipynb",25,4,"jax.",python,selection_command
+2453,8728437,"test.ipynb",25,11,"jax.testing",python,selection_command
+2454,8729744,"test.ipynb",25,11,"",python,content
+2455,8730368,"test.ipynb",25,0,"j",python,content
+2456,8730368,"test.ipynb",26,0,"",python,selection_keyboard
+2457,8730526,"test.ipynb",26,0,"n",python,content
+2458,8730526,"test.ipynb",27,0,"",python,selection_keyboard
+2459,8730604,"test.ipynb",27,0,"p",python,content
+2460,8730605,"test.ipynb",28,0,"",python,selection_keyboard
+2461,8730695,"test.ipynb",27,0,"",python,selection_command
+2462,8731003,"test.ipynb",28,0,"",python,selection_command
+2463,8731300,"test.ipynb",29,0,"",python,selection_command
+2464,8731787,"test.ipynb",29,15,"",python,content
+2465,8731930,"test.ipynb",29,0,"a",python,content
+2466,8731930,"test.ipynb",30,0,"",python,selection_keyboard
+2467,8732213,"test.ipynb",30,0,"l",python,content
+2468,8732213,"test.ipynb",31,0,"",python,selection_keyboard
+2469,8732372,"test.ipynb",31,0,"l",python,content
+2470,8732372,"test.ipynb",32,0,"",python,selection_keyboard
+2471,8732504,"test.ipynb",32,0,"c",python,content
+2472,8732505,"test.ipynb",33,0,"",python,selection_keyboard
+2473,8732701,"test.ipynb",33,0,"l",python,content
+2474,8732702,"test.ipynb",34,0,"",python,selection_keyboard
+2475,8732886,"test.ipynb",34,0,"o",python,content
+2476,8732887,"test.ipynb",35,0,"",python,selection_keyboard
+2477,8732930,"test.ipynb",35,0,"s",python,content
+2478,8732930,"test.ipynb",36,0,"",python,selection_keyboard
+2479,8732966,"test.ipynb",36,0,"e",python,content
+2480,8732967,"test.ipynb",37,0,"",python,selection_keyboard
+2481,8733238,"test.ipynb",36,0,"",python,selection_command
+2482,8733558,"test.ipynb",37,0,"",python,selection_command
+2483,8733794,"test.ipynb",38,0,"",python,selection_command
+2484,8734792,"test.ipynb",38,42,"",python,content
+2485,8736731,"test.ipynb",38,0,"m",python,content
+2486,8736732,"test.ipynb",39,0,"",python,selection_keyboard
+2487,8736760,"test.ipynb",39,0,"o",python,content
+2488,8736761,"test.ipynb",40,0,"",python,selection_keyboard
+2489,8736802,"test.ipynb",40,0,"d",python,content
+2490,8736803,"test.ipynb",41,0,"",python,selection_keyboard
+2491,8736922,"test.ipynb",41,0,"e",python,content
+2492,8736922,"test.ipynb",42,0,"",python,selection_keyboard
+2493,8737089,"test.ipynb",42,0,"l",python,content
+2494,8737090,"test.ipynb",43,0,"",python,selection_keyboard
+2495,8738360,"test.ipynb",42,0,"",python,selection_command
+2496,8741730,"test.ipynb",38,0,"",python,selection_command
+2497,8741882,"test.ipynb",38,5,"",python,content
+2498,8742148,"test.ipynb",38,0,"s",python,content
+2499,8742148,"test.ipynb",39,0,"",python,selection_keyboard
+2500,8742269,"test.ipynb",39,0,"t",python,content
+2501,8742269,"test.ipynb",40,0,"",python,selection_keyboard
+2502,8742294,"test.ipynb",40,0,"a",python,content
+2503,8742294,"test.ipynb",41,0,"",python,selection_keyboard
+2504,8742427,"test.ipynb",41,0,"t",python,content
+2505,8742428,"test.ipynb",42,0,"",python,selection_keyboard
+2506,8742501,"test.ipynb",42,0,"e",python,content
+2507,8742502,"test.ipynb",43,0,"",python,selection_keyboard
+2508,8742751,"test.ipynb",43,0,"_",python,content
+2509,8742752,"test.ipynb",44,0,"",python,selection_keyboard
+2510,8743211,"test.ipynb",44,0,"with_dropout, state_no_dropout",python,content
+2511,8743461,"test.ipynb",73,0,"",python,selection_command
+2512,8745299,"test.ipynb",25,0,"",python,selection_command
+2513,8745561,"test.ipynb",25,0,"j",python,content
+2514,8745562,"test.ipynb",26,0,"",python,selection_keyboard
+2515,8745819,"test.ipynb",26,0,"n",python,content
+2516,8745819,"test.ipynb",27,0,"",python,selection_keyboard
+2517,8745869,"test.ipynb",27,0,"p",python,content
+2518,8745870,"test.ipynb",28,0,"",python,selection_keyboard
+2519,8746162,"test.ipynb",28,0,".",python,content
+2520,8746163,"test.ipynb",29,0,"",python,selection_keyboard
+2521,8746433,"test.ipynb",29,0,"t",python,content
+2522,8746433,"test.ipynb",30,0,"",python,selection_keyboard
+2523,8746612,"test.ipynb",30,0,"r",python,content
+2524,8746612,"test.ipynb",31,0,"",python,selection_keyboard
+2525,8746669,"test.ipynb",31,0,"e",python,content
+2526,8746669,"test.ipynb",32,0,"",python,selection_keyboard
+2527,8747323,"test.ipynb",31,1,"",python,content
+2528,8747429,"test.ipynb",30,1,"",python,content
+2529,8747581,"test.ipynb",29,1,"",python,content
+2530,8747707,"test.ipynb",28,1,"",python,content
+2531,8747867,"test.ipynb",27,1,"",python,content
+2532,8748189,"test.ipynb",26,1,"",python,content
+2533,8748264,"test.ipynb",26,0,"a",python,content
+2534,8748264,"test.ipynb",27,0,"",python,selection_keyboard
+2535,8748403,"test.ipynb",27,0,"x",python,content
+2536,8748404,"test.ipynb",28,0,"",python,selection_keyboard
+2537,8748542,"test.ipynb",28,0,".",python,content
+2538,8748542,"test.ipynb",29,0,"",python,selection_keyboard
+2539,8748698,"test.ipynb",29,0,"t",python,content
+2540,8748698,"test.ipynb",30,0,"",python,selection_keyboard
+2541,8748865,"test.ipynb",30,0,"r",python,content
+2542,8748865,"test.ipynb",31,0,"",python,selection_keyboard
+2543,8748897,"test.ipynb",31,0,"e",python,content
+2544,8748897,"test.ipynb",32,0,"",python,selection_keyboard
+2545,8749074,"test.ipynb",32,0,"e",python,content
+2546,8749074,"test.ipynb",33,0,"",python,selection_keyboard
+2547,8749197,"test.ipynb",33,0,".",python,content
+2548,8749197,"test.ipynb",34,0,"",python,selection_keyboard
+2549,8749371,"test.ipynb",34,0,"m",python,content
+2550,8749372,"test.ipynb",35,0,"",python,selection_keyboard
+2551,8749488,"test.ipynb",35,0,"a",python,content
+2552,8749489,"test.ipynb",36,0,"",python,selection_keyboard
+2553,8749582,"test.ipynb",36,0,"p",python,content
+2554,8749582,"test.ipynb",37,0,"",python,selection_keyboard
+2555,8749807,"test.ipynb",37,0,"(",python,content
+2556,8749808,"test.ipynb",38,0,"",python,selection_keyboard
+2557,8750048,"test.ipynb",37,0,"",python,selection_command
+2558,8750331,"test.ipynb",88,0,"",python,selection_command
+2559,8750393,"test.ipynb",88,0,")",python,content
+2560,8750393,"test.ipynb",89,0,"",python,selection_keyboard
+2561,8750751,"test.ipynb",88,0,"",python,selection_command
+2562,8751137,"test.ipynb",87,0,"",python,selection_command
+2563,8751397,"test.ipynb",71,0,"",python,selection_command
+2564,8751416,"test.ipynb",69,0,"",python,selection_command
+2565,8751449,"test.ipynb",51,0,"",python,selection_command
+2566,8751480,"test.ipynb",50,0,"",python,selection_command
+2567,8751514,"test.ipynb",42,0,"",python,selection_command
+2568,8751546,"test.ipynb",41,0,"",python,selection_command
+2569,8751580,"test.ipynb",38,0,"",python,selection_command
+2570,8751879,"test.ipynb",41,0,"",python,selection_command
+2571,8752087,"test.ipynb",42,0,"",python,selection_command
+2572,8754598,"test.ipynb",41,0,"",python,selection_command
+2573,8754983,"test.ipynb",38,0,"",python,selection_command
+2574,8755664,"test.ipynb",38,0,"l",python,content
+2575,8755665,"test.ipynb",39,0,"",python,selection_keyboard
+2576,8755764,"test.ipynb",39,0,"a",python,content
+2577,8755765,"test.ipynb",40,0,"",python,selection_keyboard
+2578,8755886,"test.ipynb",40,0,"m",python,content
+2579,8755887,"test.ipynb",41,0,"",python,selection_keyboard
+2580,8756055,"test.ipynb",41,0,"b",python,content
+2581,8756056,"test.ipynb",42,0,"",python,selection_keyboard
+2582,8756100,"test.ipynb",42,0,"d",python,content
+2583,8756100,"test.ipynb",43,0,"",python,selection_keyboard
+2584,8756147,"test.ipynb",43,0,"a",python,content
+2585,8756148,"test.ipynb",44,0,"",python,selection_keyboard
+2586,8757016,"test.ipynb",44,0," ",python,content
+2587,8757017,"test.ipynb",45,0,"",python,selection_keyboard
+2588,8757431,"test.ipynb",45,0,"x",python,content
+2589,8757431,"test.ipynb",46,0,"",python,selection_keyboard
+2590,8757675,"test.ipynb",46,0,":",python,content
+2591,8757676,"test.ipynb",47,0,"",python,selection_keyboard
+2592,8757769,"test.ipynb",47,0," ",python,content
+2593,8757769,"test.ipynb",48,0,"",python,selection_keyboard
+2594,8759849,"test.ipynb",47,1,"",python,content
+2595,8760144,"test.ipynb",46,1,"",python,content
+2596,8760146,"test.ipynb",45,1,"",python,content
+2597,8760148,"test.ipynb",44,1,"",python,content
+2598,8760184,"test.ipynb",43,1,"",python,content
+2599,8760338,"test.ipynb",42,1,"",python,content
+2600,8760518,"test.ipynb",41,1,"",python,content
+2601,8760703,"test.ipynb",40,1,"",python,content
+2602,8760886,"test.ipynb",39,1,"",python,content
+2603,8761060,"test.ipynb",38,1,"",python,content
+2604,8761192,"test.ipynb",37,0,"",python,selection_command
+2605,8761716,"test.ipynb",24,0,"",python,selection_command
+2606,8761885,"test.ipynb",12,0,"",python,selection_command
+2607,8762245,"test.ipynb",0,0,"\n",python,content
+2608,8762408,"test.ipynb",0,0,"i",python,content
+2609,8762409,"test.ipynb",1,0,"",python,selection_keyboard
+2610,8762574,"test.ipynb",1,0,"m",python,content
+2611,8762574,"test.ipynb",2,0,"",python,selection_keyboard
+2612,8762575,"test.ipynb",2,0,"p",python,content
+2613,8762576,"test.ipynb",3,0,"",python,selection_keyboard
+2614,8762600,"test.ipynb",3,0,"o",python,content
+2615,8762601,"test.ipynb",4,0,"",python,selection_keyboard
+2616,8762672,"test.ipynb",4,0,"r",python,content
+2617,8762672,"test.ipynb",5,0,"",python,selection_keyboard
+2618,8762778,"test.ipynb",5,0,"t",python,content
+2619,8762778,"test.ipynb",6,0,"",python,selection_keyboard
+2620,8762834,"test.ipynb",6,0," ",python,content
+2621,8762835,"test.ipynb",7,0,"",python,selection_keyboard
+2622,8762934,"test.ipynb",7,0,"j",python,content
+2623,8762935,"test.ipynb",8,0,"",python,selection_keyboard
+2624,8762984,"test.ipynb",8,0,"a",python,content
+2625,8762985,"test.ipynb",9,0,"",python,selection_keyboard
+2626,8763098,"test.ipynb",9,0,"x",python,content
+2627,8763099,"test.ipynb",10,0,"",python,selection_keyboard
+2628,8763409,"test.ipynb",9,0,"",python,selection_command
+2629,8764349,"test.ipynb",20,0,"",python,selection_command
+2630,8764522,"test.ipynb",35,0,"",python,selection_command
+2631,8764671,"test.ipynb",45,0,"",python,selection_command
+2632,8768504,"test.ipynb",36,64,"jax.tree.map(jnp.allclose(state_with_dropout, state_no_dropout))",python,selection_command
+2633,8768866,"test.ipynb",36,0,"",python,selection_command
+2634,8771645,"test.ipynb",36,0,"jax.tree_util.tree_map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout)\n",python,content
+2635,8771647,"test.ipynb",129,65,"",python,content
+2636,8778666,"test.ipynb",45,0,"",python,selection_command
+2637,8778957,"test.ipynb",36,0,"",python,selection_command
+2638,8779549,"test.ipynb",39,0,"",python,selection_command
+2639,8779731,"test.ipynb",40,0,"",python,selection_command
+2640,8780030,"test.ipynb",40,9,"",python,content
+2641,8780216,"test.ipynb",40,0,"t",python,content
+2642,8780216,"test.ipynb",41,0,"",python,selection_keyboard
+2643,8780400,"test.ipynb",41,0,"r",python,content
+2644,8780400,"test.ipynb",42,0,"",python,selection_keyboard
+2645,8780446,"test.ipynb",42,0,"e",python,content
+2646,8780446,"test.ipynb",43,0,"",python,selection_keyboard
+2647,8780564,"test.ipynb",43,0,"e",python,content
+2648,8780564,"test.ipynb",44,0,"",python,selection_keyboard
+2649,8780767,"test.ipynb",43,0,"",python,selection_command
+2650,8781088,"test.ipynb",44,0,"",python,selection_command
+2651,8781350,"test.ipynb",45,0,"",python,selection_command
+2652,8781716,"test.ipynb",45,1,"t",python,selection_command
+2653,8781817,"test.ipynb",45,8,"tree_map",python,selection_command
+2654,8782194,"test.ipynb",45,7,"tree_ma",python,selection_command
+2655,8782496,"test.ipynb",45,6,"tree_m",python,selection_command
+2656,8782496,"test.ipynb",45,5,"tree_",python,selection_command
+2657,8782600,"test.ipynb",45,4,"tree",python,selection_command
+2658,8782722,"test.ipynb",45,4,"",python,content
+2659,8783203,"test.ipynb",45,1,"",python,content
+2660,8790222,"test.ipynb",36,0,"",python,selection_command
+2661,8790537,"test.ipynb",36,0,"p",python,content
+2662,8790538,"test.ipynb",37,0,"",python,selection_keyboard
+2663,8790618,"test.ipynb",37,0,"r",python,content
+2664,8790618,"test.ipynb",38,0,"",python,selection_keyboard
+2665,8790712,"test.ipynb",38,0,"i",python,content
+2666,8790713,"test.ipynb",39,0,"",python,selection_keyboard
+2667,8790781,"test.ipynb",39,0,"n",python,content
+2668,8790781,"test.ipynb",40,0,"",python,selection_keyboard
+2669,8790886,"test.ipynb",40,0,"t",python,content
+2670,8790886,"test.ipynb",41,0,"",python,selection_keyboard
+2671,8791099,"test.ipynb",41,0,"(",python,content
+2672,8791100,"test.ipynb",42,0,"",python,selection_keyboard
+2673,8791251,"test.ipynb",41,0,"",python,selection_command
+2674,8791569,"test.ipynb",125,0,"",python,selection_command
+2675,8791598,"test.ipynb",125,0,")",python,content
+2676,8791599,"test.ipynb",126,0,"",python,selection_keyboard
+2677,8799031,"test.ipynb",125,0,"",python,selection_command
+2678,8799350,"test.ipynb",125,1,"",python,content
+2679,8799354,"test.ipynb",124,0,"",python,selection_command
+2680,8800013,"test.ipynb",36,0,"",python,selection_command
+2681,8800429,"test.ipynb",36,1,"p",python,selection_command
+2682,8800486,"test.ipynb",36,5,"print",python,selection_command
+2683,8800694,"test.ipynb",36,6,"print(",python,selection_command
+2684,8801609,"test.ipynb",36,6,"",python,content
+2685,8802114,"test.ipynb",36,0,"f",python,content
+2686,8802115,"test.ipynb",37,0,"",python,selection_keyboard
+2687,8802214,"test.ipynb",37,0," ",python,content
+2688,8802214,"test.ipynb",38,0,"",python,selection_keyboard
+2689,8802581,"test.ipynb",37,1,"",python,content
+2690,8802738,"test.ipynb",36,1,"",python,content
+2691,8802927,"test.ipynb",36,0,"i",python,content
+2692,8802927,"test.ipynb",37,0,"",python,selection_keyboard
+2693,8803019,"test.ipynb",37,0,"f",python,content
+2694,8803019,"test.ipynb",38,0,"",python,selection_keyboard
+2695,8803107,"test.ipynb",38,0," ",python,content
+2696,8803107,"test.ipynb",39,0,"",python,selection_keyboard
+2697,8803395,"test.ipynb",38,0,"",python,selection_command
+2698,8805288,"test.ipynb",122,0,"\nprint(is_close)",python,content
+2699,8805288,"test.ipynb",38,0,"s_close =",python,content
+2700,8805288,"test.ipynb",37,1,"",python,content
+2701,8813362,"test.ipynb",141,0,"",python,selection_command
+2702,8813703,"test.ipynb",130,16,"",python,content
+2703,8813708,"test.ipynb",36,0,"",python,selection_command
+2704,8813827,"test.ipynb",35,0,"",python,selection_command
+2705,8814347,"test.ipynb",36,0,"",python,selection_command
+2706,8815159,"test.ipynb",45,0,"",python,selection_command
+2707,8815366,"test.ipynb",47,0,"",python,selection_command
+2708,8815555,"test.ipynb",50,0,"",python,selection_command
+2709,8815730,"test.ipynb",51,0,"",python,selection_command
+2710,8815860,"test.ipynb",55,0,"",python,selection_command
+2711,8816064,"test.ipynb",56,0,"",python,selection_command
+2712,8816230,"test.ipynb",59,0,"",python,selection_command
+2713,8816483,"test.ipynb",60,0,"",python,selection_command
+2714,8816630,"test.ipynb",67,0,"",python,selection_command
+2715,8816823,"test.ipynb",68,0,"",python,selection_command
+2716,8817233,"test.ipynb",36,94,"is_close = jax.tree.map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout)",python,selection_command
+2717,8837967,"test.ipynb",0,0,"",python,tab
+2718,8837967,"test.ipynb",174,0,"",python,selection_mouse
+2719,8837968,"test.ipynb",173,0,"",python,selection_command
+2720,8838383,"test.ipynb",0,175,"model_no_dropout = MyModel(use_bias=False, dropout=0.0, rngs=rngs)\nmodel_no_dropout(dummy_input)\n\nstate_no_dropout = nnx.state(model_no_dropout)\nnnx.display(state_no_dropout)\n",python,selection_command
+2721,8838702,"test.ipynb",175,0,"",python,selection_command
+2722,8842939,"test.ipynb",0,0,"",python,tab
+2723,8842940,"test.ipynb",34,0,"",python,selection_mouse
+2724,8842948,"test.ipynb",33,0,"",python,selection_command
+2725,8843101,"test.ipynb",0,130,"import jax\nimport jax.numpy as jnp\n\nis_close = jax.tree.map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout)",python,selection_command
+2726,8843362,"test.ipynb",58,0,"",python,selection_command
+2727,8858192,"test.ipynb",0,0,"",python,tab
+2728,8859922,"test.ipynb",0,0,"",python,tab
+2729,8859922,"test.ipynb",101,0,"",python,selection_mouse
+2730,8861011,"test.ipynb",89,0,"",python,selection_mouse
+2731,8861533,"test.ipynb",101,0,"",python,selection_mouse
+2732,8890764,"test.ipynb",0,0,"",python,tab
+2733,8891766,"test.ipynb",0,0,"",python,tab
+2734,8891766,"test.ipynb",125,0,"",python,selection_mouse
+2735,8892287,"test.ipynb",36,94,"is_close = jax.tree.map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout)",python,selection_command
+2736,8892604,"test.ipynb",36,94,"is_close = jax.tree_util.tree_map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout)\nprint(""States are close:"", is_close)\n",python,content
+2737,8911708,"test.ipynb",169,0,"",python,selection_mouse
+2738,8912127,"test.ipynb",64,0,"",python,selection_command
+2739,8912301,"test.ipynb",36,104,"is_close = jax.tree_util.tree_map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout)",python,selection_command
+2740,8912415,"test.ipynb",36,141,"is_close = jax.tree_util.tree_map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout) print(""States are close:"", is_close)",python,content
+2741,8912419,"test.ipynb",140,0,"",python,selection_command
+2742,8912612,"test.ipynb",140,0,"# To get a summary of which parts are different:\ndef compare_states(state1, state2):\n """"""Compare two states and show which parts are different.""""""\n def compare_leaf(path, x, y):\n if jnp.allclose(x, y):\n return f""{path}: Same""\n else:\n return f""{path}: Different""\n \n return jax.tree_util.tree_map_with_path(compare_leaf, state1, state2)\n\ncomparison = compare_states(state_with_dropout, state_no_dropout)\n",python,content
+2743,8914088,"test.ipynb",140,450,"",python,content
+2744,8914103,"test.ipynb",178,0,"",python,selection_command
+2745,8914563,"test.ipynb",36,0,"",python,selection_command
+2746,8914718,"test.ipynb",36,141,"is_close = jax.tree_util.tree_map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout) print(""States are close:"", is_close)",python,selection_command
+2747,8914820,"test.ipynb",36,142,"is_close = jax.tree_util.tree_map(lambda x, y: jnp.allclose(x, y), state_with_dropout, state_no_dropout) print(""States are close:"", is_close)\n",python,selection_command
+2748,8915196,"test.ipynb",36,142,"# To get a summary of which parts are different:\ndef compare_states(state1, state2):\n """"""Compare two states and show which parts are different.""""""\n def compare_leaf(path, x, y):\n if jnp.allclose(x, y):\n return f""{path}: Same""\n else:\n return f""{path}: Different""\n \n return jax.tree_util.tree_map_with_path(compare_leaf, state1, state2)\n\ncomparison = compare_states(state_with_dropout, state_no_dropout)\n",python,content
+2749,8918204,"test.ipynb",36,149,"# To get a summary of which parts are different:\ndef compare_states(state1, state2):\n """"""Compare two states and show which parts are different.""""""",python,selection_command
+2750,8918978,"test.ipynb",125,0,"",python,selection_command
+2751,8920618,"test.ipynb",190,0,"",python,selection_command
+2752,8920865,"test.ipynb",224,0,"",python,selection_command
+2753,8920899,"test.ipynb",255,0,"",python,selection_command
+2754,8920931,"test.ipynb",290,0,"",python,selection_command
+2755,8920963,"test.ipynb",304,0,"",python,selection_command
+2756,8920999,"test.ipynb",343,0,"",python,selection_command
+2757,8921030,"test.ipynb",349,0,"",python,selection_command
+2758,8921064,"test.ipynb",419,0,"",python,selection_command
+2759,8921100,"test.ipynb",424,0,"",python,selection_command
+2760,8921131,"test.ipynb",486,0,"",python,selection_command
+2761,8924151,"test.ipynb",486,0,"p",python,content
+2762,8924152,"test.ipynb",487,0,"",python,selection_keyboard
+2763,8924203,"test.ipynb",487,0,"r",python,content
+2764,8924204,"test.ipynb",488,0,"",python,selection_keyboard
+2765,8924303,"test.ipynb",488,0,"i",python,content
+2766,8924303,"test.ipynb",489,0,"",python,selection_keyboard
+2767,8924395,"test.ipynb",489,0,"n",python,content
+2768,8924396,"test.ipynb",490,0,"",python,selection_keyboard
+2769,8924424,"test.ipynb",490,0,"t",python,content
+2770,8924424,"test.ipynb",491,0,"",python,selection_keyboard
+2771,8924685,"test.ipynb",491,0,"()",python,content
+2772,8924686,"test.ipynb",492,0,"",python,selection_keyboard
+2773,8925146,"test.ipynb",492,0,"comparison",python,content
+2774,8955367,"test.ipynb",0,0,"",python,tab
+2775,8955368,"test.ipynb",96,0,"",python,selection_mouse
+2776,8955370,"test.ipynb",95,0,"",python,selection_command
+2777,8956467,"test.ipynb",0,0,"",python,tab
+2778,8956680,"test.ipynb",0,0,"",python,tab
+2779,8965669,"test.ipynb",0,0,"",python,tab
+2780,8988574,"test.ipynb",0,0,"",python,tab
+2781,8996504,"train_dynamics.py",0,0,"",python,tab
+2782,9023543,"train_dynamics.py",10665,0,"",python,selection_mouse
+2783,9024030,"train_dynamics.py",10691,0,"",python,selection_mouse
+2784,9030458,"train_dynamics.py",10289,0,"",python,selection_mouse
+2785,9033509,"train_dynamics.py",10218,97,"",python,content
+2786,9033529,"train_dynamics.py",10226,0,"",python,selection_command
+2787,9035161,"train_dynamics.py",10226,0,"# FIXME (f.srambical): pass sharding information for restoration onto different topology\n ",python,content
+2788,9035171,"train_dynamics.py",10289,0,"",python,selection_command
+2789,9035948,"train_dynamics.py",10367,0,"",python,selection_command
+2790,9036112,"train_dynamics.py",10430,0,"",python,selection_command
+2791,9036291,"train_dynamics.py",10369,0,"",python,selection_command
+2792,9036565,"train_dynamics.py",10377,0,"",python,selection_command
+2793,9079970,"train_dynamics.py",13827,0,"",python,selection_command
+2794,9080583,"train_dynamics.py",13796,0,"",python,selection_command
+2795,9080810,"train_dynamics.py",13795,0,"",python,selection_command
+2796,9080843,"train_dynamics.py",13773,0,"",python,selection_command
+2797,9080874,"train_dynamics.py",13734,0,"",python,selection_command
+2798,9080910,"train_dynamics.py",13676,0,"",python,selection_command
+2799,9080949,"train_dynamics.py",13658,0,"",python,selection_command
+2800,9080982,"train_dynamics.py",13635,0,"",python,selection_command
+2801,9081008,"train_dynamics.py",13545,0,"",python,selection_command
+2802,9081041,"train_dynamics.py",13471,0,"",python,selection_command
+2803,9081075,"train_dynamics.py",13426,0,"",python,selection_command
+2804,9081108,"train_dynamics.py",13400,0,"",python,selection_command
+2805,9081142,"train_dynamics.py",13359,0,"",python,selection_command
+2806,9081175,"train_dynamics.py",13330,0,"",python,selection_command
+2807,9081298,"train_dynamics.py",13275,0,"",python,selection_command
+2808,9081651,"train_dynamics.py",13199,0,"",python,selection_command
+2809,9081947,"train_dynamics.py",13275,0,"",python,selection_command
+2810,9082310,"train_dynamics.py",13199,0,"",python,selection_command
+2811,9082520,"train_dynamics.py",13199,75," if args.save_ckpt and step % args.log_checkpoint_interval == 0:",python,selection_command
+2812,9082618,"train_dynamics.py",13199,130," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)",python,selection_command
+2813,9082872,"train_dynamics.py",13199,159," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()",python,selection_command
+2814,9082896,"train_dynamics.py",13199,200," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(",python,selection_command
+2815,9082929,"train_dynamics.py",13199,226," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(\n step,",python,selection_command
+2816,9082966,"train_dynamics.py",13199,271," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(",python,selection_command
+2817,9083001,"train_dynamics.py",13199,345," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),",python,selection_command
+2818,9083132,"train_dynamics.py",13199,435," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),",python,selection_command
+2819,9083286,"train_dynamics.py",13199,458," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),\n ),",python,selection_command
+2820,9083453,"train_dynamics.py",13199,476," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),\n ),\n )",python,selection_command
+2821,9083649,"train_dynamics.py",13199,534," if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n breakpoint()\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),\n ),\n )\n print(f""Saved checkpoint at step {step}"")",python,selection_command
+2822,9084015,"train_dynamics.py",13676,0,"",python,selection_command
+2823,9085240,"test.ipynb",0,0,"",python,tab
+2824,9088183,"test.ipynb",0,0,"",python,tab
+2825,9088183,"test.ipynb",328,0,"",python,selection_mouse
+2826,9088193,"test.ipynb",327,0,"",python,selection_command
+2827,9089266,"test.ipynb",0,0,"",python,tab
+2828,9089597,"test.ipynb",0,0,"",python,tab
+2829,9089867,"test.ipynb",0,0,"",python,tab
+2830,9092784,"test.ipynb",0,0,"",python,tab
+2831,9094980,"test.ipynb",0,0,"",python,tab
+2832,9094981,"test.ipynb",0,0,"",python,tab
+2833,9103049,"test.ipynb",0,0,"# Example: Load a model checkpoint saved as in the provided code\n\n",python,content
+2834,9103051,"test.ipynb",66,0,"\n",python,content
+2835,9103070,"test.ipynb",66,0,"import os\n",python,content
+2836,9103072,"test.ipynb",77,0,"\n",python,content
+2837,9103361,"test.ipynb",77,0,"# Assume you have access to the following:\n",python,content
+2838,9104203,"test.ipynb",120,0,"# - checkpoint_manager: an ocp.CheckpointManager instance\n",python,content
+2839,9104732,"test.ipynb",178,0,"# - nnx: the flax.nnx module\n",python,content
+2840,9105193,"test.ipynb",207,0,"# - MyModel: your model class\n",python,content
+2841,9106578,"test.ipynb",237,0,"# - args: an object with necessary attributes (e.g., restore_ckpt, etc.)\n",python,content
+2842,9106591,"test.ipynb",311,0,"\n",python,content
+2843,9107055,"test.ipynb",311,0,"# 1. Create a model and optimizer instance with the same structure as during training\n",python,content
+2844,9107389,"test.ipynb",397,0,"rngs = nnx.Rngs(0) # or use the appropriate seed/rngs as in your training script\n",python,content
+2845,9107866,"test.ipynb",479,0,"model = MyModel(use_bias=True, dropout=0.1, rngs=rngs)\n",python,content
+2846,9108164,"test.ipynb",534,0,"optimizer = nnx.Adam(model, lr=1e-3) # adjust optimizer and args as needed\n",python,content
+2847,9108177,"test.ipynb",611,0,"\n",python,content
+2848,9108323,"test.ipynb",611,0,"# 2. Create an abstract optimizer state for restoration\n",python,content
+2849,9108590,"test.ipynb",667,0,"abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n",python,content
+2850,9108770,"test.ipynb",722,0,"abstract_optimizer_state = nnx.state(abstract_optimizer)\n",python,content
+2851,9108785,"test.ipynb",780,0,"\n",python,content
+2852,9108790,"test.ipynb",780,0,"# 3. Restore the latest checkpoint\n",python,content
+2853,9108881,"test.ipynb",815,0,"restored = checkpoint_manager.restore(\n",python,content
+2854,9108969,"test.ipynb",854,0," checkpoint_manager.latest_step(),\n",python,content
+2855,9109003,"test.ipynb",892,0," args=ocp.args.Composite(\n",python,content
+2856,9109196,"test.ipynb",921,0," model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n",python,content
+2857,9109454,"test.ipynb",991,0," # dataloader_state can be omitted if not needed for inference\n",python,content
+2858,9109456,"test.ipynb",1061,0," ),\n",python,content
+2859,9109457,"test.ipynb",1068,0,")\n",python,content
+2860,9109553,"test.ipynb",1070,0,"restored_optimizer_state = restored[""model_state""]\n",python,content
+2861,9109555,"test.ipynb",1122,0,"\n",python,content
+2862,9109632,"test.ipynb",1122,0,"# 4. Update the optimizer with the restored state\n",python,content
+2863,9109812,"test.ipynb",1172,0,"nnx.update(optimizer, restored_optimizer_state)\n",python,content
+2864,9109814,"test.ipynb",1221,0,"\n",python,content
+2865,9110182,"test.ipynb",1221,0,"# Now, optimizer and its model parameters are loaded from the checkpoint\n",python,content
+2866,9110316,"test.ipynb",1294,0,"# You can use optimizer.model for inference or further training\n",python,content
+2867,9110318,"test.ipynb",1358,1,"",python,content
+2868,9115204,"test.ipynb",0,1357,"",python,content
+2869,9118496,"train_dynamics.py",0,0,"",python,tab
+2870,9119168,"train_dynamics.py",0,0,"",python,selection_command
+2871,9120164,"train_dynamics.py",710,0,"",python,selection_command
+2872,9120564,"train_dynamics.py",1598,0,"",python,selection_command
+2873,9120985,"train_dynamics.py",2374,0,"",python,selection_command
+2874,9121801,"train_dynamics.py",2373,0,"",python,selection_command
+2875,9122332,"train_dynamics.py",3764,0,"",python,selection_command
+2876,9122581,"train_dynamics.py",4693,0,"",python,selection_command
+2877,9123257,"train_dynamics.py",5719,0,"",python,selection_command
+2878,9123559,"train_dynamics.py",6780,0,"",python,selection_command
+2879,9124008,"train_dynamics.py",7495,0,"",python,selection_command
+2880,9124332,"train_dynamics.py",8829,0,"",python,selection_command
+2881,9124739,"train_dynamics.py",9941,0,"",python,selection_command
+2882,9125068,"train_dynamics.py",11283,0,"",python,selection_command
+2883,9125461,"train_dynamics.py",12662,0,"",python,selection_command
+2884,9125772,"train_dynamics.py",13827,0,"",python,selection_command
+2885,9126103,"train_dynamics.py",13211,0,"",python,selection_command
+2886,9126613,"train_dynamics.py",12404,0,"",python,selection_command
+2887,9126767,"train_dynamics.py",11830,0,"",python,selection_command
+2888,9126912,"train_dynamics.py",11126,0,"",python,selection_command
+2889,9127042,"train_dynamics.py",10377,0,"",python,selection_command
+2890,9127188,"train_dynamics.py",9770,0,"",python,selection_command
+2891,9127300,"train_dynamics.py",9285,0,"",python,selection_command
+2892,9127448,"train_dynamics.py",8583,0,"",python,selection_command
+2893,9127918,"train_dynamics.py",7412,0,"",python,selection_command
+2894,9128862,"train_dynamics.py",6651,0,"",python,selection_command
+2895,9129460,"train_dynamics.py",5565,0,"",python,selection_command
+2896,9130233,"train_dynamics.py",5529,0,"",python,selection_command
+2897,9130532,"train_dynamics.py",5479,0,"",python,selection_command
+2898,9130533,"train_dynamics.py",5431,0,"",python,selection_command
+2899,9130533,"train_dynamics.py",5381,0,"",python,selection_command
+2900,9130562,"train_dynamics.py",5339,0,"",python,selection_command
+2901,9130729,"train_dynamics.py",5303,0,"",python,selection_command
+2902,9131027,"train_dynamics.py",5283,0,"",python,selection_command
+2903,9131028,"train_dynamics.py",5264,0,"",python,selection_command
+2904,9131039,"train_dynamics.py",5238,0,"",python,selection_command
+2905,9131068,"train_dynamics.py",5200,0,"",python,selection_command
+2906,9131161,"train_dynamics.py",5169,0,"",python,selection_command
+2907,9131162,"train_dynamics.py",5160,0,"",python,selection_command
+2908,9131175,"train_dynamics.py",5128,0,"",python,selection_command
+2909,9131212,"train_dynamics.py",5119,0,"",python,selection_command
+2910,9131242,"train_dynamics.py",5059,0,"",python,selection_command
+2911,9131352,"train_dynamics.py",5050,0,"",python,selection_command
+2912,9131353,"train_dynamics.py",5048,0,"",python,selection_command
+2913,9131360,"train_dynamics.py",5000,0,"",python,selection_command
+2914,9131376,"train_dynamics.py",4927,0,"",python,selection_command
+2915,9131411,"train_dynamics.py",4901,0,"",python,selection_command
+2916,9131442,"train_dynamics.py",4858,0,"",python,selection_command
+2917,9131474,"train_dynamics.py",4849,0,"",python,selection_command
+2918,9131509,"train_dynamics.py",4809,0,"",python,selection_command
+2919,9131542,"train_dynamics.py",4759,0,"",python,selection_command
+2920,9131574,"train_dynamics.py",4734,0,"",python,selection_command
+2921,9131687,"train_dynamics.py",4697,0,"",python,selection_command
+2922,9131687,"train_dynamics.py",4664,0,"",python,selection_command
+2923,9131688,"train_dynamics.py",4637,0,"",python,selection_command
+2924,9131709,"train_dynamics.py",4628,0,"",python,selection_command
+2925,9131876,"train_dynamics.py",4637,0,"",python,selection_command
+2926,9132210,"train_dynamics.py",4664,0,"",python,selection_command
+2927,9132495,"train_dynamics.py",4697,0,"",python,selection_command
+2928,9133320,"train_dynamics.py",4689,36," num_devices = jax.device_count()",python,selection_command
+2929,9133613,"train_dynamics.py",4689,61," num_devices = jax.device_count()\n if num_devices == 0:",python,selection_command
+2930,9133865,"train_dynamics.py",4689,111," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")",python,selection_command
+2931,9133877,"train_dynamics.py",4689,159," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")",python,selection_command
+2932,9134521,"train_dynamics.py",4689,160," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n",python,selection_command
+2933,9134831,"train_dynamics.py",4689,203," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:",python,selection_command
+2934,9134831,"train_dynamics.py",4689,229," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(",python,selection_command
+2935,9134831,"train_dynamics.py",4689,302," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by """,python,selection_command
+2936,9134861,"train_dynamics.py",4689,350," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""",python,selection_command
+2937,9134886,"train_dynamics.py",4689,360," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )",python,selection_command
+2938,9134926,"train_dynamics.py",4689,361," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n",python,selection_command
+2939,9135022,"train_dynamics.py",4689,429," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices",python,selection_command
+2940,9135022,"train_dynamics.py",4689,430," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n",python,selection_command
+2941,9135022,"train_dynamics.py",4689,470," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)",python,selection_command
+2942,9135058,"train_dynamics.py",4689,471," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n",python,selection_command
+2943,9135091,"train_dynamics.py",4689,502," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---",python,selection_command
+2944,9135125,"train_dynamics.py",4689,540," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)",python,selection_command
+2945,9135157,"train_dynamics.py",4689,566," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)",python,selection_command
+2946,9135197,"train_dynamics.py",4689,585," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(",python,selection_command
+2947,9135227,"train_dynamics.py",4689,605," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer",python,selection_command
+2948,9135262,"train_dynamics.py",4689,641," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,",python,selection_command
+2949,9135358,"train_dynamics.py",4689,683," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,",python,selection_command
+2950,9135358,"train_dynamics.py",4689,733," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,",python,selection_command
+2951,9135359,"train_dynamics.py",4689,781," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,",python,selection_command
+2952,9135387,"train_dynamics.py",4689,831," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,",python,selection_command
+2953,9135418,"train_dynamics.py",4689,867," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,",python,selection_command
+2954,9135451,"train_dynamics.py",4689,923," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,",python,selection_command
+2955,9135546,"train_dynamics.py",4689,977," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,",python,selection_command
+2956,9135547,"train_dynamics.py",4689,991," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM",python,selection_command
+2957,9135558,"train_dynamics.py",4689,1021," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,",python,selection_command
+2958,9135586,"train_dynamics.py",4689,1059," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,",python,selection_command
+2959,9135626,"train_dynamics.py",4689,1109," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,",python,selection_command
+2960,9135660,"train_dynamics.py",4689,1161," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,",python,selection_command
+2961,9135693,"train_dynamics.py",4689,1205," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,",python,selection_command
+2962,9135726,"train_dynamics.py",4689,1249," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,",python,selection_command
+2963,9135758,"train_dynamics.py",4689,1291," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,",python,selection_command
+2964,9135791,"train_dynamics.py",4689,1337," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,",python,selection_command
+2965,9135881,"train_dynamics.py",4689,1356," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics",python,selection_command
+2966,9135881,"train_dynamics.py",4689,1388," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,",python,selection_command
+2967,9135892,"train_dynamics.py",4689,1428," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,",python,selection_command
+2968,9135926,"train_dynamics.py",4689,1474," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,",python,selection_command
+2969,9135961,"train_dynamics.py",4689,1518," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,",python,selection_command
+2970,9136071,"train_dynamics.py",4689,1548," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,",python,selection_command
+2971,9136072,"train_dynamics.py",4689,1584," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,",python,selection_command
+2972,9136072,"train_dynamics.py",4689,1622," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,",python,selection_command
+2973,9136092,"train_dynamics.py",4689,1648," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,",python,selection_command
+2974,9136125,"train_dynamics.py",4689,1702," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,",python,selection_command
+2975,9136161,"train_dynamics.py",4689,1721," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,",python,selection_command
+2976,9136219,"train_dynamics.py",4689,1727," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )",python,selection_command
+2977,9136240,"train_dynamics.py",4689,1728," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n",python,selection_command
+2978,9136272,"train_dynamics.py",4689,1780," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)",python,selection_command
+2979,9136296,"train_dynamics.py",4689,1837," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)",python,selection_command
+2980,9136404,"train_dynamics.py",4689,1838," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n",python,selection_command
+2981,9136405,"train_dynamics.py",4689,1884," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:",python,selection_command
+2982,9136457,"train_dynamics.py",4689,1914," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {",python,selection_command
+2983,9136832,"train_dynamics.py",4689,1949," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,",python,selection_command
+2984,9137121,"train_dynamics.py",4689,1986," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,",python,selection_command
+2985,9137121,"train_dynamics.py",4689,2017," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,",python,selection_command
+2986,9137143,"train_dynamics.py",4689,2048," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,",python,selection_command
+2987,9137172,"train_dynamics.py",4689,2078," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",",python,selection_command
+2988,9137209,"train_dynamics.py",4689,2106," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,",python,selection_command
+2989,9137242,"train_dynamics.py",4689,2116," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }",python,selection_command
+2990,9137278,"train_dynamics.py",4689,2117," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n",python,selection_command
+2991,9137311,"train_dynamics.py",4689,2143," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:",python,selection_command
+2992,9137342,"train_dynamics.py",4689,2181," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(",python,selection_command
+2993,9137453,"train_dynamics.py",4689,2199," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {",python,selection_command
+2994,9137453,"train_dynamics.py",4689,2240," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,",python,selection_command
+2995,9137453,"train_dynamics.py",4689,2279," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",",python,selection_command
+2996,9137477,"train_dynamics.py",4689,2297," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }",python,selection_command
+2997,9137513,"train_dynamics.py",4689,2311," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )",python,selection_command
+2998,9138501,"train_dynamics.py",4689,2351," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)",python,selection_command
+2999,9138692,"train_dynamics.py",4689,2352," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n",python,selection_command
+3000,9138712,"train_dynamics.py",4689,2417," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})",python,selection_command
+3001,9138745,"train_dynamics.py",4689,2418," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n",python,selection_command
+3002,9139099,"train_dynamics.py",4689,2417," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})",python,selection_command
+3003,9139350,"train_dynamics.py",4689,2352," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n",python,selection_command
+3004,9139379,"train_dynamics.py",4689,2351," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)",python,selection_command
+3005,9139410,"train_dynamics.py",4689,2311," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )",python,selection_command
+3006,9139442,"train_dynamics.py",4689,2297," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }",python,selection_command
+3007,9139549,"train_dynamics.py",4689,2279," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",",python,selection_command
+3008,9139550,"train_dynamics.py",4689,2240," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,",python,selection_command
+3009,9139550,"train_dynamics.py",4689,2199," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {",python,selection_command
+3010,9139576,"train_dynamics.py",4689,2181," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(",python,selection_command
+3011,9139610,"train_dynamics.py",4689,2143," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:",python,selection_command
+3012,9139642,"train_dynamics.py",4689,2117," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n",python,selection_command
+3013,9139741,"train_dynamics.py",4689,2116," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }",python,selection_command
+3014,9139741,"train_dynamics.py",4689,2106," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,",python,selection_command
+3015,9139742,"train_dynamics.py",4689,2078," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",",python,selection_command
+3016,9139773,"train_dynamics.py",4689,2048," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,",python,selection_command
+3017,9139806,"train_dynamics.py",4689,2017," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,",python,selection_command
+3018,9139846,"train_dynamics.py",4689,1986," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,",python,selection_command
+3019,9139875,"train_dynamics.py",4689,1949," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,",python,selection_command
+3020,9139908,"train_dynamics.py",4689,1914," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {",python,selection_command
+3021,9139941,"train_dynamics.py",4689,1884," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:",python,selection_command
+3022,9139976,"train_dynamics.py",4689,1838," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n",python,selection_command
+3023,9140076,"train_dynamics.py",4689,1837," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)",python,selection_command
+3024,9140076,"train_dynamics.py",4689,1780," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)",python,selection_command
+3025,9140077,"train_dynamics.py",4689,1728," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n",python,selection_command
+3026,9140111,"train_dynamics.py",4689,1727," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )",python,selection_command
+3027,9140144,"train_dynamics.py",4689,1721," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,",python,selection_command
+3028,9140180,"train_dynamics.py",4689,1702," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,",python,selection_command
+3029,9140265,"train_dynamics.py",4689,1648," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,",python,selection_command
+3030,9140305,"train_dynamics.py",4689,1622," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,",python,selection_command
+3031,9140306,"train_dynamics.py",4689,1584," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,",python,selection_command
+3032,9140395,"train_dynamics.py",4689,1622," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,",python,selection_command
+3033,9140661,"train_dynamics.py",4689,1648," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,",python,selection_command
+3034,9140679,"train_dynamics.py",4689,1702," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,",python,selection_command
+3035,9140709,"train_dynamics.py",4689,1721," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,",python,selection_command
+3036,9140875,"train_dynamics.py",4689,1727," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )",python,selection_command
+3037,9141314,"train_dynamics.py",6415,0,"",python,selection_command
+3038,9141884,"test.ipynb",0,0,"",python,tab
+3039,9144882,"test.ipynb",0,1,"",python,content
+3040,9145317,"test.ipynb",0,0," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )",python,content
+3041,9145534,"test.ipynb",1726,0,"",python,selection_command
+3042,9146029,"test.ipynb",4,0,"",python,selection_command
+3043,9148651,"test.ipynb",0,0,"\n",python,content
+3044,9148655,"test.ipynb",0,0," ",python,content
+3045,9148842,"test.ipynb",4,0,"i",python,content
+3046,9148843,"test.ipynb",5,0,"",python,selection_keyboard
+3047,9148991,"test.ipynb",5,0,"m",python,content
+3048,9148992,"test.ipynb",6,0,"",python,selection_keyboard
+3049,9148993,"test.ipynb",6,0,"p",python,content
+3050,9148994,"test.ipynb",7,0,"",python,selection_keyboard
+3051,9149022,"test.ipynb",7,0,"o",python,content
+3052,9149023,"test.ipynb",8,0,"",python,selection_keyboard
+3053,9149075,"test.ipynb",8,0,"r",python,content
+3054,9149076,"test.ipynb",9,0,"",python,selection_keyboard
+3055,9149164,"test.ipynb",9,0,"t",python,content
+3056,9149165,"test.ipynb",10,0,"",python,selection_keyboard
+3057,9149228,"test.ipynb",10,0," ",python,content
+3058,9149228,"test.ipynb",11,0,"",python,selection_keyboard
+3059,9149310,"test.ipynb",11,0,"j",python,content
+3060,9149310,"test.ipynb",12,0,"",python,selection_keyboard
+3061,9149377,"test.ipynb",12,0,"a",python,content
+3062,9149378,"test.ipynb",13,0,"",python,selection_keyboard
+3063,9149526,"test.ipynb",13,0,"x",python,content
+3064,9149527,"test.ipynb",14,0,"",python,selection_keyboard
+3065,9149635,"test.ipynb",14,0," ",python,content
+3066,9149636,"test.ipynb",15,0,"",python,selection_keyboard
+3067,9150036,"test.ipynb",14,0,"",python,selection_command
+3068,9156328,"test.ipynb",30,0,"",python,selection_command
+3069,9156445,"test.ipynb",67,0,"",python,selection_command
+3070,9156619,"test.ipynb",92,0,"",python,selection_command
+3071,9156861,"test.ipynb",142,0,"",python,selection_command
+3072,9156895,"test.ipynb",176,0,"",python,selection_command
+3073,9157217,"test.ipynb",191,0,"",python,selection_command
+3074,9157489,"test.ipynb",177,42," if args.batch_size % num_devices != 0:",python,selection_command
+3075,9157649,"test.ipynb",177,68," if args.batch_size % num_devices != 0:\n raise ValueError(",python,selection_command
+3076,9157803,"test.ipynb",177,141," if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by """,python,selection_command
+3077,9157948,"test.ipynb",177,189," if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""",python,selection_command
+3078,9158104,"test.ipynb",177,199," if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )",python,selection_command
+3079,9158298,"test.ipynb",177,200," if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n",python,selection_command
+3080,9158584,"test.ipynb",177,201,"",python,content
+3081,9158601,"test.ipynb",181,0,"",python,selection_command
+3082,9159101,"test.ipynb",177,68,"",python,content
+3083,9159537,"test.ipynb",177,1,"",python,content
+3084,9159555,"test.ipynb",181,0,"",python,selection_command
+3085,9162095,"test.ipynb",185,0,"",python,selection_command
+3086,9162276,"test.ipynb",187,0,"",python,selection_command
+3087,9162500,"test.ipynb",215,0,"0",python,content
+3088,9162500,"test.ipynb",206,9,"",python,content
+3089,9163150,"test.ipynb",209,0,"",python,selection_command
+3090,9163287,"test.ipynb",220,0,"",python,selection_command
+3091,9163464,"test.ipynb",251,0,"",python,selection_command
+3092,9165033,"test.ipynb",289,0,"",python,selection_command
+3093,9165219,"test.ipynb",315,0,"",python,selection_command
+3094,9165935,"test.ipynb",289,0,"",python,selection_command
+3095,9166182,"test.ipynb",251,0,"",python,selection_command
+3096,9166215,"test.ipynb",220,0,"",python,selection_command
+3097,9166242,"test.ipynb",209,0,"",python,selection_command
+3098,9166270,"test.ipynb",187,0,"",python,selection_command
+3099,9166301,"test.ipynb",176,0,"",python,selection_command
+3100,9166343,"test.ipynb",138,0,"",python,selection_command
+3101,9166375,"test.ipynb",88,0,"",python,selection_command
+3102,9166535,"test.ipynb",63,0,"",python,selection_command
+3103,9166705,"test.ipynb",26,0,"",python,selection_command
+3104,9167011,"test.ipynb",15,0,"\n ",python,content
+3105,9167800,"test.ipynb",16,4,"",python,content
+3106,9168252,"test.ipynb",15,0,"\n ",python,content
+3107,9168265,"test.ipynb",16,4,"",python,content
+3108,9169228,"test.ipynb",16,0," ",python,content
+3109,9170026,"test.ipynb",20,0,"i",python,content
+3110,9170027,"test.ipynb",21,0,"",python,selection_keyboard
+3111,9170060,"test.ipynb",21,0,"m",python,content
+3112,9170061,"test.ipynb",22,0,"",python,selection_keyboard
+3113,9170178,"test.ipynb",22,0,"p",python,content
+3114,9170178,"test.ipynb",23,0,"",python,selection_keyboard
+3115,9170239,"test.ipynb",23,0,"o",python,content
+3116,9170240,"test.ipynb",24,0,"",python,selection_keyboard
+3117,9170292,"test.ipynb",24,0,"r",python,content
+3118,9170292,"test.ipynb",25,0,"",python,selection_keyboard
+3119,9170399,"test.ipynb",25,0,"t",python,content
+3120,9170400,"test.ipynb",26,0,"",python,selection_keyboard
+3121,9170512,"test.ipynb",26,0," ",python,content
+3122,9170512,"test.ipynb",27,0,"",python,selection_keyboard
+3123,9172779,"test.ipynb",26,1,"",python,content
+3124,9172937,"test.ipynb",25,1,"",python,content
+3125,9173114,"test.ipynb",24,1,"",python,content
+3126,9173301,"test.ipynb",23,1,"",python,content
+3127,9173416,"test.ipynb",22,1,"",python,content
+3128,9173574,"test.ipynb",21,1,"",python,content
+3129,9173698,"test.ipynb",20,1,"",python,content
+3130,9173829,"test.ipynb",20,0,"f",python,content
+3131,9173829,"test.ipynb",21,0,"",python,selection_keyboard
+3132,9174037,"test.ipynb",21,0,"r",python,content
+3133,9174037,"test.ipynb",22,0,"",python,selection_keyboard
+3134,9174092,"test.ipynb",22,0,"o",python,content
+3135,9174092,"test.ipynb",23,0,"",python,selection_keyboard
+3136,9174135,"test.ipynb",23,0,"m",python,content
+3137,9174135,"test.ipynb",24,0,"",python,selection_keyboard
+3138,9174279,"test.ipynb",24,0," ",python,content
+3139,9174280,"test.ipynb",25,0,"",python,selection_keyboard
+3140,9176160,"test.ipynb",25,0,"m",python,content
+3141,9176160,"test.ipynb",26,0,"",python,selection_keyboard
+3142,9176225,"test.ipynb",26,0,"o",python,content
+3143,9176225,"test.ipynb",27,0,"",python,selection_keyboard
+3144,9176280,"test.ipynb",27,0,"d",python,content
+3145,9176280,"test.ipynb",28,0,"",python,selection_keyboard
+3146,9176816,"test.ipynb",28,0,"e",python,content
+3147,9176816,"test.ipynb",29,0,"",python,selection_keyboard
+3148,9176971,"test.ipynb",29,0,"l",python,content
+3149,9176971,"test.ipynb",30,0,"",python,selection_keyboard
+3150,9177441,"test.ipynb",30,0," import Genie",python,content
+3151,9177688,"test.ipynb",42,0,"",python,selection_command
+3152,9181941,"train_dynamics.py",0,0,"",python,tab
+3153,9182981,"train_dynamics.py",6417,0,"",python,selection_command
+3154,9183128,"train_dynamics.py",6423,0,"",python,selection_command
+3155,9184366,"train_dynamics.py",0,0,"",python,selection_command
+3156,9185234,"train_dynamics.py",371,0,"",python,selection_command
+3157,9186487,"test.ipynb",0,0,"",python,tab
+3158,9187181,"test.ipynb",43,0,"\n ",python,content
+3159,9187328,"test.ipynb",48,0," num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )",python,content
+3160,9187623,"test.ipynb",1774,0,"",python,selection_command
+3161,9188309,"test.ipynb",44,1732,"",python,content
+3162,9188318,"test.ipynb",42,0,"",python,selection_command
+3163,9189216,"test.ipynb",43,0,"\n ",python,content
+3164,9189330,"test.ipynb",44,4,"",python,content
+3165,9189429,"test.ipynb",44,0,"\nfrom genie import Genie, restore_genie_components",python,content
+3166,9189435,"test.ipynb",45,0,"",python,selection_command
+3167,9189831,"test.ipynb",44,0,"",python,selection_command
+3168,9190341,"test.ipynb",44,1,"",python,content
+3169,9190495,"test.ipynb",16,0,"",python,selection_command
+3170,9190753,"test.ipynb",16,28,"",python,content
+3171,9191804,"test.ipynb",16,1,"f",python,selection_command
+3172,9192112,"test.ipynb",16,0," ",python,content
+3173,9192121,"test.ipynb",20,0,"",python,selection_command
+3174,9194927,"test.ipynb",4,0,"",python,selection_command
+3175,9195147,"test.ipynb",3,0,"",python,selection_command
+3176,9198983,"test.ipynb",1515,4,"",python,content
+3177,9198983,"test.ipynb",1496,4,"",python,content
+3178,9198983,"test.ipynb",1442,4,"",python,content
+3179,9198983,"test.ipynb",1416,4,"",python,content
+3180,9198983,"test.ipynb",1378,4,"",python,content
+3181,9198983,"test.ipynb",1342,4,"",python,content
+3182,9198983,"test.ipynb",1312,4,"",python,content
+3183,9198983,"test.ipynb",1268,4,"",python,content
+3184,9198983,"test.ipynb",1222,4,"",python,content
+3185,9198983,"test.ipynb",1182,4,"",python,content
+3186,9198983,"test.ipynb",1150,4,"",python,content
+3187,9198983,"test.ipynb",1131,4,"",python,content
+3188,9198983,"test.ipynb",1085,4,"",python,content
+3189,9198983,"test.ipynb",1043,4,"",python,content
+3190,9198983,"test.ipynb",999,4,"",python,content
+3191,9198983,"test.ipynb",955,4,"",python,content
+3192,9198983,"test.ipynb",903,4,"",python,content
+3193,9198983,"test.ipynb",853,4,"",python,content
+3194,9198983,"test.ipynb",815,4,"",python,content
+3195,9198983,"test.ipynb",785,4,"",python,content
+3196,9198983,"test.ipynb",771,4,"",python,content
+3197,9198983,"test.ipynb",717,4,"",python,content
+3198,9198983,"test.ipynb",661,4,"",python,content
+3199,9198983,"test.ipynb",625,4,"",python,content
+3200,9198983,"test.ipynb",575,4,"",python,content
+3201,9198983,"test.ipynb",527,4,"",python,content
+3202,9198983,"test.ipynb",477,4,"",python,content
+3203,9198983,"test.ipynb",435,4,"",python,content
+3204,9198983,"test.ipynb",399,4,"",python,content
+3205,9198983,"test.ipynb",379,4,"",python,content
+3206,9198983,"test.ipynb",360,4,"",python,content
+3207,9198983,"test.ipynb",334,4,"",python,content
+3208,9198983,"test.ipynb",296,4,"",python,content
+3209,9198983,"test.ipynb",265,4,"",python,content
+3210,9198983,"test.ipynb",232,4,"",python,content
+3211,9198983,"test.ipynb",183,4,"",python,content
+3212,9198983,"test.ipynb",133,4,"",python,content
+3213,9198983,"test.ipynb",108,4,"",python,content
+3214,9198983,"test.ipynb",71,4,"",python,content
+3215,9198983,"test.ipynb",16,4,"",python,content
+3216,9198983,"test.ipynb",0,4,"",python,content
+3217,9199494,"test.ipynb",0,0,"",python,selection_command
+3218,9201767,"test.ipynb",17,0,"",python,selection_command
+3219,9201855,"test.ipynb",23,0,"",python,selection_command
+3220,9202097,"test.ipynb",30,0,"",python,selection_command
+3221,9202280,"test.ipynb",35,0,"",python,selection_command
+3222,9204082,"test.ipynb",35,26,"",python,content
+3223,9204085,"test.ipynb",34,0,"",python,selection_command
+3224,9204913,"test.ipynb",36,0,"",python,selection_command
+3225,9205167,"test.ipynb",60,0,"",python,selection_command
+3226,9205194,"test.ipynb",89,0,"",python,selection_command
+3227,9205227,"test.ipynb",114,0,"",python,selection_command
+3228,9205254,"test.ipynb",160,0,"",python,selection_command
+3229,9205281,"test.ipynb",181,0,"",python,selection_command
+3230,9205314,"test.ipynb",205,0,"",python,selection_command
+3231,9205348,"test.ipynb",210,0,"",python,selection_command
+3232,9205382,"test.ipynb",234,0,"",python,selection_command
+3233,9205415,"test.ipynb",261,0,"",python,selection_command
+3234,9205449,"test.ipynb",292,0,"",python,selection_command
+3235,9205482,"test.ipynb",307,0,"",python,selection_command
+3236,9205515,"test.ipynb",323,0,"",python,selection_command
+3237,9205826,"test.ipynb",348,0,"",python,selection_command
+3238,9207267,"train_dynamics.py",0,0,"",python,tab
+3239,9207850,"train_dynamics.py",0,0,"",python,selection_command
+3240,9208165,"train_dynamics.py",41,0,"",python,selection_command
+3241,9208427,"train_dynamics.py",51,0,"",python,selection_command
+3242,9208446,"train_dynamics.py",52,0,"",python,selection_command
+3243,9208476,"train_dynamics.py",66,0,"",python,selection_command
+3244,9208509,"train_dynamics.py",126,0,"",python,selection_command
+3245,9208540,"train_dynamics.py",185,0,"",python,selection_command
+3246,9208575,"train_dynamics.py",198,0,"",python,selection_command
+3247,9208610,"train_dynamics.py",229,0,"",python,selection_command
+3248,9208641,"train_dynamics.py",248,0,"",python,selection_command
+3249,9208676,"train_dynamics.py",269,0,"",python,selection_command
+3250,9208710,"train_dynamics.py",280,0,"",python,selection_command
+3251,9208743,"train_dynamics.py",304,0,"",python,selection_command
+3252,9208778,"train_dynamics.py",316,0,"",python,selection_command
+3253,9208821,"train_dynamics.py",329,0,"",python,selection_command
+3254,9208846,"train_dynamics.py",342,0,"",python,selection_command
+3255,9208879,"train_dynamics.py",365,0,"",python,selection_command
+3256,9208930,"train_dynamics.py",366,0,"",python,selection_command
+3257,9208946,"train_dynamics.py",416,0,"",python,selection_command
+3258,9208991,"train_dynamics.py",460,0,"",python,selection_command
+3259,9209040,"train_dynamics.py",503,0,"",python,selection_command
+3260,9209052,"train_dynamics.py",567,0,"",python,selection_command
+3261,9209084,"train_dynamics.py",568,0,"",python,selection_command
+3262,9209117,"train_dynamics.py",569,0,"",python,selection_command
+3263,9209164,"train_dynamics.py",580,0,"",python,selection_command
+3264,9209183,"train_dynamics.py",592,0,"",python,selection_command
+3265,9209309,"train_dynamics.py",609,0,"",python,selection_command
+3266,9209717,"train_dynamics.py",592,0,"",python,selection_command
+3267,9210082,"train_dynamics.py",609,0,"",python,selection_command
+3268,9210271,"train_dynamics.py",609,28," num_steps: int = 200_000",python,selection_command
+3269,9210364,"train_dynamics.py",609,1740," num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n",python,selection_command
+3270,9210963,"train_dynamics.py",609,1739," num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"",python,selection_command
+3271,9211263,"train_dynamics.py",2326,0,"",python,selection_command
+3272,9211932,"test.ipynb",0,0,"",python,tab
+3273,9213729,"test.ipynb",0,0,"",python,selection_command
+3274,9214048,"test.ipynb",12,0,"",python,selection_command
+3275,9215015,"test.ipynb",37,0,"",python,selection_command
+3276,9215185,"test.ipynb",70,0,"",python,selection_command
+3277,9215516,"test.ipynb",37,0,"",python,selection_command
+3278,9215680,"test.ipynb",36,0,"",python,selection_command
+3279,9215801,"test.ipynb",12,0,"",python,selection_command
+3280,9215998,"test.ipynb",35,0,"\n",python,content
+3281,9216448,"test.ipynb",36,0,", restore_genie_components",python,content
+3282,9216451,"test.ipynb",61,0,"",python,selection_command
+3283,9217094,"test.ipynb",36,26,"",python,content
+3284,9218212,"test.ipynb",36,0,"\n",python,content
+3285,9218361,"test.ipynb",37,0," num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"",python,content
+3286,9218712,"test.ipynb",1775,0,"",python,selection_command
+3287,9219737,"test.ipynb",1754,0,"",python,selection_command
+3288,9220364,"test.ipynb",1754,1," ",python,selection_command
+3289,9220467,"test.ipynb",1754,2," ",python,selection_command
+3290,9220650,"test.ipynb",1754,3," ",python,selection_command
+3291,9221006,"test.ipynb",1754,4," ",python,selection_command
+3292,9221646,"test.ipynb",0,1,"i",python,selection_command
+3293,9221867,"test.ipynb",12,1,"f",python,selection_command
+3294,9222018,"test.ipynb",36,0,"",python,selection_command
+3295,9222462,"test.ipynb",37,1," ",python,selection_command
+3296,9222737,"test.ipynb",37,2," ",python,selection_command
+3297,9223015,"test.ipynb",37,3," ",python,selection_command
+3298,9223170,"test.ipynb",37,4," ",python,selection_command
+3299,9223468,"test.ipynb",1754,4,"",python,content
+3300,9223468,"test.ipynb",1722,4,"",python,content
+3301,9223468,"test.ipynb",1678,4,"",python,content
+3302,9223468,"test.ipynb",1637,4,"",python,content
+3303,9223468,"test.ipynb",1614,4,"",python,content
+3304,9223468,"test.ipynb",1580,4,"",python,content
+3305,9223468,"test.ipynb",1554,4,"",python,content
+3306,9223468,"test.ipynb",1488,4,"",python,content
+3307,9223468,"test.ipynb",1455,4,"",python,content
+3308,9223468,"test.ipynb",1433,4,"",python,content
+3309,9223468,"test.ipynb",1412,4,"",python,content
+3310,9223468,"test.ipynb",1390,4,"",python,content
+3311,9223468,"test.ipynb",1376,4,"",python,content
+3312,9223468,"test.ipynb",1339,4,"",python,content
+3313,9223468,"test.ipynb",1314,4,"",python,content
+3314,9223468,"test.ipynb",1284,4,"",python,content
+3315,9223468,"test.ipynb",1256,4,"",python,content
+3316,9223468,"test.ipynb",1231,4,"",python,content
+3317,9223468,"test.ipynb",1203,4,"",python,content
+3318,9223468,"test.ipynb",1174,4,"",python,content
+3319,9223468,"test.ipynb",1145,4,"",python,content
+3320,9223468,"test.ipynb",1121,4,"",python,content
+3321,9223468,"test.ipynb",1106,4,"",python,content
+3322,9223468,"test.ipynb",1077,4,"",python,content
+3323,9223468,"test.ipynb",1050,4,"",python,content
+3324,9223468,"test.ipynb",1022,4,"",python,content
+3325,9223468,"test.ipynb",993,4,"",python,content
+3326,9223468,"test.ipynb",961,4,"",python,content
+3327,9223468,"test.ipynb",929,4,"",python,content
+3328,9223468,"test.ipynb",901,4,"",python,content
+3329,9223468,"test.ipynb",878,4,"",python,content
+3330,9223468,"test.ipynb",868,4,"",python,content
+3331,9223468,"test.ipynb",833,4,"",python,content
+3332,9223468,"test.ipynb",800,4,"",python,content
+3333,9223468,"test.ipynb",766,4,"",python,content
+3334,9223468,"test.ipynb",742,4,"",python,content
+3335,9223468,"test.ipynb",708,4,"",python,content
+3336,9223468,"test.ipynb",677,4,"",python,content
+3337,9223468,"test.ipynb",643,4,"",python,content
+3338,9223468,"test.ipynb",614,4,"",python,content
+3339,9223468,"test.ipynb",598,4,"",python,content
+3340,9223468,"test.ipynb",538,4,"",python,content
+3341,9223468,"test.ipynb",509,4,"",python,content
+3342,9223468,"test.ipynb",503,4,"",python,content
+3343,9223468,"test.ipynb",420,4,"",python,content
+3344,9223468,"test.ipynb",391,4,"",python,content
+3345,9223469,"test.ipynb",364,4,"",python,content
+3346,9223469,"test.ipynb",339,4,"",python,content
+3347,9223469,"test.ipynb",314,4,"",python,content
+3348,9223469,"test.ipynb",289,4,"",python,content
+3349,9223469,"test.ipynb",270,4,"",python,content
+3350,9223469,"test.ipynb",239,4,"",python,content
+3351,9223469,"test.ipynb",211,4,"",python,content
+3352,9223469,"test.ipynb",188,4,"",python,content
+3353,9223469,"test.ipynb",161,4,"",python,content
+3354,9223469,"test.ipynb",134,4,"",python,content
+3355,9223469,"test.ipynb",106,4,"",python,content
+3356,9223469,"test.ipynb",84,4,"",python,content
+3357,9223469,"test.ipynb",66,4,"",python,content
+3358,9223469,"test.ipynb",37,4,"",python,content
+3359,9223481,"test.ipynb",37,0,"",python,selection_command
+3360,9224208,"test.ipynb",335,0,"",python,selection_command
+3361,9224564,"test.ipynb",762,0,"",python,selection_command
+3362,9224892,"test.ipynb",1108,0,"",python,selection_command
+3363,9226251,"test.ipynb",0,0,"",python,selection_command
+3364,9227010,"test.ipynb",11,0,"\n",python,content
+3365,9227633,"test.ipynb",37,0,"\n\n",python,content
+3366,9227634,"test.ipynb",12,0,"import jax.numpy as jnp\nfrom flax import nnx",python,content
+3367,9227824,"test.ipynb",55,0,"",python,selection_command
+3368,9228739,"test.ipynb",281,0,"",python,selection_command
+3369,9228991,"test.ipynb",693,0,"",python,selection_command
+3370,9229397,"test.ipynb",1036,0,"",python,selection_command
+3371,9229561,"test.ipynb",1411,0,"",python,selection_command
+3372,9229814,"test.ipynb",1786,0,"",python,selection_command
+3373,9230354,"test.ipynb",1411,0,"",python,selection_command
+3374,9232132,"test.ipynb",1389,0,"",python,selection_command
+3375,9232448,"test.ipynb",1327,0,"",python,selection_command
+3376,9232604,"test.ipynb",1331,0,"",python,selection_command
+3377,9232876,"test.ipynb",1333,0,"",python,selection_command
+3378,9233066,"test.ipynb",1337,0,"",python,selection_command
+3379,9233400,"test.ipynb",1338,0,"",python,selection_command
+3380,9233635,"test.ipynb",1341,0,"",python,selection_command
+3381,9234031,"test.ipynb",1343,0,"",python,selection_command
+3382,9234295,"test.ipynb",1345,0,"",python,selection_command
+3383,9237071,"test.ipynb",1327,62,"",python,content
+3384,9239821,"test.ipynb",1696,0,"",python,selection_command
+3385,9241530,"test.ipynb",1697,0,"",python,selection_command
+3386,9241785,"test.ipynb",1724,0,"",python,selection_command
+3387,9241809,"test.ipynb",1758,0,"",python,selection_command
+3388,9241842,"test.ipynb",1780,0,"",python,selection_command
+3389,9242048,"test.ipynb",1795,0,"",python,selection_command
+3390,9242173,"test.ipynb",1811,0,"",python,selection_command
+3391,9242971,"test.ipynb",1822,5,"",python,content
+3392,9244146,"test.ipynb",1988,5,"",python,content
+3393,9244146,"test.ipynb",1943,5,"",python,content
+3394,9244146,"test.ipynb",1898,5,"",python,content
+3395,9244146,"test.ipynb",1856,5,"",python,content
+3396,9245749,"test.ipynb",2374,0,"",python,selection_command
+3397,9247603,"test.ipynb",2334,0,"",python,selection_command
+3398,9247852,"test.ipynb",2294,0,"",python,selection_command
+3399,9247874,"test.ipynb",2246,0,"",python,selection_command
+3400,9247910,"test.ipynb",2200,0,"",python,selection_command
+3401,9247940,"test.ipynb",2166,0,"",python,selection_command
+3402,9247974,"test.ipynb",2140,0,"",python,selection_command
+3403,9248007,"test.ipynb",2130,0,"",python,selection_command
+3404,9248038,"test.ipynb",2080,0,"",python,selection_command
+3405,9248072,"test.ipynb",2028,0,"",python,selection_command
+3406,9248327,"test.ipynb",2048,0,"",python,selection_command
+3407,9248458,"test.ipynb",2016,0,"",python,selection_command
+3408,9248953,"test.ipynb",2012,0,"",python,selection_command
+3409,9249095,"test.ipynb",2011,0,"",python,selection_command
+3410,9249365,"test.ipynb",2100,5,"",python,content
+3411,9249365,"test.ipynb",2049,5,"",python,content
+3412,9249365,"test.ipynb",2007,5,"",python,content
+3413,9250612,"test.ipynb",2034,0,"",python,selection_command
+3414,9250855,"test.ipynb",2081,0,"",python,selection_command
+3415,9250879,"test.ipynb",2119,0,"",python,selection_command
+3416,9250911,"test.ipynb",2136,0,"",python,selection_command
+3417,9251533,"test.ipynb",2250,5,"",python,content
+3418,9251533,"test.ipynb",2203,5,"",python,content
+3419,9251533,"test.ipynb",2163,5,"",python,content
+3420,9251533,"test.ipynb",2133,5,"",python,content
+3421,9252644,"test.ipynb",2154,0,"",python,selection_command
+3422,9252894,"test.ipynb",2183,0,"",python,selection_command
+3423,9252910,"test.ipynb",2224,0,"",python,selection_command
+3424,9252945,"test.ipynb",2267,0,"",python,selection_command
+3425,9252973,"test.ipynb",2307,0,"",python,selection_command
+3426,9253059,"test.ipynb",2313,0,"",python,selection_command
+3427,9253393,"test.ipynb",2273,0,"",python,selection_command
+3428,9253848,"test.ipynb",2394,5,"",python,content
+3429,9253848,"test.ipynb",2353,5,"",python,content
+3430,9253848,"test.ipynb",2314,5,"",python,content
+3431,9253848,"test.ipynb",2274,5,"",python,content
+3432,9254154,"test.ipynb",2308,0,"",python,selection_command
+3433,9254415,"test.ipynb",2343,0,"",python,selection_command
+3434,9254446,"test.ipynb",2376,0,"",python,selection_command
+3435,9254478,"test.ipynb",2408,0,"",python,selection_command
+3436,9254506,"test.ipynb",2428,0,"",python,selection_command
+3437,9254543,"test.ipynb",2456,0,"",python,selection_command
+3438,9255532,"test.ipynb",2535,5,"",python,content
+3439,9255532,"test.ipynb",2494,5,"",python,content
+3440,9255532,"test.ipynb",2455,5,"",python,content
+3441,9255532,"test.ipynb",2423,5,"",python,content
+3442,9255873,"test.ipynb",2481,0,"",python,selection_command
+3443,9256146,"test.ipynb",2518,0,"",python,selection_command
+3444,9256484,"test.ipynb",2553,0,"",python,selection_command
+3445,9256663,"test.ipynb",2579,0,"",python,selection_command
+3446,9256950,"test.ipynb",2674,5,"",python,content
+3447,9256950,"test.ipynb",2638,5,"",python,content
+3448,9256950,"test.ipynb",2610,5,"",python,content
+3449,9256950,"test.ipynb",2577,5,"",python,content
+3450,9256950,"test.ipynb",2548,5,"",python,content
+3451,9258271,"test.ipynb",2599,0,"",python,selection_command
+3452,9258571,"test.ipynb",2690,0,"",python,selection_command
+3453,9260027,"test.ipynb",2259,0,"",python,selection_command
+3454,9260333,"test.ipynb",1780,0,"",python,selection_command
+3455,9261249,"test.ipynb",2259,0,"",python,selection_command
+3456,9261432,"test.ipynb",2690,0,"",python,selection_command
+3457,9262354,"test.ipynb",2691,0,"\n",python,content
+3458,9262680,"test.ipynb",2692,0,"\n",python,content
+3459,9263520,"train_dynamics.py",0,0,"",python,tab
+3460,9264250,"train_dynamics.py",2804,0,"",python,selection_command
+3461,9264584,"train_dynamics.py",3580,0,"",python,selection_command
+3462,9264904,"train_dynamics.py",4166,0,"",python,selection_command
+3463,9265490,"train_dynamics.py",4627,0,"",python,selection_command
+3464,9265896,"train_dynamics.py",5055,0,"",python,selection_command
+3465,9267701,"train_dynamics.py",5565,0,"",python,selection_command
+3466,9268020,"train_dynamics.py",6172,0,"",python,selection_command
+3467,9268736,"train_dynamics.py",6651,0,"",python,selection_command
+3468,9269889,"train_dynamics.py",7041,0,"",python,selection_command
+3469,9270455,"train_dynamics.py",7412,0,"",python,selection_command
+3470,9272515,"train_dynamics.py",7418,0,"",python,selection_command
+3471,9272771,"train_dynamics.py",7440,0,"",python,selection_command
+3472,9272795,"train_dynamics.py",7475,0,"",python,selection_command
+3473,9272817,"train_dynamics.py",7491,0,"",python,selection_command
+3474,9272849,"train_dynamics.py",7507,0,"",python,selection_command
+3475,9272883,"train_dynamics.py",7534,0,"",python,selection_command
+3476,9272918,"train_dynamics.py",7563,0,"",python,selection_command
+3477,9272951,"train_dynamics.py",7569,0,"",python,selection_command
+3478,9272985,"train_dynamics.py",7606,0,"",python,selection_command
+3479,9273265,"train_dynamics.py",7569,0,"",python,selection_command
+3480,9273692,"train_dynamics.py",7565,40," optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3481,9273829,"train_dynamics.py",7559,46," )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3482,9274083,"train_dynamics.py",7530,75," mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3483,9274093,"train_dynamics.py",7503,102," weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3484,9274123,"train_dynamics.py",7487,118," b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3485,9274156,"train_dynamics.py",7471,134," b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3486,9274189,"train_dynamics.py",7436,169," learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3487,9274236,"train_dynamics.py",7414,191," tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3488,9274262,"train_dynamics.py",7408,197," )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3489,9274293,"train_dynamics.py",7378,227," args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3490,9274323,"train_dynamics.py",7351,254," args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3491,9274358,"train_dynamics.py",7327,278," args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3492,9274391,"train_dynamics.py",7303,302," args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3493,9274423,"train_dynamics.py",7282,323," args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3494,9274457,"train_dynamics.py",7260,345," args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3495,9274611,"train_dynamics.py",7234,371," args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3496,9274750,"train_dynamics.py",7199,406," lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,selection_command
+3497,9274987,"train_dynamics.py",7199,0,"",python,selection_command
+3498,9275690,"test.ipynb",0,0,"",python,tab
+3499,9276799,"test.ipynb",2693,0," num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"",python,content
+3500,9277723,"test.ipynb",4432,0,"u",python,content
+3501,9277723,"test.ipynb",4433,0,"",python,selection_keyboard
+3502,9278423,"test.ipynb",4432,0,"",python,selection_command
+3503,9278551,"test.ipynb",2691,1742,"",python,content
+3504,9278554,"test.ipynb",0,0,"",python,tab
+3505,9278578,"test.ipynb",0,0,"",python,tab
+3506,9278579,"test.ipynb",2654,0,"args.",python,content
+3507,9278594,"test.ipynb",2623,0,"args.",python,content
+3508,9278598,"test.ipynb",2600,0,"args.",python,content
+3509,9278601,"test.ipynb",2572,0,"args.",python,content
+3510,9278603,"test.ipynb",2548,0,"args.",python,content
+3511,9278608,"test.ipynb",2520,0,"args.",python,content
+3512,9278609,"test.ipynb",2484,0,"args.",python,content
+3513,9278612,"test.ipynb",2450,0,"args.",python,content
+3514,9278635,"test.ipynb",2423,0,"args.",python,content
+3515,9278636,"test.ipynb",2379,0,"args.",python,content
+3516,9278636,"test.ipynb",2343,0,"args.",python,content
+3517,9278662,"test.ipynb",2309,0,"args.",python,content
+3518,9278662,"test.ipynb",2274,0,"args.",python,content
+3519,9278663,"test.ipynb",2235,0,"args.",python,content
+3520,9278666,"test.ipynb",2193,0,"args.",python,content
+3521,9278667,"test.ipynb",2158,0,"args.",python,content
+3522,9278667,"test.ipynb",2133,0,"args.",python,content
+3523,9278668,"test.ipynb",2090,0,"args.",python,content
+3524,9278668,"test.ipynb",2044,0,"args.",python,content
+3525,9278668,"test.ipynb",2007,0,"args.",python,content
+3526,9278669,"test.ipynb",1973,0,"args.",python,content
+3527,9278669,"test.ipynb",1933,0,"args.",python,content
+3528,9278670,"test.ipynb",1893,0,"args.",python,content
+3529,9278670,"test.ipynb",1856,0,"args.",python,content
+3530,9278671,"test.ipynb",1822,0,"args.",python,content
+3531,9278671,"test.ipynb",1811,0,"",python,selection_command
+3532,9280047,"test.ipynb",1822,5,"",python,content
+3533,9280050,"test.ipynb",1856,5,"",python,content
+3534,9280051,"test.ipynb",1893,5,"",python,content
+3535,9280053,"test.ipynb",1933,5,"",python,content
+3536,9280060,"test.ipynb",1973,5,"",python,content
+3537,9280062,"test.ipynb",2007,5,"",python,content
+3538,9280065,"test.ipynb",2044,5,"",python,content
+3539,9280065,"test.ipynb",2090,5,"",python,content
+3540,9280066,"test.ipynb",2133,5,"",python,content
+3541,9280067,"test.ipynb",2158,5,"",python,content
+3542,9280069,"test.ipynb",2193,5,"",python,content
+3543,9280074,"test.ipynb",2235,5,"",python,content
+3544,9280077,"test.ipynb",2274,5,"",python,content
+3545,9280079,"test.ipynb",2309,5,"",python,content
+3546,9280083,"test.ipynb",2343,5,"",python,content
+3547,9280084,"test.ipynb",2379,5,"",python,content
+3548,9280084,"test.ipynb",2423,5,"",python,content
+3549,9280085,"test.ipynb",2450,5,"",python,content
+3550,9280088,"test.ipynb",2484,5,"",python,content
+3551,9280095,"test.ipynb",2520,5,"",python,content
+3552,9280096,"test.ipynb",2548,5,"",python,content
+3553,9280097,"test.ipynb",2572,5,"",python,content
+3554,9280099,"test.ipynb",2600,5,"",python,content
+3555,9280100,"test.ipynb",2623,5,"",python,content
+3556,9280103,"test.ipynb",2654,5,"",python,content
+3557,9280111,"test.ipynb",2691,0,"\n\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"u",python,content
+3558,9281069,"test.ipynb",4414,0,"",python,selection_command
+3559,9282709,"test.ipynb",3944,0,"",python,selection_command
+3560,9283085,"test.ipynb",3538,0,"",python,selection_command
+3561,9283471,"test.ipynb",3051,0,"",python,selection_command
+3562,9284118,"test.ipynb",2692,0,"",python,selection_command
+3563,9286771,"test.ipynb",2692,1741,"\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"u",python,selection_command
+3564,9287553,"test.ipynb",2692,1741," lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)",python,content
+3565,9287556,"test.ipynb",0,0,"",python,tab
+3566,9287581,"test.ipynb",0,0,"",python,tab
+3567,9287589,"test.ipynb",2696,0,"",python,selection_command
+3568,9289960,"test.ipynb",2696,1,"l",python,selection_command
+3569,9290063,"test.ipynb",2696,1,"l",python,selection_command
+3570,9290332,"test.ipynb",2696,1,"l",python,selection_command
+3571,9290346,"test.ipynb",2696,1,"l",python,selection_command
+3572,9290378,"test.ipynb",2696,1,"l",python,selection_command
+3573,9290414,"test.ipynb",2696,1,"l",python,selection_command
+3574,9290446,"test.ipynb",2696,1,"l",python,selection_command
+3575,9290480,"test.ipynb",2696,1,"l",python,selection_command
+3576,9290513,"test.ipynb",2696,1,"l",python,selection_command
+3577,9290624,"test.ipynb",2696,1,"l",python,selection_command
+3578,9290624,"test.ipynb",2696,1,"l",python,selection_command
+3579,9290624,"test.ipynb",2696,1,"l",python,selection_command
+3580,9290655,"test.ipynb",2696,1,"l",python,selection_command
+3581,9290685,"test.ipynb",2696,1,"l",python,selection_command
+3582,9290715,"test.ipynb",2696,1,"l",python,selection_command
+3583,9290749,"test.ipynb",2696,1,"l",python,selection_command
+3584,9290785,"test.ipynb",2696,1,"l",python,selection_command
+3585,9291176,"test.ipynb",2696,0,"",python,selection_command
+3586,9291427,"test.ipynb",3058,4,"",python,content
+3587,9291427,"test.ipynb",3052,4,"",python,content
+3588,9291427,"test.ipynb",3023,4,"",python,content
+3589,9291427,"test.ipynb",2996,4,"",python,content
+3590,9291427,"test.ipynb",2980,4,"",python,content
+3591,9291427,"test.ipynb",2964,4,"",python,content
+3592,9291427,"test.ipynb",2929,4,"",python,content
+3593,9291427,"test.ipynb",2907,4,"",python,content
+3594,9291427,"test.ipynb",2901,4,"",python,content
+3595,9291427,"test.ipynb",2871,4,"",python,content
+3596,9291427,"test.ipynb",2844,4,"",python,content
+3597,9291427,"test.ipynb",2820,4,"",python,content
+3598,9291427,"test.ipynb",2796,4,"",python,content
+3599,9291427,"test.ipynb",2775,4,"",python,content
+3600,9291427,"test.ipynb",2753,4,"",python,content
+3601,9291427,"test.ipynb",2727,4,"",python,content
+3602,9291427,"test.ipynb",2692,4,"",python,content
+3603,9292117,"test.ipynb",2692,0,"",python,selection_command
+3604,9293497,"test.ipynb",2704,0,"",python,selection_command
+3605,9293664,"test.ipynb",2706,0,"",python,selection_command
+3606,9294085,"test.ipynb",0,0,"",python,selection_command
+3607,9295150,"test.ipynb",12,0,"",python,selection_command
+3608,9295314,"test.ipynb",36,0,"",python,selection_command
+3609,9295426,"test.ipynb",57,0,"",python,selection_command
+3610,9295749,"test.ipynb",80,0,"\n",python,content
+3611,9298183,"test.ipynb",81,0,"i",python,content
+3612,9298183,"test.ipynb",82,0,"",python,selection_keyboard
+3613,9298612,"test.ipynb",82,0,"m",python,content
+3614,9298613,"test.ipynb",83,0,"",python,selection_keyboard
+3615,9298674,"test.ipynb",83,0,"p",python,content
+3616,9298675,"test.ipynb",84,0,"",python,selection_keyboard
+3617,9298759,"test.ipynb",84,0,"o",python,content
+3618,9298759,"test.ipynb",85,0,"",python,selection_keyboard
+3619,9298826,"test.ipynb",85,0,"r",python,content
+3620,9298826,"test.ipynb",86,0,"",python,selection_keyboard
+3621,9298932,"test.ipynb",86,0,"t",python,content
+3622,9298933,"test.ipynb",87,0,"",python,selection_keyboard
+3623,9298949,"test.ipynb",87,0," ",python,content
+3624,9298950,"test.ipynb",88,0,"",python,selection_keyboard
+3625,9299133,"test.ipynb",88,0,"o",python,content
+3626,9299133,"test.ipynb",89,0,"",python,selection_keyboard
+3627,9299299,"test.ipynb",89,0,"p",python,content
+3628,9299300,"test.ipynb",90,0,"",python,selection_keyboard
+3629,9299329,"test.ipynb",90,0,"[]",python,content
+3630,9299330,"test.ipynb",91,0,"",python,selection_keyboard
+3631,9299565,"test.ipynb",91,0,"t",python,content
+3632,9299566,"test.ipynb",92,0,"",python,selection_keyboard
+3633,9299654,"test.ipynb",92,0,"a",python,content
+3634,9299655,"test.ipynb",93,0,"",python,selection_keyboard
+3635,9299826,"test.ipynb",92,1,"",python,content
+3636,9299988,"test.ipynb",91,1,"",python,content
+3637,9300178,"test.ipynb",90,2,"",python,content
+3638,9300195,"test.ipynb",90,0,"t",python,content
+3639,9300196,"test.ipynb",91,0,"",python,selection_keyboard
+3640,9300226,"test.ipynb",91,0,"a",python,content
+3641,9300226,"test.ipynb",92,0,"",python,selection_keyboard
+3642,9300535,"test.ipynb",92,0,"x",python,content
+3643,9300536,"test.ipynb",93,0,"",python,selection_keyboard
+3644,9300790,"test.ipynb",93,0," ",python,content
+3645,9300791,"test.ipynb",94,0,"",python,selection_keyboard
+3646,9301227,"test.ipynb",93,1,"",python,content
+3647,9301265,"test.ipynb",92,0,"",python,selection_command
+3648,9301782,"train_dynamics.py",0,0,"",python,tab
+3649,9302086,"train_dynamics.py",0,0,"",python,selection_command
+3650,9303658,"train_dynamics.py",491,0,"",python,selection_command
+3651,9304899,"test.ipynb",0,0,"",python,tab
+3652,9305319,"test.ipynb",93,0,"\n",python,content
+3653,9305461,"test.ipynb",94,0,"\nfrom utils.lr_utils import get_lr_schedule",python,content
+3654,9305464,"test.ipynb",95,0,"",python,selection_command
+3655,9305985,"test.ipynb",94,0,"",python,selection_command
+3656,9306345,"test.ipynb",95,0,"",python,selection_command
+3657,9306995,"test.ipynb",3051,0,"",python,selection_command
+3658,9307748,"test.ipynb",3049,0,"",python,selection_command
+3659,9308043,"test.ipynb",3024,0,"",python,selection_command
+3660,9308044,"test.ipynb",3001,0,"",python,selection_command
+3661,9308059,"test.ipynb",2989,0,"",python,selection_command
+3662,9308090,"test.ipynb",2977,0,"",python,selection_command
+3663,9308117,"test.ipynb",2946,0,"",python,selection_command
+3664,9308161,"test.ipynb",2928,0,"",python,selection_command
+3665,9308196,"test.ipynb",2926,0,"",python,selection_command
+3666,9308224,"test.ipynb",2900,0,"",python,selection_command
+3667,9308567,"test.ipynb",2877,0,"",python,selection_command
+3668,9308742,"test.ipynb",2857,0,"",python,selection_command
+3669,9308761,"test.ipynb",2837,0,"",python,selection_command
+3670,9308792,"test.ipynb",2820,0,"",python,selection_command
+3671,9308970,"test.ipynb",2802,0,"",python,selection_command
+3672,9309094,"test.ipynb",2780,0,"",python,selection_command
+3673,9309253,"test.ipynb",2749,0,"",python,selection_command
+3674,9309425,"test.ipynb",2761,0,"",python,selection_command
+3675,9309532,"test.ipynb",2763,0,"",python,selection_command
+3676,9313128,"test.ipynb",2794,0,"",python,selection_command
+3677,9314696,"test.ipynb",2780,0,"",python,selection_command
+3678,9315192,"test.ipynb",2784,0,"",python,selection_command
+3679,9315778,"test.ipynb",2784,1,"a",python,selection_command
+3680,9315927,"test.ipynb",2784,2,"ar",python,selection_command
+3681,9316100,"test.ipynb",2784,3,"arg",python,selection_command
+3682,9316252,"test.ipynb",2784,4,"args",python,selection_command
+3683,9316414,"test.ipynb",2784,4,"args",python,selection_command
+3684,9316660,"test.ipynb",2784,5,"args.",python,selection_command
+3685,9316764,"test.ipynb",2784,5,"args.",python,selection_command
+3686,9317120,"test.ipynb",2784,5,"args.",python,selection_command
+3687,9317120,"test.ipynb",2784,5,"args.",python,selection_command
+3688,9317120,"test.ipynb",2784,5,"args.",python,selection_command
+3689,9317120,"test.ipynb",2784,5,"args.",python,selection_command
+3690,9317120,"test.ipynb",2781,4," a",python,selection_command
+3691,9317412,"test.ipynb",2784,5,"args.",python,selection_command
+3692,9317835,"test.ipynb",2904,5,"",python,content
+3693,9317835,"test.ipynb",2881,5,"",python,content
+3694,9317835,"test.ipynb",2861,5,"",python,content
+3695,9317835,"test.ipynb",2841,5,"",python,content
+3696,9317835,"test.ipynb",2824,5,"",python,content
+3697,9317835,"test.ipynb",2806,5,"",python,content
+3698,9317835,"test.ipynb",2784,5,"",python,content
+3699,9317846,"test.ipynb",2784,0,"",python,selection_command
+3700,9320009,"test.ipynb",2801,0,"",python,selection_command
+3701,9320202,"test.ipynb",2814,0,"",python,selection_command
+3702,9320231,"test.ipynb",2826,0,"",python,selection_command
+3703,9320264,"test.ipynb",2841,0,"",python,selection_command
+3704,9320317,"test.ipynb",2856,0,"",python,selection_command
+3705,9320473,"test.ipynb",2874,0,"",python,selection_command
+3706,9320646,"test.ipynb",2891,0,"",python,selection_command
+3707,9320800,"test.ipynb",2874,0,"",python,selection_command
+3708,9321062,"test.ipynb",2856,0,"",python,selection_command
+3709,9321096,"test.ipynb",2841,0,"",python,selection_command
+3710,9321127,"test.ipynb",2826,0,"",python,selection_command
+3711,9321152,"test.ipynb",2814,0,"",python,selection_command
+3712,9321181,"test.ipynb",2801,0,"",python,selection_command
+3713,9321215,"test.ipynb",2784,0,"",python,selection_command
+3714,9321436,"test.ipynb",2753,0,"",python,selection_command
+3715,9321632,"test.ipynb",2761,0,"",python,selection_command
+3716,9321817,"test.ipynb",2763,0,"",python,selection_command
+3717,9323107,"utils/lr_utils.py",0,0,"import optax\n\n\ndef get_lr_schedule(\n lr_schedule: str,\n init_lr: float,\n max_lr: float,\n decay_end: float,\n total_steps: int,\n warmup_steps: int,\n wsd_decay_steps: int,\n) -> optax.Schedule:\n supported_schedules = [""wsd"", ""cos""]\n if lr_schedule == ""cos"":\n assert (\n warmup_steps <= total_steps\n ), ""Warmup steps can't be greater than total steps.""\n return optax.warmup_cosine_decay_schedule(\n init_value=init_lr,\n peak_value=max_lr,\n warmup_steps=warmup_steps,\n decay_steps=total_steps, # Note: decay_steps includes the warmup steps, so we need to pass total value\n end_value=decay_end,\n )\n elif lr_schedule == ""wsd"":\n assert (\n warmup_steps + wsd_decay_steps <= total_steps\n ), ""Warmup and decay period is longer than total steps.""\n schedules = [\n optax.linear_schedule(\n init_value=init_lr, end_value=max_lr, transition_steps=warmup_steps\n ),\n optax.constant_schedule(value=max_lr),\n optax.linear_schedule(\n init_value=max_lr, end_value=decay_end, transition_steps=wsd_decay_steps\n ),\n ]\n boundaries = [warmup_steps, total_steps - wsd_decay_steps]\n return optax.join_schedules(schedules, boundaries)\n else:\n raise ValueError(\n f""Learning rate schedule not supported. Please use one of {supported_schedules}""\n )\n",python,tab
+3718,9323107,"utils/lr_utils.py",19,0,"",python,selection_command
+3719,9323982,"test.ipynb",0,0,"",python,tab
+3720,9324937,"test.ipynb",3014,0,"",python,selection_command
+3721,9325884,"test.ipynb",2989,0,"",python,selection_command
+3722,9325994,"test.ipynb",2993,0,"",python,selection_command
+3723,9326193,"test.ipynb",3001,0,"",python,selection_command
+3724,9326321,"test.ipynb",3002,0,"",python,selection_command
+3725,9326965,"test.ipynb",3002,5,"",python,content
+3726,9327695,"test.ipynb",2979,0,"",python,selection_command
+3727,9327806,"test.ipynb",2964,0,"",python,selection_command
+3728,9327971,"test.ipynb",2952,0,"",python,selection_command
+3729,9328105,"test.ipynb",2924,0,"",python,selection_command
+3730,9328298,"test.ipynb",2906,0,"",python,selection_command
+3731,9328443,"test.ipynb",2891,0,"",python,selection_command
+3732,9328703,"test.ipynb",2883,0,"",python,selection_command
+3733,9328723,"test.ipynb",2865,0,"",python,selection_command
+3734,9328758,"test.ipynb",2850,0,"",python,selection_command
+3735,9328787,"test.ipynb",2835,0,"",python,selection_command
+3736,9328822,"test.ipynb",2820,0,"",python,selection_command
+3737,9328857,"test.ipynb",2808,0,"",python,selection_command
+3738,9328888,"test.ipynb",2793,0,"",python,selection_command
+3739,9329082,"test.ipynb",2762,0,"",python,selection_command
+3740,9329719,"test.ipynb",0,0,"",python,selection_command
+3741,9330069,"test.ipynb",12,0,"",python,selection_command
+3742,9330314,"test.ipynb",36,0,"",python,selection_command
+3743,9330341,"test.ipynb",57,0,"",python,selection_command
+3744,9330509,"test.ipynb",81,0,"",python,selection_command
+3745,9330688,"test.ipynb",94,0,"",python,selection_command
+3746,9330837,"test.ipynb",95,0,"",python,selection_command
+3747,9331062,"test.ipynb",138,0,"",python,selection_command
+3748,9331167,"test.ipynb",139,0,"",python,selection_command
+3749,9331343,"test.ipynb",138,0,"",python,selection_command
+3750,9331492,"test.ipynb",95,0,"",python,selection_command
+3751,9331649,"test.ipynb",100,0,"",python,selection_command
+3752,9331802,"test.ipynb",105,0,"",python,selection_command
+3753,9331950,"test.ipynb",106,0,"",python,selection_command
+3754,9332096,"test.ipynb",115,0,"",python,selection_command
+3755,9332201,"test.ipynb",122,0,"",python,selection_command
+3756,9332360,"test.ipynb",138,0,"",python,selection_command
+3757,9332702,"test.ipynb",122,0,"",python,selection_command
+3758,9332938,"utils/lr_utils.py",0,0,"",python,tab
+3759,9333780,"test.ipynb",0,0,"",python,tab
+3760,9334582,"test.ipynb",138,0,"",python,selection_command
+3761,9334890,"test.ipynb",138,1,"",python,content
+3762,9335499,"test.ipynb",394,0,"",python,selection_command
+3763,9335698,"test.ipynb",828,0,"",python,selection_command
+3764,9335872,"test.ipynb",1166,0,"",python,selection_command
+3765,9336038,"test.ipynb",1531,0,"",python,selection_command
+3766,9336866,"test.ipynb",1871,0,"",python,selection_command
+3767,9337076,"test.ipynb",2385,0,"",python,selection_command
+3768,9337380,"test.ipynb",3010,0,"",python,selection_command
+3769,9337885,"test.ipynb",3008,0,"",python,selection_command
+3770,9338161,"test.ipynb",2988,0,"",python,selection_command
+3771,9338162,"test.ipynb",2965,0,"",python,selection_command
+3772,9338192,"test.ipynb",2953,0,"",python,selection_command
+3773,9338221,"test.ipynb",2941,0,"",python,selection_command
+3774,9338252,"test.ipynb",2910,0,"",python,selection_command
+3775,9338285,"test.ipynb",2892,0,"",python,selection_command
+3776,9338329,"test.ipynb",2890,0,"",python,selection_command
+3777,9338357,"test.ipynb",2869,0,"",python,selection_command
+3778,9338479,"test.ipynb",2851,0,"",python,selection_command
+3779,9338737,"test.ipynb",2836,0,"",python,selection_command
+3780,9338767,"test.ipynb",2821,0,"",python,selection_command
+3781,9338799,"test.ipynb",2809,0,"",python,selection_command
+3782,9338999,"test.ipynb",2796,0,"",python,selection_command
+3783,9339147,"test.ipynb",2779,0,"",python,selection_command
+3784,9339297,"test.ipynb",2748,0,"",python,selection_command
+3785,9339427,"test.ipynb",2760,0,"",python,selection_command
+3786,9339612,"test.ipynb",2762,0,"",python,selection_command
+3787,9343134,"test.ipynb",2793,0,"",python,selection_command
+3788,9343434,"test.ipynb",2783,0,"",python,selection_command
+3789,9348465,"test.ipynb",2748,0,"",python,selection_command
+3790,9348914,"test.ipynb",569,0,"",python,selection_command
+3791,9350636,"test.ipynb",2748,0,"",python,selection_command
+3792,9350795,"test.ipynb",2783,0,"",python,selection_command
+3793,9351369,"test.ipynb",2800,0,"",python,selection_command
+3794,9352402,"test.ipynb",2813,0,"",python,selection_command
+3795,9352600,"test.ipynb",2825,0,"",python,selection_command
+3796,9352817,"test.ipynb",2840,0,"",python,selection_command
+3797,9352993,"test.ipynb",2855,0,"",python,selection_command
+3798,9353111,"test.ipynb",2873,0,"",python,selection_command
+3799,9353563,"test.ipynb",2890,0,"",python,selection_command
+3800,9353713,"test.ipynb",2896,0,"",python,selection_command
+3801,9353870,"test.ipynb",2914,0,"",python,selection_command
+3802,9354152,"test.ipynb",2927,0,"",python,selection_command
+3803,9354330,"test.ipynb",2928,0,"",python,selection_command
+3804,9354763,"test.ipynb",2908,0,"",python,selection_command
+3805,9355015,"test.ipynb",2890,0,"",python,selection_command
+3806,9355042,"test.ipynb",2887,0,"",python,selection_command
+3807,9355067,"test.ipynb",2867,0,"",python,selection_command
+3808,9355099,"test.ipynb",2849,0,"",python,selection_command
+3809,9355149,"test.ipynb",2834,0,"",python,selection_command
+3810,9355364,"test.ipynb",2849,0,"",python,selection_command
+3811,9355633,"test.ipynb",2867,0,"",python,selection_command
+3812,9355645,"test.ipynb",2887,0,"",python,selection_command
+3813,9355676,"test.ipynb",2890,0,"",python,selection_command
+3814,9355918,"test.ipynb",2908,0,"",python,selection_command
+3815,9356079,"test.ipynb",2928,0,"",python,selection_command
+3816,9366248,"test.ipynb",2908,0,"",python,selection_command
+3817,9366495,"test.ipynb",2890,0,"",python,selection_command
+3818,9366527,"test.ipynb",2887,0,"",python,selection_command
+3819,9366558,"test.ipynb",2867,0,"",python,selection_command
+3820,9366592,"test.ipynb",2849,0,"",python,selection_command
+3821,9366618,"test.ipynb",2834,0,"",python,selection_command
+3822,9366648,"test.ipynb",2819,0,"",python,selection_command
+3823,9366819,"test.ipynb",2807,0,"",python,selection_command
+3824,9366964,"test.ipynb",2794,0,"",python,selection_command
+3825,9367103,"test.ipynb",2766,0,"",python,selection_command
+3826,9367246,"test.ipynb",2746,0,"",python,selection_command
+3827,9367434,"test.ipynb",2766,0,"",python,selection_command
+3828,9368902,"utils/lr_utils.py",0,0,"",python,tab
+3829,9371825,"test.ipynb",0,0,"",python,tab
+3830,9372900,"train_dynamics.py",0,0,"",python,tab
+3831,9374736,"train_dynamics.py",7217,0,"",python,selection_command
+3832,9377496,"test.ipynb",0,0,"",python,tab
+3833,9391217,"test.ipynb",2787,0,"",python,selection_mouse
+3834,9396345,"test.ipynb",2748,0,"",python,selection_command
+3835,9396552,"test.ipynb",569,0,"",python,selection_command
+3836,9397516,"test.ipynb",579,0,"",python,selection_command
+3837,9398094,"test.ipynb",580,0,"",python,selection_command
+3838,9398401,"test.ipynb",580,0,"e",python,content
+3839,9398402,"test.ipynb",581,0,"",python,selection_keyboard
+3840,9398629,"test.ipynb",580,0,"",python,selection_command
+3841,9399081,"test.ipynb",569,0,"",python,selection_command
+3842,9404438,"test.ipynb",2749,0,"",python,selection_command
+3843,9404953,"test.ipynb",2780,0,"",python,selection_command
+3844,9405047,"test.ipynb",2797,0,"",python,selection_command
+3845,9405373,"test.ipynb",2780,0,"",python,selection_command
+3846,9405429,"test.ipynb",2794,0,"",python,selection_command
+3847,9405896,"test.ipynb",2795,0,"",python,selection_command
+3848,9405939,"test.ipynb",2795,0,"e",python,content
+3849,9405939,"test.ipynb",2796,0,"",python,selection_keyboard
+3850,9406191,"test.ipynb",2795,0,"",python,selection_command
+3851,9406812,"test.ipynb",2809,0,"",python,selection_command
+3852,9406985,"test.ipynb",2821,0,"",python,selection_command
+3853,9407232,"test.ipynb",2836,0,"",python,selection_command
+3854,9407258,"test.ipynb",2851,0,"",python,selection_command
+3855,9407291,"test.ipynb",2868,0,"",python,selection_command
+3856,9407324,"test.ipynb",2886,0,"",python,selection_command
+3857,9407357,"test.ipynb",2892,0,"",python,selection_command
+3858,9407469,"test.ipynb",2909,0,"",python,selection_command
+3859,9407733,"test.ipynb",2927,0,"",python,selection_command
+3860,9407994,"test.ipynb",2953,0,"",python,selection_command
+3861,9408064,"test.ipynb",2965,0,"",python,selection_command
+3862,9408188,"test.ipynb",2982,0,"",python,selection_command
+3863,9408615,"test.ipynb",3005,0,"",python,selection_command
+3864,9408816,"test.ipynb",3010,0,"",python,selection_command
+3865,9409119,"test.ipynb",3027,0,"",python,selection_command
+3866,9412071,"train_dynamics.py",0,0,"",python,tab
+3867,9413270,"train_dynamics.py",7569,0,"",python,selection_command
+3868,9415081,"train_dynamics.py",7606,0,"",python,selection_command
+3869,9415329,"train_dynamics.py",7611,0,"",python,selection_command
+3870,9415348,"train_dynamics.py",7693,0,"",python,selection_command
+3871,9415376,"train_dynamics.py",7750,0,"",python,selection_command
+3872,9415408,"train_dynamics.py",7809,0,"",python,selection_command
+3873,9415442,"train_dynamics.py",7814,0,"",python,selection_command
+3874,9415474,"train_dynamics.py",7877,0,"",python,selection_command
+3875,9415508,"train_dynamics.py",7962,0,"",python,selection_command
+3876,9415542,"train_dynamics.py",7967,0,"",python,selection_command
+3877,9416356,"train_dynamics.py",8693,0,"",python,selection_command
+3878,9418119,"train_dynamics.py",8609,0,"",python,selection_command
+3879,9418364,"train_dynamics.py",8583,0,"",python,selection_command
+3880,9418392,"train_dynamics.py",8577,0,"",python,selection_command
+3881,9418423,"train_dynamics.py",8496,0,"",python,selection_command
+3882,9418458,"train_dynamics.py",8470,0,"",python,selection_command
+3883,9418484,"train_dynamics.py",8399,0,"",python,selection_command
+3884,9418517,"train_dynamics.py",8386,0,"",python,selection_command
+3885,9418547,"train_dynamics.py",8342,0,"",python,selection_command
+3886,9418581,"train_dynamics.py",8337,0,"",python,selection_command
+3887,9418615,"train_dynamics.py",8290,0,"",python,selection_command
+3888,9418649,"train_dynamics.py",8207,0,"",python,selection_command
+3889,9418863,"train_dynamics.py",8290,0,"",python,selection_command
+3890,9419137,"train_dynamics.py",8286,50," nnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3891,9419227,"train_dynamics.py",8203,133," optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3892,9419481,"train_dynamics.py",8136,200," optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3893,9419510,"train_dynamics.py",8083,253," nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3894,9419541,"train_dynamics.py",8008,328," model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3895,9419667,"train_dynamics.py",7963,373," model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3896,9420019,"train_dynamics.py",7963,0,"",python,selection_command
+3897,9420553,"test.ipynb",0,0,"",python,tab
+3898,9421017,"test.ipynb",3048,0,"\n",python,content
+3899,9421280,"test.ipynb",3049,0,"\n",python,content
+3900,9421721,"test.ipynb",3050,0,"\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)",python,content
+3901,9421748,"test.ipynb",3055,0,"",python,selection_command
+3902,9422747,"test.ipynb",3055,1,"m",python,selection_command
+3903,9422901,"test.ipynb",3055,46,"model_state = nnx.state(optimizer.model)\n m",python,selection_command
+3904,9423152,"test.ipynb",3055,121,"model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n n",python,selection_command
+3905,9423180,"test.ipynb",3055,174,"model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n o",python,selection_command
+3906,9423361,"test.ipynb",3055,241,"model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n o",python,selection_command
+3907,9423530,"test.ipynb",3055,324,"model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n n",python,selection_command
+3908,9425031,"test.ipynb",3374,4,"",python,content
+3909,9425031,"test.ipynb",3291,4,"",python,content
+3910,9425031,"test.ipynb",3224,4,"",python,content
+3911,9425031,"test.ipynb",3171,4,"",python,content
+3912,9425031,"test.ipynb",3096,4,"",python,content
+3913,9425031,"test.ipynb",3051,4,"",python,content
+3914,9425036,"test.ipynb",3051,0,"",python,selection_command
+3915,9426157,"test.ipynb",3050,1,"",python,content
+3916,9429577,"test.ipynb",3091,0,"",python,selection_command
+3917,9430039,"test.ipynb",3091,71,"",python,content
+3918,9430225,"test.ipynb",3140,0,"",python,selection_command
+3919,9430379,"test.ipynb",3203,0,"",python,selection_command
+3920,9430768,"test.ipynb",3140,0,"",python,selection_command
+3921,9430908,"test.ipynb",3091,0,"",python,selection_command
+3922,9431708,"test.ipynb",3091,49,"",python,content
+3923,9432060,"test.ipynb",3154,0,"",python,selection_command
+3924,9433745,"test.ipynb",3233,0,"",python,selection_command
+3925,9434239,"test.ipynb",3233,46,"nnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3926,9434402,"test.ipynb",3154,125,"optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\nnnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3927,9434552,"test.ipynb",3091,188,"optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\noptimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\nnnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3928,9434668,"test.ipynb",3050,229,"model_state = nnx.state(optimizer.model)\noptimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\noptimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\nnnx.update(optimizer, optimizer_sharded_state)",python,selection_command
+3929,9434743,"test.ipynb",3049,230,"",python,content
+3930,9435462,"train_dynamics.py",0,0,"",python,tab
+3931,9437516,"train_dynamics.py",8008,0,"",python,selection_command
+3932,9437761,"train_dynamics.py",8083,0,"",python,selection_command
+3933,9437792,"train_dynamics.py",8136,0,"",python,selection_command
+3934,9437816,"train_dynamics.py",8203,0,"",python,selection_command
+3935,9437847,"train_dynamics.py",8286,0,"",python,selection_command
+3936,9437884,"train_dynamics.py",8337,0,"",python,selection_command
+3937,9437915,"train_dynamics.py",8338,0,"",python,selection_command
+3938,9437948,"train_dynamics.py",8382,0,"",python,selection_command
+3939,9437988,"train_dynamics.py",8395,0,"",python,selection_command
+3940,9438016,"train_dynamics.py",8466,0,"",python,selection_command
+3941,9438048,"train_dynamics.py",8492,0,"",python,selection_command
+3942,9438082,"train_dynamics.py",8573,0,"",python,selection_command
+3943,9438116,"train_dynamics.py",8579,0,"",python,selection_command
+3944,9438149,"train_dynamics.py",8605,0,"",python,selection_command
+3945,9438191,"train_dynamics.py",8689,0,"",python,selection_command
+3946,9438217,"train_dynamics.py",8695,0,"",python,selection_command
+3947,9438249,"train_dynamics.py",8825,0,"",python,selection_command
+3948,9438290,"train_dynamics.py",8958,0,"",python,selection_command
+3949,9438324,"train_dynamics.py",8959,0,"",python,selection_command
+3950,9438356,"train_dynamics.py",9014,0,"",python,selection_command
+3951,9438390,"train_dynamics.py",9072,0,"",python,selection_command
+3952,9438423,"train_dynamics.py",9095,0,"",python,selection_command
+3953,9438457,"train_dynamics.py",9148,0,"",python,selection_command
+3954,9438490,"train_dynamics.py",9184,0,"",python,selection_command
+3955,9438573,"train_dynamics.py",9148,0,"",python,selection_command
+3956,9438830,"train_dynamics.py",9095,0,"",python,selection_command
+3957,9438851,"train_dynamics.py",9072,0,"",python,selection_command
+3958,9438889,"train_dynamics.py",9014,0,"",python,selection_command
+3959,9438923,"train_dynamics.py",8959,0,"",python,selection_command
+3960,9438958,"train_dynamics.py",8958,0,"",python,selection_command
+3961,9439233,"train_dynamics.py",8959,0,"",python,selection_command
+3962,9441778,"train_dynamics.py",8959,54," checkpoint_options = ocp.CheckpointManagerOptions(",python,selection_command
+3963,9441921,"train_dynamics.py",8959,112," checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,",python,selection_command
+3964,9442183,"train_dynamics.py",8959,135," checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,",python,selection_command
+3965,9442193,"train_dynamics.py",8959,188," checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,",python,selection_command
+3966,9442350,"train_dynamics.py",8959,224," checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,",python,selection_command
+3967,9442497,"train_dynamics.py",8959,262," checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,",python,selection_command
+3968,9442661,"train_dynamics.py",8959,268," checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )",python,selection_command
+3969,9442882,"train_dynamics.py",8959,0,"",python,selection_command
+3970,9443407,"test.ipynb",0,0,"",python,tab
+3971,9444012,"test.ipynb",3049,0,"\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )",python,content
+3972,9444016,"test.ipynb",3054,0,"",python,selection_command
+3973,9444635,"test.ipynb",3054,1,"c",python,selection_command
+3974,9444710,"test.ipynb",3054,56,"checkpoint_options = ocp.CheckpointManagerOptions(\n ",python,selection_command
+3975,9444980,"test.ipynb",3054,114,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n ",python,selection_command
+3976,9444991,"test.ipynb",3054,137,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n ",python,selection_command
+3977,9445024,"test.ipynb",3054,190,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n ",python,selection_command
+3978,9445144,"test.ipynb",3054,226,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n ",python,selection_command
+3979,9445326,"test.ipynb",3054,264,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )",python,selection_command
+3980,9445523,"test.ipynb",3313,4,"",python,content
+3981,9445523,"test.ipynb",3275,8," ",python,content
+3982,9445523,"test.ipynb",3239,8," ",python,content
+3983,9445523,"test.ipynb",3186,8," ",python,content
+3984,9445523,"test.ipynb",3163,8," ",python,content
+3985,9445523,"test.ipynb",3105,8," ",python,content
+3986,9445523,"test.ipynb",3050,4,"",python,content
+3987,9445530,"test.ipynb",3050,0,"",python,selection_command
+3988,9447016,"test.ipynb",0,0,"",python,selection_command
+3989,9447826,"test.ipynb",12,0,"",python,selection_command
+3990,9448080,"test.ipynb",36,0,"",python,selection_command
+3991,9448111,"test.ipynb",57,0,"",python,selection_command
+3992,9448211,"test.ipynb",81,0,"",python,selection_command
+3993,9449221,"test.ipynb",35,0,"\nimport orbax.checkpoint as ocp",python,content
+3994,9450296,"test.ipynb",3320,0,"",python,selection_command
+3995,9451765,"test.ipynb",3286,0,"",python,selection_command
+3996,9451907,"test.ipynb",3254,0,"",python,selection_command
+3997,9452031,"test.ipynb",3205,0,"",python,selection_command
+3998,9452178,"test.ipynb",3186,0,"",python,selection_command
+3999,9452309,"test.ipynb",3132,0,"",python,selection_command
+4000,9453006,"test.ipynb",3221,5,"",python,content
+4001,9453006,"test.ipynb",3156,5,"",python,content
+4002,9454197,"test.ipynb",3310,0,"",python,selection_command
+4003,9454895,"test.ipynb",3311,0,"\n",python,content
+4004,9455096,"test.ipynb",3312,0,"\n",python,content
+4005,9455849,"train_dynamics.py",0,0,"",python,tab
+4006,9457581,"train_dynamics.py",9014,0,"",python,selection_command
+4007,9457832,"train_dynamics.py",9072,0,"",python,selection_command
+4008,9457847,"train_dynamics.py",9095,0,"",python,selection_command
+4009,9457882,"train_dynamics.py",9148,0,"",python,selection_command
+4010,9457911,"train_dynamics.py",9184,0,"",python,selection_command
+4011,9458082,"train_dynamics.py",9222,0,"",python,selection_command
+4012,9458272,"train_dynamics.py",9228,0,"",python,selection_command
+4013,9458396,"train_dynamics.py",9229,0,"",python,selection_command
+4014,9458730,"train_dynamics.py",9229,47," checkpoint_manager = ocp.CheckpointManager(",python,selection_command
+4015,9458817,"train_dynamics.py",9229,70," checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,",python,selection_command
+4016,9458996,"train_dynamics.py",9229,106," checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,",python,selection_command
+4017,9459131,"train_dynamics.py",9229,149," checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,",python,selection_command
+4018,9459252,"train_dynamics.py",9229,155," checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )",python,selection_command
+4019,9459501,"train_dynamics.py",9229,0,"",python,selection_command
+4020,9459990,"test.ipynb",0,0,"",python,tab
+4021,9460788,"test.ipynb",3313,0,"\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )",python,content
+4022,9460803,"test.ipynb",3318,0,"",python,selection_command
+4023,9461318,"test.ipynb",3318,1,"c",python,selection_command
+4024,9461432,"test.ipynb",3318,49,"checkpoint_manager = ocp.CheckpointManager(\n ",python,selection_command
+4025,9461679,"test.ipynb",3318,72,"checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n ",python,selection_command
+4026,9461833,"test.ipynb",3318,108,"checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n ",python,selection_command
+4027,9462278,"test.ipynb",3318,151,"checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )",python,selection_command
+4028,9462456,"test.ipynb",3464,4,"",python,content
+4029,9462456,"test.ipynb",3421,8," ",python,content
+4030,9462456,"test.ipynb",3385,8," ",python,content
+4031,9462456,"test.ipynb",3362,8," ",python,content
+4032,9462456,"test.ipynb",3314,4,"",python,content
+4033,9462469,"test.ipynb",3314,0,"",python,selection_command
+4034,9464552,"test.ipynb",3358,0,"",python,selection_command
+4035,9465184,"test.ipynb",3362,0,"",python,selection_command
+4036,9465856,"test.ipynb",3407,39,"",python,content
+4037,9465856,"test.ipynb",3362,5,"",python,content
+4038,9467765,"test.ipynb",3376,0,"",python,selection_command
+4039,9467869,"test.ipynb",3404,0,"",python,selection_command
+4040,9468496,"test.ipynb",3405,0,"\n",python,content
+4041,9468695,"test.ipynb",3406,0,"\n",python,content
+4042,9470418,"train_dynamics.py",0,0,"",python,tab
+4043,9472150,"train_dynamics.py",9446,0,"",python,selection_keyboard
+4044,9472869,"train_dynamics.py",9996,0,"",python,selection_command
+4045,9473443,"train_dynamics.py",10721,0,"",python,selection_command
+4046,9474248,"train_dynamics.py",10643,0,"",python,selection_command
+4047,9474359,"train_dynamics.py",10606,0,"",python,selection_command
+4048,9474478,"train_dynamics.py",10560,0,"",python,selection_command
+4049,9474644,"train_dynamics.py",10513,0,"",python,selection_command
+4050,9474981,"train_dynamics.py",10497,46," restored = checkpoint_manager.restore(",python,selection_command
+4051,9475305,"train_dynamics.py",10497,92," restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),",python,selection_command
+4052,9475821,"train_dynamics.py",10560,0,"",python,selection_command
+4053,9475997,"train_dynamics.py",10513,0,"",python,selection_command
+4054,9476154,"train_dynamics.py",10448,0,"",python,selection_command
+4055,9476344,"train_dynamics.py",10385,0,"",python,selection_command
+4056,9476428,"train_dynamics.py",10331,0,"",python,selection_command
+4057,9476678,"train_dynamics.py",10315,53," optimizer.model.tokenizer.vq.drop.rngs = rngs",python,selection_command
+4058,9476747,"train_dynamics.py",10315,116," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)",python,selection_command
+4059,9477016,"train_dynamics.py",10315,181," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)",python,selection_command
+4060,9477027,"train_dynamics.py",10315,228," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(",python,selection_command
+4061,9477059,"train_dynamics.py",10315,274," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),",python,selection_command
+4062,9477092,"train_dynamics.py",10315,311," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(",python,selection_command
+4063,9477202,"train_dynamics.py",10315,389," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),",python,selection_command
+4064,9477278,"train_dynamics.py",10315,474," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),",python,selection_command
+4065,9477430,"train_dynamics.py",10315,489," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),",python,selection_command
+4066,9477582,"train_dynamics.py",10315,499," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )",python,selection_command
+4067,9479149,"train_dynamics.py",10315,0,"",python,selection_command
+4068,9480371,"test.ipynb",0,0,"",python,tab
+4069,9481454,"test.ipynb",3407,0,"\n optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )",python,content
+4070,9481467,"test.ipynb",3416,0,"",python,selection_command
+4071,9482120,"test.ipynb",3416,1,"o",python,selection_command
+4072,9482178,"test.ipynb",3416,55,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n a",python,selection_command
+4073,9482445,"test.ipynb",3416,118,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n a",python,selection_command
+4074,9482460,"test.ipynb",3416,183,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n r",python,selection_command
+4075,9482493,"test.ipynb",3416,230,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n ",python,selection_command
+4076,9482524,"test.ipynb",3416,276,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n ",python,selection_command
+4077,9482636,"test.ipynb",3416,313,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n ",python,selection_command
+4078,9482637,"test.ipynb",3416,391,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n ",python,selection_command
+4079,9482799,"test.ipynb",3416,476,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ",python,selection_command
+4080,9482970,"test.ipynb",3416,491,"optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )",python,selection_command
+4081,9484543,"test.ipynb",3898,8," ",python,content
+4082,9484543,"test.ipynb",3883,12," ",python,content
+4083,9484543,"test.ipynb",3798,16," ",python,content
+4084,9484543,"test.ipynb",3720,16," ",python,content
+4085,9484543,"test.ipynb",3683,12," ",python,content
+4086,9484543,"test.ipynb",3637,12," ",python,content
+4087,9484543,"test.ipynb",3590,8," ",python,content
+4088,9484543,"test.ipynb",3525,8," ",python,content
+4089,9484543,"test.ipynb",3462,8," ",python,content
+4090,9484543,"test.ipynb",3408,8," ",python,content
+4091,9484545,"test.ipynb",3412,0,"",python,selection_command
+4092,9486950,"test.ipynb",3408,49," optimizer.model.tokenizer.vq.drop.rngs = rngs",python,selection_command
+4093,9487164,"test.ipynb",3408,108," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)",python,selection_command
+4094,9487381,"test.ipynb",3408,169," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)",python,selection_command
+4095,9487393,"test.ipynb",3408,212," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(",python,selection_command
+4096,9487425,"test.ipynb",3408,254," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),",python,selection_command
+4097,9487460,"test.ipynb",3408,287," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(",python,selection_command
+4098,9487492,"test.ipynb",3408,361," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),",python,selection_command
+4099,9487526,"test.ipynb",3408,442," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),",python,selection_command
+4100,9487704,"test.ipynb",3408,453," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),",python,selection_command
+4101,9487879,"test.ipynb",3408,459," optimizer.model.tokenizer.vq.drop.rngs = rngs\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )",python,selection_command
+4102,9488213,"test.ipynb",3862,4,"",python,content
+4103,9488213,"test.ipynb",3851,8," ",python,content
+4104,9488213,"test.ipynb",3770,12," ",python,content
+4105,9488213,"test.ipynb",3696,12," ",python,content
+4106,9488213,"test.ipynb",3663,8," ",python,content
+4107,9488213,"test.ipynb",3621,8," ",python,content
+4108,9488213,"test.ipynb",3578,4,"",python,content
+4109,9488213,"test.ipynb",3517,4,"",python,content
+4110,9488213,"test.ipynb",3458,4,"",python,content
+4111,9488213,"test.ipynb",3408,4,"",python,content
+4112,9488215,"test.ipynb",3408,0,"",python,selection_command
+4113,9489785,"test.ipynb",3454,0,"",python,selection_command
+4114,9490117,"test.ipynb",3509,0,"",python,selection_command
+4115,9490309,"test.ipynb",3566,0,"",python,selection_command
+4116,9490414,"test.ipynb",3605,0,"",python,selection_command
+4117,9490550,"test.ipynb",3643,0,"",python,selection_command
+4118,9490714,"test.ipynb",3672,0,"",python,selection_command
+4119,9491358,"test.ipynb",3742,0,"",python,selection_command
+4120,9491451,"test.ipynb",3819,0,"",python,selection_command
+4121,9492073,"test.ipynb",3742,0,"",python,selection_command
+4122,9492185,"test.ipynb",3672,0,"",python,selection_command
+4123,9494194,"test.ipynb",3680,0,"",python,selection_command
+4124,9494504,"test.ipynb",3691,0,"",python,selection_command
+4125,9494504,"test.ipynb",3692,0,"",python,selection_command
+4126,9494507,"test.ipynb",3695,0,"",python,selection_command
+4127,9494534,"test.ipynb",3696,0,"",python,selection_command
+4128,9494831,"test.ipynb",3700,0,"",python,selection_command
+4129,9495028,"test.ipynb",3701,0,"",python,selection_command
+4130,9495218,"test.ipynb",3714,0,"",python,selection_command
+4131,9495278,"test.ipynb",3715,0,"",python,selection_command
+4132,9506288,"test.ipynb",2482,0,"",python,selection_mouse
+4133,9506289,"test.ipynb",2481,0,"",python,selection_command
+4134,9507101,"test.ipynb",0,0,"",python,selection_command
+4135,9509075,"test.ipynb",11,0,"\n",python,content
+4136,9509245,"test.ipynb",12,0,"i",python,content
+4137,9509245,"test.ipynb",13,0,"",python,selection_keyboard
+4138,9509358,"test.ipynb",13,0,"m",python,content
+4139,9509358,"test.ipynb",14,0,"",python,selection_keyboard
+4140,9509396,"test.ipynb",14,0,"p",python,content
+4141,9509397,"test.ipynb",15,0,"",python,selection_keyboard
+4142,9509492,"test.ipynb",15,0,"o",python,content
+4143,9509492,"test.ipynb",16,0,"",python,selection_keyboard
+4144,9509532,"test.ipynb",16,0,"r",python,content
+4145,9509533,"test.ipynb",17,0,"",python,selection_keyboard
+4146,9509624,"test.ipynb",17,0,"t",python,content
+4147,9509625,"test.ipynb",18,0,"",python,selection_keyboard
+4148,9509710,"test.ipynb",18,0," ",python,content
+4149,9509710,"test.ipynb",19,0,"",python,selection_keyboard
+4150,9509829,"test.ipynb",19,0,"g",python,content
+4151,9509830,"test.ipynb",20,0,"",python,selection_keyboard
+4152,9509979,"test.ipynb",20,0,"r",python,content
+4153,9509979,"test.ipynb",21,0,"",python,selection_keyboard
+4154,9510015,"test.ipynb",21,0,"a",python,content
+4155,9510016,"test.ipynb",22,0,"",python,selection_keyboard
+4156,9510067,"test.ipynb",22,0,"i",python,content
+4157,9510067,"test.ipynb",23,0,"",python,selection_keyboard
+4158,9510141,"test.ipynb",23,0,"n",python,content
+4159,9510142,"test.ipynb",24,0,"",python,selection_keyboard
+4160,9510273,"test.ipynb",23,0,"",python,selection_command
+4161,9513517,"test.ipynb",3780,0,"",python,selection_command
+4162,9520051,"test.ipynb",3785,0,"",python,selection_command
+4163,9520694,"test.ipynb",3755,77,"",python,content
+4164,9520702,"test.ipynb",3759,0,"",python,selection_command
+4165,9528092,"test.ipynb",0,0,"",python,selection_command
+4166,9528738,"test.ipynb",12,0,"",python,selection_command
+4167,9528995,"test.ipynb",25,0,"",python,selection_command
+4168,9529009,"test.ipynb",49,0,"",python,selection_command
+4169,9529040,"test.ipynb",80,0,"",python,selection_command
+4170,9529075,"test.ipynb",101,0,"",python,selection_command
+4171,9529107,"test.ipynb",125,0,"",python,selection_command
+4172,9529142,"test.ipynb",138,0,"",python,selection_command
+4173,9529175,"test.ipynb",139,0,"",python,selection_command
+4174,9529210,"test.ipynb",182,0,"",python,selection_command
+4175,9529243,"test.ipynb",183,0,"",python,selection_command
+4176,9529277,"test.ipynb",184,0,"",python,selection_command
+4177,9529311,"test.ipynb",209,0,"",python,selection_command
+4178,9529344,"test.ipynb",223,0,"",python,selection_command
+4179,9529377,"test.ipynb",241,0,"",python,selection_command
+4180,9529411,"test.ipynb",265,0,"",python,selection_command
+4181,9529562,"test.ipynb",288,0,"",python,selection_command
+4182,9529709,"test.ipynb",311,0,"",python,selection_command
+4183,9530415,"test.ipynb",330,0,"",python,selection_command
+4184,9530589,"test.ipynb",354,0,"",python,selection_command
+4185,9530724,"test.ipynb",381,0,"",python,selection_command
+4186,9531896,"test.ipynb",883,0,"",python,selection_command
+4187,9533376,"test.ipynb",1480,0,"",python,selection_command
+4188,9534232,"test.ipynb",1488,0,"",python,selection_command
+4189,9534412,"test.ipynb",1490,0,"",python,selection_command
+4190,9534607,"test.ipynb",1494,0,"",python,selection_command
+4191,9534785,"test.ipynb",1496,0,"",python,selection_command
+4192,9535219,"test.ipynb",1499,0,"",python,selection_command
+4193,9535713,"test.ipynb",1496,0,"",python,selection_command
+4194,9536230,"test.ipynb",1497,0,"",python,selection_command
+4195,9537919,"test.ipynb",1496,0,"",python,selection_command
+4196,9539859,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+4197,9540464,"experiments/dynamics_grain_tok_restore.sh",430,0,"",shellscript,selection_command
+4198,9540793,"experiments/dynamics_grain_tok_restore.sh",386,0,"",shellscript,selection_command
+4199,9540954,"experiments/dynamics_grain_tok_restore.sh",366,0,"",shellscript,selection_command
+4200,9541093,"experiments/dynamics_grain_tok_restore.sh",310,0,"",shellscript,selection_command
+4201,9541529,"experiments/dynamics_grain_tok_restore.sh",312,0,"",shellscript,selection_command
+4202,9541717,"experiments/dynamics_grain_tok_restore.sh",315,0,"",shellscript,selection_command
+4203,9542078,"experiments/dynamics_grain_tok_restore.sh",249,0,"",shellscript,selection_command
+4204,9542810,"experiments/dynamics_grain_tok_restore.sh",240,0,"",shellscript,selection_command
+4205,9542964,"experiments/dynamics_grain_tok_restore.sh",239,0,"",shellscript,selection_command
+4206,9543082,"experiments/dynamics_grain_tok_restore.sh",236,0,"",shellscript,selection_command
+4207,9543233,"experiments/dynamics_grain_tok_restore.sh",233,0,"",shellscript,selection_command
+4208,9543488,"experiments/dynamics_grain_tok_restore.sh",233,1,"=",shellscript,selection_command
+4209,9543561,"experiments/dynamics_grain_tok_restore.sh",233,3,"=""$",shellscript,selection_command
+4210,9544136,"experiments/dynamics_grain_tok_restore.sh",233,2,"=""",shellscript,selection_command
+4211,9544197,"experiments/dynamics_grain_tok_restore.sh",234,0,"",shellscript,selection_command
+4212,9544777,"experiments/dynamics_grain_tok_restore.sh",234,1,"""",shellscript,selection_command
+4213,9545251,"experiments/dynamics_grain_tok_restore.sh",234,57,"""$PWD/checkpoints/dynamics_openai_grain_tok_lam_restore""\n",shellscript,selection_command
+4214,9545462,"experiments/dynamics_grain_tok_restore.sh",234,56,"""$PWD/checkpoints/dynamics_openai_grain_tok_lam_restore""",shellscript,selection_command
+4215,9545629,"experiments/dynamics_grain_tok_restore.sh",234,55,"""$PWD/checkpoints/dynamics_openai_grain_tok_lam_restore",shellscript,selection_command
+4216,9545903,"experiments/dynamics_grain_tok_restore.sh",234,56,"""$PWD/checkpoints/dynamics_openai_grain_tok_lam_restore""",shellscript,selection_command
+4217,9546120,"experiments/dynamics_grain_tok_restore.sh",289,0,"",shellscript,selection_command
+4218,9546626,"test.ipynb",0,0,"",python,tab
+4219,9548568,"test.ipynb",1498,0,"\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),",python,content
+4220,9548582,"test.ipynb",1507,0,"",python,selection_command
+4221,9549129,"test.ipynb",1499,77,"",python,content
+4222,9549132,"test.ipynb",1496,0,"",python,selection_command
+4223,9549465,"test.ipynb",1497,0,"",python,selection_command
+4224,9549671,"test.ipynb",1497,0,"""$PWD/checkpoints/dynamics_openai_grain_tok_lam_restore""",python,content
+4225,9549672,"test.ipynb",1553,0,"",python,selection_keyboard
+4226,9550099,"test.ipynb",1552,0,"",python,selection_command
+4227,9550435,"test.ipynb",1515,0,"",python,selection_command
+4228,9550695,"test.ipynb",1514,0,"",python,selection_command
+4229,9550719,"test.ipynb",1503,0,"",python,selection_command
+4230,9550746,"test.ipynb",1502,0,"",python,selection_command
+4231,9550779,"test.ipynb",1499,0,"",python,selection_command
+4232,9550812,"test.ipynb",1496,0,"",python,selection_command
+4233,9550847,"test.ipynb",1494,0,"",python,selection_command
+4234,9551133,"test.ipynb",1496,0,"",python,selection_command
+4235,9551298,"test.ipynb",1499,0,"",python,selection_command
+4236,9555600,"test.ipynb",1499,1,"P",python,selection_command
+4237,9555658,"test.ipynb",1499,3,"PWD",python,selection_command
+4238,9557780,"test.ipynb",1499,2,"PW",python,selection_command
+4239,9558538,"test.ipynb",1500,0,"",python,selection_command
+4240,9558860,"test.ipynb",1501,0,"",python,selection_command
+4241,9559045,"test.ipynb",1500,0,"",python,selection_command
+4242,9559425,"test.ipynb",1501,0,"",python,selection_command
+4243,9559549,"test.ipynb",1501,1,"D",python,selection_command
+4244,9559627,"test.ipynb",1500,2,"WD",python,selection_command
+4245,9559751,"test.ipynb",1499,3,"PWD",python,selection_command
+4246,9559884,"test.ipynb",1498,4,"$PWD",python,selection_command
+4247,9560065,"test.ipynb",1498,4,"",python,content
+4248,9560312,"test.ipynb",1498,0,"/home/franz.srambical/jafar",python,content
+4249,9560312,"test.ipynb",1525,0,"",python,selection_keyboard
+4250,9560759,"test.ipynb",1524,0,"",python,selection_command
+4251,9562665,"test.ipynb",1480,0,"",python,selection_command
+4252,9562932,"test.ipynb",1488,0,"",python,selection_command
+4253,9563093,"test.ipynb",1490,0,"",python,selection_command
+4254,9563264,"test.ipynb",1494,0,"",python,selection_command
+4255,9563433,"test.ipynb",1496,0,"",python,selection_command
+4256,9566931,"test.ipynb",1496,1,"",python,content
+4257,9567248,"test.ipynb",1575,0,"",python,selection_command
+4258,9567575,"test.ipynb",1575,1,"",python,content
+4259,9567576,"test.ipynb",1574,0,"",python,selection_command
+4260,9581955,"test.ipynb",11,0,"",python,selection_mouse
+4261,9581956,"test.ipynb",10,0,"",python,selection_command
+4262,9582650,"test.ipynb",22,0,"",python,selection_command
+4263,9582861,"test.ipynb",12,13,"",python,content
+4264,9584069,"test.ipynb",3826,0,"",python,selection_command
+4265,9608373,"test.ipynb",3826,1,")",python,selection_command
+4266,9608580,"test.ipynb",3819,1," ",python,selection_command
+4267,9608767,"test.ipynb",3749,1," ",python,selection_command
+4268,9608903,"test.ipynb",3720,1," ",python,selection_command
+4269,9609031,"test.ipynb",3682,1," ",python,selection_command
+4270,9609184,"test.ipynb",3643,1,"r",python,selection_command
+4271,9609350,"test.ipynb",3643,0,"",python,selection_command
+4272,9609667,"test.ipynb",3826,0,"#",python,content
+4273,9609667,"test.ipynb",3819,0,"#",python,content
+4274,9609667,"test.ipynb",3749,0,"#",python,content
+4275,9609667,"test.ipynb",3720,0,"#",python,content
+4276,9609667,"test.ipynb",3682,0,"#",python,content
+4277,9609667,"test.ipynb",3643,0,"#",python,content
+4278,9609667,"test.ipynb",3644,0,"",python,selection_keyboard
+4279,9609748,"test.ipynb",3832,0," ",python,content
+4280,9609748,"test.ipynb",3824,0," ",python,content
+4281,9609748,"test.ipynb",3753,0," ",python,content
+4282,9609749,"test.ipynb",3723,0," ",python,content
+4283,9609749,"test.ipynb",3684,0," ",python,content
+4284,9609749,"test.ipynb",3644,0," ",python,content
+4285,9609749,"test.ipynb",3645,0,"",python,selection_keyboard
+4286,9609992,"test.ipynb",3644,0,"",python,selection_command
+4287,9610376,"test.ipynb",3685,0,"",python,selection_command
+4288,9610628,"test.ipynb",3725,0,"",python,selection_command
+4289,9610874,"test.ipynb",3685,0,"",python,selection_command
+4290,9611014,"test.ipynb",3644,0,"",python,selection_command
+4291,9611214,"test.ipynb",3643,40,"# restored = checkpoint_manager.restore(",python,selection_command
+4292,9611298,"test.ipynb",3643,80,"# restored = checkpoint_manager.restore(\n# checkpoint_manager.latest_step(),",python,selection_command
+4293,9611562,"test.ipynb",3643,111,"# restored = checkpoint_manager.restore(\n# checkpoint_manager.latest_step(),\n# args=ocp.args.Composite(",python,selection_command
+4294,9611581,"test.ipynb",3643,183,"# restored = checkpoint_manager.restore(\n# checkpoint_manager.latest_step(),\n# args=ocp.args.Composite(\n# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),",python,selection_command
+4295,9611610,"test.ipynb",3643,192,"# restored = checkpoint_manager.restore(\n# checkpoint_manager.latest_step(),\n# args=ocp.args.Composite(\n# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n# ),",python,selection_command
+4296,9611784,"test.ipynb",3643,196,"# restored = checkpoint_manager.restore(\n# checkpoint_manager.latest_step(),\n# args=ocp.args.Composite(\n# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n# ),\n# )",python,selection_command
+4297,9612049,"test.ipynb",3643,0,"",python,selection_command
+4298,9612478,"test.ipynb",3684,0,"",python,selection_command
+4299,9612727,"test.ipynb",3724,0,"",python,selection_command
+4300,9612746,"test.ipynb",3755,0,"",python,selection_command
+4301,9612919,"test.ipynb",3827,0,"",python,selection_command
+4302,9613062,"test.ipynb",3836,0,"",python,selection_command
+4303,9613237,"test.ipynb",3839,0,"\n",python,content
+4304,9613401,"test.ipynb",3840,0,"\n",python,content
+4305,9614053,"test.ipynb",3841,0,"\n# restored = checkpoint_manager.restore(\n# checkpoint_manager.latest_step(),\n# args=ocp.args.Composite(\n# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n# ),\n# )",python,content
+4306,9614063,"test.ipynb",3842,0,"",python,selection_command
+4307,9614752,"test.ipynb",3842,1,"#",python,selection_command
+4308,9614861,"test.ipynb",3842,2,"# ",python,selection_command
+4309,9614917,"test.ipynb",3842,2,"# ",python,selection_command
+4310,9615181,"test.ipynb",3842,2,"# ",python,selection_command
+4311,9615397,"test.ipynb",3842,2,"# ",python,selection_command
+4312,9615533,"test.ipynb",3842,2,"# ",python,selection_command
+4313,9615694,"test.ipynb",3842,2,"# ",python,selection_command
+4314,9615843,"test.ipynb",4035,2,"",python,content
+4315,9615843,"test.ipynb",4026,2,"",python,content
+4316,9615843,"test.ipynb",3954,2,"",python,content
+4317,9615843,"test.ipynb",3923,2,"",python,content
+4318,9615843,"test.ipynb",3883,2,"",python,content
+4319,9615843,"test.ipynb",3842,2,"",python,content
+4320,9615853,"test.ipynb",3842,0,"",python,selection_command
+4321,9616596,"test.ipynb",3851,0,"",python,selection_command
+4322,9616761,"test.ipynb",3853,0,"",python,selection_command
+4323,9620851,"test.ipynb",3892,0,"",python,selection_command
+4324,9620986,"test.ipynb",3930,0,"",python,selection_command
+4325,9621116,"test.ipynb",3959,0,"",python,selection_command
+4326,9622915,"test.ipynb",4023,0,"",python,selection_command
+4327,9623310,"test.ipynb",4022,0,"",python,selection_command
+4328,9623858,"test.ipynb",4022,1,")",python,selection_command
+4329,9623909,"test.ipynb",3952,71," model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n )",python,selection_command
+4330,9624048,"test.ipynb",3923,100,"args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n )",python,selection_command
+4331,9624221,"test.ipynb",3923,100,"",python,content
+4332,9628181,"test.ipynb",3919,6,"",python,content
+4333,9646000,"test.ipynb",0,0,"",python,selection_command
+4334,9648334,"test.ipynb",498,0,"",python,selection_command
+4335,9648604,"test.ipynb",1149,0,"",python,selection_command
+4336,9648783,"test.ipynb",1833,0,"",python,selection_command
+4337,9649283,"test.ipynb",2579,0,"",python,selection_command
+4338,9649482,"test.ipynb",3102,0,"",python,selection_command
+4339,9649791,"test.ipynb",3755,0,"",python,selection_command
+4340,9650612,"test.ipynb",3919,0,"",python,selection_command
+4341,9653964,"test.ipynb",3881,0,"",python,selection_command
+4342,9654086,"test.ipynb",3885,0,"",python,selection_command
+4343,9662350,"test.ipynb",498,0,"",python,selection_command
+4344,9662808,"test.ipynb",1149,0,"",python,selection_command
+4345,9663331,"test.ipynb",1174,0,"",python,selection_keyboard
+4346,9663634,"test.ipynb",1198,0,"",python,selection_command
+4347,9663894,"test.ipynb",1219,0,"",python,selection_command
+4348,9663910,"test.ipynb",1243,0,"",python,selection_command
+4349,9663942,"test.ipynb",1269,0,"",python,selection_command
+4350,9664002,"test.ipynb",1290,0,"",python,selection_command
+4351,9664009,"test.ipynb",1323,0,"",python,selection_command
+4352,9664042,"test.ipynb",1333,0,"",python,selection_command
+4353,9664076,"test.ipynb",1351,0,"",python,selection_command
+4354,9664109,"test.ipynb",1368,0,"",python,selection_command
+4355,9664277,"test.ipynb",1351,0,"",python,selection_command
+4356,9664534,"test.ipynb",1333,0,"",python,selection_command
+4357,9664560,"test.ipynb",1323,0,"",python,selection_command
+4358,9664625,"test.ipynb",1333,0,"",python,selection_command
+4359,9664906,"test.ipynb",1351,0,"",python,selection_command
+4360,9664906,"test.ipynb",1368,0,"",python,selection_command
+4361,9664944,"test.ipynb",1386,0,"",python,selection_command
+4362,9664978,"test.ipynb",1415,0,"",python,selection_command
+4363,9665176,"test.ipynb",1437,0,"",python,selection_command
+4364,9665340,"test.ipynb",1467,0,"",python,selection_command
+4365,9665954,"test.ipynb",3439,0,"",python,selection_command
+4366,9667548,"test.ipynb",1467,0,"",python,selection_command
+4367,9668812,"test.ipynb",1561,0,"",python,selection_command
+4368,9669298,"test.ipynb",1561,0,"/",python,content
+4369,9669299,"test.ipynb",1562,0,"",python,selection_keyboard
+4370,9670018,"test.ipynb",1562,0,"m",python,content
+4371,9670019,"test.ipynb",1563,0,"",python,selection_keyboard
+4372,9670148,"test.ipynb",1563,0,"o",python,content
+4373,9670148,"test.ipynb",1564,0,"",python,selection_keyboard
+4374,9670149,"test.ipynb",1564,0,"d",python,content
+4375,9670149,"test.ipynb",1565,0,"",python,selection_keyboard
+4376,9670181,"test.ipynb",1565,0,"e",python,content
+4377,9670181,"test.ipynb",1566,0,"",python,selection_keyboard
+4378,9670257,"test.ipynb",1566,0,"l",python,content
+4379,9670258,"test.ipynb",1567,0,"",python,selection_keyboard
+4380,9670673,"test.ipynb",1567,0,"_",python,content
+4381,9670674,"test.ipynb",1568,0,"",python,selection_keyboard
+4382,9670845,"test.ipynb",1568,0,"s",python,content
+4383,9670846,"test.ipynb",1569,0,"",python,selection_keyboard
+4384,9670911,"test.ipynb",1569,0,"t",python,content
+4385,9670911,"test.ipynb",1570,0,"",python,selection_keyboard
+4386,9670963,"test.ipynb",1570,0,"a",python,content
+4387,9670963,"test.ipynb",1571,0,"",python,selection_keyboard
+4388,9671062,"test.ipynb",1571,0,"t",python,content
+4389,9671062,"test.ipynb",1572,0,"",python,selection_keyboard
+4390,9671197,"test.ipynb",1572,0,"e",python,content
+4391,9671197,"test.ipynb",1573,0,"",python,selection_keyboard
+4392,9671349,"test.ipynb",1572,0,"",python,selection_command
+4393,9689336,"test.ipynb",3853,0,"",python,selection_mouse
+4394,9690596,"test.ipynb",3851,0,"",python,selection_mouse
+4395,9690596,"test.ipynb",3850,0,"",python,selection_command
+4396,9691340,"test.ipynb",3848,3,"# )",python,selection_command
+4397,9692474,"test.ipynb",3850,0,"",python,selection_command
+4398,9693048,"test.ipynb",3852,0,"",python,selection_command
+4399,9693218,"test.ipynb",3853,0,"",python,selection_command
+4400,9693418,"test.ipynb",3856,0,"",python,selection_command
+4401,9693486,"test.ipynb",3895,0,"",python,selection_command
+4402,9696459,"test.ipynb",3897,0,"",python,selection_command
+4403,9697413,"test.ipynb",3858,0,"",python,selection_command
+4404,9697465,"test.ipynb",3863,0,"",python,selection_command
+4405,9699519,"test.ipynb",3865,1,"c",python,selection_command
+4406,9699595,"test.ipynb",3865,40,"checkpoint_manager.restore(\n checkpoi",python,selection_command
+4407,9699742,"test.ipynb",3865,67,"checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n)",python,selection_command
+4408,9700033,"test.ipynb",3865,67,"",python,content
+4409,9701416,"test.ipynb",3865,0,"c",python,content
+4410,9701416,"test.ipynb",3866,0,"",python,selection_keyboard
+4411,9701493,"test.ipynb",3866,0,"h",python,content
+4412,9701493,"test.ipynb",3867,0,"",python,selection_keyboard
+4413,9701661,"test.ipynb",3867,0,"e",python,content
+4414,9701661,"test.ipynb",3868,0,"",python,selection_keyboard
+4415,9701662,"test.ipynb",3868,0,"c",python,content
+4416,9701663,"test.ipynb",3869,0,"",python,selection_keyboard
+4417,9701710,"test.ipynb",3869,0,"k",python,content
+4418,9701710,"test.ipynb",3870,0,"",python,selection_keyboard
+4419,9701881,"test.ipynb",3870,0,"p",python,content
+4420,9701882,"test.ipynb",3871,0,"",python,selection_keyboard
+4421,9701957,"test.ipynb",3871,0,"o",python,content
+4422,9701957,"test.ipynb",3872,0,"",python,selection_keyboard
+4423,9702042,"test.ipynb",3872,0,"i",python,content
+4424,9702042,"test.ipynb",3873,0,"",python,selection_keyboard
+4425,9702131,"test.ipynb",3873,0,"t",python,content
+4426,9702132,"test.ipynb",3874,0,"",python,selection_keyboard
+4427,9702212,"test.ipynb",3874,0,"e",python,content
+4428,9702213,"test.ipynb",3875,0,"",python,selection_keyboard
+4429,9702997,"test.ipynb",3874,0,"",python,selection_command
+4430,9703370,"test.ipynb",3853,0,"\n",python,content
+4431,9703453,"test.ipynb",3854,0,"c",python,content
+4432,9703454,"test.ipynb",3855,0,"",python,selection_keyboard
+4433,9703603,"test.ipynb",3855,0,"h",python,content
+4434,9703604,"test.ipynb",3856,0,"",python,selection_keyboard
+4435,9703704,"test.ipynb",3856,0,"e",python,content
+4436,9703704,"test.ipynb",3857,0,"",python,selection_keyboard
+4437,9703705,"test.ipynb",3857,0,"c",python,content
+4438,9703705,"test.ipynb",3858,0,"",python,selection_keyboard
+4439,9703762,"test.ipynb",3858,0,"k",python,content
+4440,9703763,"test.ipynb",3859,0,"",python,selection_keyboard
+4441,9703894,"test.ipynb",3859,0,"p",python,content
+4442,9703895,"test.ipynb",3860,0,"",python,selection_keyboard
+4443,9703946,"test.ipynb",3860,0,"o",python,content
+4444,9703947,"test.ipynb",3861,0,"",python,selection_keyboard
+4445,9704014,"test.ipynb",3861,0,"i",python,content
+4446,9704014,"test.ipynb",3862,0,"",python,selection_keyboard
+4447,9704046,"test.ipynb",3862,0,"n",python,content
+4448,9704046,"test.ipynb",3863,0,"",python,selection_keyboard
+4449,9704114,"test.ipynb",3863,0,"e",python,content
+4450,9704114,"test.ipynb",3864,0,"",python,selection_keyboard
+4451,9704229,"test.ipynb",3864,0,"t",python,content
+4452,9704229,"test.ipynb",3865,0,"",python,selection_keyboard
+4453,9704420,"test.ipynb",3865,0,"r",python,content
+4454,9704420,"test.ipynb",3866,0,"",python,selection_keyboard
+4455,9704753,"test.ipynb",3865,1,"",python,content
+4456,9704839,"test.ipynb",3864,1,"",python,content
+4457,9704983,"test.ipynb",3863,1,"",python,content
+4458,9705027,"test.ipynb",3863,0,"t",python,content
+4459,9705027,"test.ipynb",3864,0,"",python,selection_keyboard
+4460,9705135,"test.ipynb",3864,0,"e",python,content
+4461,9705136,"test.ipynb",3865,0,"",python,selection_keyboard
+4462,9705166,"test.ipynb",3865,0,"r",python,content
+4463,9705167,"test.ipynb",3866,0,"",python,selection_keyboard
+4464,9705277,"test.ipynb",3866,0," ",python,content
+4465,9705278,"test.ipynb",3867,0,"",python,selection_keyboard
+4466,9705324,"test.ipynb",3867,0,"=",python,content
+4467,9705324,"test.ipynb",3868,0,"",python,selection_keyboard
+4468,9705468,"test.ipynb",3868,0," ",python,content
+4469,9705468,"test.ipynb",3869,0,"",python,selection_keyboard
+4470,9706335,"test.ipynb",3869,0,"ocp.PyTreeCheckpointer()",python,content
+4471,9706588,"test.ipynb",3892,0,"",python,selection_command
+4472,9707040,"test.ipynb",3914,0,"",python,selection_command
+4473,9707374,"test.ipynb",3905,0,"",python,selection_command
+4474,9707564,"test.ipynb",3905,10,"",python,content
+4475,9708214,"test.ipynb",3905,0,"c",python,content
+4476,9708249,"test.ipynb",3906,0,"h",python,content
+4477,9709672,"test.ipynb",3907,0,"eckpointer.restore(ckpt_dir, jax.tree_util.tree_map(lambda x: x.copy(), abstract_optimizer_state))\n\n\n\n\n\n\n\n\n",python,content
+4478,9711613,"test.ipynb",4013,1,"\n",python,selection_command
+4479,9711858,"test.ipynb",4012,2,"\n\n",python,selection_command
+4480,9711889,"test.ipynb",4011,3,"\n\n\n",python,selection_command
+4481,9711923,"test.ipynb",4010,4,"\n\n\n\n",python,selection_command
+4482,9711955,"test.ipynb",4009,5,"\n\n\n\n\n",python,selection_command
+4483,9712282,"test.ipynb",4008,6,"\n\n\n\n\n\n",python,selection_command
+4484,9712411,"test.ipynb",4007,7,"\n\n\n\n\n\n\n",python,selection_command
+4485,9712616,"test.ipynb",4006,8,"\n\n\n\n\n\n\n\n",python,selection_command
+4486,9712662,"test.ipynb",4005,9,"",python,content
+4487,9712680,"test.ipynb",3894,0,"",python,selection_command
+4488,9713331,"test.ipynb",3854,0,"",python,selection_command
+4489,9713443,"test.ipynb",3853,0,"",python,selection_command
+4490,9713701,"test.ipynb",3852,0,"",python,selection_command
+4491,9713723,"test.ipynb",3848,0,"",python,selection_command
+4492,9713756,"test.ipynb",3839,0,"",python,selection_command
+4493,9714059,"test.ipynb",3767,0,"",python,selection_command
+4494,9714379,"test.ipynb",3736,0,"",python,selection_command
+4495,9714380,"test.ipynb",3696,0,"",python,selection_command
+4496,9714380,"test.ipynb",3655,0,"",python,selection_command
+4497,9714396,"test.ipynb",3598,0,"",python,selection_command
+4498,9714429,"test.ipynb",3543,0,"",python,selection_command
+4499,9714561,"test.ipynb",3497,0,"",python,selection_command
+4500,9714904,"test.ipynb",3496,0,"",python,selection_command
+4501,9714904,"test.ipynb",3495,0,"",python,selection_command
+4502,9714904,"test.ipynb",3493,0,"",python,selection_command
+4503,9714911,"test.ipynb",3461,0,"",python,selection_command
+4504,9714945,"test.ipynb",3447,0,"",python,selection_command
+4505,9714980,"test.ipynb",3403,0,"",python,selection_command
+4506,9715014,"test.ipynb",3402,0,"",python,selection_command
+4507,9715428,"test.ipynb",3403,0,"",python,selection_command
+4508,9715565,"test.ipynb",3447,0,"",python,selection_command
+4509,9715761,"test.ipynb",3461,0,"",python,selection_command
+4510,9715850,"test.ipynb",3493,0,"",python,selection_command
+4511,9716111,"test.ipynb",3493,1,")",python,selection_command
+4512,9716286,"test.ipynb",3461,33," options=checkpoint_options,\n)",python,selection_command
+4513,9716547,"test.ipynb",3447,47," ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4514,9716559,"test.ipynb",3403,91,"checkpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4515,9716590,"test.ipynb",3402,92,"\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4516,9716623,"test.ipynb",3401,93,"\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4517,9716658,"test.ipynb",3399,95,")\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4518,9716692,"test.ipynb",3365,129," cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4519,9716810,"test.ipynb",3333,161," step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4520,9716811,"test.ipynb",3289,205," keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4521,9716811,"test.ipynb",3270,224," max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4522,9717083,"test.ipynb",3289,205," keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4523,9717226,"test.ipynb",3270,224," max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4524,9717525,"test.ipynb",3221,273," save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4525,9717525,"test.ipynb",3170,324,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4526,9717534,"test.ipynb",3169,325,"\ncheckpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4527,9717573,"test.ipynb",3132,362,"optimizer = nnx.Optimizer(genie, tx)\n\ncheckpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4528,9717599,"test.ipynb",3130,364,")\noptimizer = nnx.Optimizer(genie, tx)\n\ncheckpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4529,9717919,"test.ipynb",3132,362,"optimizer = nnx.Optimizer(genie, tx)\n\ncheckpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4530,9718095,"test.ipynb",3169,325,"\ncheckpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4531,9718267,"test.ipynb",3170,324,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4532,9718578,"test.ipynb",3169,325,"\ncheckpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4533,9718765,"test.ipynb",3170,324,"checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4534,9719099,"test.ipynb",3169,325,"\ncheckpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=log_checkpoint_interval,\n max_to_keep=3,\n keep_period=log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n)\n\n\ncheckpoint_manager = ocp.CheckpointManager(\n ckpt_dir,\n options=checkpoint_options,\n)",python,selection_command
+4535,9719114,"test.ipynb",3169,326,"",python,content
+4536,9719630,"test.ipynb",3170,0,"",python,selection_command
+4537,9720049,"test.ipynb",3170,1,"",python,content
+4538,9720158,"test.ipynb",3216,0,"",python,selection_command
+4539,9720481,"test.ipynb",3271,0,"",python,selection_command
+4540,9720481,"test.ipynb",3328,0,"",python,selection_command
+4541,9720481,"test.ipynb",3369,0,"",python,selection_command
+4542,9720510,"test.ipynb",3409,0,"",python,selection_command
+4543,9720541,"test.ipynb",3440,0,"",python,selection_command
+4544,9720575,"test.ipynb",3512,0,"",python,selection_command
+4545,9720610,"test.ipynb",3521,0,"",python,selection_command
+4546,9720643,"test.ipynb",3525,0,"",python,selection_command
+4547,9720805,"test.ipynb",3526,0,"",python,selection_command
+4548,9721007,"test.ipynb",3527,0,"",python,selection_command
+4549,9721072,"test.ipynb",3567,0,"",python,selection_command
+4550,9721322,"test.ipynb",3576,0,"",python,selection_command
+4551,9721569,"test.ipynb",3578,0,"",python,selection_command
+4552,9721594,"test.ipynb",3590,0,"",python,selection_command
+4553,9721626,"test.ipynb",3591,0,"",python,selection_command
+4554,9721654,"test.ipynb",3598,0,"",python,selection_command
+4555,9721687,"test.ipynb",3599,0,"",python,selection_command
+4556,9721841,"test.ipynb",3607,0,"",python,selection_command
+4557,9722133,"test.ipynb",3609,0,"",python,selection_command
+4558,9722160,"test.ipynb",3612,0,"",python,selection_command
+4559,9722667,"test.ipynb",3609,0,"",python,selection_command
+4560,9722830,"test.ipynb",3607,0,"",python,selection_command
+4561,9722979,"test.ipynb",3599,0,"",python,selection_command
+4562,9723108,"test.ipynb",3598,0,"",python,selection_command
+4563,9723248,"test.ipynb",3591,0,"",python,selection_command
+4564,9725795,"test.ipynb",3598,0,"",python,selection_command
+4565,9725941,"test.ipynb",3599,0,"",python,selection_command
+4566,9726163,"test.ipynb",3607,0,"",python,selection_command
+4567,9726331,"test.ipynb",3609,0,"",python,selection_command
+4568,9726604,"test.ipynb",3609,1,"j",python,selection_command
+4569,9726677,"test.ipynb",3609,3,"jax",python,selection_command
+4570,9726951,"test.ipynb",3609,4,"jax.",python,selection_command
+4571,9726970,"test.ipynb",3609,13,"jax.tree_util",python,selection_command
+4572,9727002,"test.ipynb",3609,14,"jax.tree_util.",python,selection_command
+4573,9727028,"test.ipynb",3609,22,"jax.tree_util.tree_map",python,selection_command
+4574,9727061,"test.ipynb",3609,23,"jax.tree_util.tree_map(",python,selection_command
+4575,9727095,"test.ipynb",3609,29,"jax.tree_util.tree_map(lambda",python,selection_command
+4576,9727291,"test.ipynb",3609,31,"jax.tree_util.tree_map(lambda x",python,selection_command
+4577,9727464,"test.ipynb",3609,32,"jax.tree_util.tree_map(lambda x:",python,selection_command
+4578,9727620,"test.ipynb",3609,34,"jax.tree_util.tree_map(lambda x: x",python,selection_command
+4579,9727784,"test.ipynb",3609,35,"jax.tree_util.tree_map(lambda x: x.",python,selection_command
+4580,9727999,"test.ipynb",3609,39,"jax.tree_util.tree_map(lambda x: x.copy",python,selection_command
+4581,9728499,"test.ipynb",3647,0,"",python,selection_command
+4582,9729300,"test.ipynb",3644,0,"",python,selection_command
+4583,9729567,"test.ipynb",3643,0,"",python,selection_command
+4584,9729590,"test.ipynb",3642,0,"",python,selection_command
+4585,9729623,"test.ipynb",3640,0,"",python,selection_command
+4586,9729647,"test.ipynb",3639,0,"",python,selection_command
+4587,9729679,"test.ipynb",3632,0,"",python,selection_command
+4588,9729715,"test.ipynb",3631,0,"",python,selection_command
+4589,9729747,"test.ipynb",3623,0,"",python,selection_command
+4590,9729780,"test.ipynb",3622,0,"",python,selection_command
+4591,9729815,"test.ipynb",3613,0,"",python,selection_command
+4592,9729849,"test.ipynb",3612,0,"",python,selection_command
+4593,9729897,"test.ipynb",3609,0,"",python,selection_command
+4594,9729928,"test.ipynb",3607,0,"",python,selection_command
+4595,9730151,"test.ipynb",3599,0,"",python,selection_command
+4596,9730329,"test.ipynb",3598,0,"",python,selection_command
+4597,9730483,"test.ipynb",3591,0,"",python,selection_command
+4598,9730919,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",0,0,"# Copyright 2025 The Orbax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n""""""Synchronous Checkpointer implementation.""""""\n\nimport time\nfrom typing import Any, Iterable, Optional, Type\n\nfrom absl import logging\nfrom etils import epath\nfrom etils import epy\nimport jax\nfrom orbax.checkpoint import checkpoint_args\nfrom orbax.checkpoint import options as options_lib\nfrom orbax.checkpoint import utils\nfrom orbax.checkpoint._src import asyncio_utils\nfrom orbax.checkpoint._src.checkpointers import abstract_checkpointer\nfrom orbax.checkpoint._src.futures import synchronization\nfrom orbax.checkpoint._src.handlers import checkpoint_handler\nfrom orbax.checkpoint._src.handlers import composite_checkpoint_handler\nfrom orbax.checkpoint._src.metadata import checkpoint\nfrom orbax.checkpoint._src.metadata import step_metadata_serialization\nfrom orbax.checkpoint._src.multihost import multihost\nfrom orbax.checkpoint._src.path import atomicity\nfrom orbax.checkpoint._src.path import atomicity_defaults\nfrom orbax.checkpoint._src.path import atomicity_types\nfrom orbax.checkpoint._src.path import utils as path_utils\nfrom typing_extensions import Self # for Python version < 3.11\n\n\n\nCheckpointArgs = checkpoint_args.CheckpointArgs\nregister_with_handler = checkpoint_args.register_with_handler\nget_legacy_handler_wrapper = (\n composite_checkpoint_handler.get_legacy_handler_wrapper\n)\nStepMetadata = checkpoint.StepMetadata\n\n\ndef construct_checkpoint_args(\n handler: checkpoint_handler.CheckpointHandler,\n for_save: bool,\n *args,\n **kwargs,\n) -> checkpoint_args.CheckpointArgs:\n """"""Constructs `CheckpointArgs` for save or restore for the handler.""""""\n for arg in args:\n if isinstance(arg, checkpoint_args.CheckpointArgs):\n return arg\n for arg in kwargs.values():\n if isinstance(arg, checkpoint_args.CheckpointArgs):\n return arg\n jax.monitoring.record_event('/jax/orbax/deprecation/checkpointer_legacy_args')\n save_arg_cls, restore_arg_cls = checkpoint_args.get_registered_args_cls(\n handler\n )\n if for_save:\n return save_arg_cls(*args, **kwargs)\n else:\n return restore_arg_cls(*args, **kwargs)\n\n\nclass Checkpointer(\n abstract_checkpointer.AbstractCheckpointer, epy.ContextManager\n):\n """"""A synchronous implementation of AbstractCheckpointer.\n\n This class saves synchronously to a given directory using an underlying\n :py:class:`.CheckpointHandler`. Atomicity of the operation is guaranteed.\n\n IMPORTANT: Async checkpointing can often be faster for saving. Strongly\n consider using :py:class:`.AsyncCheckpointer` instead.\n\n IMPORTANT: Remember that to save and restore a checkpoint, one should always\n use an :py:class:`.AbstractCheckpointer` coupled with a `CheckpointHandler`.\n The specific `CheckpointHandler` to use depends on the object being saved or\n restored.\n\n Basic example::\n\n ckptr = Checkpointer(StandardCheckpointHandler())\n args = ocp.args.StandardSave(item=pytree_of_arrays)\n ckptr.save(path, args=args)\n args = ocp.args.StandardRestore(item=abstract_pytree_target)\n ckptr.restore(path, args=args)\n\n Each handler includes `...SaveArgs` and `...RestoreArgs` classes that document\n what arguments are expected. When using `Checkpointer`, you can either use\n this dataclass directly, or you can provide the arguments in keyword form.\n\n For example::\n\n ckptr = Checkpointer(StandardCheckpointHandler())\n ckptr.save(path, state=pytree_of_arays)\n ckptr.restore(path, state=abstract_pytree_target)\n """"""\n\n def __init__(\n self,\n handler: checkpoint_handler.CheckpointHandler,\n *,\n multiprocessing_options: options_lib.MultiprocessingOptions = options_lib.MultiprocessingOptions(),\n file_options: options_lib.FileOptions = options_lib.FileOptions(),\n checkpoint_metadata_store: Optional[checkpoint.MetadataStore] = None,\n temporary_path_class: Optional[\n Type[atomicity_types.TemporaryPath]\n ] = None,\n ):\n if not checkpoint_args.has_registered_args(handler):\n logging.warning(\n 'No registered CheckpointArgs found for handler type: %s',\n type(handler),\n )\n handler = get_legacy_handler_wrapper(handler)\n self._handler = handler\n self._primary_host = multiprocessing_options.primary_host\n self._active_processes = multiprocessing_options.active_processes\n self._barrier_sync_key_prefix = (\n multiprocessing_options.barrier_sync_key_prefix\n )\n self._multiprocessing_options = options_lib.MultiprocessingOptions(\n primary_host=self._primary_host,\n active_processes=self._active_processes,\n barrier_sync_key_prefix=self._barrier_sync_key_prefix,\n )\n self._file_options = file_options\n self._temporary_path_class = temporary_path_class\n\n # If not provided then use checkpoint_metadata_store with blocking writes.\n self._metadata_store = (\n checkpoint_metadata_store\n or checkpoint.metadata_store(enable_write=True, blocking_write=True)\n )\n if not self._metadata_store.is_blocking_writer():\n raise ValueError('Checkpoint metadata store must be blocking writer.')\n\n jax.monitoring.record_event('/jax/orbax/checkpointer/init')\n\n def get_temporary_path(\n self, directory: epath.Path\n ) -> atomicity_types.TemporaryPath:\n temporary_path_class = (\n self._temporary_path_class\n or atomicity_defaults.get_default_temporary_path_class(directory)\n )\n tmpdir = temporary_path_class.from_final(\n directory,\n checkpoint_metadata_store=self._metadata_store,\n multiprocessing_options=self._multiprocessing_options,\n file_options=self._file_options,\n )\n return tmpdir\n\n async def create_temporary_path(\n self, temporary_path: atomicity_types.TemporaryPath\n ):\n await atomicity.create_all(\n [temporary_path],\n multiprocessing_options=self._multiprocessing_options,\n )\n\n def synchronize_next_awaitable_signal_operation_id(self):\n synchronization.OperationIdGenerator.next_operation_id()\n\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'next_awaitable_signal_operation_id:sync',\n prefix=self._barrier_sync_key_prefix,\n ),\n timeout=multihost.DIRECTORY_CREATION_TIMEOUT,\n processes=self._active_processes,\n )\n logging.vlog(\n 1,\n '[process=%s] Synchronized next awaitable signal operation id to %s',\n multihost.process_index(),\n synchronization.OperationIdGenerator.get_current_operation_id(),\n )\n\n def save(\n self,\n directory: epath.PathLike,\n *args,\n force: bool = False,\n custom_metadata: dict[str, Any] | None = None,\n **kwargs,\n ):\n """"""Saves the given item to the provided directory.\n\n Delegates to the underlying CheckpointHandler. Ensures save operation\n atomicity.\n\n This method should be called by all hosts - process synchronization and\n actions that need to be performed on only one host are managed internally.\n\n Args:\n directory: a path to which to save.\n *args: additional args to provide to the CheckpointHandler's save method.\n force: if True, allows overwriting an existing directory. May add overhead\n due to the need to delete any existing files.\n custom_metadata: a dictionary of custom metadata to be written to the\n checkpoint directory via StepMetadata.\n **kwargs: additional keyword args to provide to the CheckpointHandler's\n save method.\n\n Raises:\n ValueError if the provided directory already exists.\n """"""\n checkpoint_start_time = time.time()\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'Checkpointer:save_start',\n prefix=self._barrier_sync_key_prefix,\n ),\n processes=self._active_processes,\n record_event_name=(\n '/jax/orbax/write/checkpoint_start_sync_duration_secs'\n ),\n )\n directory = epath.Path(directory)\n\n if utils.is_primary_host(self._primary_host):\n jax.monitoring.record_event(\n '/jax/orbax/write/storage_type',\n storage_type=path_utils.get_storage_type(directory),\n )\n # TODO(dicentra): Revise other metrics to also only report from the primary\n # host where appropriate.\n jax.monitoring.record_event('/jax/orbax/write/start')\n logging.info(\n '[process=%s] Started saving checkpoint to %s.',\n multihost.process_index(),\n directory,\n )\n self.synchronize_next_awaitable_signal_operation_id()\n\n if directory.exists():\n if force:\n if utils.is_primary_host(self._primary_host):\n logging.info('Specified `force`: removing existing directory.')\n directory.rmtree() # Post-sync handled by create_tmp_directory.\n else:\n raise ValueError(f'Destination {directory} already exists.')\n ckpt_args = construct_checkpoint_args(self._handler, True, *args, **kwargs)\n tmpdir = self.get_temporary_path(directory)\n # tmpdir creation also does an initial StepMetadata save.\n asyncio_utils.run_sync(self.create_temporary_path(tmpdir))\n self._handler.save(tmpdir.get(), args=ckpt_args)\n if utils.is_primary_host(self._primary_host):\n # Update StepMetadata after the handler save is complete. (blocking write)\n self._save_step_metadata(tmpdir.get(), custom_metadata=custom_metadata)\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'Checkpointer:save',\n prefix=self._barrier_sync_key_prefix,\n ),\n processes=self._active_processes,\n )\n\n # Ensure save operation atomicity and record time saved by checkpoint.\n if utils.is_primary_host(self._primary_host):\n # finalize does a final StepMetadata update.\n self._handler.finalize(tmpdir.get())\n atomicity.on_commit_callback(\n tmpdir,\n checkpoint_start_time=checkpoint_start_time,\n )\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'Checkpointer:finalize',\n prefix=self._barrier_sync_key_prefix,\n # suffix=directory.name,\n ),\n processes=self._active_processes,\n )\n save_duration_secs = time.time() - checkpoint_start_time\n logging.info(\n 'Finished synchronous save in %.2f seconds to %s',\n save_duration_secs,\n directory,\n )\n\n def restore(self, directory: epath.PathLike, *args, **kwargs) -> Any:\n """"""See superclass documentation.""""""\n restore_start_time = time.time()\n directory = epath.Path(directory)\n if not directory.exists():\n raise FileNotFoundError(f'Checkpoint at {directory} not found.')\n if not utils.is_checkpoint_finalized(directory):\n raise ValueError(f'Found incomplete checkpoint at {directory}.')\n logging.info('Restoring checkpoint from %s.', directory)\n ckpt_args = construct_checkpoint_args(self._handler, False, *args, **kwargs)\n restored = self._restore(directory, args=ckpt_args)\n multihost.sync_global_processes(\n multihost.unique_barrier_key(\n 'Checkpointer:restore',\n prefix=self._barrier_sync_key_prefix,\n ),\n processes=self._active_processes,\n )\n restore_duration_secs = time.time() - restore_start_time\n logging.info(\n 'Finished restoring checkpoint in %.2f seconds from %s.',\n restore_duration_secs,\n directory,\n )\n return restored\n\n def _restore(\n self, directory: epath.PathLike, args: checkpoint_args.CheckpointArgs\n ) -> Any:\n return self._handler.restore(directory, args=args)\n\n def metadata(self, directory: epath.PathLike) -> StepMetadata | Any | None:\n """"""See superclass documentation.""""""\n directory = epath.Path(directory)\n return self._handler.metadata(directory)\n\n def _save_step_metadata(\n self, directory: epath.Path, custom_metadata: dict[str, Any] | None\n ):\n """"""Saves StepMetadata to the checkpoint directory.""""""\n update_dict = {\n 'custom_metadata': custom_metadata,\n }\n if isinstance(\n self._handler, composite_checkpoint_handler.CompositeCheckpointHandler\n ):\n try:\n # get item_handlers from handler\n partial_metadata: StepMetadata = (\n self._handler.metadata_from_temporary_paths(directory)\n )\n except (FileNotFoundError, NotImplementedError, ValueError, TypeError):\n logging.warning(\n 'Failed to get per-item metadata from directory %s. Handler types '\n 'will not be saved.',\n directory,\n )\n else:\n update_dict['item_handlers'] = partial_metadata.item_handlers\n else:\n try:\n item_handler = self._handler.typestr()\n except (NotImplementedError, AttributeError):\n logging.warning(\n 'Failed to get item handler typestr from directory %s. Backup '\n 'handler type will be saved.',\n directory,\n )\n item_handler = (\n f'{self._handler.__module__}.{self._handler.__class__.__qualname__}'\n )\n update_dict['item_handlers'] = item_handler\n self._metadata_store.update(\n file_path=checkpoint.step_metadata_file_path(directory),\n **step_metadata_serialization.serialize_for_update(**update_dict),\n )\n\n def close(self):\n """"""Closes the underlying CheckpointHandler.""""""\n self._handler.close()\n self._metadata_store.close()\n\n @property\n def handler(self) -> checkpoint_handler.CheckpointHandler:\n return self._handler\n\n def __contextmanager__(\n self,\n ) -> Iterable[Self]:\n try:\n yield self\n finally:\n self.close()\n",python,tab
+4599,9730919,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10909,0,"",python,selection_command
+4600,9732213,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10916,0,"",python,selection_command
+4601,9732411,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10917,0,"",python,selection_command
+4602,9732618,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10921,0,"",python,selection_command
+4603,9732930,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10923,0,"",python,selection_command
+4604,9733181,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10932,0,"",python,selection_command
+4605,9733208,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10934,0,"",python,selection_command
+4606,9733239,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10939,0,"",python,selection_command
+4607,9733273,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10940,0,"",python,selection_command
+4608,9733890,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10948,0,"",python,selection_command
+4609,9734081,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10950,0,"",python,selection_command
+4610,9734468,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",10951,0,"",python,selection_command
+4611,9735235,"test.ipynb",0,0,"",python,tab
+4612,9735759,"test.ipynb",3598,0,"",python,selection_command
+4613,9736007,"test.ipynb",3599,0,"",python,selection_command
+4614,9736044,"test.ipynb",3607,0,"",python,selection_command
+4615,9736071,"test.ipynb",3609,0,"",python,selection_command
+4616,9736104,"test.ipynb",3612,0,"",python,selection_command
+4617,9736444,"test.ipynb",3613,0,"",python,selection_command
+4618,9736762,"test.ipynb",3612,0,"",python,selection_command
+4619,9736941,"test.ipynb",3609,0,"",python,selection_command
+4620,9737242,"test.ipynb",3607,0,"",python,selection_command
+4621,9737381,"test.ipynb",3607,1,",",python,selection_command
+4622,9737410,"test.ipynb",3607,5,", jax",python,selection_command
+4623,9737665,"test.ipynb",3607,6,", jax.",python,selection_command
+4624,9737693,"test.ipynb",3607,15,", jax.tree_util",python,selection_command
+4625,9737723,"test.ipynb",3607,16,", jax.tree_util.",python,selection_command
+4626,9737755,"test.ipynb",3607,24,", jax.tree_util.tree_map",python,selection_command
+4627,9737801,"test.ipynb",3607,25,", jax.tree_util.tree_map(",python,selection_command
+4628,9737835,"test.ipynb",3607,31,", jax.tree_util.tree_map(lambda",python,selection_command
+4629,9737982,"test.ipynb",3607,33,", jax.tree_util.tree_map(lambda x",python,selection_command
+4630,9738164,"test.ipynb",3607,34,", jax.tree_util.tree_map(lambda x:",python,selection_command
+4631,9738296,"test.ipynb",3607,36,", jax.tree_util.tree_map(lambda x: x",python,selection_command
+4632,9738449,"test.ipynb",3607,37,", jax.tree_util.tree_map(lambda x: x.",python,selection_command
+4633,9738578,"test.ipynb",3607,41,", jax.tree_util.tree_map(lambda x: x.copy",python,selection_command
+4634,9738761,"test.ipynb",3607,44,", jax.tree_util.tree_map(lambda x: x.copy(),",python,selection_command
+4635,9739493,"test.ipynb",3607,70,", jax.tree_util.tree_map(lambda x: x.copy(), abstract_optimizer_state)",python,selection_command
+4636,9739786,"test.ipynb",3607,69,", jax.tree_util.tree_map(lambda x: x.copy(), abstract_optimizer_state",python,selection_command
+4637,9739897,"test.ipynb",3607,69,"",python,content
+4638,9741322,"test.ipynb",3607,1,"",python,content
+4639,9741862,"test.ipynb",3567,0,"",python,selection_command
+4640,9742369,"test.ipynb",3576,0,"",python,selection_command
+4641,9742503,"test.ipynb",3578,0,"",python,selection_command
+4642,9742693,"test.ipynb",3590,0,"",python,selection_command
+4643,9742837,"test.ipynb",3591,0,"",python,selection_command
+4644,9743027,"test.ipynb",3598,0,"",python,selection_command
+4645,9743217,"test.ipynb",3599,0,"",python,selection_command
+4646,9743551,"test.ipynb",1467,0,"",python,selection_command
+4647,9745126,"test.ipynb",1475,0,"",python,selection_command
+4648,9745315,"test.ipynb",1477,0,"",python,selection_command
+4649,9745549,"test.ipynb",1481,0,"",python,selection_command
+4650,9745840,"test.ipynb",1573,0,"",python,selection_command
+4651,9746172,"test.ipynb",1562,0,"",python,selection_command
+4652,9748063,"test.ipynb",1562,0,"/",python,content
+4653,9748063,"test.ipynb",1563,0,"",python,selection_keyboard
+4654,9748280,"test.ipynb",1562,0,"",python,selection_command
+4655,9749409,"test.ipynb",1562,0,"0",python,content
+4656,9749410,"test.ipynb",1563,0,"",python,selection_keyboard
+4657,9749719,"test.ipynb",1563,0,"0",python,content
+4658,9749719,"test.ipynb",1564,0,"",python,selection_keyboard
+4659,9750049,"test.ipynb",1564,0,"0",python,content
+4660,9750050,"test.ipynb",1565,0,"",python,selection_keyboard
+4661,9750367,"test.ipynb",1565,0,"0",python,content
+4662,9750367,"test.ipynb",1566,0,"",python,selection_keyboard
+4663,9750559,"test.ipynb",1566,0,"3",python,content
+4664,9750560,"test.ipynb",1567,0,"",python,selection_keyboard
+4665,9750655,"test.ipynb",1567,0,"0",python,content
+4666,9750656,"test.ipynb",1568,0,"",python,selection_keyboard
+4667,9750798,"test.ipynb",1567,0,"",python,selection_command
+4668,9766538,"test.ipynb",3531,0,"",python,selection_mouse
+4669,9766620,"test.ipynb",3530,0,"",python,selection_command
+4670,9767522,"test.ipynb",3528,3,"# )",python,selection_command
+4671,9767711,"test.ipynb",3519,12,"# ),\n# )",python,selection_command
+4672,9767880,"test.ipynb",3447,84,"# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n# ),\n# )",python,selection_command
+4673,9768027,"test.ipynb",3416,115,"# args=ocp.args.Composite(\n# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n# ),\n# )",python,selection_command
+4674,9768193,"test.ipynb",3376,155,"# checkpoint_manager.latest_step(),\n# args=ocp.args.Composite(\n# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n# ),\n# )",python,selection_command
+4675,9768328,"test.ipynb",3335,196,"# restored = checkpoint_manager.restore(\n# checkpoint_manager.latest_step(),\n# args=ocp.args.Composite(\n# model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n# ),\n# )",python,selection_command
+4676,9768416,"test.ipynb",3335,197,"",python,content
+4677,9771575,"test.ipynb",3335,1,"",python,content
+4678,9797111,"test.ipynb",3417,0,"",python,selection_mouse
+4679,9797135,"test.ipynb",3416,0,"",python,selection_command
+4680,9800195,"test.ipynb",0,0,"",python,tab
+4681,9800196,"test.ipynb",0,0,"",python,tab
+4682,9801762,"test.ipynb",0,0,"r",python,content
+4683,9801763,"test.ipynb",1,0,"",python,selection_keyboard
+4684,9801829,"test.ipynb",1,0,"e",python,content
+4685,9801829,"test.ipynb",2,0,"",python,selection_keyboard
+4686,9802719,"test.ipynb",2,0,"s",python,content
+4687,9802720,"test.ipynb",3,0,"",python,selection_keyboard
+4688,9802828,"test.ipynb",3,0,"t",python,content
+4689,9802829,"test.ipynb",4,0,"",python,selection_keyboard
+4690,9802856,"test.ipynb",4,0,"e",python,content
+4691,9802857,"test.ipynb",5,0,"",python,selection_keyboard
+4692,9803305,"test.ipynb",4,1,"",python,content
+4693,9803460,"test.ipynb",4,0,"o",python,content
+4694,9803461,"test.ipynb",5,0,"",python,selection_keyboard
+4695,9803512,"test.ipynb",5,0,"r",python,content
+4696,9803512,"test.ipynb",6,0,"",python,selection_keyboard
+4697,9803543,"test.ipynb",6,0,"e",python,content
+4698,9803543,"test.ipynb",7,0,"",python,selection_keyboard
+4699,9803714,"test.ipynb",7,0,"d",python,content
+4700,9803715,"test.ipynb",8,0,"",python,selection_keyboard
+4701,9804083,"test.ipynb",0,8,"",python,content
+4702,9804323,"test.ipynb",0,0,"n",python,content
+4703,9804323,"test.ipynb",1,0,"",python,selection_keyboard
+4704,9804423,"test.ipynb",1,0,"n",python,content
+4705,9804423,"test.ipynb",2,0,"",python,selection_keyboard
+4706,9804493,"test.ipynb",2,0,"x",python,content
+4707,9804493,"test.ipynb",3,0,"",python,selection_keyboard
+4708,9804615,"test.ipynb",3,0,".",python,content
+4709,9804616,"test.ipynb",4,0,"",python,selection_keyboard
+4710,9804688,"test.ipynb",4,0,"d",python,content
+4711,9804689,"test.ipynb",5,0,"",python,selection_keyboard
+4712,9804812,"test.ipynb",5,0,"i",python,content
+4713,9804812,"test.ipynb",6,0,"",python,selection_keyboard
+4714,9804907,"test.ipynb",6,0,"s",python,content
+4715,9804908,"test.ipynb",7,0,"",python,selection_keyboard
+4716,9804992,"test.ipynb",7,0,"p",python,content
+4717,9804992,"test.ipynb",8,0,"",python,selection_keyboard
+4718,9805124,"test.ipynb",8,0,"l",python,content
+4719,9805124,"test.ipynb",9,0,"",python,selection_keyboard
+4720,9805191,"test.ipynb",9,0,"a",python,content
+4721,9805192,"test.ipynb",10,0,"",python,selection_keyboard
+4722,9805330,"test.ipynb",10,0,"y",python,content
+4723,9805331,"test.ipynb",11,0,"",python,selection_keyboard
+4724,9805515,"test.ipynb",11,0,"()",python,content
+4725,9805515,"test.ipynb",12,0,"",python,selection_keyboard
+4726,9805731,"test.ipynb",12,0,"r",python,content
+4727,9805732,"test.ipynb",13,0,"",python,selection_keyboard
+4728,9805818,"test.ipynb",13,0,"e",python,content
+4729,9805818,"test.ipynb",14,0,"",python,selection_keyboard
+4730,9805887,"test.ipynb",14,0,"s",python,content
+4731,9805887,"test.ipynb",15,0,"",python,selection_keyboard
+4732,9805993,"test.ipynb",15,0,"t",python,content
+4733,9805993,"test.ipynb",16,0,"",python,selection_keyboard
+4734,9806127,"test.ipynb",16,0,"o",python,content
+4735,9806127,"test.ipynb",17,0,"",python,selection_keyboard
+4736,9806212,"test.ipynb",17,0,"r",python,content
+4737,9806213,"test.ipynb",18,0,"",python,selection_keyboard
+4738,9806292,"test.ipynb",18,0,"e",python,content
+4739,9806293,"test.ipynb",19,0,"",python,selection_keyboard
+4740,9806449,"test.ipynb",19,0,"d",python,content
+4741,9806449,"test.ipynb",20,0,"",python,selection_keyboard
+4742,9806549,"test.ipynb",20,0,"\n",python,content
+4743,9806970,"test.ipynb",20,1,"",python,content
+4744,9890670,"train_tokenizer.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom models.tokenizer import TokenizerVQVAE\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 300_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n vq_beta: float = 0.25\n batch_size: int = 48\n init_lr: float = 0.0\n max_lr: float = 3e-4\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 20000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n warmup_steps: int = 10000\n # Tokenizer\n model_dim: int = 512\n ffn_dim: int = 2048\n latent_dim: int = 32\n num_latents: int = 1024\n patch_size: int = 4\n num_blocks: int = 4\n num_heads: int = 8\n dropout: float = 0.0\n codebook_dropout: float = 0.01\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_tokenizer""\n tags: list[str] = field(default_factory=lambda: [""tokenizer""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 10000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\n\n\ndef tokenizer_loss_fn(model, inputs):\n # --- Compute loss ---\n # FIXME (f.srambical): Can we even do native int8 training without casting the video at all?\n # FIXME (f.srambical): If the tokenizer is the reason for the dynamics model being memory-bound,\n # should we at least train the tokenizer natively in int8?\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n mse = jnp.square(inputs[""videos""] - outputs[""recon""]).mean()\n q_loss = jnp.square(jax.lax.stop_gradient(outputs[""emb""]) - outputs[""z""]).mean()\n commitment_loss = jnp.square(\n outputs[""emb""] - jax.lax.stop_gradient(outputs[""z""])\n ).mean()\n loss = mse + q_loss + args.vq_beta * commitment_loss\n\n # --- Compute validation metrics ---\n gt = inputs[""videos""].clip(0, 1).reshape(-1, *inputs[""videos""].shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n _, index_counts = jnp.unique_counts(\n jnp.ravel(outputs[""indices""]), size=args.num_latents, fill_value=0\n )\n codebook_usage = (index_counts != 0).mean()\n metrics = dict(\n loss=loss,\n mse=mse,\n q_loss=q_loss,\n commitment_loss=commitment_loss,\n psnr=psnr,\n ssim=ssim,\n codebook_usage=codebook_usage,\n )\n return loss, (outputs[""recon""], metrics)\n\n\n@nnx.jit\ndef train_step(tokenizer, optimizer, inputs):\n def loss_fn(model):\n return tokenizer_loss_fn(model, inputs)\n\n (loss, (recon, metrics)), grads = nnx.value_and_grad(loss_fn, has_aux=True)(\n tokenizer\n )\n optimizer.update(grads)\n if args.log_gradients:\n metrics[""encoder_gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""encoder""]\n )\n metrics[""vq_gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""vq""]\n )\n metrics[""decoder_gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""decoder""]\n )\n return loss, recon, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.model_dim,\n ffn_dim=args.ffn_dim,\n latent_dim=args.latent_dim,\n num_latents=args.num_latents,\n patch_size=args.patch_size,\n num_blocks=args.num_blocks,\n num_heads=args.num_heads,\n dropout=args.dropout,\n codebook_dropout=args.codebook_dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(tokenizer, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(tokenizer, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n # FIXME (f.srambical): change all checkpointing/ restore logic to separately checkpoint model and optimizer\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n # FIXME (f.srambical): also checkpoint optimizer state\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n inputs = dict(videos=videos)\n loss, recon, metrics = train_step(tokenizer, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n # NOTE: Process-dependent control flow deliberately happens\n # after indexing operation since it must not contain code\n # sections that lead to cross-accelerator communication.\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[0])),\n recon=wandb.Image(np.asarray(recon_seq[0])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+4745,9891516,"test.ipynb",0,0,"",python,tab
+4746,9897920,"test.ipynb",0,0,"",python,tab
+4747,9901725,"test.ipynb",0,0,"",python,tab
+4748,9903725,"train_tokenizer.py",0,0,"",python,tab
+4749,9903726,"train_tokenizer.py",1960,0,"",python,selection_mouse
+4750,9905311,"train_tokenizer.py",0,0,"",python,selection_command
+4751,9909056,".venv/lib/python3.10/site-packages/orbax/checkpoint/_src/checkpointers/checkpointer.py",0,0,"",python,tab
+4752,9911079,"train_dynamics.py",0,0,"",python,tab
+4753,9911409,"train_dynamics.py",0,0,"",python,selection_command
+4754,9912276,"train_dynamics.py",371,0,"",python,selection_command
+4755,9912515,"train_dynamics.py",384,0,"",python,selection_command
+4756,9912667,"train_dynamics.py",399,0,"",python,selection_command
+4757,9912830,"train_dynamics.py",5260,0,"",python,selection_command
+4758,9912966,"train_dynamics.py",5268,0,"",python,selection_command
+4759,9913337,"train_dynamics.py",6447,0,"",python,selection_command
+4760,9913891,"train_dynamics.py",5268,0,"",python,selection_command
+4761,9915914,"genie.py",0,0,"",python,tab
+4762,9915915,"genie.py",333,0,"",python,selection_command
+4763,9919749,"genie.py",1021,0,"",python,selection_command
+4764,9919905,"genie.py",2006,0,"",python,selection_command
+4765,9920286,"genie.py",2984,0,"",python,selection_command
+4766,9921347,"genie.py",2006,0,"",python,selection_command
+4767,9921641,"genie.py",2984,0,"",python,selection_command
+4768,9922093,"genie.py",3016,0,"",python,selection_command
+4769,9922330,"genie.py",3052,0,"",python,selection_command
+4770,9922359,"genie.py",3090,0,"",python,selection_command
+4771,9922389,"genie.py",3136,0,"",python,selection_command
+4772,9922423,"genie.py",3185,0,"",python,selection_command
+4773,9922457,"genie.py",3229,0,"",python,selection_command
+4774,9922491,"genie.py",3273,0,"",python,selection_command
+4775,9922525,"genie.py",3315,0,"",python,selection_command
+4776,9922559,"genie.py",3340,0,"",python,selection_command
+4777,9922593,"genie.py",3374,0,"",python,selection_command
+4778,9922627,"genie.py",3416,0,"",python,selection_command
+4779,9922661,"genie.py",3446,0,"",python,selection_command
+4780,9922695,"genie.py",3504,0,"",python,selection_command
+4781,9922730,"genie.py",3523,0,"",python,selection_command
+4782,9922762,"genie.py",3537,0,"",python,selection_command
+4783,9923044,"genie.py",3538,0,"",python,selection_command
+4784,9923183,"genie.py",3547,0,"",python,selection_command
+4785,9923397,"genie.py",3549,0,"",python,selection_command
+4786,9927350,"models/dynamics.py",0,0,"",python,tab
+4787,9927350,"models/dynamics.py",132,0,"",python,selection_command
+4788,9930536,"models/dynamics.py",859,0,"",python,selection_command
+4789,9932251,"models/dynamics.py",898,0,"",python,selection_command
+4790,9932500,"models/dynamics.py",925,0,"",python,selection_command
+4791,9932520,"models/dynamics.py",972,0,"",python,selection_command
+4792,9932727,"models/dynamics.py",981,0,"",python,selection_command
+4793,9936362,"test.ipynb",0,0,"",python,tab
+4794,9939310,"models/dynamics.py",0,0,"",python,tab
+4795,9941268,"models/dynamics.py",1020,0,"",python,selection_command
+4796,9941517,"models/dynamics.py",1048,0,"",python,selection_command
+4797,9941538,"models/dynamics.py",1076,0,"",python,selection_command
+4798,9941573,"models/dynamics.py",1102,0,"",python,selection_command
+4799,9941604,"models/dynamics.py",1132,0,"",python,selection_command
+4800,9941636,"models/dynamics.py",1161,0,"",python,selection_command
+4801,9941739,"models/dynamics.py",1132,0,"",python,selection_command
+4802,9941978,"models/dynamics.py",1161,0,"",python,selection_command
+4803,9942263,"models/dynamics.py",1189,0,"",python,selection_command
+4804,9942263,"models/dynamics.py",1215,0,"",python,selection_command
+4805,9942276,"models/dynamics.py",1245,0,"",python,selection_command
+4806,9942309,"models/dynamics.py",1269,0,"",python,selection_command
+4807,9942343,"models/dynamics.py",1327,0,"",python,selection_command
+4808,9942455,"models/dynamics.py",1350,0,"",python,selection_command
+4809,9942540,"models/dynamics.py",1360,0,"",python,selection_command
+4810,9942788,"models/dynamics.py",1442,0,"",python,selection_command
+4811,9942978,"models/dynamics.py",1479,0,"",python,selection_command
+4812,9943043,"models/dynamics.py",1566,0,"",python,selection_command
+4813,9943179,"models/dynamics.py",1576,0,"",python,selection_command
+4814,9943313,"models/dynamics.py",1580,0,"",python,selection_command
+4815,9945495,"models/dynamics.py",1581,0,"",python,selection_command
+4816,9949776,"test.ipynb",0,0,"",python,tab
+4817,9954789,"models/dynamics.py",0,0,"",python,tab
+4818,9962032,"models/dynamics.py",1566,0,"",python,selection_command
+4819,9962266,"models/dynamics.py",1484,0,"",python,selection_command
+4820,9962289,"models/dynamics.py",1447,0,"",python,selection_command
+4821,9962322,"models/dynamics.py",1365,0,"",python,selection_command
+4822,9962353,"models/dynamics.py",1350,0,"",python,selection_command
+4823,9962411,"models/dynamics.py",1332,0,"",python,selection_command
+4824,9962419,"models/dynamics.py",1274,0,"",python,selection_command
+4825,9962455,"models/dynamics.py",1250,0,"",python,selection_command
+4826,9962486,"models/dynamics.py",1220,0,"",python,selection_command
+4827,9962519,"models/dynamics.py",1194,0,"",python,selection_command
+4828,9962555,"models/dynamics.py",1166,0,"",python,selection_command
+4829,9962586,"models/dynamics.py",1137,0,"",python,selection_command
+4830,9962620,"models/dynamics.py",1107,0,"",python,selection_command
+4831,9962663,"models/dynamics.py",1081,0,"",python,selection_command
+4832,9962707,"models/dynamics.py",1053,0,"",python,selection_command
+4833,9962729,"models/dynamics.py",1025,0,"",python,selection_command
+4834,9962853,"models/dynamics.py",986,0,"",python,selection_command
+4835,9967486,"models/dynamics.py",1025,0,"",python,selection_command
+4836,9967733,"models/dynamics.py",1053,0,"",python,selection_command
+4837,9967757,"models/dynamics.py",1081,0,"",python,selection_command
+4838,9967788,"models/dynamics.py",1107,0,"",python,selection_command
+4839,9967822,"models/dynamics.py",1137,0,"",python,selection_command
+4840,9967854,"models/dynamics.py",1166,0,"",python,selection_command
+4841,9967888,"models/dynamics.py",1194,0,"",python,selection_command
+4842,9967922,"models/dynamics.py",1220,0,"",python,selection_command
+4843,9967956,"models/dynamics.py",1250,0,"",python,selection_command
+4844,9967987,"models/dynamics.py",1274,0,"",python,selection_command
+4845,9968023,"models/dynamics.py",1332,0,"",python,selection_command
+4846,9968055,"models/dynamics.py",1350,0,"",python,selection_command
+4847,9968227,"models/dynamics.py",1365,0,"",python,selection_command
+4848,9968373,"models/dynamics.py",1447,0,"",python,selection_command
+4849,9981957,"test.ipynb",0,0,"",python,tab
+4850,10049985,"test.ipynb",0,0,"",python,tab
+4851,10049985,"test.ipynb",0,0,"",python,tab
+4852,10051139,"test.ipynb",0,0,"n",python,content
+4853,10051139,"test.ipynb",1,0,"",python,selection_keyboard
+4854,10051208,"test.ipynb",1,0,"n",python,content
+4855,10051208,"test.ipynb",2,0,"",python,selection_keyboard
+4856,10051286,"test.ipynb",2,0,"x",python,content
+4857,10051287,"test.ipynb",3,0,"",python,selection_keyboard
+4858,10051383,"test.ipynb",3,0,".",python,content
+4859,10051384,"test.ipynb",4,0,"",python,selection_keyboard
+4860,10051657,"test.ipynb",4,0,"d",python,content
+4861,10051658,"test.ipynb",5,0,"",python,selection_keyboard
+4862,10051731,"test.ipynb",5,0,"i",python,content
+4863,10051732,"test.ipynb",6,0,"",python,selection_keyboard
+4864,10051812,"test.ipynb",6,0,"s",python,content
+4865,10051813,"test.ipynb",7,0,"",python,selection_keyboard
+4866,10051943,"test.ipynb",7,0,"p",python,content
+4867,10051944,"test.ipynb",8,0,"",python,selection_keyboard
+4868,10052092,"test.ipynb",8,0,"l",python,content
+4869,10052092,"test.ipynb",9,0,"",python,selection_keyboard
+4870,10052155,"test.ipynb",9,0,"a",python,content
+4871,10052156,"test.ipynb",10,0,"",python,selection_keyboard
+4872,10052295,"test.ipynb",10,0,"y",python,content
+4873,10052295,"test.ipynb",11,0,"",python,selection_keyboard
+4874,10052509,"test.ipynb",11,0,"()",python,content
+4875,10052509,"test.ipynb",12,0,"",python,selection_keyboard
+4876,10052956,"test.ipynb",12,0,"m",python,content
+4877,10052956,"test.ipynb",13,0,"",python,selection_keyboard
+4878,10052998,"test.ipynb",13,0,"o",python,content
+4879,10052999,"test.ipynb",14,0,"",python,selection_keyboard
+4880,10053298,"test.ipynb",13,1,"",python,content
+4881,10053408,"test.ipynb",12,1,"",python,content
+4882,10053540,"test.ipynb",12,0,"o",python,content
+4883,10053541,"test.ipynb",13,0,"",python,selection_keyboard
+4884,10053607,"test.ipynb",13,0,"p",python,content
+4885,10053608,"test.ipynb",14,0,"",python,selection_keyboard
+4886,10053674,"test.ipynb",14,0,"t",python,content
+4887,10053675,"test.ipynb",15,0,"",python,selection_keyboard
+4888,10053845,"test.ipynb",15,0,"i",python,content
+4889,10053845,"test.ipynb",16,0,"",python,selection_keyboard
+4890,10053894,"test.ipynb",16,0,"m",python,content
+4891,10053895,"test.ipynb",17,0,"",python,selection_keyboard
+4892,10053998,"test.ipynb",17,0,"i",python,content
+4893,10053999,"test.ipynb",18,0,"",python,selection_keyboard
+4894,10054022,"test.ipynb",18,0,"z",python,content
+4895,10054022,"test.ipynb",19,0,"",python,selection_keyboard
+4896,10054090,"test.ipynb",19,0,"e",python,content
+4897,10054090,"test.ipynb",20,0,"",python,selection_keyboard
+4898,10054185,"test.ipynb",20,0,"r",python,content
+4899,10054185,"test.ipynb",21,0,"",python,selection_keyboard
+4900,10054256,"test.ipynb",21,0,".",python,content
+4901,10054257,"test.ipynb",22,0,"",python,selection_keyboard
+4902,10054407,"test.ipynb",22,0,"m",python,content
+4903,10054408,"test.ipynb",23,0,"",python,selection_keyboard
+4904,10054456,"test.ipynb",23,0,"o",python,content
+4905,10054457,"test.ipynb",24,0,"",python,selection_keyboard
+4906,10054568,"test.ipynb",24,0,"d",python,content
+4907,10054568,"test.ipynb",25,0,"",python,selection_keyboard
+4908,10054604,"test.ipynb",25,0,"e",python,content
+4909,10054605,"test.ipynb",26,0,"",python,selection_keyboard
+4910,10055147,"test.ipynb",26,0,"l",python,content
+4911,10055147,"test.ipynb",27,0,"",python,selection_keyboard
+4912,10073726,"test.ipynb",0,0,"",python,tab
+4913,10147587,"test.ipynb",0,0,"",python,tab
+4914,10198651,"test.ipynb",0,0,"",python,tab
+4915,10205005,"test.ipynb",26,0,"",python,selection_command
+4916,10205295,"test.ipynb",22,0,"",python,selection_command
+4917,10205542,"test.ipynb",21,0,"",python,selection_command
+4918,10205710,"test.ipynb",12,0,"",python,selection_command
+4919,10206217,"test.ipynb",12,0,"n",python,content
+4920,10206218,"test.ipynb",13,0,"",python,selection_keyboard
+4921,10206368,"test.ipynb",13,0,"n",python,content
+4922,10206368,"test.ipynb",14,0,"",python,selection_keyboard
+4923,10206763,"test.ipynb",14,0,".",python,content
+4924,10206763,"test.ipynb",15,0,"",python,selection_keyboard
+4925,10206877,"test.ipynb",15,0,"x",python,content
+4926,10206877,"test.ipynb",16,0,"",python,selection_keyboard
+4927,10207383,"test.ipynb",15,1,"",python,content
+4928,10207487,"test.ipynb",14,1,"",python,content
+4929,10207560,"test.ipynb",14,0,"x",python,content
+4930,10207561,"test.ipynb",15,0,"",python,selection_keyboard
+4931,10207691,"test.ipynb",15,0,".",python,content
+4932,10207692,"test.ipynb",16,0,"",python,selection_keyboard
+4933,10207770,"test.ipynb",16,0,"s",python,content
+4934,10207771,"test.ipynb",17,0,"",python,selection_keyboard
+4935,10207941,"test.ipynb",17,0,"t",python,content
+4936,10207942,"test.ipynb",18,0,"",python,selection_keyboard
+4937,10207991,"test.ipynb",18,0,"a",python,content
+4938,10207991,"test.ipynb",19,0,"",python,selection_keyboard
+4939,10208125,"test.ipynb",19,0,"t",python,content
+4940,10208126,"test.ipynb",20,0,"",python,selection_keyboard
+4941,10208218,"test.ipynb",20,0,"e",python,content
+4942,10208219,"test.ipynb",21,0,"",python,selection_keyboard
+4943,10208495,"test.ipynb",21,0,"(",python,content
+4944,10208496,"test.ipynb",22,0,"",python,selection_keyboard
+4945,10209679,"test.ipynb",21,0,"",python,selection_command
+4946,10209977,"test.ipynb",30,0,"",python,selection_command
+4947,10210160,"test.ipynb",31,0,"",python,selection_command
+4948,10210483,"test.ipynb",36,0,"",python,selection_command
+4949,10210621,"test.ipynb",37,0,"",python,selection_command
+4950,10210892,"test.ipynb",37,0,")",python,content
+4951,10210893,"test.ipynb",38,0,"",python,selection_keyboard
+4952,10215905,"test.ipynb",0,0,"",python,tab
+4953,10227512,"test.ipynb",0,0,"",python,tab
+4954,10263490,"test.ipynb",0,0,"",python,tab
+4955,10268459,"models/dynamics.py",0,0,"",python,tab
+4956,10271304,"train_dynamics.py",0,0,"",python,tab
+4957,10276256,"train_dynamics.py",6415,0,"",python,selection_command
+4958,10277251,"train_dynamics.py",7203,0,"",python,selection_command
+4959,10277411,"train_dynamics.py",8290,0,"",python,selection_command
+4960,10278443,"train_dynamics.py",8643,0,"",python,selection_command
+4961,10278758,"train_dynamics.py",8897,0,"",python,selection_command
+4962,10278908,"train_dynamics.py",10169,0,"",python,selection_command
+4963,10279049,"train_dynamics.py",10204,0,"",python,selection_command
+4964,10280363,"train_dynamics.py",10230,0,"",python,selection_command
+4965,10280546,"train_dynamics.py",10327,0,"",python,selection_command
+4966,10280661,"train_dynamics.py",10381,0,"",python,selection_command
+4967,10280958,"train_dynamics.py",10327,0,"",python,selection_command
+4968,10281070,"train_dynamics.py",10332,0,"",python,selection_command
+4969,10281230,"train_dynamics.py",10333,0,"",python,selection_command
+4970,10281432,"train_dynamics.py",10338,0,"",python,selection_command
+4971,10281592,"train_dynamics.py",10339,0,"",python,selection_command
+4972,10281738,"train_dynamics.py",10348,0,"",python,selection_command
+4973,10281886,"train_dynamics.py",10349,0,"",python,selection_command
+4974,10282043,"train_dynamics.py",10351,0,"",python,selection_command
+4975,10282201,"train_dynamics.py",10352,0,"",python,selection_command
+4976,10282426,"train_dynamics.py",10356,0,"",python,selection_command
+4977,10283035,"train_dynamics.py",10356,12,"",python,content
+4978,10283233,"train_dynamics.py",10356,0," ",python,content
+4979,10283234,"train_dynamics.py",10357,0,"",python,selection_keyboard
+4980,10283347,"train_dynamics.py",10357,0,"=",python,content
+4981,10283348,"train_dynamics.py",10358,0,"",python,selection_keyboard
+4982,10283424,"train_dynamics.py",10358,0," ",python,content
+4983,10283424,"train_dynamics.py",10359,0,"",python,selection_keyboard
+4984,10287290,"train_dynamics.py",10359,0,"D",python,content
+4985,10287291,"train_dynamics.py",10360,0,"",python,selection_keyboard
+4986,10287502,"train_dynamics.py",10360,0,"r",python,content
+4987,10287502,"train_dynamics.py",10361,0,"",python,selection_keyboard
+4988,10287579,"train_dynamics.py",10361,0,"o",python,content
+4989,10287579,"train_dynamics.py",10362,0,"",python,selection_keyboard
+4990,10287666,"train_dynamics.py",10362,0,"p",python,content
+4991,10287666,"train_dynamics.py",10363,0,"",python,selection_keyboard
+4992,10287768,"train_dynamics.py",10363,0,"o",python,content
+4993,10287768,"train_dynamics.py",10364,0,"",python,selection_keyboard
+4994,10287826,"train_dynamics.py",10364,0,"u",python,content
+4995,10287826,"train_dynamics.py",10365,0,"",python,selection_keyboard
+4996,10287923,"train_dynamics.py",10365,0,"t",python,content
+4997,10287923,"train_dynamics.py",10366,0,"",python,selection_keyboard
+4998,10289586,"train_dynamics.py",10365,1,"",python,content
+4999,10289710,"train_dynamics.py",10364,1,"",python,content
+5000,10289847,"train_dynamics.py",10363,1,"",python,content
+5001,10289974,"train_dynamics.py",10362,1,"",python,content
+5002,10290107,"train_dynamics.py",10361,1,"",python,content
+5003,10290262,"train_dynamics.py",10360,1,"",python,content
+5004,10290477,"train_dynamics.py",10359,1,"",python,content
+5005,10290574,"train_dynamics.py",10359,0,"n",python,content
+5006,10290575,"train_dynamics.py",10360,0,"",python,selection_keyboard
+5007,10290687,"train_dynamics.py",10360,0,"n",python,content
+5008,10290688,"train_dynamics.py",10361,0,"",python,selection_keyboard
+5009,10290812,"train_dynamics.py",10361,0,"x",python,content
+5010,10290812,"train_dynamics.py",10362,0,"",python,selection_keyboard
+5011,10290909,"train_dynamics.py",10362,0,".",python,content
+5012,10290909,"train_dynamics.py",10363,0,"",python,selection_keyboard
+5013,10291224,"train_dynamics.py",10363,0,"D",python,content
+5014,10291224,"train_dynamics.py",10364,0,"",python,selection_keyboard
+5015,10291512,"train_dynamics.py",10364,0,"ropout(0.0, rngs=rngs)",python,content
+5016,10291785,"train_dynamics.py",10385,0,"",python,selection_command
+5017,10291853,"train_dynamics.py",10381,0,"",python,selection_command
+5018,10292016,"train_dynamics.py",10380,0,"",python,selection_command
+5019,10292144,"train_dynamics.py",10376,0,"",python,selection_command
+5020,10292281,"train_dynamics.py",10374,0,"",python,selection_command
+5021,10292455,"train_dynamics.py",10373,0,"",python,selection_command
+5022,10292892,"train_dynamics.py",10373,1,"1",python,content
+5023,10302605,"models/dynamics.py",0,0,"",python,tab
+5024,10304166,"models/dynamics.py",1484,0,"",python,selection_command
+5025,10304412,"models/dynamics.py",1566,0,"",python,selection_command
+5026,10304457,"models/dynamics.py",1581,0,"",python,selection_command
+5027,10304823,"models/dynamics.py",1618,0,"",python,selection_command
+5028,10305077,"models/dynamics.py",1654,0,"",python,selection_command
+5029,10305105,"models/dynamics.py",1682,0,"",python,selection_command
+5030,10305129,"models/dynamics.py",1724,0,"",python,selection_command
+5031,10305171,"models/dynamics.py",1754,0,"",python,selection_command
+5032,10305299,"models/dynamics.py",1724,0,"",python,selection_command
+5033,10305559,"models/dynamics.py",1682,0,"",python,selection_command
+5034,10305591,"models/dynamics.py",1654,0,"",python,selection_command
+5035,10305621,"models/dynamics.py",1618,0,"",python,selection_command
+5036,10305653,"models/dynamics.py",1581,0,"",python,selection_command
+5037,10307427,"train_dynamics.py",0,0,"",python,tab
+5038,10309606,"models/tokenizer.py",0,0,"from typing import Dict, Any, Tuple\n\nimport flax.nnx as nnx\nimport jax.numpy as jnp\n\nfrom utils.preprocess import patchify, unpatchify\nfrom utils.nn import STTransformer, VectorQuantizer\n\n\nclass TokenizerVQVAE(nnx.Module):\n """"""ST-ViVit VQ-VAE""""""\n\n def __init__(\n self,\n in_dim: int,\n model_dim: int,\n ffn_dim: int,\n latent_dim: int,\n num_latents: int,\n patch_size: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n codebook_dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.in_dim = in_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.latent_dim = latent_dim\n self.num_latents = num_latents\n self.patch_size = patch_size\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.codebook_dropout = codebook_dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.encoder = STTransformer(\n self.in_dim * self.patch_size**2,\n self.model_dim,\n self.ffn_dim,\n self.latent_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.vq = VectorQuantizer(\n self.latent_dim,\n self.num_latents,\n self.codebook_dropout,\n rngs=rngs,\n )\n self.out_dim = self.in_dim * self.patch_size**2\n self.decoder = STTransformer(\n self.latent_dim,\n self.model_dim,\n self.ffn_dim,\n self.out_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n H, W = batch[""videos""].shape[2:4]\n outputs = self.vq_encode(batch[""videos""], training)\n recon = self.decoder(outputs[""z_q""]) # (B, T, H_down * W_down, C)\n recon = recon.astype(jnp.float32)\n recon = nnx.sigmoid(recon)\n recon = recon.astype(self.dtype)\n outputs[""recon""] = unpatchify(recon, self.patch_size, H, W)\n return outputs\n\n def vq_encode(self, videos: Any, training: bool = True) -> Dict[str, Any]:\n # --- Preprocess + encode ---\n B, T = videos.shape[:2]\n x = patchify(videos, self.patch_size)\n N = x.shape[2]\n x = self.encoder(x) # (B, T, N, E)\n\n # --- Vector quantize ---\n x = x.reshape(B * T * N, self.latent_dim)\n z_q, z, emb, indices = self.vq(x, training)\n z_q = z_q.reshape(B, T, N, self.latent_dim)\n indices = indices.reshape(B, T, N)\n return dict(z_q=z_q, z=z, emb=emb, indices=indices)\n\n def decode(self, indices: Any, video_hw: Tuple[int, int]):\n z = self.vq.codebook[indices]\n recon = self.decoder(z)\n recon = recon.astype(jnp.float32)\n recon = nnx.sigmoid(recon)\n recon = recon.astype(self.dtype)\n return unpatchify(recon, self.patch_size, *video_hw)\n",python,tab
+5039,10310764,"utils/nn.py",0,0,"",python,tab
+5040,10310764,"utils/nn.py",6625,0,"",python,selection_command
+5041,10311473,"utils/nn.py",6660,0,"",python,selection_command
+5042,10311595,"utils/nn.py",6678,0,"",python,selection_command
+5043,10311767,"utils/nn.py",6757,0,"",python,selection_command
+5044,10311944,"utils/nn.py",6765,0,"",python,selection_command
+5045,10312090,"utils/nn.py",6802,0,"",python,selection_command
+5046,10312225,"utils/nn.py",6841,0,"",python,selection_command
+5047,10312341,"utils/nn.py",6843,0,"",python,selection_command
+5048,10313559,"utils/nn.py",6866,0,"",python,selection_command
+5049,10313811,"utils/nn.py",6875,0,"",python,selection_command
+5050,10313825,"utils/nn.py",6910,0,"",python,selection_command
+5051,10313854,"utils/nn.py",6933,0,"",python,selection_command
+5052,10313889,"utils/nn.py",6983,0,"",python,selection_command
+5053,10313922,"utils/nn.py",7054,0,"",python,selection_command
+5054,10313955,"utils/nn.py",7072,0,"",python,selection_command
+5055,10314062,"utils/nn.py",7086,0,"",python,selection_command
+5056,10314263,"utils/nn.py",7096,0,"",python,selection_command
+5057,10314441,"utils/nn.py",7145,0,"",python,selection_command
+5058,10314792,"utils/nn.py",7096,0,"",python,selection_command
+5059,10314959,"utils/nn.py",7100,0,"",python,selection_command
+5060,10315605,"utils/nn.py",7101,0,"",python,selection_command
+5061,10343652,"train_dynamics.py",0,0,"",python,tab
+5062,10345140,"train_dynamics.py",10372,0,"",python,selection_command
+5063,10345197,"train_dynamics.py",10371,0,"",python,selection_command
+5064,10345340,"train_dynamics.py",10370,0,"",python,selection_command
+5065,10345526,"train_dynamics.py",10363,0,"",python,selection_command
+5066,10345680,"train_dynamics.py",10362,0,"",python,selection_command
+5067,10346043,"train_dynamics.py",10359,0,"",python,selection_command
+5068,10346968,"train_dynamics.py",10357,0,"",python,selection_command
+5069,10348361,"train_dynamics.py",10323,0,"",python,selection_command
+5070,10364304,"test.ipynb",0,0,"",python,tab
+5071,10364305,"test.ipynb",3195,0,"",python,selection_mouse
+5072,10366902,"test.ipynb",3222,0,"\n",python,content
+5073,10367890,"test.ipynb",3223,0,"\n optimizer.model.tokenizer.vq.drop = nnx.Dropout(0.1, rngs=rngs)",python,content
+5074,10367898,"test.ipynb",3232,0,"",python,selection_command
+5075,10368346,"test.ipynb",3223,0,"",python,selection_command
+5076,10368896,"test.ipynb",3223,1,"",python,content
+5077,10368920,"test.ipynb",3231,0,"",python,selection_command
+5078,10369309,"test.ipynb",3227,4,"",python,content
+5079,10369612,"test.ipynb",3223,4,"",python,content
+5080,10373713,"test.ipynb",0,0,"",python,tab
+5081,10375137,"test.ipynb",0,0,"",python,tab
+5082,10376227,"test.ipynb",3440,0,"",python,selection_command
+5083,10377515,"test.ipynb",3400,0,"",python,selection_command
+5084,10377791,"test.ipynb",3399,0,"",python,selection_command
+5085,10377817,"test.ipynb",3342,0,"",python,selection_command
+5086,10377837,"test.ipynb",3287,0,"",python,selection_command
+5087,10377881,"test.ipynb",3223,0,"",python,selection_command
+5088,10377902,"test.ipynb",3177,0,"",python,selection_command
+5089,10378191,"test.ipynb",3176,0,"",python,selection_command
+5090,10378394,"test.ipynb",3177,0,"",python,selection_command
+5091,10379337,"test.ipynb",3177,46,"",python,content
+5092,10381668,"test.ipynb",0,0,"",python,tab
+5093,10382977,"test.ipynb",0,0,"",python,tab
+5094,10390672,"test.ipynb",0,0,"",python,tab
+5095,10390672,"test.ipynb",19,0,"",python,selection_mouse
+5096,10392327,"test.ipynb",18,0,"",python,selection_command
+5097,10393943,"test.ipynb",19,0,"",python,selection_command
+5098,10394111,"test.ipynb",20,0,"",python,selection_command
+5099,10394229,"test.ipynb",20,0,".",python,content
+5100,10394229,"test.ipynb",21,0,"",python,selection_keyboard
+5101,10394461,"test.ipynb",21,0,"m",python,content
+5102,10394462,"test.ipynb",22,0,"",python,selection_keyboard
+5103,10394523,"test.ipynb",22,0,"o",python,content
+5104,10394524,"test.ipynb",23,0,"",python,selection_keyboard
+5105,10394591,"test.ipynb",23,0,"d",python,content
+5106,10394592,"test.ipynb",24,0,"",python,selection_keyboard
+5107,10394654,"test.ipynb",24,0,"e",python,content
+5108,10394654,"test.ipynb",25,0,"",python,selection_keyboard
+5109,10394739,"test.ipynb",25,0,"l",python,content
+5110,10394740,"test.ipynb",26,0,"",python,selection_keyboard
+5111,10394907,"test.ipynb",26,0,".",python,content
+5112,10394908,"test.ipynb",27,0,"",python,selection_keyboard
+5113,10395031,"test.ipynb",27,0,"d",python,content
+5114,10395032,"test.ipynb",28,0,"",python,selection_keyboard
+5115,10395424,"test.ipynb",27,1,"",python,content
+5116,10395692,"test.ipynb",27,0,"t",python,content
+5117,10395692,"test.ipynb",28,0,"",python,selection_keyboard
+5118,10395806,"test.ipynb",28,0,"o",python,content
+5119,10395806,"test.ipynb",29,0,"",python,selection_keyboard
+5120,10395838,"test.ipynb",29,0,"k",python,content
+5121,10395839,"test.ipynb",30,0,"",python,selection_keyboard
+5122,10396022,"test.ipynb",30,0,"e",python,content
+5123,10396022,"test.ipynb",31,0,"",python,selection_keyboard
+5124,10396115,"test.ipynb",31,0,"n",python,content
+5125,10396115,"test.ipynb",32,0,"",python,selection_keyboard
+5126,10396172,"test.ipynb",32,0,"i",python,content
+5127,10396172,"test.ipynb",33,0,"",python,selection_keyboard
+5128,10396244,"test.ipynb",33,0,"z",python,content
+5129,10396244,"test.ipynb",34,0,"",python,selection_keyboard
+5130,10396339,"test.ipynb",34,0,"e",python,content
+5131,10396339,"test.ipynb",35,0,"",python,selection_keyboard
+5132,10396387,"test.ipynb",35,0,"r",python,content
+5133,10396387,"test.ipynb",36,0,"",python,selection_keyboard
+5134,10396547,"test.ipynb",36,0,".",python,content
+5135,10396547,"test.ipynb",37,0,"",python,selection_keyboard
+5136,10396864,"test.ipynb",37,0,"v",python,content
+5137,10396864,"test.ipynb",38,0,"",python,selection_keyboard
+5138,10397024,"test.ipynb",38,0,"q",python,content
+5139,10397024,"test.ipynb",39,0,"",python,selection_keyboard
+5140,10398133,"test.ipynb",39,0,".",python,content
+5141,10398133,"test.ipynb",40,0,"",python,selection_keyboard
+5142,10398258,"test.ipynb",40,0,"d",python,content
+5143,10398258,"test.ipynb",41,0,"",python,selection_keyboard
+5144,10398370,"test.ipynb",41,0,"r",python,content
+5145,10398371,"test.ipynb",42,0,"",python,selection_keyboard
+5146,10398424,"test.ipynb",42,0,"o",python,content
+5147,10398425,"test.ipynb",43,0,"",python,selection_keyboard
+5148,10398492,"test.ipynb",43,0,"p",python,content
+5149,10398492,"test.ipynb",44,0,"",python,selection_keyboard
+5150,10414283,"test.ipynb",0,0,"",python,tab
+5151,10416095,"test.ipynb",0,0,"",python,tab
+5152,10416956,"test.ipynb",37,0,"",python,selection_command
+5153,10419777,"test.ipynb",37,0,".",python,content
+5154,10419778,"test.ipynb",38,0,"",python,selection_keyboard
+5155,10420831,"test.ipynb",38,0,"d",python,content
+5156,10420832,"test.ipynb",39,0,"",python,selection_keyboard
+5157,10420888,"test.ipynb",39,0,"y",python,content
+5158,10420889,"test.ipynb",40,0,"",python,selection_keyboard
+5159,10420987,"test.ipynb",40,0,"n",python,content
+5160,10420987,"test.ipynb",41,0,"",python,selection_keyboard
+5161,10421117,"test.ipynb",41,0,"a",python,content
+5162,10421118,"test.ipynb",42,0,"",python,selection_keyboard
+5163,10421223,"test.ipynb",42,0,"m",python,content
+5164,10421224,"test.ipynb",43,0,"",python,selection_keyboard
+5165,10421310,"test.ipynb",43,0,"i",python,content
+5166,10421310,"test.ipynb",44,0,"",python,selection_keyboard
+5167,10421338,"test.ipynb",44,0,"c",python,content
+5168,10421339,"test.ipynb",45,0,"",python,selection_keyboard
+5169,10421404,"test.ipynb",45,0,"s",python,content
+5170,10421404,"test.ipynb",46,0,"",python,selection_keyboard
+5171,10421593,"test.ipynb",46,0,".",python,content
+5172,10421594,"test.ipynb",47,0,"",python,selection_keyboard
+5173,10421885,"test.ipynb",47,0,"d",python,content
+5174,10421886,"test.ipynb",48,0,"",python,selection_keyboard
+5175,10421938,"test.ipynb",48,0,"y",python,content
+5176,10421939,"test.ipynb",49,0,"",python,selection_keyboard
+5177,10422011,"test.ipynb",49,0,"n",python,content
+5178,10422012,"test.ipynb",50,0,"",python,selection_keyboard
+5179,10422104,"test.ipynb",50,0,"a",python,content
+5180,10422105,"test.ipynb",51,0,"",python,selection_keyboard
+5181,10422239,"test.ipynb",51,0,"m",python,content
+5182,10422239,"test.ipynb",52,0,"",python,selection_keyboard
+5183,10422294,"test.ipynb",52,0,"c",python,content
+5184,10422295,"test.ipynb",53,0,"",python,selection_keyboard
+5185,10422326,"test.ipynb",53,0,"i",python,content
+5186,10422327,"test.ipynb",54,0,"",python,selection_keyboard
+5187,10422370,"test.ipynb",54,0,"s",python,content
+5188,10422371,"test.ipynb",55,0,"",python,selection_keyboard
+5189,10422561,"test.ipynb",55,0,".",python,content
+5190,10422562,"test.ipynb",56,0,"",python,selection_keyboard
+5191,10423208,"test.ipynb",55,1,"",python,content
+5192,10423621,"test.ipynb",47,8,"",python,content
+5193,10424843,"test.ipynb",47,0,"t",python,content
+5194,10424843,"test.ipynb",48,0,"",python,selection_keyboard
+5195,10424965,"test.ipynb",48,0,"o",python,content
+5196,10424965,"test.ipynb",49,0,"",python,selection_keyboard
+5197,10424966,"test.ipynb",49,0,"k",python,content
+5198,10424966,"test.ipynb",50,0,"",python,selection_keyboard
+5199,10425580,"test.ipynb",50,0,"e",python,content
+5200,10425580,"test.ipynb",51,0,"",python,selection_keyboard
+5201,10425817,"test.ipynb",51,0,"n",python,content
+5202,10425817,"test.ipynb",52,0,"",python,selection_keyboard
+5203,10425830,"test.ipynb",52,0,"i",python,content
+5204,10425830,"test.ipynb",53,0,"",python,selection_keyboard
+5205,10425924,"test.ipynb",53,0,"z",python,content
+5206,10425924,"test.ipynb",54,0,"",python,selection_keyboard
+5207,10426056,"test.ipynb",54,0,"e",python,content
+5208,10426056,"test.ipynb",55,0,"",python,selection_keyboard
+5209,10426121,"test.ipynb",55,0,"r",python,content
+5210,10426122,"test.ipynb",56,0,"",python,selection_keyboard
+5211,10426193,"test.ipynb",56,0,".",python,content
+5212,10426193,"test.ipynb",57,0,"",python,selection_keyboard
+5213,10426343,"test.ipynb",57,0,"v",python,content
+5214,10426343,"test.ipynb",58,0,"",python,selection_keyboard
+5215,10426533,"test.ipynb",58,0,"q",python,content
+5216,10426533,"test.ipynb",59,0,"",python,selection_keyboard
+5217,10426548,"test.ipynb",59,0,".",python,content
+5218,10426548,"test.ipynb",60,0,"",python,selection_keyboard
+5219,10428136,"test.ipynb",60,0,"d",python,content
+5220,10428136,"test.ipynb",61,0,"",python,selection_keyboard
+5221,10428247,"test.ipynb",61,0,"o",python,content
+5222,10428247,"test.ipynb",62,0,"",python,selection_keyboard
+5223,10428256,"test.ipynb",62,0,"r",python,content
+5224,10428256,"test.ipynb",63,0,"",python,selection_keyboard
+5225,10428295,"test.ipynb",63,0,"p",python,content
+5226,10428295,"test.ipynb",64,0,"",python,selection_keyboard
+5227,10429872,"test.ipynb",63,1,"",python,content
+5228,10430021,"test.ipynb",62,1,"",python,content
+5229,10430217,"test.ipynb",61,1,"",python,content
+5230,10430810,"test.ipynb",61,0,"r",python,content
+5231,10430811,"test.ipynb",62,0,"",python,selection_keyboard
+5232,10430815,"test.ipynb",62,0,"o",python,content
+5233,10430816,"test.ipynb",63,0,"",python,selection_keyboard
+5234,10430821,"test.ipynb",63,0,"p",python,content
+5235,10430822,"test.ipynb",64,0,"",python,selection_keyboard
+5236,10433350,"test.ipynb",42,0,"",python,selection_mouse
+5237,10434593,"test.ipynb",41,0,"",python,selection_mouse
+5238,10434767,"test.ipynb",38,8,"dynamics",python,selection_mouse
+5239,10435627,"test.ipynb",38,8,"",python,content
+5240,10435867,"test.ipynb",37,1,"",python,content
+5241,10449940,"test.ipynb",0,0,"",python,tab
+5242,10449940,"test.ipynb",30,0,"",python,selection_mouse
+5243,10453294,"test.ipynb",23,0,"",python,selection_mouse
+5244,10453463,"test.ipynb",21,5,"model",python,selection_mouse
+5245,10454133,"test.ipynb",21,5,"",python,content
+5246,10454427,"test.ipynb",20,1,"",python,content
+5247,10456912,"test.ipynb",23,0,"",python,selection_mouse
+5248,10457802,"test.ipynb",22,0,"",python,selection_command
+5249,10458328,"test.ipynb",0,0,"\n",python,content
+5250,10460718,"test.ipynb",0,0,"r",python,content
+5251,10460718,"test.ipynb",1,0,"",python,selection_keyboard
+5252,10460744,"test.ipynb",1,0,"e",python,content
+5253,10460745,"test.ipynb",2,0,"",python,selection_keyboard
+5254,10460797,"test.ipynb",2,0,"s",python,content
+5255,10460797,"test.ipynb",3,0,"",python,selection_keyboard
+5256,10460905,"test.ipynb",3,0,"t",python,content
+5257,10460905,"test.ipynb",4,0,"",python,selection_keyboard
+5258,10461047,"test.ipynb",4,0,"o",python,content
+5259,10461047,"test.ipynb",5,0,"",python,selection_keyboard
+5260,10461104,"test.ipynb",5,0,"r",python,content
+5261,10461104,"test.ipynb",6,0,"",python,selection_keyboard
+5262,10461185,"test.ipynb",6,0,"e",python,content
+5263,10461186,"test.ipynb",7,0,"",python,selection_keyboard
+5264,10461325,"test.ipynb",7,0,"d",python,content
+5265,10461326,"test.ipynb",8,0,"",python,selection_keyboard
+5266,10461555,"test.ipynb",8,0,"_",python,content
+5267,10461556,"test.ipynb",9,0,"",python,selection_keyboard
+5268,10461732,"test.ipynb",9,0,"s",python,content
+5269,10461733,"test.ipynb",10,0,"",python,selection_keyboard
+5270,10461867,"test.ipynb",10,0,"t",python,content
+5271,10461867,"test.ipynb",11,0,"",python,selection_keyboard
+5272,10461951,"test.ipynb",11,0,"a",python,content
+5273,10461952,"test.ipynb",12,0,"",python,selection_keyboard
+5274,10462041,"test.ipynb",12,0,"t",python,content
+5275,10462042,"test.ipynb",13,0,"",python,selection_keyboard
+5276,10462119,"test.ipynb",13,0,"e",python,content
+5277,10462120,"test.ipynb",14,0,"",python,selection_keyboard
+5278,10462244,"test.ipynb",14,0," ",python,content
+5279,10462245,"test.ipynb",15,0,"",python,selection_keyboard
+5280,10462393,"test.ipynb",15,0,"=",python,content
+5281,10462394,"test.ipynb",16,0,"",python,selection_keyboard
+5282,10462481,"test.ipynb",16,0," ",python,content
+5283,10462481,"test.ipynb",17,0,"",python,selection_keyboard
+5284,10463006,"test.ipynb",17,0,"nnx.state(restored.model)",python,content
+5285,10463746,"test.ipynb",41,0,"",python,selection_command
+5286,10464208,"test.ipynb",81,0,"",python,selection_command
+5287,10464592,"test.ipynb",77,0,"",python,selection_command
+5288,10464787,"test.ipynb",76,0,"",python,selection_command
+5289,10464946,"test.ipynb",74,0,"",python,selection_command
+5290,10465092,"test.ipynb",73,0,"",python,selection_command
+5291,10465240,"test.ipynb",64,0,"",python,selection_command
+5292,10465393,"test.ipynb",63,0,"",python,selection_command
+5293,10465538,"test.ipynb",55,0,"",python,selection_command
+5294,10466024,"test.ipynb",63,0,"_state",python,content
+5295,10466025,"test.ipynb",69,0,"",python,selection_command
+5296,10475949,"test.ipynb",69,1,".",python,selection_command
+5297,10475995,"test.ipynb",69,10,".tokenizer",python,selection_command
+5298,10476161,"test.ipynb",69,11,".tokenizer.",python,selection_command
+5299,10476314,"test.ipynb",69,13,".tokenizer.vq",python,selection_command
+5300,10476565,"test.ipynb",69,14,".tokenizer.vq.",python,selection_command
+5301,10476988,"test.ipynb",69,18,".tokenizer.vq.drop",python,selection_command
+5302,10477214,"test.ipynb",69,18,"",python,content
+5303,10479392,"test.ipynb",70,0,"",python,selection_mouse
+5304,10479393,"test.ipynb",69,0,"",python,selection_command
+5305,10480066,"test.ipynb",26,0,"",python,selection_command
+5306,10480734,"test.ipynb",26,1,"(",python,selection_command
+5307,10480998,"test.ipynb",0,27,"restored_state = nnx.state(",python,selection_command
+5308,10481316,"test.ipynb",0,27,"",python,content
+5309,10482383,"test.ipynb",0,0,"restored_state = nnx.state(",python,content
+5310,10482387,"test.ipynb",0,0,"",python,selection_command
+5311,10486850,"test.ipynb",0,43,"",python,content
+5312,10488615,"test.ipynb",3,0,"",python,selection_command
+5313,10488798,"test.ipynb",4,0,"",python,selection_command
+5314,10489030,"test.ipynb",11,0,"",python,selection_command
+5315,10489233,"test.ipynb",12,0,"",python,selection_command
+5316,10489547,"test.ipynb",12,14,"",python,content
+5317,10489795,"test.ipynb",12,0,"r",python,content
+5318,10489795,"test.ipynb",13,0,"",python,selection_keyboard
+5319,10489859,"test.ipynb",13,0,"e",python,content
+5320,10489860,"test.ipynb",14,0,"",python,selection_keyboard
+5321,10489909,"test.ipynb",14,0,"s",python,content
+5322,10489910,"test.ipynb",15,0,"",python,selection_keyboard
+5323,10490010,"test.ipynb",15,0,"t",python,content
+5324,10490011,"test.ipynb",16,0,"",python,selection_keyboard
+5325,10490127,"test.ipynb",16,0,"o",python,content
+5326,10490127,"test.ipynb",17,0,"",python,selection_keyboard
+5327,10490207,"test.ipynb",17,0,"r",python,content
+5328,10490207,"test.ipynb",18,0,"",python,selection_keyboard
+5329,10490261,"test.ipynb",18,0,"e",python,content
+5330,10490262,"test.ipynb",19,0,"",python,selection_keyboard
+5331,10490475,"test.ipynb",19,0,"d",python,content
+5332,10490476,"test.ipynb",20,0,"",python,selection_keyboard
+5333,10491067,"test.ipynb",20,0,".",python,content
+5334,10491067,"test.ipynb",21,0,"",python,selection_keyboard
+5335,10491240,"test.ipynb",21,0,"m",python,content
+5336,10491240,"test.ipynb",22,0,"",python,selection_keyboard
+5337,10491276,"test.ipynb",22,0,"o",python,content
+5338,10491277,"test.ipynb",23,0,"",python,selection_keyboard
+5339,10491328,"test.ipynb",23,0,"d",python,content
+5340,10491328,"test.ipynb",24,0,"",python,selection_keyboard
+5341,10491386,"test.ipynb",24,0,"e",python,content
+5342,10491386,"test.ipynb",25,0,"",python,selection_keyboard
+5343,10491504,"test.ipynb",25,0,"l",python,content
+5344,10491504,"test.ipynb",26,0,"",python,selection_keyboard
+5345,10493306,"test.ipynb",25,0,"",python,selection_command
+5346,10493429,"test.ipynb",21,0,"",python,selection_command
+5347,10493644,"test.ipynb",21,5,"",python,content
+5348,10493931,"test.ipynb",20,0,"",python,selection_command
+5349,10494007,"test.ipynb",20,1,"",python,content
+5350,10570173,"train_dynamics.py",0,0,"",python,tab
+5351,10577134,"train_dynamics.py",13845,0,"",python,selection_command
+5352,10578508,"train_dynamics.py",13229,0,"",python,selection_command
+5353,10578983,"train_dynamics.py",11848,0,"",python,selection_command
+5354,10579491,"train_dynamics.py",10395,0,"",python,selection_command
+5355,10580173,"train_dynamics.py",9285,0,"",python,selection_command
+5356,10634253,"test.ipynb",0,0,"",python,tab
+5357,10634253,"test.ipynb",51,0,"",python,selection_mouse
+5358,10648243,"test.ipynb",0,0,"",python,tab
+5359,10667427,"test.ipynb",0,0,"",python,tab
+5360,10668079,"test.ipynb",52,0,"",python,selection_mouse
+5361,10668214,"test.ipynb",51,4,"drop",python,selection_mouse
+5362,10668727,"test.ipynb",51,4,"",python,content
+5363,10668859,"test.ipynb",50,1,"",python,content
+5364,10693483,"test.ipynb",0,0,"",python,tab
+5365,10693483,"test.ipynb",3194,0,"",python,selection_mouse
+5366,10694806,"test.ipynb",3177,0,"",python,selection_command
+5367,10694914,"test.ipynb",3177,0,"#",python,content
+5368,10694915,"test.ipynb",3178,0,"",python,selection_keyboard
+5369,10694996,"test.ipynb",3178,0," ",python,content
+5370,10694996,"test.ipynb",3179,0,"",python,selection_keyboard
+5371,10709146,"test.ipynb",0,0,"",python,tab
+5372,10709147,"test.ipynb",42,0,"",python,selection_mouse
+5373,10729821,"train_dynamics.py",0,0,"",python,tab
+5374,10731039,"train_dynamics.py",9770,0,"",python,selection_command
+5375,10731465,"train_dynamics.py",10395,0,"",python,selection_command
+5376,10733843,"train_dynamics.py",10323,0,"",python,selection_command
+5377,10737001,"train_dynamics.py",10315,72,"",python,content
+5378,10737013,"train_dynamics.py",10323,0,"",python,selection_command
+5379,10755464,"test.ipynb",0,0,"",python,tab
+5380,10755464,"test.ipynb",18,0,"",python,selection_mouse
+5381,10755582,"test.ipynb",16,5,"state",python,selection_mouse
+5382,10757008,"test.ipynb",16,5,"e",python,content
+5383,10757009,"test.ipynb",17,0,"",python,selection_keyboard
+5384,10757072,"test.ipynb",17,0,"v",python,content
+5385,10757073,"test.ipynb",18,0,"",python,selection_keyboard
+5386,10757091,"test.ipynb",18,0,"a",python,content
+5387,10757092,"test.ipynb",19,0,"",python,selection_keyboard
+5388,10757336,"test.ipynb",19,0,"l",python,content
+5389,10757337,"test.ipynb",20,0,"",python,selection_keyboard
+5390,10757518,"test.ipynb",20,0,"_",python,content
+5391,10757519,"test.ipynb",21,0,"",python,selection_keyboard
+5392,10757725,"test.ipynb",21,0,"s",python,content
+5393,10757726,"test.ipynb",22,0,"",python,selection_keyboard
+5394,10757764,"test.ipynb",22,0,"h",python,content
+5395,10757765,"test.ipynb",23,0,"",python,selection_keyboard
+5396,10757865,"test.ipynb",23,0,"a",python,content
+5397,10757865,"test.ipynb",24,0,"",python,selection_keyboard
+5398,10757944,"test.ipynb",24,0,"p",python,content
+5399,10757944,"test.ipynb",25,0,"",python,selection_keyboard
+5400,10758037,"test.ipynb",25,0,"e",python,content
+5401,10758037,"test.ipynb",26,0,"",python,selection_keyboard
+5402,10758856,"test.ipynb",25,0,"",python,selection_command
+5403,10766990,"test.ipynb",12,0,"",python,selection_mouse
+5404,10768461,"test.ipynb",12,0,"n",python,content
+5405,10768461,"test.ipynb",13,0,"",python,selection_keyboard
+5406,10768570,"test.ipynb",13,0,"n",python,content
+5407,10768570,"test.ipynb",14,0,"",python,selection_keyboard
+5408,10768760,"test.ipynb",14,0,"x",python,content
+5409,10768760,"test.ipynb",15,0,"",python,selection_keyboard
+5410,10770972,"test.ipynb",15,0,".",python,content
+5411,10770973,"test.ipynb",16,0,"",python,selection_keyboard
+5412,10771095,"test.ipynb",16,0,"s",python,content
+5413,10771095,"test.ipynb",17,0,"",python,selection_keyboard
+5414,10771456,"test.ipynb",17,0,"t",python,content
+5415,10771456,"test.ipynb",18,0,"",python,selection_keyboard
+5416,10771529,"test.ipynb",18,0,"a",python,content
+5417,10771530,"test.ipynb",19,0,"",python,selection_keyboard
+5418,10771638,"test.ipynb",19,0,"t",python,content
+5419,10771639,"test.ipynb",20,0,"",python,selection_keyboard
+5420,10771691,"test.ipynb",20,0,"e",python,content
+5421,10771691,"test.ipynb",21,0,"",python,selection_keyboard
+5422,10772075,"test.ipynb",21,0,"(",python,content
+5423,10772075,"test.ipynb",22,0,"",python,selection_keyboard
+5424,10772373,"test.ipynb",21,0,"",python,selection_command
+5425,10772710,"test.ipynb",24,0,"",python,selection_command
+5426,10772909,"test.ipynb",25,0,"",python,selection_command
+5427,10773056,"test.ipynb",35,0,"",python,selection_command
+5428,10773210,"test.ipynb",36,0,"",python,selection_command
+5429,10774162,"test.ipynb",66,0,"",python,selection_command
+5430,10775620,"test.ipynb",0,0,"",python,tab
+5431,10776841,"test.ipynb",0,0,"",python,tab
+5432,10777811,"test.ipynb",67,0,"",python,selection_command
+5433,10777958,"test.ipynb",67,0,")",python,content
+5434,10777958,"test.ipynb",68,0,"",python,selection_keyboard
+5435,10778230,"test.ipynb",67,0,"",python,selection_command
+5436,10783236,"test.ipynb",65,0,"",python,selection_command
+5437,10783492,"test.ipynb",63,0,"",python,selection_command
+5438,10783642,"test.ipynb",62,0,"",python,selection_command
+5439,10783761,"test.ipynb",53,0,"",python,selection_command
+5440,10783894,"test.ipynb",52,0,"",python,selection_command
+5441,10784128,"test.ipynb",47,0,"",python,selection_command
+5442,10784296,"test.ipynb",46,0,"",python,selection_command
+5443,10784493,"test.ipynb",37,0,"",python,selection_command
+5444,10785022,"test.ipynb",37,0,"l",python,content
+5445,10785022,"test.ipynb",38,0,"",python,selection_keyboard
+5446,10785204,"test.ipynb",38,0,"a",python,content
+5447,10785204,"test.ipynb",39,0,"",python,selection_keyboard
+5448,10785365,"test.ipynb",39,0,"m",python,content
+5449,10785365,"test.ipynb",40,0,"",python,selection_keyboard
+5450,10785541,"test.ipynb",40,0," ",python,content
+5451,10785542,"test.ipynb",41,0,"",python,selection_keyboard
+5452,10785915,"test.ipynb",40,1,"",python,content
+5453,10786082,"test.ipynb",40,0,":",python,content
+5454,10786083,"test.ipynb",41,0,"",python,selection_keyboard
+5455,10786169,"test.ipynb",41,0," ",python,content
+5456,10786170,"test.ipynb",42,0,"",python,selection_keyboard
+5457,10786541,"test.ipynb",41,1,"",python,content
+5458,10786680,"test.ipynb",40,1,"",python,content
+5459,10786809,"test.ipynb",39,1,"",python,content
+5460,10787700,"test.ipynb",39,0,"m",python,content
+5461,10787701,"test.ipynb",40,0,"",python,selection_keyboard
+5462,10787877,"test.ipynb",40,0,"b",python,content
+5463,10787877,"test.ipynb",41,0,"",python,selection_keyboard
+5464,10787946,"test.ipynb",41,0,"d",python,content
+5465,10787947,"test.ipynb",42,0,"",python,selection_keyboard
+5466,10787989,"test.ipynb",42,0,"a",python,content
+5467,10787989,"test.ipynb",43,0,"",python,selection_keyboard
+5468,10788496,"test.ipynb",43,0,":",python,content
+5469,10788497,"test.ipynb",44,0,"",python,selection_keyboard
+5470,10788609,"test.ipynb",44,0," ",python,content
+5471,10788610,"test.ipynb",45,0,"",python,selection_keyboard
+5472,10794657,"test.ipynb",0,0,"",python,tab
+5473,10794657,"test.ipynb",19,0,"",python,selection_mouse
+5474,10795704,"test.ipynb",12,0,"",python,selection_command
+5475,10796064,"test.ipynb",12,0,"e",python,content
+5476,10796065,"test.ipynb",13,0,"",python,selection_keyboard
+5477,10796229,"test.ipynb",13,0,"v",python,content
+5478,10796230,"test.ipynb",14,0,"",python,selection_keyboard
+5479,10796231,"test.ipynb",14,0,"a",python,content
+5480,10796231,"test.ipynb",15,0,"",python,selection_keyboard
+5481,10796336,"test.ipynb",15,0,"l",python,content
+5482,10796337,"test.ipynb",16,0,"",python,selection_keyboard
+5483,10796562,"test.ipynb",16,0,"_",python,content
+5484,10796563,"test.ipynb",17,0,"",python,selection_keyboard
+5485,10797612,"test.ipynb",16,1,"",python,content
+5486,10797802,"test.ipynb",15,1,"",python,content
+5487,10797860,"test.ipynb",14,1,"",python,content
+5488,10797988,"test.ipynb",13,1,"",python,content
+5489,10798148,"test.ipynb",12,1,"",python,content
+5490,10798383,"test.ipynb",12,0,"n",python,content
+5491,10798383,"test.ipynb",13,0,"",python,selection_keyboard
+5492,10798463,"test.ipynb",13,0,"x",python,content
+5493,10798463,"test.ipynb",14,0,"",python,selection_keyboard
+5494,10798878,"test.ipynb",13,1,"",python,content
+5495,10799019,"test.ipynb",13,0,"n",python,content
+5496,10799020,"test.ipynb",14,0,"",python,selection_keyboard
+5497,10799069,"test.ipynb",14,0,"x",python,content
+5498,10799069,"test.ipynb",15,0,"",python,selection_keyboard
+5499,10799201,"test.ipynb",15,0,".",python,content
+5500,10799201,"test.ipynb",16,0,"",python,selection_keyboard
+5501,10799254,"test.ipynb",16,0,"e",python,content
+5502,10799254,"test.ipynb",17,0,"",python,selection_keyboard
+5503,10799388,"test.ipynb",17,0,"v",python,content
+5504,10799389,"test.ipynb",18,0,"",python,selection_keyboard
+5505,10799494,"test.ipynb",18,0,"a",python,content
+5506,10799495,"test.ipynb",19,0,"",python,selection_keyboard
+5507,10799609,"test.ipynb",19,0,"l",python,content
+5508,10799610,"test.ipynb",20,0,"",python,selection_keyboard
+5509,10799902,"test.ipynb",20,0,"_",python,content
+5510,10799902,"test.ipynb",21,0,"",python,selection_keyboard
+5511,10800637,"test.ipynb",21,0,"s",python,content
+5512,10800637,"test.ipynb",22,0,"",python,selection_keyboard
+5513,10800826,"test.ipynb",22,0,"h",python,content
+5514,10800827,"test.ipynb",23,0,"",python,selection_keyboard
+5515,10800829,"test.ipynb",23,0,"a",python,content
+5516,10800830,"test.ipynb",24,0,"",python,selection_keyboard
+5517,10800950,"test.ipynb",24,0,"p",python,content
+5518,10800950,"test.ipynb",25,0,"",python,selection_keyboard
+5519,10800990,"test.ipynb",25,0,"e",python,content
+5520,10800991,"test.ipynb",26,0,"",python,selection_keyboard
+5521,10801192,"test.ipynb",26,0,"(",python,content
+5522,10801192,"test.ipynb",27,0,"",python,selection_keyboard
+5523,10801647,"test.ipynb",27,0,"l",python,content
+5524,10801647,"test.ipynb",28,0,"",python,selection_keyboard
+5525,10801807,"test.ipynb",28,0,"a",python,content
+5526,10801808,"test.ipynb",29,0,"",python,selection_keyboard
+5527,10801813,"test.ipynb",29,0,"m",python,content
+5528,10801813,"test.ipynb",30,0,"",python,selection_keyboard
+5529,10801997,"test.ipynb",30,0,"b",python,content
+5530,10801997,"test.ipynb",31,0,"",python,selection_keyboard
+5531,10801998,"test.ipynb",31,0,"d",python,content
+5532,10801998,"test.ipynb",32,0,"",python,selection_keyboard
+5533,10802029,"test.ipynb",32,0,"a",python,content
+5534,10802029,"test.ipynb",33,0,"",python,selection_keyboard
+5535,10802228,"test.ipynb",33,0,":",python,content
+5536,10802229,"test.ipynb",34,0,"",python,selection_keyboard
+5537,10802411,"test.ipynb",34,0," ",python,content
+5538,10802412,"test.ipynb",35,0,"",python,selection_keyboard
+5539,10802570,"test.ipynb",34,0,"",python,selection_command
+5540,10802854,"test.ipynb",42,0,"",python,selection_command
+5541,10803234,"test.ipynb",44,0,"",python,selection_command
+5542,10803378,"test.ipynb",44,0,")",python,content
+5543,10803378,"test.ipynb",45,0,"",python,selection_keyboard
+5544,10803902,"test.ipynb",44,0,"",python,selection_command
+5545,10811243,"test.ipynb",0,0,"",python,tab
+5546,10857083,"train_dynamics.py",0,0,"",python,tab
+5547,10857710,"train_dynamics.py",10386,0,"",python,selection_command
+5548,10857840,"train_dynamics.py",10451,0,"",python,selection_command
+5549,10858125,"train_dynamics.py",10386,0,"",python,selection_command
+5550,10858256,"train_dynamics.py",10323,0,"",python,selection_command
+5551,10859043,"train_dynamics.py",10386,0,"",python,selection_command
+5552,10859208,"train_dynamics.py",10442,0,"\n ",python,content
+5553,10859371,"train_dynamics.py",10451,0,"b",python,content
+5554,10859371,"train_dynamics.py",10452,0,"",python,selection_keyboard
+5555,10859440,"train_dynamics.py",10452,0,"r",python,content
+5556,10859440,"train_dynamics.py",10453,0,"",python,selection_keyboard
+5557,10859508,"train_dynamics.py",10453,0,"e",python,content
+5558,10859508,"train_dynamics.py",10454,0,"",python,selection_keyboard
+5559,10859570,"train_dynamics.py",10454,0,"a",python,content
+5560,10859570,"train_dynamics.py",10455,0,"",python,selection_keyboard
+5561,10859587,"train_dynamics.py",10455,0,"k",python,content
+5562,10859587,"train_dynamics.py",10456,0,"",python,selection_keyboard
+5563,10859726,"train_dynamics.py",10456,0,"p",python,content
+5564,10859727,"train_dynamics.py",10457,0,"",python,selection_keyboard
+5565,10859841,"train_dynamics.py",10457,0,"o",python,content
+5566,10859842,"train_dynamics.py",10458,0,"",python,selection_keyboard
+5567,10859888,"train_dynamics.py",10458,0,"i",python,content
+5568,10859889,"train_dynamics.py",10459,0,"",python,selection_keyboard
+5569,10859987,"train_dynamics.py",10459,0,"n",python,content
+5570,10859988,"train_dynamics.py",10460,0,"",python,selection_keyboard
+5571,10860071,"train_dynamics.py",10460,0,"t",python,content
+5572,10860072,"train_dynamics.py",10461,0,"",python,selection_keyboard
+5573,10860321,"train_dynamics.py",10461,0,"()",python,content
+5574,10860322,"train_dynamics.py",10462,0,"",python,selection_keyboard
+5575,10860388,"train_dynamics.py",10462,1,")",python,content
+5576,10860389,"train_dynamics.py",10463,0,"",python,selection_keyboard
+5577,10860584,"train_dynamics.py",10462,0,"",python,selection_command
+5578,11018360,"test.ipynb",0,0,"",python,tab
+5579,11018361,"test.ipynb",0,0,"",python,selection_mouse
+5580,11019462,"test.ipynb",0,0,"\n",python,content
+5581,11020551,"test.ipynb",0,0,"s",python,content
+5582,11020552,"test.ipynb",1,0,"",python,selection_keyboard
+5583,11020948,"test.ipynb",0,1,"",python,content
+5584,11020977,"test.ipynb",0,0,"a",python,content
+5585,11020978,"test.ipynb",1,0,"",python,selection_keyboard
+5586,11021039,"test.ipynb",1,0,"b",python,content
+5587,11021039,"test.ipynb",2,0,"",python,selection_keyboard
+5588,11021101,"test.ipynb",2,0,"s",python,content
+5589,11021102,"test.ipynb",3,0,"",python,selection_keyboard
+5590,11021602,"test.ipynb",3,0,"t",python,content
+5591,11021603,"test.ipynb",4,0,"",python,selection_keyboard
+5592,11021756,"test.ipynb",4,0,"r",python,content
+5593,11021756,"test.ipynb",5,0,"",python,selection_keyboard
+5594,11021818,"test.ipynb",5,0,"a",python,content
+5595,11021819,"test.ipynb",6,0,"",python,selection_keyboard
+5596,11021996,"test.ipynb",6,0,"c",python,content
+5597,11021996,"test.ipynb",7,0,"",python,selection_keyboard
+5598,11022106,"test.ipynb",7,0,"t",python,content
+5599,11022106,"test.ipynb",8,0,"",python,selection_keyboard
+5600,11022367,"test.ipynb",8,0,"_",python,content
+5601,11022367,"test.ipynb",9,0,"",python,selection_keyboard
+5602,11022557,"test.ipynb",9,0,"o",python,content
+5603,11022558,"test.ipynb",10,0,"",python,selection_keyboard
+5604,11022629,"test.ipynb",10,0,"p",python,content
+5605,11022630,"test.ipynb",11,0,"",python,selection_keyboard
+5606,11022708,"test.ipynb",11,0,"t",python,content
+5607,11022708,"test.ipynb",12,0,"",python,selection_keyboard
+5608,11023229,"test.ipynb",12,0,"i",python,content
+5609,11023229,"test.ipynb",13,0,"",python,selection_keyboard
+5610,11023348,"test.ipynb",13,0,"m",python,content
+5611,11023348,"test.ipynb",14,0,"",python,selection_keyboard
+5612,11023394,"test.ipynb",14,0,"i",python,content
+5613,11023395,"test.ipynb",15,0,"",python,selection_keyboard
+5614,11023455,"test.ipynb",15,0,"z",python,content
+5615,11023455,"test.ipynb",16,0,"",python,selection_keyboard
+5616,11023569,"test.ipynb",16,0,"e",python,content
+5617,11023570,"test.ipynb",17,0,"",python,selection_keyboard
+5618,11023662,"test.ipynb",17,0,"r",python,content
+5619,11023662,"test.ipynb",18,0,"",python,selection_keyboard
+5620,11023740,"test.ipynb",18,0," ",python,content
+5621,11023740,"test.ipynb",19,0,"",python,selection_keyboard
+5622,11023886,"test.ipynb",19,0,"=",python,content
+5623,11023886,"test.ipynb",20,0,"",python,selection_keyboard
+5624,11024092,"test.ipynb",20,0," ",python,content
+5625,11024093,"test.ipynb",21,0,"",python,selection_keyboard
+5626,11024347,"test.ipynb",21,0,"n",python,content
+5627,11024347,"test.ipynb",22,0,"",python,selection_keyboard
+5628,11024987,"test.ipynb",22,0,"n",python,content
+5629,11024987,"test.ipynb",23,0,"",python,selection_keyboard
+5630,11025141,"test.ipynb",23,0,"x",python,content
+5631,11025142,"test.ipynb",24,0,"",python,selection_keyboard
+5632,11025231,"test.ipynb",24,0,".",python,content
+5633,11025231,"test.ipynb",25,0,"",python,selection_keyboard
+5634,11025321,"test.ipynb",25,0,"e",python,content
+5635,11025322,"test.ipynb",26,0,"",python,selection_keyboard
+5636,11025454,"test.ipynb",26,0,"v",python,content
+5637,11025455,"test.ipynb",27,0,"",python,selection_keyboard
+5638,11025505,"test.ipynb",27,0,"a",python,content
+5639,11025506,"test.ipynb",28,0,"",python,selection_keyboard
+5640,11025666,"test.ipynb",28,0,"l",python,content
+5641,11025666,"test.ipynb",29,0,"",python,selection_keyboard
+5642,11025893,"test.ipynb",29,0,"_",python,content
+5643,11025893,"test.ipynb",30,0,"",python,selection_keyboard
+5644,11026063,"test.ipynb",30,0,"s",python,content
+5645,11026064,"test.ipynb",31,0,"",python,selection_keyboard
+5646,11026090,"test.ipynb",31,0,"h",python,content
+5647,11026090,"test.ipynb",32,0,"",python,selection_keyboard
+5648,11026291,"test.ipynb",32,0,"a",python,content
+5649,11026292,"test.ipynb",33,0,"",python,selection_keyboard
+5650,11026378,"test.ipynb",33,0,"p",python,content
+5651,11026378,"test.ipynb",34,0,"",python,selection_keyboard
+5652,11026471,"test.ipynb",34,0,"e",python,content
+5653,11026471,"test.ipynb",35,0,"",python,selection_keyboard
+5654,11026748,"test.ipynb",35,0,"()",python,content
+5655,11026748,"test.ipynb",36,0,"",python,selection_keyboard
+5656,11027075,"test.ipynb",36,0,"l",python,content
+5657,11027075,"test.ipynb",37,0,"",python,selection_keyboard
+5658,11027238,"test.ipynb",37,0,"a",python,content
+5659,11027239,"test.ipynb",38,0,"",python,selection_keyboard
+5660,11027239,"test.ipynb",38,0,"m",python,content
+5661,11027239,"test.ipynb",39,0,"",python,selection_keyboard
+5662,11027393,"test.ipynb",39,0,"b",python,content
+5663,11027394,"test.ipynb",40,0,"",python,selection_keyboard
+5664,11027423,"test.ipynb",40,0,"d",python,content
+5665,11027423,"test.ipynb",41,0,"",python,selection_keyboard
+5666,11027471,"test.ipynb",41,0,"a",python,content
+5667,11027471,"test.ipynb",42,0,"",python,selection_keyboard
+5668,11027827,"test.ipynb",42,0,":",python,content
+5669,11027827,"test.ipynb",43,0,"",python,selection_keyboard
+5670,11027906,"test.ipynb",43,0," ",python,content
+5671,11027907,"test.ipynb",44,0,"",python,selection_keyboard
+5672,11028045,"test.ipynb",44,0,"o",python,content
+5673,11028046,"test.ipynb",45,0,"",python,selection_keyboard
+5674,11028086,"test.ipynb",45,0,"p",python,content
+5675,11028086,"test.ipynb",46,0,"",python,selection_keyboard
+5676,11028374,"test.ipynb",46,0,"t",python,content
+5677,11028374,"test.ipynb",47,0,"",python,selection_keyboard
+5678,11028456,"test.ipynb",47,0,"i",python,content
+5679,11028457,"test.ipynb",48,0,"",python,selection_keyboard
+5680,11028491,"test.ipynb",48,0,"m",python,content
+5681,11028491,"test.ipynb",49,0,"",python,selection_keyboard
+5682,11028609,"test.ipynb",49,0,"i",python,content
+5683,11028609,"test.ipynb",50,0,"",python,selection_keyboard
+5684,11028673,"test.ipynb",50,0,"z",python,content
+5685,11028673,"test.ipynb",51,0,"",python,selection_keyboard
+5686,11028722,"test.ipynb",51,0,"e",python,content
+5687,11028722,"test.ipynb",52,0,"",python,selection_keyboard
+5688,11028812,"test.ipynb",52,0,"r",python,content
+5689,11028812,"test.ipynb",53,0,"",python,selection_keyboard
+5690,11029058,"test.ipynb",53,1,")",python,content
+5691,11029058,"test.ipynb",54,0,"",python,selection_keyboard
+5692,11029527,"test.ipynb",54,0,"\n",python,content
+5693,11030628,"test.ipynb",55,0,"a",python,content
+5694,11030629,"test.ipynb",56,0,"",python,selection_keyboard
+5695,11030708,"test.ipynb",56,0,"b",python,content
+5696,11030709,"test.ipynb",57,0,"",python,selection_keyboard
+5697,11030774,"test.ipynb",57,0,"s",python,content
+5698,11030775,"test.ipynb",58,0,"",python,selection_keyboard
+5699,11030909,"test.ipynb",58,0,"t",python,content
+5700,11030910,"test.ipynb",59,0,"",python,selection_keyboard
+5701,11031055,"test.ipynb",59,0,"r",python,content
+5702,11031056,"test.ipynb",60,0,"",python,selection_keyboard
+5703,11031073,"test.ipynb",60,0,"a",python,content
+5704,11031074,"test.ipynb",61,0,"",python,selection_keyboard
+5705,11031225,"test.ipynb",61,0,"c",python,content
+5706,11031225,"test.ipynb",62,0,"",python,selection_keyboard
+5707,11031433,"test.ipynb",62,0,"t",python,content
+5708,11031433,"test.ipynb",63,0,"",python,selection_keyboard
+5709,11031569,"test.ipynb",63,0,"_",python,content
+5710,11031569,"test.ipynb",64,0,"",python,selection_keyboard
+5711,11031754,"test.ipynb",64,0,"o",python,content
+5712,11031754,"test.ipynb",65,0,"",python,selection_keyboard
+5713,11031842,"test.ipynb",65,0,"p",python,content
+5714,11031842,"test.ipynb",66,0,"",python,selection_keyboard
+5715,11031957,"test.ipynb",66,0,"t",python,content
+5716,11031958,"test.ipynb",67,0,"",python,selection_keyboard
+5717,11033111,"test.ipynb",55,12,"abstract_optimizer_state",python,content
+5718,11033735,"test.ipynb",79,0," ",python,content
+5719,11033736,"test.ipynb",80,0,"",python,selection_keyboard
+5720,11033787,"test.ipynb",80,0,"=",python,content
+5721,11033787,"test.ipynb",81,0,"",python,selection_keyboard
+5722,11033929,"test.ipynb",81,0," ",python,content
+5723,11033929,"test.ipynb",82,0,"",python,selection_keyboard
+5724,11034303,"test.ipynb",82,0,"nnx.state(abstract_optimizer)",python,content
+5725,11034784,"test.ipynb",110,0,"",python,selection_command
+5726,11035122,"test.ipynb",167,0,"",python,selection_command
+5727,11035736,"test.ipynb",166,0,"",python,selection_command
+5728,11035988,"test.ipynb",157,0,"",python,selection_command
+5729,11036009,"test.ipynb",155,0,"",python,selection_command
+5730,11036037,"test.ipynb",149,0,"",python,selection_command
+5731,11036152,"test.ipynb",148,0,"",python,selection_command
+5732,11036153,"test.ipynb",138,0,"",python,selection_command
+5733,11036313,"test.ipynb",148,0,"",python,selection_command
+5734,11036442,"test.ipynb",149,0,"",python,selection_command
+5735,11036768,"test.ipynb",148,0,"",python,selection_command
+5736,11036932,"test.ipynb",138,0,"",python,selection_command
+5737,11037058,"test.ipynb",137,0,"",python,selection_command
+5738,11037204,"test.ipynb",134,0,"",python,selection_command
+5739,11037331,"test.ipynb",133,0,"",python,selection_command
+5740,11037481,"test.ipynb",128,0,"",python,selection_command
+5741,11037901,"test.ipynb",124,63,"",python,content
+5742,11039439,"test.ipynb",124,0,"abstract_optimizer_state",python,content
+5743,11043909,"test.ipynb",148,0,".",python,content
+5744,11043910,"test.ipynb",149,0,"",python,selection_keyboard
+5745,11049534,"test.ipynb",149,0,"m",python,content
+5746,11049534,"test.ipynb",150,0,"",python,selection_keyboard
+5747,11049535,"test.ipynb",150,0,"o",python,content
+5748,11049535,"test.ipynb",151,0,"",python,selection_keyboard
+5749,11049536,"test.ipynb",151,0,"d",python,content
+5750,11049537,"test.ipynb",152,0,"",python,selection_keyboard
+5751,11049538,"test.ipynb",152,0,"e",python,content
+5752,11049538,"test.ipynb",153,0,"",python,selection_keyboard
+5753,11049540,"test.ipynb",153,0,"l",python,content
+5754,11049540,"test.ipynb",154,0,"",python,selection_keyboard
+5755,11049541,"test.ipynb",154,0,".",python,content
+5756,11049541,"test.ipynb",155,0,"",python,selection_keyboard
+5757,11049543,"test.ipynb",155,0,"tokenizer.vq",python,content
+5758,11049551,"test.ipynb",168,0,"",python,selection_mouse
+5759,11054642,"test.ipynb",168,0,")",python,content
+5760,11054642,"test.ipynb",169,0,"",python,selection_keyboard
+5761,11054644,"test.ipynb",168,1,"",python,content
+5762,11055163,"test.ipynb",167,0,"",python,selection_command
+5763,11073053,"test.ipynb",112,56,"nnx.display(abstract_optimizer_state.model.tokenizer.vq)",python,selection_command
+5764,11073224,"test.ipynb",55,113,"abstract_optimizer_state = nnx.state(abstract_optimizer)\nnnx.display(abstract_optimizer_state.model.tokenizer.vq)",python,selection_command
+5765,11073590,"test.ipynb",0,168,"abstract_optimizer = nnx.eval_shape(lambda: optimizer)\nabstract_optimizer_state = nnx.state(abstract_optimizer)\nnnx.display(abstract_optimizer_state.model.tokenizer.vq)",python,selection_command
+5766,11073911,"test.ipynb",0,0,"",python,selection_command
+5767,11074436,"test.ipynb",168,0,"))",python,content
+5768,11074438,"test.ipynb",142,6,"",python,content
+5769,11074439,"test.ipynb",133,0,"shape(lambda: ",python,content
+5770,11074439,"test.ipynb",132,0,"e(nnx.eval",python,content
+5771,11074440,"test.ipynb",130,1,"",python,content
+5772,11074442,"test.ipynb",128,1,"",python,content
+5773,11074443,"test.ipynb",124,2,"nnx.",python,content
+5774,11074451,"test.ipynb",128,0,"",python,selection_command
+5775,11074626,"test.ipynb",0,112,"",python,content
+5776,11074628,"test.ipynb",0,0,"",python,selection_command
+5777,11074801,"test.ipynb",37,8,"",python,content
+5778,11074803,"test.ipynb",37,0,"",python,selection_command
+5779,11077060,"test.ipynb",37,0,"lambda: ",python,content
+5780,11077062,"test.ipynb",37,0,"",python,selection_command
+5781,11077973,"test.ipynb",76,0,"",python,selection_command
+5782,11078431,"test.ipynb",76,0,"\n",python,content
+5783,11078632,"test.ipynb",77,0,"\n",python,content
+5784,11078939,"test.ipynb",78,0,"/home/franz.srambical/jafar",python,content
+5785,11078940,"test.ipynb",105,0,"",python,selection_keyboard
+5786,11079730,"test.ipynb",104,1,"",python,content
+5787,11079959,"test.ipynb",103,1,"",python,content
+5788,11080219,"test.ipynb",102,1,"",python,content
+5789,11080238,"test.ipynb",101,1,"",python,content
+5790,11080269,"test.ipynb",100,1,"",python,content
+5791,11080303,"test.ipynb",99,1,"",python,content
+5792,11080395,"test.ipynb",98,1,"",python,content
+5793,11080397,"test.ipynb",97,1,"",python,content
+5794,11080404,"test.ipynb",96,1,"",python,content
+5795,11080436,"test.ipynb",95,1,"",python,content
+5796,11080469,"test.ipynb",94,1,"",python,content
+5797,11080505,"test.ipynb",93,1,"",python,content
+5798,11080537,"test.ipynb",92,1,"",python,content
+5799,11080574,"test.ipynb",91,1,"",python,content
+5800,11080607,"test.ipynb",90,1,"",python,content
+5801,11080637,"test.ipynb",89,1,"",python,content
+5802,11080728,"test.ipynb",88,1,"",python,content
+5803,11080730,"test.ipynb",87,1,"",python,content
+5804,11080768,"test.ipynb",86,1,"",python,content
+5805,11080798,"test.ipynb",85,1,"",python,content
+5806,11080816,"test.ipynb",84,1,"",python,content
+5807,11080920,"test.ipynb",83,1,"",python,content
+5808,11080922,"test.ipynb",82,1,"",python,content
+5809,11080924,"test.ipynb",81,1,"",python,content
+5810,11081056,"test.ipynb",80,1,"",python,content
+5811,11081253,"test.ipynb",79,1,"",python,content
+5812,11081778,"test.ipynb",78,1,"",python,content
+5813,11081969,"test.ipynb",78,0,"\nabstract_optimizer = nnx.eval_shape(lambda: optimizer)\nabstract_optimizer_state = nnx.state(abstract_optimizer)\nnnx.display(abstract_optimizer_state.model.tokenizer.vq)",python,content
+5814,11081971,"test.ipynb",79,0,"",python,selection_command
+5815,11083690,"test.ipynb",79,1,"a",python,selection_command
+5816,11083875,"test.ipynb",79,1,"a",python,selection_command
+5817,11083972,"test.ipynb",79,1,"a",python,selection_command
+5818,11084592,"test.ipynb",79,0,"",python,selection_command
+5819,11084713,"test.ipynb",191,0," ",python,content
+5820,11084714,"test.ipynb",134,0," ",python,content
+5821,11084714,"test.ipynb",79,0," ",python,content
+5822,11084714,"test.ipynb",80,0,"",python,selection_keyboard
+5823,11085168,"test.ipynb",193,1,"",python,content
+5824,11085168,"test.ipynb",135,1,"",python,content
+5825,11085168,"test.ipynb",79,1,"",python,content
+5826,11085288,"test.ipynb",191,0,"#",python,content
+5827,11085288,"test.ipynb",134,0,"#",python,content
+5828,11085288,"test.ipynb",79,0,"#",python,content
+5829,11085288,"test.ipynb",80,0,"",python,selection_keyboard
+5830,11085336,"test.ipynb",194,0," ",python,content
+5831,11085336,"test.ipynb",136,0," ",python,content
+5832,11085336,"test.ipynb",80,0," ",python,content
+5833,11085336,"test.ipynb",81,0,"",python,selection_keyboard
+5834,11085542,"test.ipynb",80,0,"",python,selection_command
+5835,11091930,"test.ipynb",80,1," ",python,selection_command
+5836,11092264,"test.ipynb",79,2,"# ",python,selection_command
+5837,11092454,"test.ipynb",79,2,"# ",python,selection_command
+5838,11092577,"test.ipynb",79,2,"# ",python,selection_command
+5839,11092787,"test.ipynb",195,2,"",python,content
+5840,11092788,"test.ipynb",136,2,"",python,content
+5841,11092788,"test.ipynb",79,2,"",python,content
+5842,11092790,"test.ipynb",79,0,"",python,selection_command
+5843,11093057,"test.ipynb",78,0,"",python,selection_command
+5844,11093376,"test.ipynb",77,0,"",python,selection_command
+5845,11093546,"test.ipynb",0,0,"",python,selection_command
+5846,11093862,"test.ipynb",0,0,"#",python,content
+5847,11093862,"test.ipynb",1,0,"",python,selection_keyboard
+5848,11093913,"test.ipynb",1,0," ",python,content
+5849,11093913,"test.ipynb",2,0,"",python,selection_keyboard
+5850,11104345,"test.ipynb",1,0,"",python,selection_command
+5851,11104522,"test.ipynb",79,0,"",python,selection_command
+5852,11104670,"test.ipynb",80,0,"",python,selection_command
+5853,11104791,"test.ipynb",82,0,"",python,selection_command
+5854,11104925,"test.ipynb",100,0,"",python,selection_command
+5855,11105188,"test.ipynb",102,0,"",python,selection_command
+5856,11105199,"test.ipynb",105,0,"",python,selection_command
+5857,11105233,"test.ipynb",106,0,"",python,selection_command
+5858,11105268,"test.ipynb",116,0,"",python,selection_command
+5859,11105300,"test.ipynb",117,0,"",python,selection_command
+5860,11105454,"test.ipynb",123,0,"",python,selection_command
+5861,11105738,"test.ipynb",133,0,"",python,selection_command
+5862,11105872,"test.ipynb",134,0,"",python,selection_command
+5863,11106374,"test.ipynb",133,0,"",python,selection_command
+5864,11106971,"test.ipynb",134,0,"",python,selection_command
+5865,11107977,"test.ipynb",134,0,".",python,content
+5866,11107978,"test.ipynb",135,0,"",python,selection_keyboard
+5867,11109593,"test.ipynb",135,0,"o",python,content
+5868,11109594,"test.ipynb",136,0,"",python,selection_keyboard
+5869,11109635,"test.ipynb",136,0,"d",python,content
+5870,11109635,"test.ipynb",137,0,"",python,selection_keyboard
+5871,11109673,"test.ipynb",137,0,"e",python,content
+5872,11109673,"test.ipynb",138,0,"",python,selection_keyboard
+5873,11109768,"test.ipynb",138,0,"l",python,content
+5874,11109768,"test.ipynb",139,0,"",python,selection_keyboard
+5875,11109959,"test.ipynb",139,0,".",python,content
+5876,11109960,"test.ipynb",140,0,"",python,selection_keyboard
+5877,11110282,"test.ipynb",139,1,"",python,content
+5878,11110410,"test.ipynb",138,1,"",python,content
+5879,11110563,"test.ipynb",137,1,"",python,content
+5880,11110696,"test.ipynb",136,1,"",python,content
+5881,11110855,"test.ipynb",135,1,"",python,content
+5882,11111075,"test.ipynb",135,0,"m",python,content
+5883,11111075,"test.ipynb",136,0,"",python,selection_keyboard
+5884,11111118,"test.ipynb",136,0,"o",python,content
+5885,11111119,"test.ipynb",137,0,"",python,selection_keyboard
+5886,11111294,"test.ipynb",137,0,"d",python,content
+5887,11111294,"test.ipynb",138,0,"",python,selection_keyboard
+5888,11111335,"test.ipynb",138,0,"e",python,content
+5889,11111335,"test.ipynb",139,0,"",python,selection_keyboard
+5890,11111467,"test.ipynb",139,0,"l",python,content
+5891,11111467,"test.ipynb",140,0,"",python,selection_keyboard
+5892,11111703,"test.ipynb",140,0,".",python,content
+5893,11111703,"test.ipynb",141,0,"",python,selection_keyboard
+5894,11111900,"test.ipynb",141,0,"t",python,content
+5895,11111901,"test.ipynb",142,0,"",python,selection_keyboard
+5896,11112027,"test.ipynb",142,0,"o",python,content
+5897,11112027,"test.ipynb",143,0,"",python,selection_keyboard
+5898,11112055,"test.ipynb",143,0,"k",python,content
+5899,11112055,"test.ipynb",144,0,"",python,selection_keyboard
+5900,11112145,"test.ipynb",144,0,"e",python,content
+5901,11112146,"test.ipynb",145,0,"",python,selection_keyboard
+5902,11112287,"test.ipynb",145,0,"n",python,content
+5903,11112287,"test.ipynb",146,0,"",python,selection_keyboard
+5904,11112344,"test.ipynb",146,0,"i",python,content
+5905,11112344,"test.ipynb",147,0,"",python,selection_keyboard
+5906,11112404,"test.ipynb",147,0,"z",python,content
+5907,11112405,"test.ipynb",148,0,"",python,selection_keyboard
+5908,11112576,"test.ipynb",148,0,"e",python,content
+5909,11112576,"test.ipynb",149,0,"",python,selection_keyboard
+5910,11112662,"test.ipynb",149,0,"r",python,content
+5911,11112662,"test.ipynb",150,0,"",python,selection_keyboard
+5912,11112825,"test.ipynb",150,0,".",python,content
+5913,11112825,"test.ipynb",151,0,"",python,selection_keyboard
+5914,11113112,"test.ipynb",151,0,"v",python,content
+5915,11113113,"test.ipynb",152,0,"",python,selection_keyboard
+5916,11113262,"test.ipynb",152,0,"q",python,content
+5917,11113263,"test.ipynb",153,0,"",python,selection_keyboard
+5918,11113390,"test.ipynb",153,0,"q",python,content
+5919,11113390,"test.ipynb",154,0,"",python,selection_keyboard
+5920,11113805,"test.ipynb",153,0,"",python,selection_command
+5921,11114249,"test.ipynb",153,1,"",python,content
+5922,11114570,"test.ipynb",210,0,"",python,selection_command
+5923,11114730,"test.ipynb",267,0,"",python,selection_command
+5924,11115222,"test.ipynb",266,0,"",python,selection_command
+5925,11115547,"test.ipynb",266,1,"q",python,selection_command
+5926,11116480,"test.ipynb",248,19,"",python,content
+5927,11116480,"test.ipynb",153,0,".drop",python,content
+5928,11123326,"test.ipynb",254,0,"",python,selection_command
+5929,11149262,"test.ipynb",197,0,"",python,selection_command
+5930,11149422,"test.ipynb",118,0,"",python,selection_command
+5931,11149554,"test.ipynb",80,0,"",python,selection_command
+5932,11149672,"test.ipynb",79,0,"",python,selection_command
+5933,11153675,"test.ipynb",80,0,"",python,selection_command
+5934,11153836,"test.ipynb",81,0,"",python,selection_command
+5935,11153971,"test.ipynb",160,0,"",python,selection_command
+5936,11154153,"test.ipynb",217,0,"",python,selection_command
+5937,11156077,"test.ipynb",160,0,"",python,selection_command
+5938,11156430,"test.ipynb",217,0,"",python,selection_command
+5939,11156943,"test.ipynb",160,0,"",python,selection_command
+5940,11157057,"test.ipynb",81,0,"",python,selection_command
+5941,11157214,"test.ipynb",80,0,"",python,selection_command
+5942,11157404,"test.ipynb",79,0,"",python,selection_command
+5943,11157461,"test.ipynb",0,0,"",python,selection_command
+5944,11157738,"test.ipynb",78,0,"\nnnx.display(abstract_optimizer_state)",python,content
+5945,11157739,"test.ipynb",79,0,"",python,selection_command
+5946,11159835,"test.ipynb",82,0,"",python,selection_command
+5947,11159943,"test.ipynb",83,0,"",python,selection_command
+5948,11160125,"test.ipynb",90,0,"",python,selection_command
+5949,11160358,"test.ipynb",91,0,"",python,selection_command
+5950,11161306,"test.ipynb",117,0,"",python,selection_command
+5951,11161461,"test.ipynb",118,0,"",python,selection_command
+5952,11161610,"test.ipynb",131,0,"",python,selection_command
+5953,11161757,"test.ipynb",210,0,"",python,selection_command
+5954,11161956,"test.ipynb",223,0,"",python,selection_command
+5955,11162136,"test.ipynb",225,0,"",python,selection_command
+5956,11162260,"test.ipynb",228,0,"",python,selection_command
+5957,11162559,"test.ipynb",225,0,"",python,selection_command
+5958,11162674,"test.ipynb",225,1,"n",python,selection_command
+5959,11162709,"test.ipynb",225,3,"nnx",python,selection_command
+5960,11162888,"test.ipynb",225,4,"nnx.",python,selection_command
+5961,11163042,"test.ipynb",225,9,"nnx.state",python,selection_command
+5962,11163197,"test.ipynb",225,10,"nnx.state(",python,selection_command
+5963,11163378,"test.ipynb",225,28,"nnx.state(abstract_optimizer",python,selection_command
+5964,11163542,"test.ipynb",225,29,"nnx.state(abstract_optimizer)",python,selection_command
+5965,11163906,"test.ipynb",225,29,"",python,content
+5966,11163915,"test.ipynb",224,0,"",python,selection_command
+5967,11164029,"test.ipynb",146,0,"",python,selection_command
+5968,11164220,"test.ipynb",118,0,"",python,selection_command
+5969,11164301,"test.ipynb",117,0,"",python,selection_command
+5970,11164746,"test.ipynb",106,0,"",python,selection_command
+5971,11164915,"test.ipynb",91,0,"",python,selection_command
+5972,11165079,"test.ipynb",91,1,"a",python,selection_command
+5973,11165090,"test.ipynb",91,24,"abstract_optimizer_state",python,selection_command
+5974,11165270,"test.ipynb",91,24,"nnx.state(abstract_optimizer)",python,content
+5975,11165273,"test.ipynb",119,0,"",python,selection_command
+5976,11165796,"test.ipynb",122,0,"",python,selection_command
+5977,11165869,"test.ipynb",123,0,"",python,selection_command
+5978,11166003,"test.ipynb",164,0,"",python,selection_command
+5979,11166320,"test.ipynb",160,0,"",python,selection_command
+5980,11166434,"test.ipynb",159,0,"",python,selection_command
+5981,11166652,"test.ipynb",149,0,"",python,selection_command
+5982,11166712,"test.ipynb",148,0,"",python,selection_command
+5983,11166851,"test.ipynb",145,0,"",python,selection_command
+5984,11167176,"test.ipynb",145,1,"n",python,selection_command
+5985,11167177,"test.ipynb",145,3,"nnx",python,selection_command
+5986,11167394,"test.ipynb",145,4,"nnx.",python,selection_command
+5987,11167423,"test.ipynb",145,14,"nnx.eval_shape",python,selection_command
+5988,11167452,"test.ipynb",145,15,"nnx.eval_shape(",python,selection_command
+5989,11167483,"test.ipynb",145,21,"nnx.eval_shape(lambda",python,selection_command
+5990,11167518,"test.ipynb",145,22,"nnx.eval_shape(lambda:",python,selection_command
+5991,11167544,"test.ipynb",145,32,"nnx.eval_shape(lambda: optimizer",python,selection_command
+5992,11167577,"test.ipynb",145,33,"nnx.eval_shape(lambda: optimizer.",python,selection_command
+5993,11167712,"test.ipynb",145,38,"nnx.eval_shape(lambda: optimizer.model",python,selection_command
+5994,11167893,"test.ipynb",145,39,"nnx.eval_shape(lambda: optimizer.model.",python,selection_command
+5995,11168057,"test.ipynb",145,48,"nnx.eval_shape(lambda: optimizer.model.tokenizer",python,selection_command
+5996,11168226,"test.ipynb",145,49,"nnx.eval_shape(lambda: optimizer.model.tokenizer.",python,selection_command
+5997,11168439,"test.ipynb",145,51,"nnx.eval_shape(lambda: optimizer.model.tokenizer.vq",python,selection_command
+5998,11168605,"test.ipynb",145,52,"nnx.eval_shape(lambda: optimizer.model.tokenizer.vq.",python,selection_command
+5999,11168819,"test.ipynb",145,56,"nnx.eval_shape(lambda: optimizer.model.tokenizer.vq.drop",python,selection_command
+6000,11169023,"test.ipynb",145,57,"nnx.eval_shape(lambda: optimizer.model.tokenizer.vq.drop)",python,selection_command
+6001,11169465,"test.ipynb",145,57,"",python,content
+6002,11169467,"test.ipynb",144,0,"",python,selection_command
+6003,11169535,"test.ipynb",123,0,"",python,selection_command
+6004,11169683,"test.ipynb",122,0,"",python,selection_command
+6005,11169812,"test.ipynb",100,0,"",python,selection_command
+6006,11169990,"test.ipynb",101,0,"",python,selection_command
+6007,11170343,"test.ipynb",101,1,"a",python,selection_command
+6008,11170401,"test.ipynb",101,18,"abstract_optimizer",python,selection_command
+6009,11170515,"test.ipynb",101,18,"nnx.eval_shape(lambda: optimizer.model.tokenizer.vq.drop)",python,content
+6010,11170517,"test.ipynb",157,0,"",python,selection_command
+6011,11170953,"test.ipynb",161,0,"",python,selection_command
+6012,11171105,"test.ipynb",162,0,"",python,selection_command
+6013,11171623,"test.ipynb",162,22,"\nabstract_optimizer = ",python,selection_command
+6014,11172144,"test.ipynb",161,89,"",python,content
+6015,11172795,"test.ipynb",160,1,"",python,content
+6016,11172799,"test.ipynb",79,0,"",python,selection_command
+6017,11176822,"test.ipynb",0,0,"",python,selection_command
+6018,11179805,"test.ipynb",0,1,"",python,content
+6019,11179954,"test.ipynb",0,1,"",python,content
+6020,11184223,"test.ipynb",0,0,"#",python,content
+6021,11184223,"test.ipynb",1,0,"",python,selection_keyboard
+6022,11184253,"test.ipynb",1,0," ",python,content
+6023,11184254,"test.ipynb",2,0,"",python,selection_keyboard
+6024,11184497,"test.ipynb",1,0,"",python,selection_command
+6025,11184671,"test.ipynb",80,0,"",python,selection_command
+6026,11184740,"test.ipynb",82,0,"",python,selection_command
+6027,11185005,"test.ipynb",83,0,"",python,selection_command
+6028,11185018,"test.ipynb",90,0,"",python,selection_command
+6029,11185051,"test.ipynb",91,0,"",python,selection_command
+6030,11185080,"test.ipynb",94,0,"",python,selection_command
+6031,11185198,"test.ipynb",95,0,"",python,selection_command
+6032,11185198,"test.ipynb",100,0,"",python,selection_command
+6033,11185198,"test.ipynb",101,0,"",python,selection_command
+6034,11185214,"test.ipynb",104,0,"",python,selection_command
+6035,11185247,"test.ipynb",105,0,"",python,selection_command
+6036,11185286,"test.ipynb",115,0,"",python,selection_command
+6037,11185317,"test.ipynb",116,0,"",python,selection_command
+6038,11185350,"test.ipynb",122,0,"",python,selection_command
+6039,11185382,"test.ipynb",124,0,"",python,selection_command
+6040,11185415,"test.ipynb",133,0,"",python,selection_command
+6041,11185529,"test.ipynb",134,0,"",python,selection_command
+6042,11185529,"test.ipynb",139,0,"",python,selection_command
+6043,11185529,"test.ipynb",140,0,"",python,selection_command
+6044,11185722,"test.ipynb",149,0,"",python,selection_command
+6045,11185872,"test.ipynb",150,0,"",python,selection_command
+6046,11186244,"test.ipynb",152,0,"",python,selection_command
+6047,11186578,"test.ipynb",152,1,".",python,selection_command
+6048,11186608,"test.ipynb",152,5,".drop",python,selection_command
+6049,11186900,"test.ipynb",152,5,"",python,content
+6050,11190773,"test.ipynb",152,0,".",python,content
+6051,11190773,"test.ipynb",153,0,"",python,selection_keyboard
+6052,11190873,"test.ipynb",153,0,"d",python,content
+6053,11190873,"test.ipynb",154,0,"",python,selection_keyboard
+6054,11190955,"test.ipynb",154,0,"r",python,content
+6055,11190956,"test.ipynb",155,0,"",python,selection_keyboard
+6056,11191110,"test.ipynb",155,0,"o",python,content
+6057,11191111,"test.ipynb",156,0,"",python,selection_keyboard
+6058,11191111,"test.ipynb",156,0,"p",python,content
+6059,11191111,"test.ipynb",157,0,"",python,selection_keyboard
+6060,11196029,"test.ipynb",156,1,"",python,content
+6061,11196260,"test.ipynb",155,1,"",python,content
+6062,11196377,"test.ipynb",154,1,"",python,content
+6063,11196538,"test.ipynb",153,1,"",python,content
+6064,11196707,"test.ipynb",152,1,"",python,content
+6065,11204267,"test.ipynb",151,0,"",python,selection_command
+6066,11205711,"test.ipynb",151,1,"q",python,selection_command
+6067,11205760,"test.ipynb",150,2,"vq",python,selection_command
+6068,11205920,"test.ipynb",149,3,".vq",python,selection_command
+6069,11206056,"test.ipynb",140,12,"tokenizer.vq",python,selection_command
+6070,11206189,"test.ipynb",139,13,".tokenizer.vq",python,selection_command
+6071,11207674,"test.ipynb",139,13,"",python,content
+6072,11208832,"test.ipynb",139,0,".",python,content
+6073,11208833,"test.ipynb",140,0,"",python,selection_keyboard
+6074,11209001,"test.ipynb",140,0,"t",python,content
+6075,11209002,"test.ipynb",141,0,"",python,selection_keyboard
+6076,11209039,"test.ipynb",141,0,"o",python,content
+6077,11209039,"test.ipynb",142,0,"",python,selection_keyboard
+6078,11209101,"test.ipynb",142,0,"k",python,content
+6079,11209101,"test.ipynb",143,0,"",python,selection_keyboard
+6080,11209160,"test.ipynb",143,0,"e",python,content
+6081,11209161,"test.ipynb",144,0,"",python,selection_keyboard
+6082,11209278,"test.ipynb",144,0,"n",python,content
+6083,11209279,"test.ipynb",145,0,"",python,selection_keyboard
+6084,11209354,"test.ipynb",145,0,"i",python,content
+6085,11209355,"test.ipynb",146,0,"",python,selection_keyboard
+6086,11209385,"test.ipynb",146,0,"z",python,content
+6087,11209386,"test.ipynb",147,0,"",python,selection_keyboard
+6088,11209443,"test.ipynb",147,0,"e",python,content
+6089,11209444,"test.ipynb",148,0,"",python,selection_keyboard
+6090,11209504,"test.ipynb",148,0,"r",python,content
+6091,11209505,"test.ipynb",149,0,"",python,selection_keyboard
+6092,11209832,"test.ipynb",148,0,"",python,selection_command
+6093,11221141,"test.ipynb",150,0,"",python,selection_mouse
+6094,11222929,"test.ipynb",151,0,"",python,selection_command
+6095,11223377,"test.ipynb",151,0,".",python,content
+6096,11223377,"test.ipynb",152,0,"",python,selection_keyboard
+6097,11225343,"test.ipynb",151,1,"",python,content
+6098,11225868,"test.ipynb",150,0,"",python,selection_command
+6099,11227910,"test.ipynb",151,0,"",python,selection_command
+6100,11231329,"test.ipynb",151,0,".",python,content
+6101,11231330,"test.ipynb",152,0,"",python,selection_keyboard
+6102,11231407,"test.ipynb",152,0,"v",python,content
+6103,11231407,"test.ipynb",153,0,"",python,selection_keyboard
+6104,11231457,"test.ipynb",153,0,"q",python,content
+6105,11231458,"test.ipynb",154,0,"",python,selection_keyboard
+6106,11238072,"test.ipynb",153,0,"",python,selection_command
+6107,11238407,"test.ipynb",152,0,"",python,selection_command
+6108,11238589,"test.ipynb",149,0,"",python,selection_command
+6109,11238732,"test.ipynb",140,0,"",python,selection_command
+6110,11238865,"test.ipynb",139,0,"",python,selection_command
+6111,11239341,"test.ipynb",139,1,".",python,selection_command
+6112,11239387,"test.ipynb",139,10,".tokenizer",python,selection_command
+6113,11239677,"test.ipynb",139,10,"",python,content
+6114,11240155,"test.ipynb",140,0,"",python,selection_command
+6115,11240318,"test.ipynb",141,0,"",python,selection_command
+6116,11240784,"test.ipynb",140,0,"",python,selection_command
+6117,11240867,"test.ipynb",141,0,".tokenizer",python,content
+6118,11240870,"test.ipynb",150,0,"",python,selection_command
+6119,11253883,"test.ipynb",71,0,"",python,selection_command
+6120,11253923,"test.ipynb",78,0,"\nnnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,content
+6121,11253924,"test.ipynb",79,0,"",python,selection_command
+6122,11263132,"test.ipynb",82,0,"",python,selection_command
+6123,11263322,"test.ipynb",83,0,"",python,selection_command
+6124,11263336,"test.ipynb",90,0,"",python,selection_command
+6125,11263368,"test.ipynb",91,0,"",python,selection_command
+6126,11263400,"test.ipynb",94,0,"",python,selection_command
+6127,11263433,"test.ipynb",95,0,"",python,selection_command
+6128,11263467,"test.ipynb",100,0,"",python,selection_command
+6129,11263502,"test.ipynb",101,0,"",python,selection_command
+6130,11263535,"test.ipynb",104,0,"",python,selection_command
+6131,11263688,"test.ipynb",105,0,"",python,selection_command
+6132,11263688,"test.ipynb",115,0,"",python,selection_command
+6133,11263689,"test.ipynb",116,0,"",python,selection_command
+6134,11263689,"test.ipynb",122,0,"",python,selection_command
+6135,11263706,"test.ipynb",124,0,"",python,selection_command
+6136,11263740,"test.ipynb",133,0,"",python,selection_command
+6137,11263844,"test.ipynb",134,0,"",python,selection_command
+6138,11263845,"test.ipynb",139,0,"",python,selection_command
+6139,11263845,"test.ipynb",142,0,"",python,selection_command
+6140,11263874,"test.ipynb",151,0,"",python,selection_command
+6141,11264369,"test.ipynb",142,0,"",python,selection_command
+6142,11264477,"test.ipynb",139,0,"",python,selection_command
+6143,11264893,"test.ipynb",140,0,"",python,selection_command
+6144,11265135,"test.ipynb",141,0,"",python,selection_command
+6145,11265278,"test.ipynb",141,1,".",python,selection_command
+6146,11265322,"test.ipynb",141,10,".tokenizer",python,selection_command
+6147,11265507,"test.ipynb",141,11,".tokenizer.",python,selection_command
+6148,11265995,"test.ipynb",141,10,".tokenizer",python,selection_command
+6149,11266168,"test.ipynb",141,10,"",python,content
+6150,11266376,"test.ipynb",139,0,"",python,selection_command
+6151,11266701,"test.ipynb",134,0,"",python,selection_command
+6152,11267222,"test.ipynb",138,0,"",python,selection_command
+6153,11267517,"test.ipynb",139,0,".tokenizer",python,content
+6154,11267518,"test.ipynb",148,0,"",python,selection_command
+6155,11272062,"test.ipynb",156,0,"",python,selection_command
+6156,11272393,"test.ipynb",156,0,"#",python,content
+6157,11272393,"test.ipynb",157,0,"",python,selection_keyboard
+6158,11272786,"test.ipynb",157,0," ",python,content
+6159,11272787,"test.ipynb",158,0,"",python,selection_keyboard
+6160,11272997,"test.ipynb",157,0,"",python,selection_command
+6161,11284517,"test.ipynb",80,0,"",python,selection_command
+6162,11284873,"test.ipynb",79,0,"",python,selection_command
+6163,11284988,"test.ipynb",79,0,"#",python,content
+6164,11284989,"test.ipynb",80,0,"",python,selection_keyboard
+6165,11285040,"test.ipynb",80,0," ",python,content
+6166,11285040,"test.ipynb",81,0,"",python,selection_keyboard
+6167,11285251,"test.ipynb",80,0,"",python,selection_command
+6168,11285470,"test.ipynb",159,0,"",python,selection_command
+6169,11285639,"test.ipynb",158,0,"",python,selection_command
+6170,11285729,"test.ipynb",158,1,"",python,content
+6171,11285876,"test.ipynb",158,1,"",python,content
+6172,11289356,"test.ipynb",79,0,"",python,selection_command
+6173,11290171,"test.ipynb",158,0,"",python,selection_command
+6174,11290675,"test.ipynb",158,0,"#",python,content
+6175,11290675,"test.ipynb",159,0,"",python,selection_keyboard
+6176,11290722,"test.ipynb",159,0," ",python,content
+6177,11290722,"test.ipynb",160,0,"",python,selection_keyboard
+6178,11290972,"test.ipynb",159,0,"",python,selection_command
+6179,11291112,"test.ipynb",80,0,"",python,selection_command
+6180,11291290,"test.ipynb",79,0,"",python,selection_command
+6181,11291577,"test.ipynb",0,0,"",python,selection_command
+6182,11292174,"test.ipynb",0,1,"",python,content
+6183,11292304,"test.ipynb",0,1,"",python,content
+6184,11295439,"test.ipynb",0,0,"#",python,content
+6185,11295439,"test.ipynb",1,0,"",python,selection_keyboard
+6186,11295533,"test.ipynb",1,0," ",python,content
+6187,11295533,"test.ipynb",2,0,"",python,selection_keyboard
+6188,11295785,"test.ipynb",1,0,"",python,selection_command
+6189,11295926,"test.ipynb",80,0,"",python,selection_command
+6190,11298177,"test.ipynb",158,1,"",python,content
+6191,11298282,"test.ipynb",158,1,"",python,content
+6192,11301325,"test.ipynb",158,0,"#",python,content
+6193,11301325,"test.ipynb",159,0,"",python,selection_keyboard
+6194,11301357,"test.ipynb",159,0," ",python,content
+6195,11301357,"test.ipynb",160,0,"",python,selection_keyboard
+6196,11301551,"test.ipynb",159,0,"",python,selection_command
+6197,11301619,"test.ipynb",80,0,"",python,selection_command
+6198,11301785,"test.ipynb",79,0,"",python,selection_command
+6199,11301893,"test.ipynb",79,1,"",python,content
+6200,11302020,"test.ipynb",79,1,"",python,content
+6201,11303989,"test.ipynb",79,0,"#",python,content
+6202,11303989,"test.ipynb",80,0,"",python,selection_keyboard
+6203,11304041,"test.ipynb",80,0," ",python,content
+6204,11304041,"test.ipynb",81,0,"",python,selection_keyboard
+6205,11304234,"test.ipynb",80,0,"",python,selection_command
+6206,11304372,"test.ipynb",159,0,"",python,selection_command
+6207,11304549,"test.ipynb",158,0,"",python,selection_command
+6208,11304664,"test.ipynb",158,1,"",python,content
+6209,11305375,"test.ipynb",158,1,"",python,content
+6210,11353334,"test.ipynb",158,76,"nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,selection_command
+6211,11353486,"test.ipynb",79,155,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq)\nnnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,selection_command
+6212,11353669,"test.ipynb",0,234,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq)\nnnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,selection_command
+6213,11353840,"test.ipynb",0,0,"",python,selection_command
+6214,11372790,"test.ipynb",0,78,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))",python,selection_command
+6215,11373028,"test.ipynb",0,157,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq)",python,selection_command
+6216,11373143,"test.ipynb",0,234,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq)\nnnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,selection_command
+6217,11448614,"test.ipynb",165,0,"",python,selection_mouse
+6218,11449435,"test.ipynb",86,0,"",python,selection_command
+6219,11449675,"test.ipynb",79,0,"",python,selection_command
+6220,11450103,"test.ipynb",79,1,"",python,content
+6221,11450317,"test.ipynb",79,1,"",python,content
+6222,11450406,"test.ipynb",156,0,"",python,selection_command
+6223,11450740,"test.ipynb",156,0,"#",python,content
+6224,11450740,"test.ipynb",157,0,"",python,selection_keyboard
+6225,11450842,"test.ipynb",157,0," ",python,content
+6226,11450842,"test.ipynb",158,0,"",python,selection_keyboard
+6227,11451174,"test.ipynb",157,0,"",python,selection_command
+6228,11513053,"test.ipynb",81,0,"",python,selection_mouse
+6229,11513870,"test.ipynb",79,0,"",python,selection_command
+6230,11514485,"test.ipynb",79,0,"#",python,content
+6231,11514486,"test.ipynb",80,0,"",python,selection_keyboard
+6232,11514531,"test.ipynb",80,0," ",python,content
+6233,11514531,"test.ipynb",81,0,"",python,selection_keyboard
+6234,11514689,"test.ipynb",80,0,"",python,selection_command
+6235,11514984,"test.ipynb",79,0,"",python,selection_command
+6236,11515250,"test.ipynb",158,0,"",python,selection_command
+6237,11515374,"test.ipynb",158,1,"",python,content
+6238,11515517,"test.ipynb",158,1,"",python,content
+6239,11938267,"test.ipynb",32,0,"",python,selection_mouse
+6240,11938451,"test.ipynb",28,10,"eval_shape",python,selection_mouse
+6241,11938565,"test.ipynb",0,79,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))\n",python,selection_mouse
+6242,11939327,"test.ipynb",34,0,"",python,selection_mouse
+6243,11939401,"test.ipynb",28,10,"eval_shape",python,selection_mouse
+6244,11939535,"test.ipynb",0,79,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))\n",python,selection_mouse
+6245,11939742,"test.ipynb",0,158,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq)\n",python,selection_mouse
+6246,11939901,"test.ipynb",0,234,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)))\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq)\nnnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,selection_mouse
+6247,11940983,"test.ipynb",233,0,"",python,selection_command
+6248,12356753,"train_dynamics.py",0,0,"",python,tab
+6249,12359716,"train_dynamics.py",10397,0,"",python,selection_command
+6250,12359851,"train_dynamics.py",10334,0,"",python,selection_command
+6251,12369362,"test.ipynb",0,0,"",python,tab
+6252,12369362,"test.ipynb",211,0,"",python,selection_mouse
+6253,12370570,"test.ipynb",212,0,"",python,selection_command
+6254,12370837,"test.ipynb",212,1,".",python,selection_command
+6255,12370881,"test.ipynb",212,6,".model",python,selection_command
+6256,12371188,"test.ipynb",212,6,"",python,content
+6257,12371789,"test.ipynb",213,0,"",python,selection_command
+6258,12372357,"test.ipynb",214,0,".model",python,content
+6259,12372372,"test.ipynb",219,0,"",python,selection_command
+6260,12374618,"test.ipynb",215,0,"",python,selection_command
+6261,12374755,"test.ipynb",212,0,"",python,selection_command
+6262,12375195,"test.ipynb",213,0,"",python,selection_command
+6263,12409927,"train_dynamics.py",0,0,"",python,tab
+6264,12410231,"train_dynamics.py",10342,0,"",python,selection_command
+6265,12410381,"train_dynamics.py",10344,0,"",python,selection_command
+6266,12410533,"train_dynamics.py",10347,0,"",python,selection_command
+6267,12410663,"train_dynamics.py",10348,0,"",python,selection_command
+6268,12412314,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",0,0,"# Copyright 2024 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# pytype: skip-file\nfrom __future__ import annotations\n\nfrom abc import abstractmethod\nimport dataclasses\nimport functools\nimport inspect\nimport typing as tp\n\nfrom jax._src import checkify as checkify_lib\n\nfrom flax.nnx import (\n extract,\n graph,\n)\nfrom flax.nnx.module import Module\nfrom flax.nnx.proxy_caller import (\n CallableProxy,\n DelayedAccessor,\n)\nfrom flax.nnx.transforms import general\nfrom flax.typing import MISSING, Leaf, Missing\nimport jax\nimport jax.core\nimport jax.stages\n\nA = tp.TypeVar('A')\nC = tp.TypeVar('C')\nB = tp.TypeVar('B')\nF = tp.TypeVar('F', bound=tp.Callable[..., tp.Any])\nG = tp.TypeVar('G', bound=tp.Callable[..., tp.Any])\nM = tp.TypeVar('M', bound=Module)\nMA = tp.TypeVar('MA', bound=Module)\nN = tp.TypeVar('N', bound=Module)\nStrInt = tp.TypeVar('StrInt', str, int)\nAxisName = tp.Hashable\nLeaves = tp.List[Leaf]\nIndex = int\n\n\n@tp.overload\ndef resolve_kwargs(\n fun: tp.Callable[..., tp.Any],\n args: tuple,\n kwargs: dict[str, tp.Any],\n) -> tuple: ...\n@tp.overload\ndef resolve_kwargs() -> tp.Callable[[F], F]: ...\ndef resolve_kwargs(\n fun: tp.Callable[..., tp.Any] | Missing = MISSING,\n args: tuple | Missing = MISSING,\n kwargs: dict[str, tp.Any] | Missing = MISSING,\n) -> tuple | tp.Callable[[F], F]:\n if isinstance(fun, Missing):\n\n def resolve_kwargs_decorator(f):\n @functools.wraps(f)\n def resolve_kwargs_wrapper(*args, **kwargs):\n args = resolve_kwargs(f, args, kwargs)\n return f(*args)\n\n return resolve_kwargs_wrapper\n\n return resolve_kwargs_decorator # type: ignore\n\n if isinstance(args, Missing):\n raise ValueError('args must be provided')\n if isinstance(kwargs, Missing):\n raise ValueError('kwargs must be provided')\n\n if isinstance(fun, functools.partial):\n # functools.partial should have an opaque signature.\n fun = lambda *args, **kwargs: None\n ba = inspect.signature(fun).bind(*args, **kwargs)\n ba.apply_defaults()\n if ba.kwargs:\n raise TypeError('keyword arguments could not be resolved to positions')\n else:\n return ba.args\n\n\n\nclass LiftedModule(tp.Generic[M], Module): # type: ignore[ignored-abstractmethod]\n @abstractmethod\n def _call(self, accessor: DelayedAccessor, *args, **kwargs) -> tp.Any:\n pass\n\n @property\n @abstractmethod\n def _submodule(self) -> M:\n pass # type: ignore[bad-return-type] # why pytype?\n\n def __call__(self, *args, **kwargs) -> tp.Any:\n return self.call(*args, **kwargs) # type: ignore\n\n @property\n def call(self) -> tp.Any:\n module = self\n\n def check_and_call(accessor: DelayedAccessor, *args, **kwargs):\n return self._call(accessor, *args, **kwargs)\n\n proxy = CallableProxy(check_and_call) # type: ignore[arg-type]\n\n while isinstance(module._submodule, LiftedModule):\n module = module._submodule\n proxy = proxy.call\n\n return proxy # type: ignore\n\n\n# -------------------------------\n# simple transforms\n# -------------------------------\n\n\ndef eval_shape(\n f: tp.Callable[..., A],\n *args: tp.Any,\n **kwargs: tp.Any,\n) -> A:\n """"""A ""lifted"" version of `jax.eval_shape `_\n that can handle `flax.nnx.Module `_\n / graph nodes as arguments.\n\n Similar to ``jax.eval_shape``, it computes the shape/dtype of a function `f` without\n performing any floating point operations (FLOPs) which can be expensive. This can be\n useful for performing shape inference, for example.\n """"""\n args, kwargs = extract.to_tree((args, kwargs))\n\n @functools.wraps(f)\n def _eval_shape_fn(*args, **kwargs):\n args, kwargs = extract.from_tree((args, kwargs))\n out = f(*args, **kwargs)\n return extract.to_tree(graph.freeze(out))\n\n out = jax.eval_shape(_eval_shape_fn, *args, **kwargs)\n return extract.from_tree(out)\n\n@dataclasses.dataclass(eq=False)\nclass CheckifyFn:\n f: tp.Callable[..., tp.Any]\n\n def __post_init__(self):\n functools.update_wrapper(self, self.f)\n\n def __call__(self, *pure_args, **pure_kwargs):\n args, kwargs = extract.from_tree(\n (pure_args, pure_kwargs), ctxtag='checkify', is_inner=True\n )\n out = self.f(*args, **kwargs)\n\n args_out, kwargs_out = extract.clear_non_graph_nodes((args, kwargs))\n pure_args_out, pure_kwargs_out, pure_out = extract.to_tree(\n (args, kwargs, out), ctxtag='checkify'\n )\n return pure_args_out, pure_kwargs_out, pure_out\n\ndef checkify(\n f: tp.Callable[..., checkify_lib.Out],\n errors: frozenset[type[checkify_lib.JaxException]] = checkify_lib.user_checks, # type: ignore\n) -> tp.Callable[..., tuple[checkify_lib.Error, checkify_lib.Out]]:\n """"""Reference-aware version of `jax.experimental.checkify\n `_.\n\n Example::\n\n >>> import jax\n >>> import jax.numpy as jnp\n >>> from jax.experimental import checkify\n >>> import dataclasses\n >>> from flax import nnx\n ...\n >>> class Foo(nnx.Module):\n ... def __init__(self, a):\n ... self.a = nnx.Param(a)\n ...\n >>> @nnx.jit\n ... def f(m):\n ... y = jnp.sin(m.a.value) # error\n ... return m.a + y\n ...\n >>> m = Foo(a=jnp.inf)\n >>> err, out = nnx.checkify(f, errors=checkify.float_checks)(m)\n >>> # err.throw()\n >>> print(err)\n Error(nan generated by primitive: sin.)\n """"""\n checkify_fn = checkify_lib.checkify(CheckifyFn(f), errors)\n\n @functools.wraps(f)\n @graph.update_context('checkify')\n def jit_wrapper(*args, **kwargs):\n pure_args, pure_kwargs = extract.to_tree(\n (args, kwargs),\n ctxtag='checkify',\n )\n error, (pure_args_out, pure_kwargs_out, pure_out) = checkify_fn(\n *pure_args, **pure_kwargs\n )\n\n args_out, kwargs_out, out = extract.from_tree(\n (pure_args_out, pure_kwargs_out, pure_out),\n ctxtag='checkify',\n is_inner=False,\n )\n\n return error, out\n\n return jit_wrapper # type: ignore\n\n\n@general.split_inputs(ctxtag='cond')\ndef cond(\n pred,\n true_fun: tp.Callable[..., A],\n false_fun: tp.Callable[..., A],\n *operands,\n **kwargs,\n) -> A:\n return jax.lax.cond(\n pred,\n general.merge_inputs(true_fun, ctxtag='cond'),\n general.merge_inputs(false_fun, ctxtag='cond'),\n *operands,\n **kwargs,\n )\n\n\n@general.split_inputs(ctxtag='switch')\ndef switch(\n index,\n branches: tp.Sequence[tp.Callable[..., A]],\n *operands,\n) -> A:\n return jax.lax.switch(\n index,\n [general.merge_inputs(f, ctxtag='switch') for f in branches],\n *operands,\n )\n\n",python,tab
+6269,12412315,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3518,0,"",python,selection_command
+6270,12416577,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3534,0,"",python,selection_command
+6271,12416837,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3560,0,"",python,selection_command
+6272,12416845,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3577,0,"",python,selection_command
+6273,12416876,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3597,0,"",python,selection_command
+6274,12416911,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3605,0,"",python,selection_command
+6275,12416944,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3737,0,"",python,selection_command
+6276,12416976,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3867,0,"",python,selection_command
+6277,12417104,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3895,0,"",python,selection_command
+6278,12417277,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3900,0,"",python,selection_command
+6279,12417756,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3981,0,"",python,selection_command
+6280,12418390,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3896,0,"",python,selection_command
+6281,12418627,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",3983,0,"",python,selection_command
+6282,12418918,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",4070,0,"",python,selection_command
+6283,12419267,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",4126,0,"",python,selection_command
+6284,12420151,".venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py",4072,0,"",python,selection_command
+6285,12422148,"train_dynamics.py",0,0,"",python,tab
+6286,12422148,"train_dynamics.py",10348,0,"",python,selection_command
+6287,12503482,"train_dynamics.py",10347,0,"",python,selection_command
+6288,12503645,"train_dynamics.py",10344,0,"",python,selection_command
+6289,12504972,"train_dynamics.py",10344,1,"n",python,selection_command
+6290,12505045,"train_dynamics.py",10344,3,"nnx",python,selection_command
+6291,12505215,"train_dynamics.py",10344,4,"nnx.",python,selection_command
+6292,12505354,"train_dynamics.py",10344,14,"nnx.eval_shape",python,selection_command
+6293,12505517,"train_dynamics.py",10344,15,"nnx.eval_shape(",python,selection_command
+6294,12505671,"train_dynamics.py",10344,21,"nnx.eval_shape(lambda",python,selection_command
+6295,12505921,"train_dynamics.py",10344,22,"nnx.eval_shape(lambda:",python,selection_command
+6296,12506774,"train_dynamics.py",10344,16,"nnx.eval_shape(l",python,selection_command
+6297,12506923,"train_dynamics.py",10344,15,"nnx.eval_shape(",python,selection_command
+6298,12507451,"train_dynamics.py",10344,14,"nnx.eval_shape",python,selection_command
+6299,12507623,"train_dynamics.py",10344,14,"",python,content
+6300,12510048,"train_dynamics.py",10343,0,"",python,selection_command
+6301,12510235,"train_dynamics.py",10344,0,"nnx.eval_shape",python,content
+6302,12510237,"train_dynamics.py",10344,0,"",python,selection_command
+6303,12511649,"test.ipynb",0,0,"",python,tab
+6304,12511650,"test.ipynb",174,0,"",python,selection_mouse
+6305,12512738,"test.ipynb",158,0,"",python,selection_command
+6306,12512822,"test.ipynb",158,0,"#",python,content
+6307,12512823,"test.ipynb",159,0,"",python,selection_keyboard
+6308,12512901,"test.ipynb",159,0," ",python,content
+6309,12512902,"test.ipynb",160,0,"",python,selection_keyboard
+6310,12513168,"test.ipynb",159,0,"",python,selection_command
+6311,12516283,"test.ipynb",236,0,"\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)",python,content
+6312,12516287,"test.ipynb",237,0,"",python,selection_command
+6313,12517318,"test.ipynb",237,1,"",python,content
+6314,12517728,"test.ipynb",237,1,"",python,content
+6315,12517908,"test.ipynb",240,0,"",python,selection_command
+6316,12518189,"test.ipynb",241,0,"",python,selection_command
+6317,12518194,"test.ipynb",248,0,"",python,selection_command
+6318,12518229,"test.ipynb",249,0,"",python,selection_command
+6319,12518253,"test.ipynb",252,0,"",python,selection_command
+6320,12518285,"test.ipynb",253,0,"",python,selection_command
+6321,12518319,"test.ipynb",258,0,"",python,selection_command
+6322,12518353,"test.ipynb",259,0,"",python,selection_command
+6323,12518387,"test.ipynb",262,0,"",python,selection_command
+6324,12518420,"test.ipynb",263,0,"",python,selection_command
+6325,12518458,"test.ipynb",273,0,"",python,selection_command
+6326,12518615,"test.ipynb",274,0,"",python,selection_command
+6327,12518792,"test.ipynb",280,0,"",python,selection_command
+6328,12518941,"test.ipynb",282,0,"",python,selection_command
+6329,12519097,"test.ipynb",291,0,"",python,selection_command
+6330,12519252,"test.ipynb",294,0,"",python,selection_command
+6331,12519652,"test.ipynb",293,0,"",python,selection_command
+6332,12519717,"test.ipynb",293,1,".",python,selection_command
+6333,12519822,"test.ipynb",293,6,".model",python,selection_command
+6334,12520432,"test.ipynb",293,6,"",python,content
+6335,12520542,"test.ipynb",291,0,"",python,selection_command
+6336,12520679,"test.ipynb",282,0,"",python,selection_command
+6337,12521395,"test.ipynb",290,0,"",python,selection_command
+6338,12521919,"test.ipynb",291,0,".model",python,content
+6339,12521920,"test.ipynb",296,0,"",python,selection_command
+6340,12527369,"test.ipynb",237,0,"",python,selection_command
+6341,12527502,"test.ipynb",237,0,"#",python,content
+6342,12527502,"test.ipynb",238,0,"",python,selection_keyboard
+6343,12527503,"test.ipynb",238,0," ",python,content
+6344,12527503,"test.ipynb",239,0,"",python,selection_keyboard
+6345,12527875,"test.ipynb",238,0,"",python,selection_command
+6346,12528217,"test.ipynb",315,0,"\n",python,content
+6347,12528551,"test.ipynb",316,0,"\n",python,content
+6348,12532220,"test.ipynb",316,0,"",python,selection_command
+6349,12532411,"test.ipynb",237,0,"",python,selection_command
+6350,12532744,"test.ipynb",237,79,"",python,content
+6351,12532775,"test.ipynb",158,0,"",python,selection_command
+6352,12532934,"test.ipynb",79,0,"",python,selection_command
+6353,12533068,"test.ipynb",157,0,"\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,content
+6354,12533069,"test.ipynb",158,0,"",python,selection_command
+6355,12533318,"test.ipynb",237,0,"",python,selection_command
+6356,12533508,"test.ipynb",316,0,"",python,selection_command
+6357,12537999,"test.ipynb",237,0,"",python,selection_command
+6358,12538178,"test.ipynb",158,0,"",python,selection_command
+6359,12541334,"test.ipynb",79,0,"",python,selection_command
+6360,12541443,"test.ipynb",0,0,"",python,selection_command
+6361,12544029,"test.ipynb",0,0,"",python,tab
+6362,12544618,"test.ipynb",0,0,"",python,tab
+6363,12544803,"test.ipynb",0,0,"",python,tab
+6364,12546152,"test.ipynb",158,0,"",python,selection_command
+6365,12546375,"test.ipynb",79,0,"",python,selection_command
+6366,12546454,"test.ipynb",0,0,"",python,selection_command
+6367,12556748,"test.ipynb",79,0,"",python,selection_command
+6368,12556860,"test.ipynb",158,0,"",python,selection_command
+6369,12556993,"test.ipynb",237,0,"",python,selection_command
+6370,12557118,"test.ipynb",316,0,"",python,selection_command
+6371,12557245,"test.ipynb",317,0,"",python,selection_command
+6372,12567214,"test.ipynb",317,0,"j",python,content
+6373,12567215,"test.ipynb",318,0,"",python,selection_keyboard
+6374,12567264,"test.ipynb",318,0,"a",python,content
+6375,12567264,"test.ipynb",319,0,"",python,selection_keyboard
+6376,12567420,"test.ipynb",319,0,"x",python,content
+6377,12567421,"test.ipynb",320,0,"",python,selection_keyboard
+6378,12567471,"test.ipynb",320,0,".",python,content
+6379,12567471,"test.ipynb",321,0,"",python,selection_keyboard
+6380,12567614,"test.ipynb",321,0,"t",python,content
+6381,12567614,"test.ipynb",322,0,"",python,selection_keyboard
+6382,12567788,"test.ipynb",322,0,"r",python,content
+6383,12567788,"test.ipynb",323,0,"",python,selection_keyboard
+6384,12567864,"test.ipynb",323,0,"e",python,content
+6385,12567864,"test.ipynb",324,0,"",python,selection_keyboard
+6386,12568041,"test.ipynb",324,0,"e",python,content
+6387,12568042,"test.ipynb",325,0,"",python,selection_keyboard
+6388,12568660,"test.ipynb",325,0,".",python,content
+6389,12568660,"test.ipynb",326,0,"",python,selection_keyboard
+6390,12568899,"test.ipynb",326,0,"m",python,content
+6391,12568900,"test.ipynb",327,0,"",python,selection_keyboard
+6392,12568997,"test.ipynb",327,0,"a",python,content
+6393,12568997,"test.ipynb",328,0,"",python,selection_keyboard
+6394,12569099,"test.ipynb",328,0,"p",python,content
+6395,12569099,"test.ipynb",329,0,"",python,selection_keyboard
+6396,12569319,"test.ipynb",329,0,"()",python,content
+6397,12569319,"test.ipynb",330,0,"",python,selection_keyboard
+6398,12572330,"test.ipynb",330,0,"o",python,content
+6399,12572331,"test.ipynb",331,0,"",python,selection_keyboard
+6400,12572396,"test.ipynb",331,0,"c",python,content
+6401,12572397,"test.ipynb",332,0,"",python,selection_keyboard
+6402,12572498,"test.ipynb",332,0,"p",python,content
+6403,12572499,"test.ipynb",333,0,"",python,selection_keyboard
+6404,12572721,"test.ipynb",333,0,".",python,content
+6405,12572722,"test.ipynb",334,0,"",python,selection_keyboard
+6406,12573048,"test.ipynb",334,0,"u",python,content
+6407,12573049,"test.ipynb",335,0,"",python,selection_keyboard
+6408,12573165,"test.ipynb",335,0,"t",python,content
+6409,12573166,"test.ipynb",336,0,"",python,selection_keyboard
+6410,12573246,"test.ipynb",336,0,"i",python,content
+6411,12573246,"test.ipynb",337,0,"",python,selection_keyboard
+6412,12573298,"test.ipynb",337,0,"l",python,content
+6413,12573298,"test.ipynb",338,0,"",python,selection_keyboard
+6414,12573386,"test.ipynb",338,0,"s",python,content
+6415,12573386,"test.ipynb",339,0,"",python,selection_keyboard
+6416,12573589,"test.ipynb",339,0,".",python,content
+6417,12573589,"test.ipynb",340,0,"",python,selection_keyboard
+6418,12575455,"test.ipynb",340,0,"t",python,content
+6419,12575455,"test.ipynb",341,0,"",python,selection_keyboard
+6420,12575564,"test.ipynb",341,0,"o",python,content
+6421,12575564,"test.ipynb",342,0,"",python,selection_keyboard
+6422,12575753,"test.ipynb",342,0,"_",python,content
+6423,12575753,"test.ipynb",343,0,"",python,selection_keyboard
+6424,12575914,"test.ipynb",343,0,"s",python,content
+6425,12575914,"test.ipynb",344,0,"",python,selection_keyboard
+6426,12575980,"test.ipynb",344,0,"h",python,content
+6427,12575980,"test.ipynb",345,0,"",python,selection_keyboard
+6428,12576106,"test.ipynb",345,0,"a",python,content
+6429,12576106,"test.ipynb",346,0,"",python,selection_keyboard
+6430,12576195,"test.ipynb",346,0,"p",python,content
+6431,12576196,"test.ipynb",347,0,"",python,selection_keyboard
+6432,12576334,"test.ipynb",347,0,"e",python,content
+6433,12576334,"test.ipynb",348,0,"",python,selection_keyboard
+6434,12576689,"test.ipynb",340,8,"to_shape_dtype_struct",python,content
+6435,12578736,"test.ipynb",361,0,",",python,content
+6436,12578736,"test.ipynb",362,0,"",python,selection_keyboard
+6437,12578811,"test.ipynb",362,0," ",python,content
+6438,12578812,"test.ipynb",363,0,"",python,selection_keyboard
+6439,12580289,"test.ipynb",362,0,"",python,selection_command
+6440,12582004,"test.ipynb",363,0,"",python,selection_command
+6441,12582575,"test.ipynb",363,0,"o",python,content
+6442,12582575,"test.ipynb",364,0,"",python,selection_keyboard
+6443,12582604,"test.ipynb",364,0,"p",python,content
+6444,12582604,"test.ipynb",365,0,"",python,selection_keyboard
+6445,12582732,"test.ipynb",365,0,"t",python,content
+6446,12582733,"test.ipynb",366,0,"",python,selection_keyboard
+6447,12582832,"test.ipynb",366,0,"i",python,content
+6448,12582833,"test.ipynb",367,0,"",python,selection_keyboard
+6449,12582916,"test.ipynb",367,0,"m",python,content
+6450,12582917,"test.ipynb",368,0,"",python,selection_keyboard
+6451,12583013,"test.ipynb",368,0,"i",python,content
+6452,12583014,"test.ipynb",369,0,"",python,selection_keyboard
+6453,12583111,"test.ipynb",369,0,"z",python,content
+6454,12583112,"test.ipynb",370,0,"",python,selection_keyboard
+6455,12583167,"test.ipynb",370,0,"e",python,content
+6456,12583168,"test.ipynb",371,0,"",python,selection_keyboard
+6457,12583229,"test.ipynb",371,0,"r",python,content
+6458,12583229,"test.ipynb",372,0,"",python,selection_keyboard
+6459,12583489,"test.ipynb",371,0,"",python,selection_command
+6460,12600920,"test.ipynb",316,0,"\n",python,content
+6461,12602570,"test.ipynb",317,1,"",python,content
+6462,12602737,"test.ipynb",320,0,"",python,selection_command
+6463,12603014,"test.ipynb",316,0,"",python,selection_command
+6464,12603300,"test.ipynb",320,0,"",python,selection_command
+6465,12603361,"test.ipynb",321,0,"",python,selection_command
+6466,12603612,"test.ipynb",325,0,"",python,selection_command
+6467,12603646,"test.ipynb",326,0,"",python,selection_command
+6468,12603678,"test.ipynb",329,0,"",python,selection_command
+6469,12603711,"test.ipynb",330,0,"",python,selection_command
+6470,12603743,"test.ipynb",333,0,"",python,selection_command
+6471,12603775,"test.ipynb",334,0,"",python,selection_command
+6472,12603809,"test.ipynb",339,0,"",python,selection_command
+6473,12603842,"test.ipynb",340,0,"",python,selection_command
+6474,12603874,"test.ipynb",361,0,"",python,selection_command
+6475,12603909,"test.ipynb",363,0,"",python,selection_command
+6476,12603941,"test.ipynb",372,0,"",python,selection_command
+6477,12604301,"test.ipynb",363,0,"",python,selection_command
+6478,12604951,"test.ipynb",363,0,"n",python,content
+6479,12604951,"test.ipynb",364,0,"",python,selection_keyboard
+6480,12605065,"test.ipynb",364,0,"n",python,content
+6481,12605066,"test.ipynb",365,0,"",python,selection_keyboard
+6482,12605170,"test.ipynb",365,0,".",python,content
+6483,12605170,"test.ipynb",366,0,"",python,selection_keyboard
+6484,12605487,"test.ipynb",365,1,"",python,content
+6485,12605579,"test.ipynb",365,0,"x",python,content
+6486,12605579,"test.ipynb",366,0,"",python,selection_keyboard
+6487,12605685,"test.ipynb",366,0,".",python,content
+6488,12605686,"test.ipynb",367,0,"",python,selection_keyboard
+6489,12606193,"test.ipynb",367,0,"s",python,content
+6490,12606193,"test.ipynb",368,0,"",python,selection_keyboard
+6491,12606289,"test.ipynb",368,0,"t",python,content
+6492,12606290,"test.ipynb",369,0,"",python,selection_keyboard
+6493,12606348,"test.ipynb",369,0,"a",python,content
+6494,12606348,"test.ipynb",370,0,"",python,selection_keyboard
+6495,12606432,"test.ipynb",370,0,"t",python,content
+6496,12606432,"test.ipynb",371,0,"",python,selection_keyboard
+6497,12606489,"test.ipynb",371,0,"e",python,content
+6498,12606489,"test.ipynb",372,0,"",python,selection_keyboard
+6499,12606703,"test.ipynb",372,0,"(",python,content
+6500,12606703,"test.ipynb",373,0,"",python,selection_keyboard
+6501,12606938,"test.ipynb",372,0,"",python,selection_command
+6502,12607216,"test.ipynb",381,0,"",python,selection_command
+6503,12607568,"test.ipynb",382,0,"",python,selection_command
+6504,12607683,"test.ipynb",382,0,"a",python,content
+6505,12607684,"test.ipynb",383,0,"",python,selection_keyboard
+6506,12608103,"test.ipynb",382,1,"",python,content
+6507,12608270,"test.ipynb",382,0,")",python,content
+6508,12608270,"test.ipynb",383,0,"",python,selection_keyboard
+6509,12608461,"test.ipynb",382,0,"",python,selection_command
+6510,12631315,"train_dynamics.py",0,0,"",python,tab
+6511,12632367,"train_dynamics.py",10347,0,"",python,selection_command
+6512,12632517,"train_dynamics.py",10348,0,"",python,selection_command
+6513,12638947,"train_dynamics.py",10411,0,"",python,selection_command
+6514,12639281,"train_dynamics.py",10410,0,"",python,selection_command
+6515,12639423,"train_dynamics.py",10409,0,"",python,selection_command
+6516,12639856,"train_dynamics.py",10409,1,"e",python,selection_command
+6517,12639886,"train_dynamics.py",10408,2,"te",python,selection_command
+6518,12640010,"train_dynamics.py",10407,3,"ate",python,selection_command
+6519,12640225,"train_dynamics.py",10406,4,"tate",python,selection_command
+6520,12640291,"train_dynamics.py",10405,5,"state",python,selection_command
+6521,12640420,"train_dynamics.py",10404,6,"_state",python,selection_command
+6522,12640584,"train_dynamics.py",10404,6,"",python,content
+6523,12641026,"train_dynamics.py",10378,59,"",python,content
+6524,12641052,"train_dynamics.py",10386,0,"",python,selection_command
+6525,12641275,"train_dynamics.py",10323,0,"",python,selection_command
+6526,12641410,"train_dynamics.py",10226,0,"",python,selection_command
+6527,12641552,"train_dynamics.py",10314,0,"\n abstract_optimizer = nnx.state(abstract_optimizer)",python,content
+6528,12641552,"train_dynamics.py",10323,0,"",python,selection_command
+6529,12642086,"train_dynamics.py",10342,0,"",python,selection_command
+6530,12642323,"train_dynamics.py",10344,0,"",python,selection_command
+6531,12643373,"train_dynamics.py",10347,0,"",python,selection_command
+6532,12643532,"train_dynamics.py",10348,0,"",python,selection_command
+6533,12643685,"train_dynamics.py",10353,0,"",python,selection_command
+6534,12643898,"train_dynamics.py",10354,0,"",python,selection_command
+6535,12645890,"train_dynamics.py",10354,18,"",python,content
+6536,12646360,"train_dynamics.py",10354,0,"o",python,content
+6537,12646360,"train_dynamics.py",10355,0,"",python,selection_keyboard
+6538,12646380,"train_dynamics.py",10355,0,"p",python,content
+6539,12646380,"train_dynamics.py",10356,0,"",python,selection_keyboard
+6540,12646520,"train_dynamics.py",10356,0,"t",python,content
+6541,12646521,"train_dynamics.py",10357,0,"",python,selection_keyboard
+6542,12646584,"train_dynamics.py",10357,0,"i",python,content
+6543,12646585,"train_dynamics.py",10358,0,"",python,selection_keyboard
+6544,12646621,"train_dynamics.py",10358,0,"m",python,content
+6545,12646621,"train_dynamics.py",10359,0,"",python,selection_keyboard
+6546,12646763,"train_dynamics.py",10359,0,"i",python,content
+6547,12646764,"train_dynamics.py",10360,0,"",python,selection_keyboard
+6548,12646844,"train_dynamics.py",10360,0,"z",python,content
+6549,12646845,"train_dynamics.py",10361,0,"",python,selection_keyboard
+6550,12646913,"train_dynamics.py",10361,0,"e",python,content
+6551,12646914,"train_dynamics.py",10362,0,"",python,selection_keyboard
+6552,12647044,"train_dynamics.py",10362,0,"r",python,content
+6553,12647044,"train_dynamics.py",10363,0,"",python,selection_keyboard
+6554,12647196,"train_dynamics.py",10362,0,"",python,selection_command
+6555,12649498,"train_dynamics.py",10412,0,"",python,selection_command
+6556,12649699,"train_dynamics.py",10409,0,"",python,selection_command
+6557,12649833,"train_dynamics.py",10408,0,"",python,selection_command
+6558,12649962,"train_dynamics.py",10398,0,"",python,selection_command
+6559,12650190,"train_dynamics.py",10397,0,"",python,selection_command
+6560,12650268,"train_dynamics.py",10394,0,"",python,selection_command
+6561,12650440,"train_dynamics.py",10392,0,"",python,selection_command
+6562,12651322,"train_dynamics.py",10373,0,"",python,selection_command
+6563,12651430,"train_dynamics.py",10390,0,"",python,selection_command
+6564,12652066,"train_dynamics.py",10391,0,"",python,selection_command
+6565,12652322,"train_dynamics.py",10391,0,"_",python,content
+6566,12652322,"train_dynamics.py",10392,0,"",python,selection_keyboard
+6567,12652532,"train_dynamics.py",10392,0,"s",python,content
+6568,12652532,"train_dynamics.py",10393,0,"",python,selection_keyboard
+6569,12652697,"train_dynamics.py",10393,0,"t",python,content
+6570,12652698,"train_dynamics.py",10394,0,"",python,selection_keyboard
+6571,12652815,"train_dynamics.py",10394,0,"a",python,content
+6572,12652815,"train_dynamics.py",10395,0,"",python,selection_keyboard
+6573,12652857,"train_dynamics.py",10395,0,"a",python,content
+6574,12652857,"train_dynamics.py",10396,0,"",python,selection_keyboard
+6575,12652961,"train_dynamics.py",10396,0,"t",python,content
+6576,12652962,"train_dynamics.py",10397,0,"",python,selection_keyboard
+6577,12653339,"train_dynamics.py",10396,1,"",python,content
+6578,12653446,"train_dynamics.py",10395,1,"",python,content
+6579,12653512,"train_dynamics.py",10395,0,"t",python,content
+6580,12653512,"train_dynamics.py",10396,0,"",python,selection_keyboard
+6581,12653544,"train_dynamics.py",10396,0,"e",python,content
+6582,12653544,"train_dynamics.py",10397,0,"",python,selection_keyboard
+6583,12657114,"train_dynamics.py",10396,0,"",python,selection_command
+6584,12657416,"train_dynamics.py",10346,0,"",python,selection_command
+6585,12657653,"train_dynamics.py",10344,0,"",python,selection_command
+6586,12657813,"train_dynamics.py",10342,0,"",python,selection_command
+6587,12657935,"train_dynamics.py",10323,0,"",python,selection_command
+6588,12658328,"train_dynamics.py",10323,18,"",python,content
+6589,12658515,"train_dynamics.py",10323,0,"o",python,content
+6590,12658515,"train_dynamics.py",10324,0,"",python,selection_keyboard
+6591,12658545,"train_dynamics.py",10324,0,"p",python,content
+6592,12658546,"train_dynamics.py",10325,0,"",python,selection_keyboard
+6593,12658630,"train_dynamics.py",10325,0,"t",python,content
+6594,12658630,"train_dynamics.py",10326,0,"",python,selection_keyboard
+6595,12658728,"train_dynamics.py",10326,0,"i",python,content
+6596,12658728,"train_dynamics.py",10327,0,"",python,selection_keyboard
+6597,12658777,"train_dynamics.py",10327,0,"m",python,content
+6598,12658778,"train_dynamics.py",10328,0,"",python,selection_keyboard
+6599,12658910,"train_dynamics.py",10328,0,"i",python,content
+6600,12658911,"train_dynamics.py",10329,0,"",python,selection_keyboard
+6601,12658967,"train_dynamics.py",10329,0,"z",python,content
+6602,12658967,"train_dynamics.py",10330,0,"",python,selection_keyboard
+6603,12659061,"train_dynamics.py",10330,0,"e",python,content
+6604,12659061,"train_dynamics.py",10331,0,"",python,selection_keyboard
+6605,12659098,"train_dynamics.py",10331,0,"r",python,content
+6606,12659098,"train_dynamics.py",10332,0,"",python,selection_keyboard
+6607,12659300,"train_dynamics.py",10332,0,"_",python,content
+6608,12659300,"train_dynamics.py",10333,0,"",python,selection_keyboard
+6609,12659486,"train_dynamics.py",10333,0,"s",python,content
+6610,12659487,"train_dynamics.py",10334,0,"",python,selection_keyboard
+6611,12659603,"train_dynamics.py",10334,0,"t",python,content
+6612,12659603,"train_dynamics.py",10335,0,"",python,selection_keyboard
+6613,12659726,"train_dynamics.py",10335,0,"a",python,content
+6614,12659727,"train_dynamics.py",10336,0,"",python,selection_keyboard
+6615,12659761,"train_dynamics.py",10336,0,"t",python,content
+6616,12659761,"train_dynamics.py",10337,0,"",python,selection_keyboard
+6617,12659811,"train_dynamics.py",10337,0,"e",python,content
+6618,12659811,"train_dynamics.py",10338,0,"",python,selection_keyboard
+6619,12660084,"train_dynamics.py",10337,0,"",python,selection_command
+6620,12660431,"train_dynamics.py",10384,0,"",python,selection_command
+6621,12660564,"train_dynamics.py",10395,0,"",python,selection_command
+6622,12660726,"train_dynamics.py",10397,0,"",python,selection_command
+6623,12660898,"train_dynamics.py",10400,0,"",python,selection_command
+6624,12661367,"train_dynamics.py",10397,0,"",python,selection_command
+6625,12665341,"test.ipynb",0,0,"",python,tab
+6626,12665341,"test.ipynb",211,0,"",python,selection_mouse
+6627,12667306,"train_dynamics.py",0,0,"",python,tab
+6628,12668047,"train_dynamics.py",10400,0,"",python,selection_command
+6629,12668188,"train_dynamics.py",10401,0,"",python,selection_command
+6630,12668370,"train_dynamics.py",10411,0,"",python,selection_command
+6631,12668531,"train_dynamics.py",10412,0,"",python,selection_command
+6632,12668830,"train_dynamics.py",10411,0,"",python,selection_command
+6633,12669250,"train_dynamics.py",10412,0,"",python,selection_command
+6634,12669588,"train_dynamics.py",10412,1,"l",python,selection_command
+6635,12669631,"train_dynamics.py",10412,6,"lambda",python,selection_command
+6636,12669832,"train_dynamics.py",10412,7,"lambda:",python,selection_command
+6637,12670414,"train_dynamics.py",10412,8,"lambda: ",python,selection_command
+6638,12670572,"train_dynamics.py",10412,17,"lambda: optimizer",python,selection_command
+6639,12670964,"train_dynamics.py",10412,17,"",python,content
+6640,12671205,"train_dynamics.py",10412,0,"o",python,content
+6641,12671206,"train_dynamics.py",10413,0,"",python,selection_keyboard
+6642,12671285,"train_dynamics.py",10413,0,"p",python,content
+6643,12671286,"train_dynamics.py",10414,0,"",python,selection_keyboard
+6644,12671345,"train_dynamics.py",10414,0,"t",python,content
+6645,12671345,"train_dynamics.py",10415,0,"",python,selection_keyboard
+6646,12671429,"train_dynamics.py",10415,0,"i",python,content
+6647,12671430,"train_dynamics.py",10416,0,"",python,selection_keyboard
+6648,12671484,"train_dynamics.py",10416,0,"m",python,content
+6649,12671484,"train_dynamics.py",10417,0,"",python,selection_keyboard
+6650,12671629,"train_dynamics.py",10417,0,"i",python,content
+6651,12671629,"train_dynamics.py",10418,0,"",python,selection_keyboard
+6652,12671646,"train_dynamics.py",10418,0,"z",python,content
+6653,12671646,"train_dynamics.py",10419,0,"",python,selection_keyboard
+6654,12671727,"train_dynamics.py",10419,0,"e",python,content
+6655,12671727,"train_dynamics.py",10420,0,"",python,selection_keyboard
+6656,12671794,"train_dynamics.py",10420,0,"r",python,content
+6657,12671794,"train_dynamics.py",10421,0,"",python,selection_keyboard
+6658,12671979,"train_dynamics.py",10421,0,"_",python,content
+6659,12671980,"train_dynamics.py",10422,0,"",python,selection_keyboard
+6660,12672129,"train_dynamics.py",10422,0,"s",python,content
+6661,12672129,"train_dynamics.py",10423,0,"",python,selection_keyboard
+6662,12672233,"train_dynamics.py",10423,0,"t",python,content
+6663,12672233,"train_dynamics.py",10424,0,"",python,selection_keyboard
+6664,12672279,"train_dynamics.py",10424,0,"a",python,content
+6665,12672280,"train_dynamics.py",10425,0,"",python,selection_keyboard
+6666,12672380,"train_dynamics.py",10425,0,"t",python,content
+6667,12672381,"train_dynamics.py",10426,0,"",python,selection_keyboard
+6668,12672445,"train_dynamics.py",10426,0,"e",python,content
+6669,12672446,"train_dynamics.py",10427,0,"",python,selection_keyboard
+6670,12672681,"train_dynamics.py",10426,0,"",python,selection_command
+6671,12672796,"train_dynamics.py",10412,0,"",python,selection_command
+6672,12672926,"train_dynamics.py",10411,0,"",python,selection_command
+6673,12673516,"train_dynamics.py",10410,0,"",python,selection_command
+6674,12673653,"train_dynamics.py",10410,1,"e",python,selection_command
+6675,12673711,"train_dynamics.py",10401,10,"eval_shape",python,selection_command
+6676,12673861,"train_dynamics.py",10400,11,".eval_shape",python,selection_command
+6677,12674218,"train_dynamics.py",10397,14,"nnx.eval_shape",python,selection_command
+6678,12674384,"train_dynamics.py",10397,14,"",python,content
+6679,12675104,"train_dynamics.py",10397,0,"j",python,content
+6680,12675105,"train_dynamics.py",10398,0,"",python,selection_keyboard
+6681,12675186,"train_dynamics.py",10398,0,"a",python,content
+6682,12675186,"train_dynamics.py",10399,0,"",python,selection_keyboard
+6683,12675306,"train_dynamics.py",10399,0,"x",python,content
+6684,12675306,"train_dynamics.py",10400,0,"",python,selection_keyboard
+6685,12675401,"train_dynamics.py",10400,0,".",python,content
+6686,12675401,"train_dynamics.py",10401,0,"",python,selection_keyboard
+6687,12675517,"train_dynamics.py",10401,0,"t",python,content
+6688,12675518,"train_dynamics.py",10402,0,"",python,selection_keyboard
+6689,12675684,"train_dynamics.py",10402,0,"r",python,content
+6690,12675684,"train_dynamics.py",10403,0,"",python,selection_keyboard
+6691,12675755,"train_dynamics.py",10403,0,"e",python,content
+6692,12675756,"train_dynamics.py",10404,0,"",python,selection_keyboard
+6693,12675935,"train_dynamics.py",10404,0,".",python,content
+6694,12675936,"train_dynamics.py",10405,0,"",python,selection_keyboard
+6695,12676456,"train_dynamics.py",10404,1,"",python,content
+6696,12676529,"train_dynamics.py",10404,0,"e",python,content
+6697,12676530,"train_dynamics.py",10405,0,"",python,selection_keyboard
+6698,12676621,"train_dynamics.py",10405,0,".",python,content
+6699,12676621,"train_dynamics.py",10406,0,"",python,selection_keyboard
+6700,12676769,"train_dynamics.py",10406,0,"m",python,content
+6701,12676769,"train_dynamics.py",10407,0,"",python,selection_keyboard
+6702,12676979,"train_dynamics.py",10407,0,"a",python,content
+6703,12676979,"train_dynamics.py",10408,0,"",python,selection_keyboard
+6704,12677046,"train_dynamics.py",10408,0,"p",python,content
+6705,12677046,"train_dynamics.py",10409,0,"",python,selection_keyboard
+6706,12678059,"train_dynamics.py",10409,0,"(",python,content
+6707,12678060,"train_dynamics.py",10410,0,"",python,selection_keyboard
+6708,12678575,"train_dynamics.py",10410,0,"o",python,content
+6709,12678576,"train_dynamics.py",10411,0,"",python,selection_keyboard
+6710,12678629,"train_dynamics.py",10411,0,"c",python,content
+6711,12678630,"train_dynamics.py",10412,0,"",python,selection_keyboard
+6712,12679357,"train_dynamics.py",10412,0,"p",python,content
+6713,12679357,"train_dynamics.py",10413,0,"",python,selection_keyboard
+6714,12679568,"train_dynamics.py",10413,0,".",python,content
+6715,12679569,"train_dynamics.py",10414,0,"",python,selection_keyboard
+6716,12680825,"train_dynamics.py",10414,0,"u",python,content
+6717,12680825,"train_dynamics.py",10415,0,"",python,selection_keyboard
+6718,12680952,"train_dynamics.py",10415,0,"t",python,content
+6719,12680952,"train_dynamics.py",10416,0,"",python,selection_keyboard
+6720,12681014,"train_dynamics.py",10416,0,"i",python,content
+6721,12681014,"train_dynamics.py",10417,0,"",python,selection_keyboard
+6722,12681068,"train_dynamics.py",10417,0,"l",python,content
+6723,12681068,"train_dynamics.py",10418,0,"",python,selection_keyboard
+6724,12681161,"train_dynamics.py",10418,0,"s",python,content
+6725,12681162,"train_dynamics.py",10419,0,"",python,selection_keyboard
+6726,12681295,"train_dynamics.py",10419,0,".",python,content
+6727,12681295,"train_dynamics.py",10420,0,"",python,selection_keyboard
+6728,12681660,"train_dynamics.py",10420,0,"t",python,content
+6729,12681661,"train_dynamics.py",10421,0,"",python,selection_keyboard
+6730,12681737,"train_dynamics.py",10421,0,"o",python,content
+6731,12681737,"train_dynamics.py",10422,0,"",python,selection_keyboard
+6732,12681918,"train_dynamics.py",10422,0,"_",python,content
+6733,12681918,"train_dynamics.py",10423,0,"",python,selection_keyboard
+6734,12682086,"train_dynamics.py",10423,0,"s",python,content
+6735,12682086,"train_dynamics.py",10424,0,"",python,selection_keyboard
+6736,12682180,"train_dynamics.py",10424,0,"h",python,content
+6737,12682180,"train_dynamics.py",10425,0,"",python,selection_keyboard
+6738,12682769,"train_dynamics.py",10420,5,"to_shape_dtype_struct",python,content
+6739,12683132,"train_dynamics.py",10440,0,"",python,selection_command
+6740,12683547,"train_dynamics.py",10458,0,"",python,selection_command
+6741,12683984,"train_dynamics.py",10458,0,")",python,content
+6742,12683985,"train_dynamics.py",10459,0,"",python,selection_keyboard
+6743,12684361,"train_dynamics.py",10458,0,"",python,selection_command
+6744,12684522,"train_dynamics.py",10457,0,"",python,selection_command
+6745,12684664,"train_dynamics.py",10442,0,"",python,selection_command
+6746,12684809,"train_dynamics.py",10441,0,"",python,selection_command
+6747,12685206,"train_dynamics.py",10420,0,"",python,selection_command
+6748,12686155,"train_dynamics.py",10459,0,"",python,selection_command
+6749,12686235,"train_dynamics.py",10459,0,")",python,content
+6750,12686236,"train_dynamics.py",10460,0,"",python,selection_keyboard
+6751,12686666,"train_dynamics.py",10459,0,"",python,selection_command
+6752,12687833,"train_dynamics.py",10362,0,"",python,selection_command
+6753,12688778,"train_dynamics.py",10460,0,"",python,selection_command
+6754,12689062,"train_dynamics.py",10459,0,"",python,selection_command
+6755,12690303,"train_dynamics.py",10458,0,"",python,selection_command
+6756,12691607,"train_dynamics.py",10459,0,"",python,selection_command
+6757,12692338,"train_dynamics.py",10458,0,"",python,selection_command
+6758,12692616,"train_dynamics.py",10460,0,"",python,selection_command
+6759,12692747,"train_dynamics.py",10459,1,"",python,content
+6760,12692904,"train_dynamics.py",10458,0,"",python,selection_command
+6761,12693686,"train_dynamics.py",10457,0,"",python,selection_command
+6762,12693828,"train_dynamics.py",10442,0,"",python,selection_command
+6763,12693983,"train_dynamics.py",10441,0,"",python,selection_command
+6764,12694379,"train_dynamics.py",10442,0,"",python,selection_command
+6765,12698470,"train_dynamics.py",10441,0,"",python,selection_command
+6766,12698719,"train_dynamics.py",10420,0,"",python,selection_command
+6767,12698746,"train_dynamics.py",10419,0,"",python,selection_command
+6768,12698780,"train_dynamics.py",10414,0,"",python,selection_command
+6769,12698809,"train_dynamics.py",10413,0,"",python,selection_command
+6770,12698841,"train_dynamics.py",10410,0,"",python,selection_command
+6771,12698874,"train_dynamics.py",10409,0,"",python,selection_command
+6772,12699181,"train_dynamics.py",10406,0,"",python,selection_command
+6773,12708467,"train_dynamics.py",10405,0,"",python,selection_command
+6774,12708653,"train_dynamics.py",10401,0,"",python,selection_command
+6775,12709236,"train_dynamics.py",10405,0,"",python,selection_command
+6776,12709772,"train_dynamics.py",10401,0,"",python,selection_command
+6777,12710857,"train_dynamics.py",10405,0,"",python,selection_command
+6778,12711283,"train_dynamics.py",10406,0,"",python,selection_command
+6779,12711535,"train_dynamics.py",10409,0,"",python,selection_command
+6780,12711561,"train_dynamics.py",10410,0,"",python,selection_command
+6781,12711595,"train_dynamics.py",10413,0,"",python,selection_command
+6782,12711623,"train_dynamics.py",10414,0,"",python,selection_command
+6783,12711851,"train_dynamics.py",10419,0,"",python,selection_command
+6784,12712126,"train_dynamics.py",10420,0,"",python,selection_command
+6785,12714436,"train_dynamics.py",10441,0,"",python,selection_command
+6786,12714688,"train_dynamics.py",10442,0,"",python,selection_command
+6787,12715599,"train_dynamics.py",10441,0,"",python,selection_command
+6788,12716034,"train_dynamics.py",10441,1,"",python,content
+6789,12716366,"train_dynamics.py",10441,0,",",python,content
+6790,12716366,"train_dynamics.py",10442,0,"",python,selection_keyboard
+6791,12716443,"train_dynamics.py",10442,0," ",python,content
+6792,12716443,"train_dynamics.py",10443,0,"",python,selection_keyboard
+6793,12716646,"train_dynamics.py",10442,0,"",python,selection_command
+6794,12717746,"train_dynamics.py",10362,0,"",python,selection_command
+6795,12718230,"train_dynamics.py",10370,0,"",python,selection_command
+6796,12718534,"train_dynamics.py",10460,0,"",python,selection_command
+6797,12718935,"train_dynamics.py",10459,0,"",python,selection_command
+6798,12719270,"train_dynamics.py",10460,0,"",python,selection_command
+6799,12719360,"train_dynamics.py",10459,1,"",python,content
+6800,12719500,"train_dynamics.py",10458,0,"",python,selection_command
+6801,12720021,"train_dynamics.py",10362,0,"",python,selection_command
+6802,12720716,"train_dynamics.py",10459,0,"",python,selection_command
+6803,12721470,"train_dynamics.py",10458,0,"",python,selection_command
+6804,12721890,"train_dynamics.py",10362,0,"",python,selection_command
+6805,12723213,"train_dynamics.py",10370,0,"",python,selection_command
+6806,12723462,"train_dynamics.py",10395,0,"",python,selection_command
+6807,12723463,"train_dynamics.py",10397,0,"",python,selection_command
+6808,12723493,"train_dynamics.py",10400,0,"",python,selection_command
+6809,12723527,"train_dynamics.py",10401,0,"",python,selection_command
+6810,12723559,"train_dynamics.py",10405,0,"",python,selection_command
+6811,12723653,"train_dynamics.py",10406,0,"",python,selection_command
+6812,12723653,"train_dynamics.py",10409,0,"",python,selection_command
+6813,12725116,"train_dynamics.py",10410,0,"",python,selection_command
+6814,12725226,"train_dynamics.py",10410,0,"\n ",python,content
+6815,12725465,"train_dynamics.py",10422,0,"",python,selection_command
+6816,12726275,"train_dynamics.py",10472,0,"",python,selection_command
+6817,12726661,"train_dynamics.py",10471,0,"",python,selection_command
+6818,12727137,"train_dynamics.py",10470,1,"",python,content
+6819,12728371,"train_dynamics.py",10470,0,"e",python,content
+6820,12728371,"train_dynamics.py",10471,0,"",python,selection_keyboard
+6821,12728484,"train_dynamics.py",10471,0,"\n ",python,content
+6822,12728997,"train_dynamics.py",10480,4,"",python,content
+6823,12729229,"train_dynamics.py",10479,0,"",python,selection_command
+6824,12730833,"train_dynamics.py",10489,0,"",python,selection_command
+6825,12733135,"train_dynamics.py",10479,0,"",python,selection_command
+6826,12733423,"train_dynamics.py",10489,0,"",python,selection_command
+6827,12740065,"test.ipynb",0,0,"",python,tab
+6828,12740065,"test.ipynb",382,0,"",python,selection_mouse
+6829,12742048,"test.ipynb",384,0,"",python,selection_command
+6830,12742338,"test.ipynb",384,0,".",python,content
+6831,12742339,"test.ipynb",385,0,"",python,selection_keyboard
+6832,12744450,"test.ipynb",385,0,"m",python,content
+6833,12744451,"test.ipynb",386,0,"",python,selection_keyboard
+6834,12744454,"test.ipynb",386,0,"o",python,content
+6835,12744454,"test.ipynb",387,0,"",python,selection_keyboard
+6836,12744461,"test.ipynb",387,0,"d",python,content
+6837,12744462,"test.ipynb",388,0,"",python,selection_keyboard
+6838,12744504,"test.ipynb",388,0,"e",python,content
+6839,12744505,"test.ipynb",389,0,"",python,selection_keyboard
+6840,12744957,"test.ipynb",389,0,"l",python,content
+6841,12744958,"test.ipynb",390,0,"",python,selection_keyboard
+6842,12745149,"test.ipynb",390,0,".",python,content
+6843,12745149,"test.ipynb",391,0,"",python,selection_keyboard
+6844,12745867,"test.ipynb",391,0,"t",python,content
+6845,12745867,"test.ipynb",392,0,"",python,selection_keyboard
+6846,12745909,"test.ipynb",392,0,"o",python,content
+6847,12745909,"test.ipynb",393,0,"",python,selection_keyboard
+6848,12746006,"test.ipynb",393,0,"k",python,content
+6849,12746006,"test.ipynb",394,0,"",python,selection_keyboard
+6850,12746054,"test.ipynb",394,0,"e",python,content
+6851,12746055,"test.ipynb",395,0,"",python,selection_keyboard
+6852,12746197,"test.ipynb",395,0,"n",python,content
+6853,12746198,"test.ipynb",396,0,"",python,selection_keyboard
+6854,12746198,"test.ipynb",396,0,"i",python,content
+6855,12746198,"test.ipynb",397,0,"",python,selection_keyboard
+6856,12746248,"test.ipynb",397,0,"z",python,content
+6857,12746248,"test.ipynb",398,0,"",python,selection_keyboard
+6858,12746332,"test.ipynb",398,0,"e",python,content
+6859,12746332,"test.ipynb",399,0,"",python,selection_keyboard
+6860,12746402,"test.ipynb",399,0,"r",python,content
+6861,12746402,"test.ipynb",400,0,"",python,selection_keyboard
+6862,12746531,"test.ipynb",400,0,".",python,content
+6863,12746532,"test.ipynb",401,0,"",python,selection_keyboard
+6864,12746877,"test.ipynb",401,0,"v",python,content
+6865,12746878,"test.ipynb",402,0,"",python,selection_keyboard
+6866,12746954,"test.ipynb",402,0,"q",python,content
+6867,12746954,"test.ipynb",403,0,"",python,selection_keyboard
+6868,12783602,"test.ipynb",382,0,"",python,selection_mouse
+6869,12785631,"test.ipynb",382,0,".",python,content
+6870,12785631,"test.ipynb",383,0,"",python,selection_keyboard
+6871,12785851,"test.ipynb",383,0,"m",python,content
+6872,12785851,"test.ipynb",384,0,"",python,selection_keyboard
+6873,12785881,"test.ipynb",384,0,"o",python,content
+6874,12785881,"test.ipynb",385,0,"",python,selection_keyboard
+6875,12785948,"test.ipynb",385,0,"d",python,content
+6876,12785948,"test.ipynb",386,0,"",python,selection_keyboard
+6877,12786013,"test.ipynb",386,0,"e",python,content
+6878,12786014,"test.ipynb",387,0,"",python,selection_keyboard
+6879,12786079,"test.ipynb",387,0,"l",python,content
+6880,12786080,"test.ipynb",388,0,"",python,selection_keyboard
+6881,12786249,"test.ipynb",387,0,"",python,selection_command
+6882,12786458,"test.ipynb",388,0,"",python,selection_command
+6883,12786765,"test.ipynb",391,0,"",python,selection_command
+6884,12787363,"test.ipynb",390,0,"",python,selection_command
+6885,12787451,"test.ipynb",390,1,".",python,selection_command
+6886,12787479,"test.ipynb",390,6,".model",python,selection_command
+6887,12788417,"test.ipynb",390,6,"",python,content
+6888,12790953,"test.ipynb",390,1,".",python,selection_command
+6889,12790962,"test.ipynb",390,10,".tokenizer",python,selection_command
+6890,12791340,"test.ipynb",390,10,"",python,content
+6891,12791602,"test.ipynb",388,0,"",python,selection_command
+6892,12792156,"test.ipynb",387,0,"",python,selection_command
+6893,12792538,"test.ipynb",388,0,".tokenizer",python,content
+6894,12792538,"test.ipynb",397,0,"",python,selection_command
+6895,12797294,"test.ipynb",395,0,"",python,selection_mouse
+6896,12799853,"test.ipynb",317,0,"",python,selection_command
+6897,12799928,"test.ipynb",317,0,"#",python,content
+6898,12799929,"test.ipynb",318,0,"",python,selection_keyboard
+6899,12799991,"test.ipynb",318,0," ",python,content
+6900,12799991,"test.ipynb",319,0,"",python,selection_keyboard
+6901,12800413,"test.ipynb",318,0,"",python,selection_command
+6902,12800770,"test.ipynb",405,0,"\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq",python,content
+6903,12800771,"test.ipynb",406,0,"",python,selection_command
+6904,12801086,"test.ipynb",494,0,"\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq",python,content
+6905,12801099,"test.ipynb",495,0,"",python,selection_command
+6906,12801621,"test.ipynb",406,0,"",python,selection_command
+6907,12801765,"test.ipynb",406,1,"",python,content
+6908,12801955,"test.ipynb",406,1,"",python,content
+6909,12802065,"test.ipynb",493,0,"",python,selection_command
+6910,12802249,"test.ipynb",493,1,"",python,content
+6911,12802394,"test.ipynb",493,1,"",python,content
+6912,12802596,"test.ipynb",406,0,"",python,selection_command
+6913,12802737,"test.ipynb",409,0,"",python,selection_command
+6914,12802947,"test.ipynb",410,0,"",python,selection_command
+6915,12803356,"test.ipynb",492,0,"",python,selection_command
+6916,12803664,"test.ipynb",491,0,"",python,selection_command
+6917,12805669,"test.ipynb",402,0,"",python,selection_command
+6918,12809917,"test.ipynb",491,0,"",python,selection_command
+6919,12810127,"test.ipynb",490,0,"",python,selection_command
+6920,12810363,"test.ipynb",487,0,"",python,selection_command
+6921,12810430,"test.ipynb",478,0,"",python,selection_command
+6922,12811077,"test.ipynb",477,0,"",python,selection_command
+6923,12811077,"test.ipynb",477,1,".",python,selection_command
+6924,12811129,"test.ipynb",477,10,".tokenizer",python,selection_command
+6925,12811448,"test.ipynb",477,10,"",python,content
+6926,12811718,"test.ipynb",480,0,"",python,selection_command
+6927,12812126,"test.ipynb",479,0,"",python,selection_command
+6928,12812244,"test.ipynb",478,0,"",python,selection_command
+6929,12812650,"test.ipynb",479,0,".tokenizer",python,content
+6930,12812651,"test.ipynb",488,0,"",python,selection_command
+6931,12815983,"test.ipynb",480,0,"",python,selection_command
+6932,12816147,"test.ipynb",477,0,"",python,selection_command
+6933,12816324,"test.ipynb",472,0,"",python,selection_command
+6934,12817495,"test.ipynb",559,0,"",python,selection_command
+6935,12819800,"test.ipynb",492,87,"",python,content
+6936,12819804,"test.ipynb",406,0,"",python,selection_command
+6937,12820684,"test.ipynb",492,0,"\njax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq",python,content
+6938,12820687,"test.ipynb",493,0,"",python,selection_command
+6939,12821372,"test.ipynb",406,0,"",python,selection_command
+6940,12821636,"test.ipynb",406,0,"#",python,content
+6941,12821734,"test.ipynb",407,0," ",python,content
+6942,12821910,"test.ipynb",407,0,"",python,selection_command
+6943,12822030,"test.ipynb",496,0,"",python,selection_command
+6944,12822855,"test.ipynb",580,0,"",python,selection_command
+6945,12823300,"test.ipynb",579,0,"",python,selection_command
+6946,12823470,"test.ipynb",578,0,"",python,selection_command
+6947,12823588,"test.ipynb",569,0,"",python,selection_command
+6948,12823733,"test.ipynb",566,0,"",python,selection_command
+6949,12823865,"test.ipynb",561,0,"",python,selection_command
+6950,12823998,"test.ipynb",560,0,"",python,selection_command
+6951,12824518,"test.ipynb",560,1,".",python,selection_command
+6952,12824536,"test.ipynb",560,6,".model",python,selection_command
+6953,12825149,"test.ipynb",560,6,"",python,content
+6954,12825234,"test.ipynb",561,0,"",python,selection_command
+6955,12826156,"test.ipynb",562,0,".model",python,content
+6956,12826157,"test.ipynb",567,0,"",python,selection_command
+6957,12828734,"test.ipynb",495,0,"",python,selection_command
+6958,12829682,"test.ipynb",495,0,"#",python,content
+6959,12829683,"test.ipynb",496,0,"",python,selection_keyboard
+6960,12829883,"test.ipynb",495,0,"",python,selection_command
+6961,12830490,"test.ipynb",496,0,"",python,selection_command
+6962,12830578,"test.ipynb",496,0," ",python,content
+6963,12830579,"test.ipynb",497,0,"",python,selection_keyboard
+6964,12830705,"test.ipynb",496,0,"",python,selection_command
+6965,12830836,"test.ipynb",407,0,"",python,selection_command
+6966,12830981,"test.ipynb",406,0,"",python,selection_command
+6967,12831181,"test.ipynb",406,1,"",python,content
+6968,12831339,"test.ipynb",406,1,"",python,content
+6969,12834750,"test.ipynb",406,0,"#",python,content
+6970,12834750,"test.ipynb",407,0,"",python,selection_keyboard
+6971,12834791,"test.ipynb",407,0," ",python,content
+6972,12834792,"test.ipynb",408,0,"",python,selection_keyboard
+6973,12834977,"test.ipynb",407,0,"",python,selection_command
+6974,12835192,"test.ipynb",406,0,"",python,selection_command
+6975,12835404,"test.ipynb",317,0,"",python,selection_command
+6976,12836212,"test.ipynb",317,1,"",python,content
+6977,12836353,"test.ipynb",317,1,"",python,content
+6978,12839298,"test.ipynb",317,0,"#",python,content
+6979,12839298,"test.ipynb",318,0,"",python,selection_keyboard
+6980,12839342,"test.ipynb",318,0," ",python,content
+6981,12839343,"test.ipynb",319,0,"",python,selection_keyboard
+6982,12839493,"test.ipynb",318,0,"",python,selection_command
+6983,12851100,"test.ipynb",311,0,"",python,selection_mouse
+6984,12851960,"test.ipynb",237,0,"",python,selection_command
+6985,12852360,"test.ipynb",237,1,"",python,content
+6986,12852512,"test.ipynb",237,1,"",python,content
+6987,12856064,"test.ipynb",237,0,"#",python,content
+6988,12856065,"test.ipynb",238,0,"",python,selection_keyboard
+6989,12856334,"test.ipynb",237,0,"",python,selection_command
+6990,12856835,"test.ipynb",238,0,"",python,selection_command
+6991,12856897,"test.ipynb",238,0," ",python,content
+6992,12856897,"test.ipynb",239,0,"",python,selection_keyboard
+6993,12857095,"test.ipynb",238,0,"",python,selection_command
+6994,12857243,"test.ipynb",159,0,"",python,selection_command
+6995,12857435,"test.ipynb",158,0,"",python,selection_command
+6996,12857632,"test.ipynb",158,1,"",python,content
+6997,12857805,"test.ipynb",158,1,"",python,content
+6998,12861732,"test.ipynb",158,0,"#",python,content
+6999,12861732,"test.ipynb",159,0,"",python,selection_keyboard
+7000,12861744,"test.ipynb",159,0," ",python,content
+7001,12861745,"test.ipynb",160,0,"",python,selection_keyboard
+7002,12861963,"test.ipynb",159,0,"",python,selection_command
+7003,12862330,"test.ipynb",80,0,"",python,selection_command
+7004,12862447,"test.ipynb",79,0,"",python,selection_command
+7005,12862781,"test.ipynb",79,1,"",python,content
+7006,12862971,"test.ipynb",79,1,"",python,content
+7007,12866217,"test.ipynb",79,0,"#",python,content
+7008,12866217,"test.ipynb",80,0,"",python,selection_keyboard
+7009,12866248,"test.ipynb",80,0," ",python,content
+7010,12866248,"test.ipynb",81,0,"",python,selection_keyboard
+7011,12866449,"test.ipynb",80,0,"",python,selection_command
+7012,12876135,"test.ipynb",1,0,"",python,selection_command
+7013,12876397,"test.ipynb",0,0,"",python,selection_command
+7014,12876911,"test.ipynb",79,0,"",python,selection_command
+7015,12877052,"test.ipynb",158,0,"",python,selection_command
+7016,12877185,"test.ipynb",237,0,"",python,selection_command
+7017,12877328,"test.ipynb",316,0,"",python,selection_command
+7018,12877520,"test.ipynb",317,0,"",python,selection_command
+7019,12878586,"test.ipynb",316,0,"",python,selection_command
+7020,12878902,"test.ipynb",316,0,"\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq",python,content
+7021,12878904,"test.ipynb",317,0,"",python,selection_command
+7022,12879328,"test.ipynb",319,0,"",python,selection_command
+7023,12879617,"test.ipynb",322,0,"",python,selection_command
+7024,12879617,"test.ipynb",323,0,"",python,selection_command
+7025,12879641,"test.ipynb",327,0,"",python,selection_command
+7026,12879669,"test.ipynb",328,0,"",python,selection_command
+7027,12879701,"test.ipynb",331,0,"",python,selection_command
+7028,12879736,"test.ipynb",332,0,"",python,selection_command
+7029,12879773,"test.ipynb",335,0,"",python,selection_command
+7030,12879802,"test.ipynb",336,0,"",python,selection_command
+7031,12879855,"test.ipynb",341,0,"",python,selection_command
+7032,12879950,"test.ipynb",342,0,"",python,selection_command
+7033,12879950,"test.ipynb",363,0,"",python,selection_command
+7034,12879950,"test.ipynb",365,0,"",python,selection_command
+7035,12879975,"test.ipynb",368,0,"",python,selection_command
+7036,12880007,"test.ipynb",369,0,"",python,selection_command
+7037,12880041,"test.ipynb",374,0,"",python,selection_command
+7038,12880145,"test.ipynb",375,0,"",python,selection_command
+7039,12880145,"test.ipynb",384,0,"",python,selection_command
+7040,12880163,"test.ipynb",385,0,"",python,selection_command
+7041,12880174,"test.ipynb",390,0,"",python,selection_command
+7042,12880386,"test.ipynb",391,0,"",python,selection_command
+7043,12880546,"test.ipynb",400,0,"",python,selection_command
+7044,12880687,"test.ipynb",403,0,"",python,selection_command
+7045,12881069,"test.ipynb",402,0,"",python,selection_command
+7046,12881193,"test.ipynb",402,1,".",python,selection_command
+7047,12881196,"test.ipynb",402,3,".vq",python,selection_command
+7048,12881839,"test.ipynb",402,3,"",python,content
+7049,12881841,"test.ipynb",401,0,"",python,selection_command
+7050,12881958,"test.ipynb",400,0,"",python,selection_command
+7051,12882086,"test.ipynb",399,0,"",python,selection_command
+7052,12882290,"test.ipynb",400,0,".vq",python,content
+7053,12882290,"test.ipynb",402,0,"",python,selection_command
+7054,12883849,"test.ipynb",317,0,"",python,selection_command
+7055,12884429,"test.ipynb",317,1,"",python,content
+7056,12884562,"test.ipynb",317,1,"",python,content
+7057,12886436,"test.ipynb",317,0,"#",python,content
+7058,12886436,"test.ipynb",318,0,"",python,selection_keyboard
+7059,12886491,"test.ipynb",318,0," ",python,content
+7060,12886491,"test.ipynb",319,0,"",python,selection_keyboard
+7061,12886769,"test.ipynb",318,0,"",python,selection_command
+7062,12886829,"test.ipynb",407,0,"",python,selection_command
+7063,12887035,"test.ipynb",406,0,"",python,selection_command
+7064,12887294,"test.ipynb",406,1,"",python,content
+7065,12887549,"test.ipynb",406,1,"",python,content
+7066,12889652,"test.ipynb",406,0,"#",python,content
+7067,12889652,"test.ipynb",407,0,"",python,selection_keyboard
+7068,12889696,"test.ipynb",407,0," ",python,content
+7069,12889697,"test.ipynb",408,0,"",python,selection_keyboard
+7070,12889915,"test.ipynb",407,0,"",python,selection_command
+7071,12889996,"test.ipynb",496,0,"",python,selection_command
+7072,12890183,"test.ipynb",495,0,"",python,selection_command
+7073,12890286,"test.ipynb",495,1,"",python,content
+7074,12890728,"test.ipynb",495,1,"",python,content
+7075,12892366,"test.ipynb",495,0,"#",python,content
+7076,12892366,"test.ipynb",496,0,"",python,selection_keyboard
+7077,12892394,"test.ipynb",496,0," ",python,content
+7078,12892395,"test.ipynb",497,0,"",python,selection_keyboard
+7079,12892728,"test.ipynb",496,0,"",python,selection_command
+7080,12892881,"test.ipynb",585,0,"",python,selection_command
+7081,12893097,"test.ipynb",496,0,"",python,selection_command
+7082,12893252,"test.ipynb",407,0,"",python,selection_command
+7083,12893379,"test.ipynb",318,0,"",python,selection_command
+7084,12893585,"test.ipynb",316,0,"",python,selection_command
+7085,12900617,"test.ipynb",237,0,"",python,selection_command
+7086,12900824,"test.ipynb",158,0,"",python,selection_command
+7087,12900941,"test.ipynb",79,0,"",python,selection_command
+7088,12901119,"test.ipynb",0,0,"",python,selection_command
+7089,12901673,"test.ipynb",0,1,"",python,content
+7090,12902044,"test.ipynb",0,1,"",python,content
+7091,12904932,"test.ipynb",0,0,"#",python,content
+7092,12904933,"test.ipynb",1,0,"",python,selection_keyboard
+7093,12905015,"test.ipynb",1,0," ",python,content
+7094,12905015,"test.ipynb",2,0,"",python,selection_keyboard
+7095,12905314,"test.ipynb",1,0,"",python,selection_command
+7096,12906066,"test.ipynb",78,0,"",python,selection_command
+7097,12906172,"test.ipynb",78,0," ",python,content
+7098,12906173,"test.ipynb",79,0,"",python,selection_keyboard
+7099,12906409,"test.ipynb",79,0,"<",python,content
+7100,12906409,"test.ipynb",80,0,"",python,selection_keyboard
+7101,12906887,"test.ipynb",80,0,"_",python,content
+7102,12906887,"test.ipynb",81,0,"",python,selection_keyboard
+7103,12907221,"test.ipynb",80,1,"",python,content
+7104,12907412,"test.ipynb",80,0,"-",python,content
+7105,12907412,"test.ipynb",81,0,"",python,selection_keyboard
+7106,12907511,"test.ipynb",81,0," ",python,content
+7107,12907512,"test.ipynb",82,0,"",python,selection_keyboard
+7108,12907744,"test.ipynb",82,0,"w",python,content
+7109,12907745,"test.ipynb",83,0,"",python,selection_keyboard
+7110,12907782,"test.ipynb",83,0,"o",python,content
+7111,12907782,"test.ipynb",84,0,"",python,selection_keyboard
+7112,12907935,"test.ipynb",84,0,"r",python,content
+7113,12907936,"test.ipynb",85,0,"",python,selection_keyboard
+7114,12907936,"test.ipynb",85,0,"k",python,content
+7115,12907937,"test.ipynb",86,0,"",python,selection_keyboard
+7116,12908078,"test.ipynb",86,0,"s",python,content
+7117,12908078,"test.ipynb",87,0,"",python,selection_keyboard
+7118,12908984,"test.ipynb",86,0,"",python,selection_command
+7119,12909100,"test.ipynb",165,0,"",python,selection_command
+7120,12909566,"test.ipynb",166,0,"",python,selection_command
+7121,12909667,"test.ipynb",166,0," ",python,content
+7122,12909668,"test.ipynb",167,0,"",python,selection_keyboard
+7123,12910255,"test.ipynb",167,0,"<",python,content
+7124,12910256,"test.ipynb",168,0,"",python,selection_keyboard
+7125,12910582,"test.ipynb",168,0,"-",python,content
+7126,12910582,"test.ipynb",169,0,"",python,selection_keyboard
+7127,12910706,"test.ipynb",169,0," ",python,content
+7128,12910707,"test.ipynb",170,0,"",python,selection_keyboard
+7129,12910969,"test.ipynb",170,0,"w",python,content
+7130,12910969,"test.ipynb",171,0,"",python,selection_keyboard
+7131,12911012,"test.ipynb",171,0,"o",python,content
+7132,12911013,"test.ipynb",172,0,"",python,selection_keyboard
+7133,12911111,"test.ipynb",172,0,"r",python,content
+7134,12911111,"test.ipynb",173,0,"",python,selection_keyboard
+7135,12911175,"test.ipynb",173,0,"k",python,content
+7136,12911175,"test.ipynb",174,0,"",python,selection_keyboard
+7137,12911283,"test.ipynb",174,0,"s",python,content
+7138,12911283,"test.ipynb",175,0,"",python,selection_keyboard
+7139,12911537,"test.ipynb",174,0,"",python,selection_command
+7140,12911653,"test.ipynb",253,0,"",python,selection_command
+7141,12911795,"test.ipynb",332,0,"",python,selection_command
+7142,12911941,"test.ipynb",334,0,"",python,selection_command
+7143,12912202,"test.ipynb",421,0,"",python,selection_command
+7144,12912362,"test.ipynb",423,0,"",python,selection_command
+7145,12912450,"test.ipynb",423,0," ",python,content
+7146,12912451,"test.ipynb",424,0,"",python,selection_keyboard
+7147,12912830,"test.ipynb",424,0,",",python,content
+7148,12912830,"test.ipynb",425,0,"",python,selection_keyboard
+7149,12913085,"test.ipynb",425,0,"_",python,content
+7150,12913085,"test.ipynb",426,0,"",python,selection_keyboard
+7151,12913420,"test.ipynb",425,1,"",python,content
+7152,12913572,"test.ipynb",424,1,"",python,content
+7153,12913932,"test.ipynb",423,0,"",python,selection_command
+7154,12914051,"test.ipynb",334,0,"",python,selection_command
+7155,12914142,"test.ipynb",332,0,"",python,selection_command
+7156,12914270,"test.ipynb",253,0,"",python,selection_command
+7157,12914394,"test.ipynb",174,0,"",python,selection_command
+7158,12914522,"test.ipynb",86,0,"",python,selection_command
+7159,12914730,"test.ipynb",85,0,"",python,selection_command
+7160,12914881,"test.ipynb",84,0,"",python,selection_command
+7161,12915132,"test.ipynb",83,0,"",python,selection_command
+7162,12915158,"test.ipynb",82,0,"",python,selection_command
+7163,12915287,"test.ipynb",81,0,"",python,selection_command
+7164,12915453,"test.ipynb",80,0,"",python,selection_command
+7165,12915583,"test.ipynb",79,0,"",python,selection_command
+7166,12915746,"test.ipynb",79,1,"<",python,selection_command
+7167,12915804,"test.ipynb",79,1,"<",python,selection_command
+7168,12916910,"test.ipynb",79,2,"<-",python,selection_command
+7169,12917516,"test.ipynb",79,1,"<",python,selection_command
+7170,12918035,"test.ipynb",79,0,"",python,selection_command
+7171,12918257,"test.ipynb",167,0,"#",python,content
+7172,12918258,"test.ipynb",79,0,"#",python,content
+7173,12918258,"test.ipynb",80,0,"",python,selection_keyboard
+7174,12918311,"test.ipynb",169,0," ",python,content
+7175,12918311,"test.ipynb",80,0," ",python,content
+7176,12918311,"test.ipynb",81,0,"",python,selection_keyboard
+7177,12918500,"test.ipynb",80,0,"",python,selection_command
+7178,12918921,"test.ipynb",170,0,"",python,selection_command
+7179,12919084,"test.ipynb",257,0,"",python,selection_command
+7180,12919221,"test.ipynb",336,0,"",python,selection_command
+7181,12919369,"test.ipynb",338,0,"",python,selection_command
+7182,12919517,"test.ipynb",419,0,"",python,selection_command
+7183,12919783,"test.ipynb",428,0,"",python,selection_command
+7184,12919972,"test.ipynb",428,0," ",python,content
+7185,12919972,"test.ipynb",429,0,"",python,selection_keyboard
+7186,12920326,"test.ipynb",428,1,"",python,content
+7187,12920400,"test.ipynb",428,0,"#",python,content
+7188,12920400,"test.ipynb",429,0,"",python,selection_keyboard
+7189,12920453,"test.ipynb",429,0," ",python,content
+7190,12920454,"test.ipynb",430,0,"",python,selection_keyboard
+7191,12920913,"test.ipynb",430,0,"<",python,content
+7192,12920913,"test.ipynb",431,0,"",python,selection_keyboard
+7193,12921041,"test.ipynb",431,0," ",python,content
+7194,12921041,"test.ipynb",432,0,"",python,selection_keyboard
+7195,12921354,"test.ipynb",431,1,"",python,content
+7196,12921534,"test.ipynb",431,0,"-",python,content
+7197,12921534,"test.ipynb",432,0,"",python,selection_keyboard
+7198,12921682,"test.ipynb",432,0," ",python,content
+7199,12921682,"test.ipynb",433,0,"",python,selection_keyboard
+7200,12921897,"test.ipynb",433,0,"w",python,content
+7201,12921897,"test.ipynb",434,0,"",python,selection_keyboard
+7202,12921961,"test.ipynb",434,0,"o",python,content
+7203,12921961,"test.ipynb",435,0,"",python,selection_keyboard
+7204,12922043,"test.ipynb",435,0,"r",python,content
+7205,12922044,"test.ipynb",436,0,"",python,selection_keyboard
+7206,12922107,"test.ipynb",436,0,"k",python,content
+7207,12922107,"test.ipynb",437,0,"",python,selection_keyboard
+7208,12922176,"test.ipynb",437,0,"s",python,content
+7209,12922176,"test.ipynb",438,0,"",python,selection_keyboard
+7210,12922368,"test.ipynb",437,0,"",python,selection_command
+7211,12922434,"test.ipynb",526,0,"",python,selection_command
+7212,12922634,"test.ipynb",527,0,"",python,selection_command
+7213,12922718,"test.ipynb",527,0," ",python,content
+7214,12922718,"test.ipynb",528,0,"",python,selection_keyboard
+7215,12922921,"test.ipynb",528,0,"#",python,content
+7216,12922921,"test.ipynb",529,0,"",python,selection_keyboard
+7217,12923026,"test.ipynb",529,0," ",python,content
+7218,12923026,"test.ipynb",530,0,"",python,selection_keyboard
+7219,12923897,"test.ipynb",530,0,"<",python,content
+7220,12923898,"test.ipynb",531,0,"",python,selection_keyboard
+7221,12924053,"test.ipynb",531,0,"-",python,content
+7222,12924053,"test.ipynb",532,0,"",python,selection_keyboard
+7223,12924368,"test.ipynb",532,0," ",python,content
+7224,12924368,"test.ipynb",533,0,"",python,selection_keyboard
+7225,12924449,"test.ipynb",533,0,"w",python,content
+7226,12924449,"test.ipynb",534,0,"",python,selection_keyboard
+7227,12924511,"test.ipynb",534,0,"o",python,content
+7228,12924512,"test.ipynb",535,0,"",python,selection_keyboard
+7229,12924595,"test.ipynb",535,0,"r",python,content
+7230,12924595,"test.ipynb",536,0,"",python,selection_keyboard
+7231,12924665,"test.ipynb",536,0,"k",python,content
+7232,12924665,"test.ipynb",537,0,"",python,selection_keyboard
+7233,12924728,"test.ipynb",537,0,"s",python,content
+7234,12924728,"test.ipynb",538,0,"",python,selection_keyboard
+7235,12924916,"test.ipynb",537,0,"",python,selection_command
+7236,12925286,"test.ipynb",437,0,"",python,selection_command
+7237,12925553,"test.ipynb",339,0,"",python,selection_command
+7238,12926193,"test.ipynb",339,1,"#",python,selection_command
+7239,12926252,"test.ipynb",339,1,"#",python,selection_command
+7240,12926294,"test.ipynb",339,2,"# ",python,selection_command
+7241,12926430,"test.ipynb",439,2,"",python,content
+7242,12926430,"test.ipynb",339,2,"",python,content
+7243,12926432,"test.ipynb",339,0,"",python,selection_command
+7244,12931468,"test.ipynb",437,0,"",python,selection_command
+7245,12932325,"test.ipynb",437,0," ",python,content
+7246,12932325,"test.ipynb",438,0,"",python,selection_keyboard
+7247,12932609,"test.ipynb",438,0,"#",python,content
+7248,12932609,"test.ipynb",439,0,"",python,selection_keyboard
+7249,12932870,"test.ipynb",438,1,"",python,content
+7250,12932997,"test.ipynb",437,1,"",python,content
+7251,12933026,"test.ipynb",437,0,"#",python,content
+7252,12933026,"test.ipynb",438,0,"",python,selection_keyboard
+7253,12933102,"test.ipynb",438,0," ",python,content
+7254,12933103,"test.ipynb",439,0,"",python,selection_keyboard
+7255,12935117,"test.ipynb",438,0,"",python,selection_command
+7256,12935363,"test.ipynb",437,0,"",python,selection_command
+7257,12935481,"test.ipynb",437,1,"",python,content
+7258,12935596,"test.ipynb",437,1,"",python,content
+7259,12935762,"test.ipynb",339,0,"",python,selection_command
+7260,12936097,"test.ipynb",339,0,"#",python,content
+7261,12936097,"test.ipynb",340,0,"",python,selection_keyboard
+7262,12936157,"test.ipynb",340,0," ",python,content
+7263,12936158,"test.ipynb",341,0,"",python,selection_keyboard
+7264,12938601,"test.ipynb",340,0,"",python,selection_command
+7265,12938713,"test.ipynb",440,0,"",python,selection_command
+7266,12939013,"test.ipynb",439,0,"",python,selection_command
+7267,12939546,"test.ipynb",439,0,"#",python,content
+7268,12939547,"test.ipynb",440,0,"",python,selection_keyboard
+7269,12939591,"test.ipynb",440,0," ",python,content
+7270,12939592,"test.ipynb",441,0,"",python,selection_keyboard
+7271,12939754,"test.ipynb",440,0,"",python,selection_command
+7272,12939851,"test.ipynb",540,0,"",python,selection_command
+7273,12940163,"test.ipynb",539,0,"",python,selection_command
+7274,12940232,"test.ipynb",539,1,"",python,content
+7275,12940380,"test.ipynb",539,1,"",python,content
+7276,12942151,"test.ipynb",539,0,"#",python,content
+7277,12942151,"test.ipynb",540,0,"",python,selection_keyboard
+7278,12942208,"test.ipynb",540,0," ",python,content
+7279,12942208,"test.ipynb",541,0,"",python,selection_keyboard
+7280,12942408,"test.ipynb",540,0,"",python,selection_command
+7281,12942554,"test.ipynb",629,0,"",python,selection_command
+7282,12942890,"test.ipynb",628,0,"",python,selection_command
+7283,12942975,"test.ipynb",628,1,"",python,content
+7284,12943208,"test.ipynb",628,1,"",python,content
+7285,12945482,"test.ipynb",628,0,"#",python,content
+7286,12945483,"test.ipynb",629,0,"",python,selection_keyboard
+7287,12945528,"test.ipynb",629,0," ",python,content
+7288,12945528,"test.ipynb",630,0,"",python,selection_keyboard
+7289,12945731,"test.ipynb",629,0,"",python,selection_command
+7290,12946277,"test.ipynb",540,0,"",python,selection_command
+7291,12946419,"test.ipynb",440,0,"",python,selection_command
+7292,12946546,"test.ipynb",340,0,"",python,selection_command
+7293,12946677,"test.ipynb",338,0,"",python,selection_command
+7294,12946812,"test.ipynb",260,0,"",python,selection_command
+7295,12947129,"test.ipynb",259,1,"",python,content
+7296,12947274,"test.ipynb",259,1,"",python,content
+7297,12949120,"test.ipynb",259,0,"#",python,content
+7298,12949120,"test.ipynb",260,0,"",python,selection_keyboard
+7299,12949170,"test.ipynb",260,0," ",python,content
+7300,12949170,"test.ipynb",261,0,"",python,selection_keyboard
+7301,12949331,"test.ipynb",260,0,"",python,selection_command
+7302,12949446,"test.ipynb",259,0,"",python,selection_command
+7303,12949608,"test.ipynb",180,0,"",python,selection_command
+7304,12949766,"test.ipynb",180,1,"",python,content
+7305,12949906,"test.ipynb",180,1,"",python,content
+7306,12951977,"test.ipynb",180,0,"#",python,content
+7307,12951978,"test.ipynb",181,0,"",python,selection_keyboard
+7308,12952014,"test.ipynb",181,0," ",python,content
+7309,12952014,"test.ipynb",182,0,"",python,selection_keyboard
+7310,12952176,"test.ipynb",181,0,"",python,selection_command
+7311,12952311,"test.ipynb",91,0,"",python,selection_command
+7312,12952378,"test.ipynb",90,0,"",python,selection_command
+7313,12952886,"test.ipynb",90,1,"",python,content
+7314,12953043,"test.ipynb",90,1,"",python,content
+7315,12955149,"test.ipynb",90,0,"#",python,content
+7316,12955150,"test.ipynb",91,0,"",python,selection_keyboard
+7317,12955210,"test.ipynb",91,0," ",python,content
+7318,12955210,"test.ipynb",92,0,"",python,selection_keyboard
+7319,12955359,"test.ipynb",91,0,"",python,selection_command
+7320,12955508,"test.ipynb",90,0,"",python,selection_command
+7321,12955629,"test.ipynb",0,0,"",python,selection_command
+7322,12955816,"test.ipynb",0,1,"",python,content
+7323,12956168,"test.ipynb",0,1,"",python,content
+7324,12957885,"test.ipynb",0,0,"#",python,content
+7325,12957885,"test.ipynb",1,0,"",python,selection_keyboard
+7326,12957973,"test.ipynb",1,0," ",python,content
+7327,12957974,"test.ipynb",2,0,"",python,selection_keyboard
+7328,12958084,"test.ipynb",1,0,"",python,selection_command
+7329,12968533,"test.ipynb",0,89,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works",python,selection_command
+7330,12968626,"test.ipynb",0,179,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works",python,selection_command
+7331,12968884,"test.ipynb",0,258,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)",python,selection_command
+7332,12968911,"test.ipynb",0,337,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)",python,selection_command
+7333,12968945,"test.ipynb",0,338,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n",python,selection_command
+7334,12968969,"test.ipynb",0,438,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works",python,selection_command
+7335,12968998,"test.ipynb",0,538,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works",python,selection_command
+7336,12969040,"test.ipynb",0,627,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq",python,selection_command
+7337,12969177,"test.ipynb",0,716,"# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq))) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.display(nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7338,12969601,"test.ipynb",629,0,"",python,selection_command
+7339,13012406,"test.ipynb",540,0,"",python,selection_command
+7340,13012648,"test.ipynb",440,0,"",python,selection_command
+7341,13012677,"test.ipynb",340,0,"",python,selection_command
+7342,13012709,"test.ipynb",338,0,"",python,selection_command
+7343,13012742,"test.ipynb",260,0,"",python,selection_command
+7344,13012845,"test.ipynb",181,0,"",python,selection_command
+7345,13013023,"test.ipynb",91,0,"",python,selection_command
+7346,13013152,"test.ipynb",1,0,"",python,selection_command
+7347,13013587,"test.ipynb",0,0,"",python,selection_command
+7348,13013689,"test.ipynb",0,1,"",python,content
+7349,13013818,"test.ipynb",0,1,"",python,content
+7350,13014162,"test.ipynb",0,1,"n",python,selection_command
+7351,13014229,"test.ipynb",0,3,"nnx",python,selection_command
+7352,13014406,"test.ipynb",0,4,"nnx.",python,selection_command
+7353,13014581,"test.ipynb",0,11,"nnx.display",python,selection_command
+7354,13014963,"test.ipynb",0,12,"nnx.display(",python,selection_command
+7355,13015095,"test.ipynb",0,12,"",python,content
+7356,13015497,"test.ipynb",75,0,"",python,selection_command
+7357,13015730,"test.ipynb",74,0,"",python,selection_command
+7358,13015847,"test.ipynb",73,0,"",python,selection_command
+7359,13016097,"test.ipynb",72,0,"",python,selection_command
+7360,13016127,"test.ipynb",71,0,"",python,selection_command
+7361,13016159,"test.ipynb",70,0,"",python,selection_command
+7362,13016190,"test.ipynb",69,0,"",python,selection_command
+7363,13016223,"test.ipynb",68,0,"",python,selection_command
+7364,13016258,"test.ipynb",67,0,"",python,selection_command
+7365,13016285,"test.ipynb",66,0,"",python,selection_command
+7366,13016317,"test.ipynb",65,0,"",python,selection_command
+7367,13016351,"test.ipynb",64,0,"",python,selection_command
+7368,13016626,"test.ipynb",63,0,"",python,selection_command
+7369,13017088,"test.ipynb",63,1,"",python,content
+7370,13020266,"test.ipynb",0,0,"",python,selection_command
+7371,13021186,"test.ipynb",75,0,"",python,selection_command
+7372,13021628,"test.ipynb",77,0,"",python,selection_command
+7373,13022150,"test.ipynb",77,1,"n",python,selection_command
+7374,13022299,"test.ipynb",77,2,"nn",python,selection_command
+7375,13022553,"test.ipynb",77,3,"nnx",python,selection_command
+7376,13022579,"test.ipynb",77,4,"nnx.",python,selection_command
+7377,13022610,"test.ipynb",77,5,"nnx.d",python,selection_command
+7378,13022645,"test.ipynb",77,6,"nnx.di",python,selection_command
+7379,13022677,"test.ipynb",77,7,"nnx.dis",python,selection_command
+7380,13022708,"test.ipynb",77,8,"nnx.disp",python,selection_command
+7381,13022741,"test.ipynb",77,9,"nnx.displ",python,selection_command
+7382,13022775,"test.ipynb",77,10,"nnx.displa",python,selection_command
+7383,13022999,"test.ipynb",77,10,"nnx.displa",python,selection_command
+7384,13023086,"test.ipynb",77,11,"nnx.display",python,selection_command
+7385,13023243,"test.ipynb",77,11,"nnx.display",python,selection_command
+7386,13023497,"test.ipynb",77,12,"nnx.display(",python,selection_command
+7387,13023866,"test.ipynb",246,12,"",python,content
+7388,13023866,"test.ipynb",167,12,"",python,content
+7389,13023866,"test.ipynb",77,12,"",python,content
+7390,13023871,"test.ipynb",77,0,"",python,selection_command
+7391,13026996,"test.ipynb",2,0,"",python,selection_command
+7392,13027198,"test.ipynb",0,0,"",python,tab
+7393,13027199,"test.ipynb",0,0,"",python,selection_command
+7394,13030234,"test.ipynb",0,0,"",python,tab
+7395,13030783,"test.ipynb",0,0,"",python,selection_command
+7396,13030850,"test.ipynb",0,0,"#",python,content
+7397,13030850,"test.ipynb",1,0,"",python,selection_keyboard
+7398,13031516,"test.ipynb",1,0," ",python,content
+7399,13031516,"test.ipynb",2,0,"",python,selection_keyboard
+7400,13031678,"test.ipynb",1,0,"",python,selection_command
+7401,13032815,"test.ipynb",78,0,"",python,selection_command
+7402,13033038,"test.ipynb",1,0,"",python,selection_command
+7403,13033133,"test.ipynb",2,0,"",python,selection_command
+7404,13033529,"test.ipynb",2,1,"n",python,selection_command
+7405,13033618,"test.ipynb",2,1,"n",python,selection_command
+7406,13033882,"test.ipynb",2,1,"n",python,selection_command
+7407,13033898,"test.ipynb",2,1,"n",python,selection_command
+7408,13033930,"test.ipynb",0,3,"# n",python,selection_command
+7409,13033963,"test.ipynb",2,1,"n",python,selection_command
+7410,13033996,"test.ipynb",2,1,"n",python,selection_command
+7411,13034139,"test.ipynb",2,1,"n",python,selection_command
+7412,13034314,"test.ipynb",2,1,"n",python,selection_command
+7413,13035598,"test.ipynb",2,74,"nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)) # <- works",python,selection_command
+7414,13036435,"test.ipynb",666,0,"",python,selection_command
+7415,13116367,"test.ipynb",579,88,"# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7416,13116649,"test.ipynb",490,177,"# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7417,13116896,"test.ipynb",390,277,"# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7418,13116928,"test.ipynb",290,377,"# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7419,13116960,"test.ipynb",289,378,"\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7420,13116990,"test.ipynb",222,445,"# nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7421,13117125,"test.ipynb",155,512,"# nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7422,13117265,"test.ipynb",77,590,"# nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7423,13117435,"test.ipynb",0,667,"# nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer.vq)) # <- works\n# nnx.state(nnx.eval_shape(lambda: optimizer.model.tokenizer)).vq) # <- works\n# nnx.state(nnx.eval_shape(lambda: optimizer.model)).tokenizer.vq)\n# nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)\n\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer.vq)) # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model.tokenizer)).vq # <- works\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer.model)).tokenizer.vq\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,selection_command
+7424,13119115,"test.ipynb",75,0,"",python,selection_command
+7425,13484814,"train_dynamics.py",0,0,"",python,tab
+7426,13485579,"train_dynamics.py",10479,0,"",python,selection_command
+7427,13485708,"train_dynamics.py",10418,0,"",python,selection_command
+7428,13485843,"train_dynamics.py",10369,0,"",python,selection_command
+7429,13485973,"train_dynamics.py",10322,0,"",python,selection_command
+7430,13486299,"train_dynamics.py",10323,0,"",python,selection_command
+7431,13486442,"train_dynamics.py",10339,0,"",python,selection_command
+7432,13486610,"train_dynamics.py",10341,0,"",python,selection_command
+7433,13486777,"train_dynamics.py",10344,0,"",python,selection_command
+7434,13486948,"train_dynamics.py",10345,0,"",python,selection_command
+7435,13499762,"test.ipynb",0,0,"",python,tab
+7436,13499762,"test.ipynb",309,0,"",python,selection_mouse
+7437,13500780,"test.ipynb",409,0,"",python,selection_command
+7438,13500873,"test.ipynb",509,0,"",python,selection_command
+7439,13501227,"test.ipynb",598,0,"",python,selection_command
+7440,13501444,"test.ipynb",579,0,"",python,selection_command
+7441,13501700,"test.ipynb",579,1,"",python,content
+7442,13501890,"test.ipynb",579,1,"",python,content
+7443,13502144,"test.ipynb",582,0,"",python,selection_command
+7444,13502428,"test.ipynb",583,0,"",python,selection_command
+7445,13502675,"test.ipynb",587,0,"",python,selection_command
+7446,13502709,"test.ipynb",588,0,"",python,selection_command
+7447,13502743,"test.ipynb",591,0,"",python,selection_command
+7448,13502773,"test.ipynb",592,0,"",python,selection_command
+7449,13502805,"test.ipynb",595,0,"",python,selection_command
+7450,13502839,"test.ipynb",596,0,"",python,selection_command
+7451,13502873,"test.ipynb",601,0,"",python,selection_command
+7452,13502908,"test.ipynb",602,0,"",python,selection_command
+7453,13502941,"test.ipynb",623,0,"",python,selection_command
+7454,13502975,"test.ipynb",625,0,"",python,selection_command
+7455,13503009,"test.ipynb",628,0,"",python,selection_command
+7456,13503043,"test.ipynb",629,0,"",python,selection_command
+7457,13503077,"test.ipynb",634,0,"",python,selection_command
+7458,13503112,"test.ipynb",635,0,"",python,selection_command
+7459,13503144,"test.ipynb",644,0,"",python,selection_command
+7460,13503178,"test.ipynb",647,0,"",python,selection_command
+7461,13503712,"test.ipynb",664,0,"",python,selection_command
+7462,13504550,"test.ipynb",663,0,"",python,selection_command
+7463,13504797,"test.ipynb",662,0,"",python,selection_command
+7464,13504827,"test.ipynb",653,0,"",python,selection_command
+7465,13504860,"test.ipynb",652,0,"",python,selection_command
+7466,13504893,"test.ipynb",647,0,"",python,selection_command
+7467,13505327,"test.ipynb",644,0,"",python,selection_command
+7468,13505511,"test.ipynb",635,0,"",python,selection_command
+7469,13507864,"test.ipynb",634,0,"",python,selection_command
+7470,13507931,"test.ipynb",634,1,"(",python,selection_command
+7471,13508199,"test.ipynb",629,6,"state(",python,selection_command
+7472,13508566,"test.ipynb",628,7,".state(",python,selection_command
+7473,13509098,"test.ipynb",625,10,"nnx.state(",python,selection_command
+7474,13509869,"test.ipynb",625,10,"",python,content
+7475,13510248,"test.ipynb",634,0,"",python,selection_command
+7476,13510943,"test.ipynb",634,1,"",python,content
+7477,13521631,"test.ipynb",606,0,"",python,selection_mouse
+7478,13522477,"test.ipynb",635,0,")",python,content
+7479,13522478,"test.ipynb",634,0,"",python,selection_command
+7480,13523002,"test.ipynb",625,0,"nnx.state(",python,content
+7481,13523005,"test.ipynb",625,0,"",python,selection_command
+7482,13523954,"test.ipynb",579,0,"",python,selection_command
+7483,13524050,"test.ipynb",579,0,"#",python,content
+7484,13524051,"test.ipynb",580,0,"",python,selection_keyboard
+7485,13524062,"test.ipynb",580,0," ",python,content
+7486,13524062,"test.ipynb",581,0,"",python,selection_keyboard
+7487,13524397,"test.ipynb",580,0,"",python,selection_command
+7488,13524671,"test.ipynb",667,0,"\n",python,content
+7489,13526555,"test.ipynb",668,0,"o",python,content
+7490,13526555,"test.ipynb",669,0,"",python,selection_keyboard
+7491,13526673,"test.ipynb",669,0,"p",python,content
+7492,13526673,"test.ipynb",670,0,"",python,selection_keyboard
+7493,13526725,"test.ipynb",670,0,"t",python,content
+7494,13526725,"test.ipynb",671,0,"",python,selection_keyboard
+7495,13526841,"test.ipynb",671,0,"i",python,content
+7496,13526842,"test.ipynb",672,0,"",python,selection_keyboard
+7497,13526861,"test.ipynb",672,0,"m",python,content
+7498,13526862,"test.ipynb",673,0,"",python,selection_keyboard
+7499,13527045,"test.ipynb",673,0,"i",python,content
+7500,13527046,"test.ipynb",674,0,"",python,selection_keyboard
+7501,13527196,"test.ipynb",674,0,"z",python,content
+7502,13527197,"test.ipynb",675,0,"",python,selection_keyboard
+7503,13527199,"test.ipynb",675,0,"e",python,content
+7504,13527199,"test.ipynb",676,0,"",python,selection_keyboard
+7505,13527261,"test.ipynb",676,0,"r",python,content
+7506,13527261,"test.ipynb",677,0,"",python,selection_keyboard
+7507,13533488,"test.ipynb",677,0,".",python,content
+7508,13533488,"test.ipynb",678,0,"",python,selection_keyboard
+7509,13533609,"test.ipynb",678,0,"m",python,content
+7510,13533609,"test.ipynb",679,0,"",python,selection_keyboard
+7511,13533674,"test.ipynb",679,0,"o",python,content
+7512,13533675,"test.ipynb",680,0,"",python,selection_keyboard
+7513,13533728,"test.ipynb",680,0,"d",python,content
+7514,13533728,"test.ipynb",681,0,"",python,selection_keyboard
+7515,13533821,"test.ipynb",681,0,"e",python,content
+7516,13533821,"test.ipynb",682,0,"",python,selection_keyboard
+7517,13533894,"test.ipynb",682,0,"l",python,content
+7518,13533894,"test.ipynb",683,0,"",python,selection_keyboard
+7519,13536779,"test.ipynb",682,0,"",python,selection_command
+7520,13537220,"test.ipynb",667,16,"",python,content
+7521,13537237,"test.ipynb",579,0,"",python,selection_command
+7522,13537341,"test.ipynb",490,0,"",python,selection_command
+7523,13537682,"test.ipynb",492,0,"",python,selection_command
+7524,13538015,"test.ipynb",581,0,"",python,selection_command
+7525,13538211,"test.ipynb",584,0,"",python,selection_command
+7526,13538393,"test.ipynb",585,0,"",python,selection_command
+7527,13538426,"test.ipynb",589,0,"",python,selection_command
+7528,13538540,"test.ipynb",590,0,"",python,selection_command
+7529,13538540,"test.ipynb",593,0,"",python,selection_command
+7530,13538540,"test.ipynb",594,0,"",python,selection_command
+7531,13538556,"test.ipynb",597,0,"",python,selection_command
+7532,13538588,"test.ipynb",598,0,"",python,selection_command
+7533,13538626,"test.ipynb",603,0,"",python,selection_command
+7534,13538730,"test.ipynb",604,0,"",python,selection_command
+7535,13538730,"test.ipynb",625,0,"",python,selection_command
+7536,13538731,"test.ipynb",627,0,"",python,selection_command
+7537,13538758,"test.ipynb",630,0,"",python,selection_command
+7538,13538944,"test.ipynb",635,0,"",python,selection_command
+7539,13539145,"test.ipynb",636,0,"",python,selection_command
+7540,13539412,"test.ipynb",645,0,"",python,selection_command
+7541,13543134,"test.ipynb",667,0,"\n",python,content
+7542,13543547,"test.ipynb",668,0,"\n",python,content
+7543,13544029,"test.ipynb",669,0,"\n# jax.tree.map(ocp.utils.to_shape_dtype_struct, nnx.state(optimizer)).model.tokenizer.vq",python,content
+7544,13544032,"test.ipynb",670,0,"",python,selection_command
+7545,13544564,"test.ipynb",669,0,"",python,selection_command
+7546,13544853,"test.ipynb",669,1,"",python,content
+7547,13545075,"test.ipynb",669,1,"",python,content
+7548,13545226,"test.ipynb",669,1,"",python,content
+7549,13545508,"test.ipynb",672,0,"",python,selection_command
+7550,13545761,"test.ipynb",673,0,"",python,selection_command
+7551,13545791,"test.ipynb",677,0,"",python,selection_command
+7552,13545823,"test.ipynb",678,0,"",python,selection_command
+7553,13545857,"test.ipynb",681,0,"",python,selection_command
+7554,13545889,"test.ipynb",682,0,"",python,selection_command
+7555,13545923,"test.ipynb",685,0,"",python,selection_command
+7556,13545956,"test.ipynb",686,0,"",python,selection_command
+7557,13545989,"test.ipynb",691,0,"",python,selection_command
+7558,13546159,"test.ipynb",692,0,"",python,selection_command
+7559,13546349,"test.ipynb",713,0,"",python,selection_command
+7560,13546481,"test.ipynb",715,0,"",python,selection_command
+7561,13547206,"test.ipynb",715,1,"n",python,selection_command
+7562,13547245,"test.ipynb",715,3,"nnx",python,selection_command
+7563,13547429,"test.ipynb",715,4,"nnx.",python,selection_command
+7564,13547660,"test.ipynb",715,9,"nnx.state",python,selection_command
+7565,13548622,"test.ipynb",715,10,"nnx.state(",python,selection_command
+7566,13550671,"test.ipynb",715,10,"",python,content
+7567,13551049,"test.ipynb",724,0,"",python,selection_command
+7568,13551966,"test.ipynb",724,1,")",python,selection_command
+7569,13552044,"test.ipynb",724,3,")).",python,selection_command
+7570,13552210,"test.ipynb",724,8,")).model",python,selection_command
+7571,13552584,"test.ipynb",724,7,")).mode",python,selection_command
+7572,13552731,"test.ipynb",724,6,")).mod",python,selection_command
+7573,13552988,"test.ipynb",724,5,")).mo",python,selection_command
+7574,13553012,"test.ipynb",724,4,")).m",python,selection_command
+7575,13553042,"test.ipynb",724,3,")).",python,selection_command
+7576,13553074,"test.ipynb",724,2,"))",python,selection_command
+7577,13553209,"test.ipynb",724,1,")",python,selection_command
+7578,13553469,"test.ipynb",724,1,"",python,content
+7579,13553850,"test.ipynb",724,1,"",python,content
+7580,13555148,"test.ipynb",743,0,"",python,selection_command
+7581,13556300,"test.ipynb",742,0,"",python,selection_command
+7582,13557568,"test.ipynb",743,0,"",python,selection_command
+7583,13557630,"test.ipynb",743,0,")",python,content
+7584,13557630,"test.ipynb",744,0,"",python,selection_keyboard
+7585,13557991,"test.ipynb",743,0,"",python,selection_command
+7586,13560563,"test.ipynb",742,0,"",python,selection_command
+7587,13560675,"test.ipynb",742,1,"q",python,selection_command
+7588,13560775,"test.ipynb",741,2,"vq",python,selection_command
+7589,13560946,"test.ipynb",740,3,".vq",python,selection_command
+7590,13561096,"test.ipynb",731,12,"tokenizer.vq",python,selection_command
+7591,13561258,"test.ipynb",730,13,".tokenizer.vq",python,selection_command
+7592,13561633,"test.ipynb",730,13,"",python,content
+7593,13566086,"test.ipynb",668,63,"",python,content
+7594,13942286,"train_dynamics.py",0,0,"",python,tab
+7595,13944009,"test.ipynb",0,0,"",python,tab
+7596,13944009,"test.ipynb",604,0,"",python,selection_mouse
+7597,13946906,"test.ipynb",668,0,"",python,selection_command
+7598,13947476,"test.ipynb",604,0,"",python,selection_command
+7599,13947602,"test.ipynb",515,0,"",python,selection_command
+7600,13947729,"test.ipynb",415,0,"",python,selection_command
+7601,13947863,"test.ipynb",315,0,"",python,selection_command
+7602,13947980,"test.ipynb",289,0,"",python,selection_command
+7603,13948117,"test.ipynb",247,0,"",python,selection_command
+7604,13948862,"test.ipynb",289,0,"",python,selection_command
+7605,13949112,"test.ipynb",315,0,"",python,selection_command
+7606,13949137,"test.ipynb",415,0,"",python,selection_command
+7607,13949171,"test.ipynb",515,0,"",python,selection_command
+7608,13949198,"test.ipynb",604,0,"",python,selection_command
+7609,13949232,"test.ipynb",668,0,"",python,selection_command
+7610,13949704,"test.ipynb",668,0,"\n",python,content
+7611,13949924,"test.ipynb",669,0,"\n# nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq)",python,content
+7612,13949927,"test.ipynb",670,0,"",python,selection_command
+7613,13950578,"test.ipynb",670,1,"",python,content
+7614,13950724,"test.ipynb",670,1,"",python,content
+7615,13952049,"test.ipynb",673,0,"",python,selection_command
+7616,13952215,"test.ipynb",674,0,"",python,selection_command
+7617,13952481,"test.ipynb",674,5,"",python,content
+7618,13952802,"test.ipynb",674,0,"s",python,content
+7619,13952802,"test.ipynb",675,0,"",python,selection_keyboard
+7620,13952879,"test.ipynb",675,0,"p",python,content
+7621,13952879,"test.ipynb",676,0,"",python,selection_keyboard
+7622,13953023,"test.ipynb",676,0,"l",python,content
+7623,13953023,"test.ipynb",677,0,"",python,selection_keyboard
+7624,13953112,"test.ipynb",677,0,"i",python,content
+7625,13953113,"test.ipynb",678,0,"",python,selection_keyboard
+7626,13953206,"test.ipynb",678,0,"t",python,content
+7627,13953207,"test.ipynb",679,0,"",python,selection_keyboard
+7628,13953904,"test.ipynb",678,0,"",python,selection_command
+7629,13962298,"test.ipynb",734,0,"",python,selection_command
+7630,13962425,"test.ipynb",734,0,")",python,content
+7631,13962425,"test.ipynb",735,0,"",python,selection_keyboard
+7632,13963261,"test.ipynb",734,1,"",python,content
+7633,13963471,"test.ipynb",733,1,"",python,content
+7634,13969393,"test.ipynb",732,0,"",python,selection_command
+7635,13978925,"test.ipynb",669,0,"",python,selection_command
+7636,13979249,"test.ipynb",668,0,"",python,selection_command
+7637,13979249,"test.ipynb",641,0,"",python,selection_command
+7638,13979250,"test.ipynb",552,0,"",python,selection_command
+7639,13979271,"test.ipynb",452,0,"",python,selection_command
+7640,14007760,"test.ipynb",352,0,"",python,selection_command
+7641,14007909,"test.ipynb",289,0,"",python,selection_command
+7642,14008029,"test.ipynb",284,0,"",python,selection_command
+7643,14008243,"test.ipynb",217,0,"",python,selection_command
+7644,14008311,"test.ipynb",139,0,"",python,selection_command
+7645,14008512,"test.ipynb",140,0,"",python,selection_command
+7646,14008690,"test.ipynb",63,0,"",python,selection_command
+7647,14009025,"test.ipynb",64,0,"",python,selection_command
+7648,14009926,"test.ipynb",11,0,"",python,selection_command
+7649,14010535,"test.ipynb",64,0,"",python,selection_command
+7650,14012199,"test.ipynb",141,0,"",python,selection_command
+7651,14012440,"test.ipynb",219,0,"",python,selection_command
+7652,14012464,"test.ipynb",286,0,"",python,selection_command
+7653,14012503,"test.ipynb",289,0,"",python,selection_command
+7654,14012531,"test.ipynb",354,0,"",python,selection_command
+7655,14012566,"test.ipynb",454,0,"",python,selection_command
+7656,14012597,"test.ipynb",554,0,"",python,selection_command
+7657,14012636,"test.ipynb",643,0,"",python,selection_command
+7658,14012671,"test.ipynb",668,0,"",python,selection_command
+7659,14013059,"test.ipynb",669,0,"",python,selection_command
+7660,14013382,"test.ipynb",732,0,"",python,selection_command
+7661,14013708,"test.ipynb",670,0,"",python,selection_command
+7662,14013927,"test.ipynb",673,0,"",python,selection_command
+7663,14014079,"test.ipynb",674,0,"",python,selection_command
+7664,14014242,"test.ipynb",679,0,"",python,selection_command
+7665,14014356,"test.ipynb",680,0,"",python,selection_command
+7666,14014759,"test.ipynb",679,0,"",python,selection_command
+7667,14015740,"test.ipynb",713,0,"",python,selection_command
+7668,14016116,"test.ipynb",679,0,"",python,selection_command
+7669,14016412,"test.ipynb",713,0,"",python,selection_command
+7670,14016744,"test.ipynb",679,0,"",python,selection_command
+7671,14020475,"test.ipynb",680,0,"",python,selection_command
+7672,14020727,"test.ipynb",683,0,"",python,selection_command
+7673,14020758,"test.ipynb",684,0,"",python,selection_command
+7674,14020788,"test.ipynb",694,0,"",python,selection_command
+7675,14020812,"test.ipynb",695,0,"",python,selection_command
+7676,14020847,"test.ipynb",701,0,"",python,selection_command
+7677,14020880,"test.ipynb",703,0,"",python,selection_command
+7678,14021164,"test.ipynb",712,0,"",python,selection_command
+7679,14021357,"test.ipynb",715,0,"",python,selection_command
+7680,14021993,"test.ipynb",714,0,"",python,selection_command
+7681,14022133,"test.ipynb",713,0,"",python,selection_command
+7682,14022540,"test.ipynb",714,0,"",python,selection_command
+7683,14024420,"test.ipynb",714,19,"",python,content
+7684,14038308,"test.ipynb",713,0,"",python,selection_command
+7685,14038683,"test.ipynb",670,0,"",python,selection_command
+7686,14039065,"test.ipynb",670,0,"n",python,content
+7687,14039066,"test.ipynb",671,0,"",python,selection_keyboard
+7688,14039175,"test.ipynb",671,0,"n",python,content
+7689,14039175,"test.ipynb",672,0,"",python,selection_keyboard
+7690,14039240,"test.ipynb",672,0,"x",python,content
+7691,14039240,"test.ipynb",673,0,"",python,selection_keyboard
+7692,14039378,"test.ipynb",673,0,".",python,content
+7693,14039378,"test.ipynb",674,0,"",python,selection_keyboard
+7694,14039478,"test.ipynb",674,0,"s",python,content
+7695,14039479,"test.ipynb",675,0,"",python,selection_keyboard
+7696,14039878,"test.ipynb",674,1,"",python,content
+7697,14039979,"test.ipynb",674,0,"d",python,content
+7698,14039979,"test.ipynb",675,0,"",python,selection_keyboard
+7699,14040031,"test.ipynb",675,0,"i",python,content
+7700,14040032,"test.ipynb",676,0,"",python,selection_keyboard
+7701,14040109,"test.ipynb",676,0,"s",python,content
+7702,14040110,"test.ipynb",677,0,"",python,selection_keyboard
+7703,14040179,"test.ipynb",677,0,"p",python,content
+7704,14040180,"test.ipynb",678,0,"",python,selection_keyboard
+7705,14040355,"test.ipynb",678,0,"l",python,content
+7706,14040355,"test.ipynb",679,0,"",python,selection_keyboard
+7707,14040423,"test.ipynb",679,0,"a",python,content
+7708,14040424,"test.ipynb",680,0,"",python,selection_keyboard
+7709,14040552,"test.ipynb",680,0,"y",python,content
+7710,14040553,"test.ipynb",681,0,"",python,selection_keyboard
+7711,14040742,"test.ipynb",681,0,"(",python,content
+7712,14040742,"test.ipynb",682,0,"",python,selection_keyboard
+7713,14041024,"test.ipynb",681,0,"",python,selection_command
+7714,14041240,"test.ipynb",726,0,"",python,selection_command
+7715,14041329,"test.ipynb",726,0,")",python,content
+7716,14041329,"test.ipynb",727,0,"",python,selection_keyboard
+7717,14202315,"train_dynamics.py",0,0,"",python,tab
+7718,14202315,"train_dynamics.py",10361,0,"",python,selection_mouse
+7719,14202456,"train_dynamics.py",10360,0,"",python,selection_command
+7720,14212340,"test.ipynb",0,0,"",python,tab
+7721,14214045,"train_dynamics.py",0,0,"",python,tab
+7722,14214046,"train_dynamics.py",10361,0,"",python,selection_mouse
+7723,14214046,"train_dynamics.py",10360,0,"",python,selection_command
+7724,14214773,"test.ipynb",0,0,"",python,tab
+7725,14216318,"train_dynamics.py",0,0,"",python,tab
+7726,14216318,"train_dynamics.py",10361,0,"",python,selection_mouse
+7727,14216358,"train_dynamics.py",10360,0,"",python,selection_command
+7728,14220223,"train_dynamics.py",10471,9,"",python,content
+7729,14220238,"train_dynamics.py",10471,0,"",python,selection_command
+7730,14220560,"train_dynamics.py",10410,13,"",python,content
+7731,14220579,"train_dynamics.py",10410,0,"",python,selection_command
+7732,14220906,"train_dynamics.py",10459,0,")",python,content
+7733,14220908,"train_dynamics.py",10459,0,"",python,selection_command
+7734,14221592,"train_dynamics.py",10441,2,"",python,content
+7735,14221595,"train_dynamics.py",10441,0,"",python,selection_command
+7736,14221986,"train_dynamics.py",10441,0,"(",python,content
+7737,14221988,"train_dynamics.py",10441,0,"",python,selection_command
+7738,14222340,"train_dynamics.py",10459,0,")",python,content
+7739,14222341,"train_dynamics.py",10459,0,"",python,selection_command
+7740,14222625,"train_dynamics.py",10459,1,"",python,content
+7741,14222630,"train_dynamics.py",10458,0,"",python,selection_command
+7742,14222847,"train_dynamics.py",10458,1,"",python,content
+7743,14222864,"train_dynamics.py",10457,0,"",python,selection_command
+7744,14223045,"train_dynamics.py",10428,13,"",python,content
+7745,14223057,"train_dynamics.py",10397,25,"nnx.eval",python,content
+7746,14223060,"train_dynamics.py",10397,0,"",python,selection_command
+7747,14223242,"train_dynamics.py",10421,6,"",python,content
+7748,14223242,"train_dynamics.py",10412,0,"lambda: ",python,content
+7749,14223243,"train_dynamics.py",10412,0,"",python,selection_command
+7750,14223788,"train_dynamics.py",10332,6,"",python,content
+7751,14223789,"train_dynamics.py",10323,0,"abstract_",python,content
+7752,14223790,"train_dynamics.py",10323,0,"",python,selection_command
+7753,14224616,"train_dynamics.py",10391,6,"",python,content
+7754,14224617,"train_dynamics.py",10391,0,"",python,selection_command
+7755,14224925,"train_dynamics.py",10354,0,"abstract_",python,content
+7756,14224927,"train_dynamics.py",10354,0,"",python,selection_command
+7757,14225187,"train_dynamics.py",10348,59,"",python,content
+7758,14225190,"train_dynamics.py",10226,0,"",python,selection_command
+7759,14225406,"train_dynamics.py",10386,0,"abstract_optimizer = nnx.state(abstract_optimizer)\n ",python,content
+7760,14225410,"train_dynamics.py",10404,0,"",python,selection_command
+7761,14226026,"train_dynamics.py",10404,0,"_state",python,content
+7762,14226029,"train_dynamics.py",10404,0,"",python,selection_command
+7763,14226357,"train_dynamics.py",10451,21,"",python,content
+7764,14226359,"train_dynamics.py",10386,0,"",python,selection_command
+7765,14226862,"train_dynamics.py",10323,0,"optimizer.model.tokenizer.vq.drop = nnx.Dropout(0.1, rngs=rngs)\n ",python,content
+7766,14226879,"train_dynamics.py",10323,0,"",python,selection_command
+7767,14228513,"train_dynamics.py",10323,72,"",python,content
+7768,14230440,"train_dynamics.py",10451,0,"breakpoint()\n ",python,content
+7769,14230445,"train_dynamics.py",10386,0,"",python,selection_command
+7770,14231185,"train_dynamics.py",10451,21,"",python,content
+7771,14232136,"train_dynamics.py",10451,0,"breakpoint()\n ",python,content
+7772,14232276,"train_dynamics.py",10404,6,"",python,content
+7773,14232282,"train_dynamics.py",10404,0,"",python,selection_command
+7774,14233162,"train_dynamics.py",10404,0,"_state",python,content
+7775,14233663,"train_dynamics.py",10451,21,"",python,content
+7776,14233664,"train_dynamics.py",10386,0,"",python,selection_command
+7777,14234228,"train_dynamics.py",10323,0,"optimizer.model.tokenizer.vq.drop = nnx.Dropout(0.1, rngs=rngs)\n ",python,content
+7778,14234233,"train_dynamics.py",10323,0,"",python,selection_command
+7779,14234536,"train_dynamics.py",10323,72,"",python,content
+7780,14236128,"train_dynamics.py",13773,0,"",python,selection_command
+7781,14236545,"train_dynamics.py",13742,0,"",python,selection_command
+7782,14236777,"train_dynamics.py",13741,0,"",python,selection_command
+7783,14236811,"train_dynamics.py",13719,0,"",python,selection_command
+7784,14236853,"train_dynamics.py",13680,0,"",python,selection_command
+7785,14236886,"train_dynamics.py",13622,0,"",python,selection_command
+7786,14236919,"train_dynamics.py",13604,0,"",python,selection_command
+7787,14236946,"train_dynamics.py",13581,0,"",python,selection_command
+7788,14236976,"train_dynamics.py",13491,0,"",python,selection_command
+7789,14237010,"train_dynamics.py",13417,0,"",python,selection_command
+7790,14237043,"train_dynamics.py",13372,0,"",python,selection_command
+7791,14237076,"train_dynamics.py",13346,0,"",python,selection_command
+7792,14237401,"train_dynamics.py",13305,0,"",python,selection_command
+7793,14237469,"train_dynamics.py",13276,0,"",python,selection_command
+7794,14237758,"train_dynamics.py",13221,0,"",python,selection_command
+7795,14237932,"train_dynamics.py",13145,0,"",python,selection_command
+7796,14238113,"train_dynamics.py",13221,0,"",python,selection_command
+7797,14239449,"train_dynamics.py",13237,0,"",python,selection_command
+7798,14239592,"train_dynamics.py",13253,0,"",python,selection_command
+7799,14240335,"train_dynamics.py",13255,0,"",python,selection_command
+7800,14240526,"train_dynamics.py",13258,0,"",python,selection_command
+7801,14240957,"train_dynamics.py",13259,0,"",python,selection_command
+7802,14241111,"train_dynamics.py",13264,0,"",python,selection_command
+7803,15051019,"train_dynamics.py",13303,0,"",python,selection_command
+7804,15051550,"train_dynamics.py",13264,0,"",python,selection_command
+7805,15051724,"train_dynamics.py",13188,0,"",python,selection_command
+7806,15052015,"train_dynamics.py",13264,0,"",python,selection_command
+7807,15055556,"train_dynamics.py",12173,0,"",python,selection_command
+7808,15055864,"train_dynamics.py",11072,0,"",python,selection_command
+7809,15056914,"train_dynamics.py",9919,0,"",python,selection_command
+7810,15059311,"train_dynamics.py",11072,0,"",python,selection_command
+7811,15062745,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+7812,15063253,"experiments/dynamics_grain_tok_restore.sh",355,0,"",shellscript,selection_command
+7813,15063504,"experiments/dynamics_grain_tok_restore.sh",366,0,"",shellscript,selection_command
+7814,15063534,"experiments/dynamics_grain_tok_restore.sh",409,0,"",shellscript,selection_command
+7815,15063566,"experiments/dynamics_grain_tok_restore.sh",455,0,"",shellscript,selection_command
+7816,15063740,"experiments/dynamics_grain_tok_restore.sh",476,0,"",shellscript,selection_command
+7817,15064111,"experiments/dynamics_grain_tok_restore.sh",457,21,"",shellscript,content
+7818,15064130,"experiments/dynamics_grain_tok_restore.sh",461,0,"",shellscript,selection_command
+7819,15067351,"train_dynamics.py",0,0,"",python,tab
+7820,15068443,"train_dynamics.py",13773,0,"",python,selection_command
+7821,15069396,"train_dynamics.py",13742,0,"",python,selection_command
+7822,15069642,"train_dynamics.py",13741,0,"",python,selection_command
+7823,15069667,"train_dynamics.py",13719,0,"",python,selection_command
+7824,15069699,"train_dynamics.py",13680,0,"",python,selection_command
+7825,15193626,"train_dynamics.py",13622,0,"",python,selection_command
+7826,15193873,"train_dynamics.py",13604,0,"",python,selection_command
+7827,15193905,"train_dynamics.py",13581,0,"",python,selection_command
+7828,15193935,"train_dynamics.py",13491,0,"",python,selection_command
+7829,15193970,"train_dynamics.py",13417,0,"",python,selection_command
+7830,15194072,"train_dynamics.py",13372,0,"",python,selection_command
+7831,15194073,"train_dynamics.py",13346,0,"",python,selection_command
+7832,15194206,"train_dynamics.py",13305,0,"",python,selection_command
+7833,15422358,"train_dynamics.py",13276,0,"",python,selection_command
+7834,15423093,"train_dynamics.py",12608,0,"",python,selection_command
+7835,15423370,"train_dynamics.py",11824,0,"",python,selection_command
+7836,15423551,"train_dynamics.py",10991,0,"",python,selection_command
+7837,15424007,"train_dynamics.py",10083,0,"",python,selection_command
+7838,15424930,"train_dynamics.py",10158,0,"",python,selection_command
+7839,15425187,"train_dynamics.py",10163,0,"",python,selection_command
+7840,15425201,"train_dynamics.py",10196,0,"",python,selection_command
+7841,15425233,"train_dynamics.py",10222,0,"",python,selection_command
+7842,15425263,"train_dynamics.py",10319,0,"",python,selection_command
+7843,15425298,"train_dynamics.py",10382,0,"",python,selection_command
+7844,15425329,"train_dynamics.py",10447,0,"",python,selection_command
+7845,15425624,"train_dynamics.py",10382,0,"",python,selection_command
+7846,15425770,"train_dynamics.py",10319,0,"",python,selection_command
+7847,15426034,"train_dynamics.py",10382,0,"",python,selection_command
+7848,15426533,"train_dynamics.py",10442,0,"\n ",python,content
+7849,15426873,"train_dynamics.py",10451,0,"b",python,content
+7850,15426874,"train_dynamics.py",10452,0,"",python,selection_keyboard
+7851,15426932,"train_dynamics.py",10452,0,"r",python,content
+7852,15426933,"train_dynamics.py",10453,0,"",python,selection_keyboard
+7853,15426988,"train_dynamics.py",10453,0,"e",python,content
+7854,15426988,"train_dynamics.py",10454,0,"",python,selection_keyboard
+7855,15427051,"train_dynamics.py",10454,0,"a",python,content
+7856,15427052,"train_dynamics.py",10455,0,"",python,selection_keyboard
+7857,15427084,"train_dynamics.py",10455,0,"k",python,content
+7858,15427085,"train_dynamics.py",10456,0,"",python,selection_keyboard
+7859,15427200,"train_dynamics.py",10456,0,"p",python,content
+7860,15427200,"train_dynamics.py",10457,0,"",python,selection_keyboard
+7861,15427270,"train_dynamics.py",10457,0,"o",python,content
+7862,15427270,"train_dynamics.py",10458,0,"",python,selection_keyboard
+7863,15427350,"train_dynamics.py",10458,0,"i",python,content
+7864,15427350,"train_dynamics.py",10459,0,"",python,selection_keyboard
+7865,15427433,"train_dynamics.py",10459,0,"n",python,content
+7866,15427433,"train_dynamics.py",10460,0,"",python,selection_keyboard
+7867,15427489,"train_dynamics.py",10460,0,"t",python,content
+7868,15427489,"train_dynamics.py",10461,0,"",python,selection_keyboard
+7869,15427787,"train_dynamics.py",10461,0,"()",python,content
+7870,15427787,"train_dynamics.py",10462,0,"",python,selection_keyboard
+7871,15427800,"train_dynamics.py",10462,1,")",python,content
+7872,15427801,"train_dynamics.py",10463,0,"",python,selection_keyboard
+7873,15428022,"train_dynamics.py",10462,0,"",python,selection_command
+7874,15434860,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+7875,15435593,"experiments/dynamics_grain_tok_restore.sh",456,0,"\n",shellscript,content
+7876,15435609,"experiments/dynamics_grain_tok_restore.sh",457,0," ",shellscript,content
+7877,15436367,"experiments/dynamics_grain_tok_restore.sh",461,0,"--restore_ckpt \",shellscript,content
+7878,15436560,"experiments/dynamics_grain_tok_restore.sh",476,0,"",shellscript,selection_command
+7879,15440872,"train_dynamics.py",0,0,"",python,tab
+7880,15516869,"train_dynamics.py",10443,20," breakpoint()",python,selection_command
+7881,15595636,"train_dynamics.py",10462,0,"",python,selection_command
+7882,15596139,"train_dynamics.py",10461,0,"",python,selection_command
+7883,15596304,"train_dynamics.py",10451,0,"",python,selection_command
+7884,15596667,"train_dynamics.py",13313,0,"",python,selection_command
+7885,15598058,"train_dynamics.py",13297,28," breakpoint()",python,selection_command
+7886,15616097,"train_dynamics.py",13313,0,"",python,selection_command
+7887,15706331,"test.ipynb",0,0,"",python,tab
+7888,15707457,"test.ipynb",0,0,"",python,tab
+7889,15707458,"test.ipynb",0,0,"",python,tab
+7890,15708427,"test.ipynb",0,0,"",python,tab
+7891,15714718,"test.ipynb",0,0,"",python,tab
+7892,15715828,"test.ipynb",0,0,"d",python,content
+7893,15716205,"test.ipynb",1,0,"u",python,content
+7894,15716206,"test.ipynb",2,0,"",python,selection_keyboard
+7895,15716376,"test.ipynb",2,0,"m",python,content
+7896,15716377,"test.ipynb",3,0,"",python,selection_keyboard
+7897,15716479,"test.ipynb",3,0,"m",python,content
+7898,15716480,"test.ipynb",4,0,"",python,selection_keyboard
+7899,15717035,"test.ipynb",4,0,"y",python,content
+7900,15717036,"test.ipynb",5,0,"",python,selection_keyboard
+7901,15717240,"test.ipynb",5,0,"_",python,content
+7902,15717241,"test.ipynb",6,0,"",python,selection_keyboard
+7903,15717405,"test.ipynb",6,0,"i",python,content
+7904,15717405,"test.ipynb",7,0,"",python,selection_keyboard
+7905,15717469,"test.ipynb",7,0,"n",python,content
+7906,15717470,"test.ipynb",8,0,"",python,selection_keyboard
+7907,15717584,"test.ipynb",8,0,"p",python,content
+7908,15717584,"test.ipynb",9,0,"",python,selection_keyboard
+7909,15717676,"test.ipynb",9,0,"u",python,content
+7910,15717676,"test.ipynb",10,0,"",python,selection_keyboard
+7911,15717740,"test.ipynb",10,0,"t",python,content
+7912,15717741,"test.ipynb",11,0,"",python,selection_keyboard
+7913,15717867,"test.ipynb",11,0," ",python,content
+7914,15717867,"test.ipynb",12,0,"",python,selection_keyboard
+7915,15717985,"test.ipynb",12,0,"=",python,content
+7916,15718086,"test.ipynb",13,0," ",python,content
+7917,15718579,"test.ipynb",14,0,"jnp.ones((1, 16, 90, 160, 3))\n\n\n\n\n\n\n\n\n\n\n",python,content
+7918,15719445,"test.ipynb",53,1,"",python,content
+7919,15719772,"test.ipynb",52,1,"",python,content
+7920,15719989,"test.ipynb",51,1,"",python,content
+7921,15720022,"test.ipynb",50,1,"",python,content
+7922,15720054,"test.ipynb",49,1,"",python,content
+7923,15720086,"test.ipynb",48,1,"",python,content
+7924,15720130,"test.ipynb",47,1,"",python,content
+7925,15720161,"test.ipynb",46,1,"",python,content
+7926,15720317,"test.ipynb",45,1,"",python,content
+7927,15720487,"test.ipynb",44,1,"",python,content
+7928,15722585,"test.ipynb",44,0,"n",python,content
+7929,15722586,"test.ipynb",45,0,"",python,selection_keyboard
+7930,15722614,"test.ipynb",45,0,"n",python,content
+7931,15722615,"test.ipynb",46,0,"",python,selection_keyboard
+7932,15722661,"test.ipynb",46,0,"x",python,content
+7933,15722661,"test.ipynb",47,0,"",python,selection_keyboard
+7934,15722763,"test.ipynb",47,0,".",python,content
+7935,15722764,"test.ipynb",48,0,"",python,selection_keyboard
+7936,15722918,"test.ipynb",48,0,"e",python,content
+7937,15722919,"test.ipynb",49,0,"",python,selection_keyboard
+7938,15723021,"test.ipynb",49,0,"v",python,content
+7939,15723021,"test.ipynb",50,0,"",python,selection_keyboard
+7940,15723109,"test.ipynb",50,0,"a",python,content
+7941,15723109,"test.ipynb",51,0,"",python,selection_keyboard
+7942,15723173,"test.ipynb",51,0,"l",python,content
+7943,15723173,"test.ipynb",52,0,"",python,selection_keyboard
+7944,15723442,"test.ipynb",52,0,"_",python,content
+7945,15723443,"test.ipynb",53,0,"",python,selection_keyboard
+7946,15723966,"test.ipynb",53,0,"s",python,content
+7947,15723967,"test.ipynb",54,0,"",python,selection_keyboard
+7948,15724013,"test.ipynb",54,0,"h",python,content
+7949,15724014,"test.ipynb",55,0,"",python,selection_keyboard
+7950,15724157,"test.ipynb",55,0,"a",python,content
+7951,15724158,"test.ipynb",56,0,"",python,selection_keyboard
+7952,15724209,"test.ipynb",56,0,"p",python,content
+7953,15724209,"test.ipynb",57,0,"",python,selection_keyboard
+7954,15724524,"test.ipynb",57,0,"e",python,content
+7955,15724524,"test.ipynb",58,0,"",python,selection_keyboard
+7956,15724786,"test.ipynb",58,0,"()",python,content
+7957,15724786,"test.ipynb",59,0,"",python,selection_keyboard
+7958,15737625,"test.ipynb",59,0,"o",python,content
+7959,15737626,"test.ipynb",60,0,"",python,selection_keyboard
+7960,15737633,"test.ipynb",60,0,"p",python,content
+7961,15737634,"test.ipynb",61,0,"",python,selection_keyboard
+7962,15737702,"test.ipynb",61,0,"t",python,content
+7963,15737702,"test.ipynb",62,0,"",python,selection_keyboard
+7964,15737901,"test.ipynb",62,0,"i",python,content
+7965,15737902,"test.ipynb",63,0,"",python,selection_keyboard
+7966,15737956,"test.ipynb",63,0,"m",python,content
+7967,15737957,"test.ipynb",64,0,"",python,selection_keyboard
+7968,15738082,"test.ipynb",64,0,"i",python,content
+7969,15738083,"test.ipynb",65,0,"",python,selection_keyboard
+7970,15738148,"test.ipynb",65,0,"z",python,content
+7971,15738148,"test.ipynb",66,0,"",python,selection_keyboard
+7972,15738267,"test.ipynb",66,0,"e",python,content
+7973,15738267,"test.ipynb",67,0,"",python,selection_keyboard
+7974,15738340,"test.ipynb",67,0,"r",python,content
+7975,15738340,"test.ipynb",68,0,"",python,selection_keyboard
+7976,15738383,"test.ipynb",68,0,".",python,content
+7977,15738384,"test.ipynb",69,0,"",python,selection_keyboard
+7978,15738540,"test.ipynb",69,0,"m",python,content
+7979,15738541,"test.ipynb",70,0,"",python,selection_keyboard
+7980,15738725,"test.ipynb",70,0,"o",python,content
+7981,15738726,"test.ipynb",71,0,"",python,selection_keyboard
+7982,15739374,"test.ipynb",71,0,"d",python,content
+7983,15739374,"test.ipynb",72,0,"",python,selection_keyboard
+7984,15739420,"test.ipynb",72,0,"e",python,content
+7985,15739420,"test.ipynb",73,0,"",python,selection_keyboard
+7986,15739507,"test.ipynb",73,0,"l",python,content
+7987,15739508,"test.ipynb",74,0,"",python,selection_keyboard
+7988,15739786,"test.ipynb",73,0,"",python,selection_command
+7989,15743491,"test.ipynb",44,31,"",python,content
+7990,15743823,"test.ipynb",44,0,"o",python,content
+7991,15743824,"test.ipynb",45,0,"",python,selection_keyboard
+7992,15743906,"test.ipynb",45,0,"p",python,content
+7993,15743906,"test.ipynb",46,0,"",python,selection_keyboard
+7994,15744050,"test.ipynb",46,0,"t",python,content
+7995,15744051,"test.ipynb",47,0,"",python,selection_keyboard
+7996,15744134,"test.ipynb",47,0,"i",python,content
+7997,15744135,"test.ipynb",48,0,"",python,selection_keyboard
+7998,15744166,"test.ipynb",48,0,"m",python,content
+7999,15744166,"test.ipynb",49,0,"",python,selection_keyboard
+8000,15744342,"test.ipynb",49,0,"i",python,content
+8001,15744342,"test.ipynb",50,0,"",python,selection_keyboard
+8002,15744557,"test.ipynb",50,0,"z",python,content
+8003,15744558,"test.ipynb",51,0,"",python,selection_keyboard
+8004,15744605,"test.ipynb",51,0,"e",python,content
+8005,15744605,"test.ipynb",52,0,"",python,selection_keyboard
+8006,15744683,"test.ipynb",52,0,"r",python,content
+8007,15744683,"test.ipynb",53,0,"",python,selection_keyboard
+8008,15744957,"test.ipynb",53,0,".",python,content
+8009,15744958,"test.ipynb",54,0,"",python,selection_keyboard
+8010,15745138,"test.ipynb",54,0,"m",python,content
+8011,15745139,"test.ipynb",55,0,"",python,selection_keyboard
+8012,15745181,"test.ipynb",55,0,"o",python,content
+8013,15745181,"test.ipynb",56,0,"",python,selection_keyboard
+8014,15745216,"test.ipynb",56,0,"d",python,content
+8015,15745217,"test.ipynb",57,0,"",python,selection_keyboard
+8016,15745268,"test.ipynb",57,0,"e",python,content
+8017,15745268,"test.ipynb",58,0,"",python,selection_keyboard
+8018,15745402,"test.ipynb",58,0,"l",python,content
+8019,15745402,"test.ipynb",59,0,"",python,selection_keyboard
+8020,15747677,"test.ipynb",59,0,"()",python,content
+8021,15747678,"test.ipynb",60,0,"",python,selection_keyboard
+8022,15749320,"test.ipynb",59,0,"",python,selection_command
+8023,15749898,"test.ipynb",54,0,"",python,selection_command
+8024,15754302,"test.ipynb",55,0,"",python,selection_command
+8025,15754450,"test.ipynb",56,0,"",python,selection_command
+8026,15754617,"test.ipynb",57,0,"",python,selection_command
+8027,15754767,"test.ipynb",58,0,"",python,selection_command
+8028,15754923,"test.ipynb",59,0,"",python,selection_command
+8029,15754999,"test.ipynb",60,0,"",python,selection_command
+8030,15755545,"test.ipynb",60,0,"d",python,content
+8031,15755545,"test.ipynb",61,0,"",python,selection_keyboard
+8032,15755630,"test.ipynb",61,0,"u",python,content
+8033,15755630,"test.ipynb",62,0,"",python,selection_keyboard
+8034,15755801,"test.ipynb",62,0,"m",python,content
+8035,15755801,"test.ipynb",63,0,"",python,selection_keyboard
+8036,15755938,"test.ipynb",63,0,"m",python,content
+8037,15755938,"test.ipynb",64,0,"",python,selection_keyboard
+8038,15756115,"test.ipynb",64,0,"y",python,content
+8039,15756116,"test.ipynb",65,0,"",python,selection_keyboard
+8040,15756302,"test.ipynb",65,0,"_",python,content
+8041,15756303,"test.ipynb",66,0,"",python,selection_keyboard
+8042,15756432,"test.ipynb",66,0,"i",python,content
+8043,15756432,"test.ipynb",67,0,"",python,selection_keyboard
+8044,15756500,"test.ipynb",67,0,"n",python,content
+8045,15756501,"test.ipynb",68,0,"",python,selection_keyboard
+8046,15756592,"test.ipynb",68,0,"p",python,content
+8047,15756593,"test.ipynb",69,0,"",python,selection_keyboard
+8048,15756673,"test.ipynb",69,0,"u",python,content
+8049,15756674,"test.ipynb",70,0,"",python,selection_keyboard
+8050,15756751,"test.ipynb",70,0,"t",python,content
+8051,15756751,"test.ipynb",71,0,"",python,selection_keyboard
+8052,15756936,"test.ipynb",70,0,"",python,selection_command
+8053,15759008,"test.ipynb",44,28,"optimizer.model(dummy_input)",python,selection_command
+8054,15759150,"test.ipynb",0,72,"dummy_input = jnp.ones((1, 16, 90, 160, 3))\noptimizer.model(dummy_input)",python,selection_command
+8055,15759703,"test.ipynb",0,0,"",python,selection_command
+8056,15764308,"test.ipynb",0,0,"dummy_input = jnp.ones((16, 90, 160, 3)) # Remove batch dimension if not needed\n",python,content
+8057,15764357,"test.ipynb",81,44,"",python,content
+8058,15767667,"test.ipynb",0,80,"dummy_input = jnp.ones((1, 16, 90, 160, 3))",python,content
+8059,15769218,"test.ipynb",0,72,"dummy_input = jnp.ones((1, 16, 90, 160, 3))\noptimizer.model(dummy_input)",python,selection_command
+8060,15769911,"test.ipynb",31,0,"",python,selection_command
+8061,15769984,"test.ipynb",71,0,"",python,selection_command
+8062,15770773,"test.ipynb",60,0,"",python,selection_command
+8063,15777074,"test.ipynb",16,0,"",python,selection_command
+8064,15777789,"test.ipynb",14,0,"",python,selection_command
+8065,15779097,"train_dynamics.py",0,0,"",python,tab
+8066,15783638,"train_dynamics.py",12423,0,"",python,selection_command
+8067,15783783,"train_dynamics.py",11404,0,"",python,selection_command
+8068,15784751,"train_dynamics.py",10163,0,"",python,selection_command
+8069,15785117,"train_dynamics.py",9285,0,"",python,selection_command
+8070,15786505,"train_dynamics.py",8087,0,"",python,selection_command
+8071,15787293,"train_dynamics.py",7242,0,"",python,selection_command
+8072,15787579,"train_dynamics.py",8087,0,"",python,selection_command
+8073,15788018,"train_dynamics.py",7242,0,"",python,selection_command
+8074,15788181,"train_dynamics.py",6532,0,"",python,selection_command
+8075,15788341,"train_dynamics.py",5621,0,"",python,selection_command
+8076,15788449,"train_dynamics.py",4730,0,"",python,selection_command
+8077,15788630,"train_dynamics.py",3994,0,"",python,selection_command
+8078,15788790,"train_dynamics.py",2684,0,"",python,selection_command
+8079,15789050,"train_dynamics.py",1915,0,"",python,selection_command
+8080,15789082,"train_dynamics.py",1190,0,"",python,selection_command
+8081,15789106,"train_dynamics.py",503,0,"",python,selection_command
+8082,15789144,"train_dynamics.py",0,0,"",python,selection_command
+8083,15789585,"train_dynamics.py",1342,0,"",python,selection_command
+8084,15789915,"train_dynamics.py",2860,0,"",python,selection_command
+8085,15790342,"train_dynamics.py",4849,0,"",python,selection_command
+8086,15790884,"train_dynamics.py",6616,0,"",python,selection_command
+8087,15791578,"train_dynamics.py",8140,0,"",python,selection_command
+8088,15792689,"train_dynamics.py",8207,0,"",python,selection_command
+8089,15792864,"train_dynamics.py",8290,0,"",python,selection_command
+8090,15793152,"train_dynamics.py",8337,0,"",python,selection_command
+8091,15793152,"train_dynamics.py",8342,0,"",python,selection_command
+8092,15793182,"train_dynamics.py",8386,0,"",python,selection_command
+8093,15793214,"train_dynamics.py",8399,0,"",python,selection_command
+8094,15793248,"train_dynamics.py",8470,0,"",python,selection_command
+8095,15793282,"train_dynamics.py",8496,0,"",python,selection_command
+8096,15793316,"train_dynamics.py",8577,0,"",python,selection_command
+8097,15793549,"train_dynamics.py",10610,0,"",python,selection_command
+8098,15794786,"train_dynamics.py",11248,0,"",python,selection_keyboard
+8099,15795154,"train_dynamics.py",11194,0,"",python,selection_command
+8100,15795399,"train_dynamics.py",11148,0,"",python,selection_command
+8101,15795420,"train_dynamics.py",11093,0,"",python,selection_command
+8102,15795451,"train_dynamics.py",11083,0,"",python,selection_command
+8103,15795488,"train_dynamics.py",11012,0,"",python,selection_command
+8104,15795581,"train_dynamics.py",10959,0,"",python,selection_command
+8105,15795582,"train_dynamics.py",10905,0,"",python,selection_command
+8106,15795584,"train_dynamics.py",10849,0,"",python,selection_command
+8107,15795618,"train_dynamics.py",10790,0,"",python,selection_command
+8108,15795651,"train_dynamics.py",10780,0,"",python,selection_command
+8109,15795685,"train_dynamics.py",10765,0,"",python,selection_command
+8110,15795772,"train_dynamics.py",10680,0,"",python,selection_command
+8111,15795886,"train_dynamics.py",9636,0,"",python,selection_command
+8112,15796736,"train_dynamics.py",8577,0,"",python,selection_command
+8113,15796958,"train_dynamics.py",7479,0,"",python,selection_command
+8114,15797488,"train_dynamics.py",6815,0,"",python,selection_command
+8115,15797707,"train_dynamics.py",6035,0,"",python,selection_command
+8116,15799965,"train_dynamics.py",6054,0,"",python,selection_command
+8117,15800135,"train_dynamics.py",6086,0,"",python,selection_command
+8118,15800172,"train_dynamics.py",6126,0,"",python,selection_command
+8119,15800203,"train_dynamics.py",6172,0,"",python,selection_command
+8120,15800298,"train_dynamics.py",6216,0,"",python,selection_command
+8121,15800298,"train_dynamics.py",6246,0,"",python,selection_command
+8122,15800298,"train_dynamics.py",6282,0,"",python,selection_command
+8123,15800319,"train_dynamics.py",6320,0,"",python,selection_command
+8124,15800357,"train_dynamics.py",6346,0,"",python,selection_command
+8125,15800386,"train_dynamics.py",6400,0,"",python,selection_command
+8126,15800489,"train_dynamics.py",6415,0,"",python,selection_command
+8127,15800491,"train_dynamics.py",6417,0,"",python,selection_command
+8128,15800498,"train_dynamics.py",6426,0,"",python,selection_command
+8129,15800690,"train_dynamics.py",6417,0,"",python,selection_command
+8130,15800884,"train_dynamics.py",6426,0,"",python,selection_command
+8131,15801050,"train_dynamics.py",6478,0,"",python,selection_command
+8132,15801538,"train_dynamics.py",6426,0,"",python,selection_command
+8133,15801597,"train_dynamics.py",6478,0,"",python,selection_command
+8134,15801751,"train_dynamics.py",6527,0,"",python,selection_command
+8135,15803771,"test.ipynb",0,0,"",python,tab
+8136,15803771,"test.ipynb",72,0,"",python,selection_mouse
+8137,15803773,"test.ipynb",71,0,"",python,selection_command
+8138,15805636,"test.ipynb",60,0,"",python,selection_command
+8139,15805919,"test.ipynb",16,0,"",python,selection_command
+8140,15806346,"test.ipynb",15,0,"",python,selection_command
+8141,15806487,"test.ipynb",14,0,"",python,selection_command
+8142,15806853,"test.ipynb",14,29,"",python,content
+8143,15807640,"test.ipynb",14,0,"{}",python,content
+8144,15807641,"test.ipynb",15,0,"",python,selection_keyboard
+8145,15809105,"test.ipynb",15,0,"""""",python,content
+8146,15809105,"test.ipynb",16,0,"",python,selection_keyboard
+8147,15810958,"test.ipynb",15,0,"",python,selection_command
+8148,15811310,"test.ipynb",34,0,"",python,selection_command
+8149,15811559,"test.ipynb",29,0,"",python,selection_command
+8150,15812057,"train_dynamics.py",0,0,"",python,tab
+8151,15812678,"train_dynamics.py",5565,0,"",python,selection_command
+8152,15813118,"train_dynamics.py",5529,0,"",python,selection_command
+8153,15813407,"train_dynamics.py",5479,0,"",python,selection_command
+8154,15813407,"train_dynamics.py",5431,0,"",python,selection_command
+8155,15813415,"train_dynamics.py",5381,0,"",python,selection_command
+8156,15813449,"train_dynamics.py",5339,0,"",python,selection_command
+8157,15813480,"train_dynamics.py",5303,0,"",python,selection_command
+8158,15813636,"train_dynamics.py",5283,0,"",python,selection_command
+8159,15813819,"train_dynamics.py",5264,0,"",python,selection_command
+8160,15813954,"train_dynamics.py",5266,0,"",python,selection_command
+8161,15814123,"train_dynamics.py",5268,0,"",python,selection_command
+8162,15814552,"genie.py",0,0,"",python,tab
+8163,15814552,"genie.py",333,0,"",python,selection_command
+8164,15815097,"genie.py",1973,0,"",python,selection_command
+8165,15815567,"genie.py",3918,0,"",python,selection_command
+8166,15816732,"genie.py",4400,0,"",python,selection_keyboard
+8167,15817165,"genie.py",4369,0,"",python,selection_command
+8168,15817409,"genie.py",4330,0,"",python,selection_command
+8169,15817437,"genie.py",4256,0,"",python,selection_command
+8170,15817601,"genie.py",4170,0,"",python,selection_command
+8171,15817714,"genie.py",4082,0,"",python,selection_command
+8172,15818212,"genie.py",4170,0,"",python,selection_command
+8173,15820224,"test.ipynb",0,0,"",python,tab
+8174,15820224,"test.ipynb",16,0,"",python,selection_mouse
+8175,15821796,"test.ipynb",16,0,"v",python,content
+8176,15821796,"test.ipynb",17,0,"",python,selection_keyboard
+8177,15822035,"test.ipynb",17,0,"d",python,content
+8178,15822036,"test.ipynb",18,0,"",python,selection_keyboard
+8179,15822093,"test.ipynb",18,0,"e",python,content
+8180,15822094,"test.ipynb",19,0,"",python,selection_keyboard
+8181,15822140,"test.ipynb",19,0,"o",python,content
+8182,15822141,"test.ipynb",20,0,"",python,selection_keyboard
+8183,15822320,"test.ipynb",20,0,"s",python,content
+8184,15822321,"test.ipynb",21,0,"",python,selection_keyboard
+8185,15822590,"test.ipynb",20,1,"",python,content
+8186,15822736,"test.ipynb",19,1,"",python,content
+8187,15822885,"test.ipynb",18,1,"",python,content
+8188,15823167,"test.ipynb",17,1,"",python,content
+8189,15823274,"test.ipynb",17,0,"i",python,content
+8190,15823274,"test.ipynb",18,0,"",python,selection_keyboard
+8191,15823333,"test.ipynb",18,0,"d",python,content
+8192,15823334,"test.ipynb",19,0,"",python,selection_keyboard
+8193,15823362,"test.ipynb",19,0,"e",python,content
+8194,15823362,"test.ipynb",20,0,"",python,selection_keyboard
+8195,15823663,"test.ipynb",20,0,"o",python,content
+8196,15823663,"test.ipynb",21,0,"",python,selection_keyboard
+8197,15823737,"test.ipynb",21,0,"s",python,content
+8198,15823737,"test.ipynb",22,0,"",python,selection_keyboard
+8199,15824241,"test.ipynb",23,0,": jnp.ones((1, 16, 90, 160, 3))",python,content
+8200,15824241,"test.ipynb",54,0,"",python,selection_command
+8201,15824520,"test.ipynb",53,0,"",python,selection_command
+8202,15824940,"test.ipynb",83,0,"",python,selection_command
+8203,15844458,"test.ipynb",0,0,"",python,tab
+8204,15850349,"test.ipynb",0,0,"",python,tab
+8205,15850349,"test.ipynb",2841,0,"",python,selection_mouse
+8206,15850899,"test.ipynb",2840,0,"",python,selection_command
+8207,15851204,"test.ipynb",2838,0,"",python,selection_command
+8208,15851437,"test.ipynb",2838,19,"",python,content
+8209,15851741,"test.ipynb",2838,0,"n",python,content
+8210,15851741,"test.ipynb",2839,0,"",python,selection_keyboard
+8211,15851799,"test.ipynb",2839,0,"o",python,content
+8212,15851799,"test.ipynb",2840,0,"",python,selection_keyboard
+8213,15851939,"test.ipynb",2839,0,"",python,selection_command
+8214,15852529,"test.ipynb",2838,0,"",python,selection_command
+8215,15852726,"test.ipynb",2838,2,"",python,content
+8216,15854427,"test.ipynb",2838,0,"F",python,content
+8217,15854428,"test.ipynb",2839,0,"",python,selection_keyboard
+8218,15854603,"test.ipynb",2839,0,"a",python,content
+8219,15854604,"test.ipynb",2840,0,"",python,selection_keyboard
+8220,15854656,"test.ipynb",2840,0,"l",python,content
+8221,15854656,"test.ipynb",2841,0,"",python,selection_keyboard
+8222,15854748,"test.ipynb",2841,0,"s",python,content
+8223,15854749,"test.ipynb",2842,0,"",python,selection_keyboard
+8224,15854800,"test.ipynb",2842,0,"e",python,content
+8225,15854800,"test.ipynb",2843,0,"",python,selection_keyboard
+8226,15855041,"test.ipynb",2842,0,"",python,selection_command
+8227,15861173,"test.ipynb",0,0,"",python,tab
+8228,15871355,"test.ipynb",51,0,"",python,selection_mouse
+8229,15872201,"test.ipynb",52,0,"",python,selection_command
+8230,15872385,"test.ipynb",53,0,"",python,selection_command
+8231,15872556,"test.ipynb",54,0,"",python,selection_command
+8232,15872751,"test.ipynb",54,0,",",python,content
+8233,15872752,"test.ipynb",55,0,"",python,selection_keyboard
+8234,15872830,"test.ipynb",55,0," ",python,content
+8235,15872831,"test.ipynb",56,0,"",python,selection_keyboard
+8236,15873407,"test.ipynb",56,0,"""""",python,content
+8237,15873407,"test.ipynb",57,0,"",python,selection_keyboard
+8238,15874017,"test.ipynb",58,0,": jnp.ones((1, 16, 90, 160, 3))",python,content
+8239,15874017,"test.ipynb",57,0,"mask_rng",python,content
+8240,15874020,"test.ipynb",97,0,"",python,selection_command
+8241,15874313,"test.ipynb",96,0,"",python,selection_command
+8242,15883007,"test.ipynb",78,0,"",python,selection_mouse
+8243,15884122,"test.ipynb",76,0,"",python,selection_command
+8244,15884282,"test.ipynb",72,0,"",python,selection_command
+8245,15884421,"test.ipynb",71,0,"",python,selection_command
+8246,15884770,"test.ipynb",68,0,"",python,selection_command
+8247,15884896,"test.ipynb",68,1,"j",python,selection_command
+8248,15884934,"test.ipynb",68,3,"jnp",python,selection_command
+8249,15885114,"test.ipynb",68,4,"jnp.",python,selection_command
+8250,15885294,"test.ipynb",68,8,"jnp.ones",python,selection_command
+8251,15885437,"test.ipynb",68,10,"jnp.ones((",python,selection_command
+8252,15885629,"test.ipynb",68,11,"jnp.ones((1",python,selection_command
+8253,15885710,"test.ipynb",68,12,"jnp.ones((1,",python,selection_command
+8254,15885853,"test.ipynb",68,15,"jnp.ones((1, 16",python,selection_command
+8255,15886015,"test.ipynb",68,16,"jnp.ones((1, 16,",python,selection_command
+8256,15886152,"test.ipynb",68,19,"jnp.ones((1, 16, 90",python,selection_command
+8257,15886343,"test.ipynb",68,20,"jnp.ones((1, 16, 90,",python,selection_command
+8258,15886474,"test.ipynb",68,24,"jnp.ones((1, 16, 90, 160",python,selection_command
+8259,15886676,"test.ipynb",68,25,"jnp.ones((1, 16, 90, 160,",python,selection_command
+8260,15886965,"test.ipynb",68,27,"jnp.ones((1, 16, 90, 160, 3",python,selection_command
+8261,15887302,"test.ipynb",68,28,"jnp.ones((1, 16, 90, 160, 3)",python,selection_command
+8262,15887447,"test.ipynb",68,29,"jnp.ones((1, 16, 90, 160, 3))",python,selection_command
+8263,15888032,"test.ipynb",68,29,"",python,content
+8264,15890545,"test.ipynb",68,0,"j",python,content
+8265,15890545,"test.ipynb",69,0,"",python,selection_keyboard
+8266,15890671,"test.ipynb",69,0,"n",python,content
+8267,15890671,"test.ipynb",70,0,"",python,selection_keyboard
+8268,15890716,"test.ipynb",70,0,"p",python,content
+8269,15890717,"test.ipynb",71,0,"",python,selection_keyboard
+8270,15890935,"test.ipynb",71,0,".",python,content
+8271,15890935,"test.ipynb",72,0,"",python,selection_keyboard
+8272,15891756,"test.ipynb",71,1,"",python,content
+8273,15891920,"test.ipynb",70,1,"",python,content
+8274,15892111,"test.ipynb",69,1,"",python,content
+8275,15892198,"test.ipynb",68,1,"",python,content
+8276,15892350,"test.ipynb",68,0,"r",python,content
+8277,15892351,"test.ipynb",69,0,"",python,selection_keyboard
+8278,15892467,"test.ipynb",69,0,"n",python,content
+8279,15892467,"test.ipynb",70,0,"",python,selection_keyboard
+8280,15892656,"test.ipynb",70,0,"g",python,content
+8281,15892657,"test.ipynb",71,0,"",python,selection_keyboard
+8282,15893373,"test.ipynb",70,0,"",python,selection_command
+8283,15908278,"test.ipynb",0,0,"",python,tab
+8284,15908278,"test.ipynb",669,0,"",python,selection_mouse
+8285,15909455,"test.ipynb",670,0,"",python,selection_command
+8286,15913994,"test.ipynb",669,58,"",python,content
+8287,15914229,"test.ipynb",668,0,"",python,selection_command
+8288,15914519,"test.ipynb",668,1,"",python,content
+8289,15914936,"test.ipynb",667,1,"",python,content
+8290,15914940,"test.ipynb",579,0,"",python,selection_command
+8291,15915113,"test.ipynb",490,0,"",python,selection_command
+8292,15915368,"test.ipynb",390,0,"",python,selection_command
+8293,15915396,"test.ipynb",290,0,"",python,selection_command
+8294,15915429,"test.ipynb",289,0,"",python,selection_command
+8295,15915461,"test.ipynb",222,0,"",python,selection_command
+8296,15915495,"test.ipynb",155,0,"",python,selection_command
+8297,15915800,"test.ipynb",0,0,"",python,selection_command
+8298,15916046,"test.ipynb",0,0,"",python,tab
+8299,15917531,"test.ipynb",0,0,"",python,tab
+8300,15918423,"test.ipynb",0,0,"",python,tab
+8301,15919001,"test.ipynb",77,0,"",python,selection_command
+8302,15919148,"test.ipynb",155,0,"",python,selection_command
+8303,15919305,"test.ipynb",222,0,"",python,selection_command
+8304,15919466,"test.ipynb",289,0,"",python,selection_command
+8305,15919684,"test.ipynb",222,0,"",python,selection_command
+8306,15919776,"test.ipynb",222,1,"",python,content
+8307,15919929,"test.ipynb",222,1,"",python,content
+8308,15922187,"test.ipynb",286,0,"",python,selection_command
+8309,15922468,"test.ipynb",285,1,"",python,content
+8310,15922555,"test.ipynb",284,0,"",python,selection_command
+8311,15922714,"test.ipynb",217,0,"",python,selection_command
+8312,15922941,"test.ipynb",221,0,"",python,selection_command
+8313,15923182,"test.ipynb",220,1,"",python,content
+8314,15923302,"test.ipynb",219,0,"",python,selection_command
+8315,15923450,"test.ipynb",141,0,"",python,selection_command
+8316,15923672,"test.ipynb",154,0,"",python,selection_command
+8317,15924087,"test.ipynb",153,0,"",python,selection_command
+8318,15924206,"test.ipynb",149,0,"",python,selection_command
+8319,15924390,"test.ipynb",146,0,"",python,selection_command
+8320,15924532,"test.ipynb",144,0,"",python,selection_command
+8321,15924674,"test.ipynb",142,0,"",python,selection_command
+8322,15925051,"test.ipynb",142,1,"",python,content
+8323,15925095,"test.ipynb",65,0,"",python,selection_command
+8324,15925860,"test.ipynb",0,0,"",python,tab
+8325,15927744,"test.ipynb",0,0,"",python,tab
+8326,15928166,"test.ipynb",64,0,"",python,selection_command
+8327,15928335,"test.ipynb",64,1,"",python,content
+8328,15928569,"test.ipynb",140,0,"",python,selection_command
+8329,15928780,"test.ipynb",217,0,"",python,selection_command
+8330,15962378,"genie.py",0,0,"",python,tab
+8331,15962378,"genie.py",4114,0,"",python,selection_mouse
+8332,15964185,"train_dynamics.py",0,0,"",python,tab
+8333,15966428,"train_dynamics.py",8643,0,"",python,selection_command
+8334,15967286,"train_dynamics.py",8897,0,"",python,selection_command
+8335,15967620,"train_dynamics.py",10169,0,"",python,selection_command
+8336,15974730,"test.ipynb",0,0,"",python,tab
+8337,15974730,"test.ipynb",0,0,"",python,selection_mouse
+8338,15975454,"test.ipynb",0,72,"dummy_input = {""videos"": jnp.ones((1, 16, 90, 160, 3)), ""mask_rng"": rng}",python,selection_command
+8339,15975675,"test.ipynb",0,101,"dummy_input = {""videos"": jnp.ones((1, 16, 90, 160, 3)), ""mask_rng"": rng}\noptimizer.model(dummy_input)",python,selection_command
+8340,15975696,"test.ipynb",0,101,"",python,content
+8341,16379209,"test.ipynb",0,0,"",python,tab
+8342,16379209,"test.ipynb",224,0,"",python,selection_mouse
+8343,16379329,"test.ipynb",223,5,"state",python,selection_mouse
+8344,16379480,"test.ipynb",219,64,"nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq\n",python,selection_mouse
+8345,16379781,"test.ipynb",281,0,"",python,selection_command
+8346,16380598,"test.ipynb",0,0,"",python,tab
+8347,16381922,"test.ipynb",0,0,"nnx.state(nnx.eval_shape(lambda: optimizer)).model.tokenizer.vq",python,content
+8348,16381922,"test.ipynb",63,0,"",python,selection_keyboard
+8349,16383269,"test.ipynb",62,0,"",python,selection_command
+8350,16383771,"test.ipynb",0,0,"",python,selection_command
+8351,16384167,"test.ipynb",0,0,"a",python,content
+8352,16384167,"test.ipynb",1,0,"",python,selection_keyboard
+8353,16384297,"test.ipynb",1,0,"b",python,content
+8354,16384297,"test.ipynb",2,0,"",python,selection_keyboard
+8355,16384395,"test.ipynb",2,0,"s",python,content
+8356,16384395,"test.ipynb",3,0,"",python,selection_keyboard
+8357,16384530,"test.ipynb",3,0,"t",python,content
+8358,16384531,"test.ipynb",4,0,"",python,selection_keyboard
+8359,16384699,"test.ipynb",4,0,"r",python,content
+8360,16384700,"test.ipynb",5,0,"",python,selection_keyboard
+8361,16384835,"test.ipynb",5,0,"a",python,content
+8362,16384835,"test.ipynb",6,0,"",python,selection_keyboard
+8363,16384934,"test.ipynb",6,0,"c",python,content
+8364,16384934,"test.ipynb",7,0,"",python,selection_keyboard
+8365,16385085,"test.ipynb",7,0,"t",python,content
+8366,16385085,"test.ipynb",8,0,"",python,selection_keyboard
+8367,16385303,"test.ipynb",8,0,"_",python,content
+8368,16385304,"test.ipynb",9,0,"",python,selection_keyboard
+8369,16385467,"test.ipynb",9,0,"o",python,content
+8370,16385467,"test.ipynb",10,0,"",python,selection_keyboard
+8371,16385546,"test.ipynb",10,0,"p",python,content
+8372,16385546,"test.ipynb",11,0,"",python,selection_keyboard
+8373,16385663,"test.ipynb",11,0,"t",python,content
+8374,16385663,"test.ipynb",12,0,"",python,selection_keyboard
+8375,16385845,"test.ipynb",12,0,"m",python,content
+8376,16385846,"test.ipynb",13,0,"",python,selection_keyboard
+8377,16385895,"test.ipynb",13,0,"i",python,content
+8378,16385895,"test.ipynb",14,0,"",python,selection_keyboard
+8379,16386016,"test.ipynb",14,0,"z",python,content
+8380,16386016,"test.ipynb",15,0,"",python,selection_keyboard
+8381,16386113,"test.ipynb",15,0,"e",python,content
+8382,16386113,"test.ipynb",16,0,"",python,selection_keyboard
+8383,16386149,"test.ipynb",16,0,"i",python,content
+8384,16386149,"test.ipynb",17,0,"",python,selection_keyboard
+8385,16386463,"test.ipynb",16,1,"",python,content
+8386,16386587,"test.ipynb",15,1,"",python,content
+8387,16386733,"test.ipynb",14,1,"",python,content
+8388,16386862,"test.ipynb",13,1,"",python,content
+8389,16387150,"test.ipynb",13,0,"i",python,content
+8390,16387150,"test.ipynb",14,0,"",python,selection_keyboard
+8391,16387231,"test.ipynb",14,0,"m",python,content
+8392,16387231,"test.ipynb",15,0,"",python,selection_keyboard
+8393,16387447,"test.ipynb",14,1,"",python,content
+8394,16387578,"test.ipynb",13,1,"",python,content
+8395,16387701,"test.ipynb",12,1,"",python,content
+8396,16387885,"test.ipynb",12,0,"i",python,content
+8397,16387886,"test.ipynb",13,0,"",python,selection_keyboard
+8398,16387919,"test.ipynb",13,0,"m",python,content
+8399,16387920,"test.ipynb",14,0,"",python,selection_keyboard
+8400,16388031,"test.ipynb",14,0,"i",python,content
+8401,16388031,"test.ipynb",15,0,"",python,selection_keyboard
+8402,16388113,"test.ipynb",15,0,"z",python,content
+8403,16388113,"test.ipynb",16,0,"",python,selection_keyboard
+8404,16388182,"test.ipynb",16,0,"e",python,content
+8405,16388182,"test.ipynb",17,0,"",python,selection_keyboard
+8406,16388231,"test.ipynb",17,0,"r",python,content
+8407,16388232,"test.ipynb",18,0,"",python,selection_keyboard
+8408,16388432,"test.ipynb",18,0,"_",python,content
+8409,16388432,"test.ipynb",19,0,"",python,selection_keyboard
+8410,16388602,"test.ipynb",19,0,"s",python,content
+8411,16388603,"test.ipynb",20,0,"",python,selection_keyboard
+8412,16388665,"test.ipynb",20,0,"t",python,content
+8413,16388665,"test.ipynb",21,0,"",python,selection_keyboard
+8414,16388737,"test.ipynb",21,0,"a",python,content
+8415,16388737,"test.ipynb",22,0,"",python,selection_keyboard
+8416,16388818,"test.ipynb",22,0,"t",python,content
+8417,16388818,"test.ipynb",23,0,"",python,selection_keyboard
+8418,16388877,"test.ipynb",23,0,"e",python,content
+8419,16388878,"test.ipynb",24,0,"",python,selection_keyboard
+8420,16389088,"test.ipynb",24,0," ",python,content
+8421,16389088,"test.ipynb",25,0,"",python,selection_keyboard
+8422,16389282,"test.ipynb",25,0,"=",python,content
+8423,16389282,"test.ipynb",26,0,"",python,selection_keyboard
+8424,16389297,"test.ipynb",26,0," ",python,content
+8425,16389298,"test.ipynb",27,0,"",python,selection_keyboard
+8426,16392193,"test.ipynb",0,0,"",python,tab
+8427,16393386,"test.ipynb",0,0,"",python,tab
+8428,16393386,"test.ipynb",34,0,"",python,selection_mouse
+8429,16394193,"test.ipynb",33,0,"",python,selection_command
+8430,16398203,"test.ipynb",89,0,"",python,selection_command
+8431,16399835,"test.ipynb",88,0,"",python,selection_command
+8432,16399987,"test.ipynb",87,0,"",python,selection_command
+8433,16400133,"test.ipynb",78,0,"",python,selection_command
+8434,16400299,"test.ipynb",77,0,"",python,selection_command
+8435,16400366,"test.ipynb",72,0,"",python,selection_command
+8436,16400523,"test.ipynb",69,0,"",python,selection_command
+8437,16400919,"test.ipynb",70,0,"",python,selection_command
+8438,16401085,"test.ipynb",71,0,"",python,selection_command
+8439,16401403,"test.ipynb",71,19,"",python,content
+8440,16401410,"test.ipynb",70,0,"",python,selection_command
+8441,16403969,"test.ipynb",0,0,"",python,tab
+8442,16405422,"test.ipynb",0,0,"a",python,content
+8443,16405422,"test.ipynb",1,0,"",python,selection_keyboard
+8444,16405543,"test.ipynb",1,0,"b",python,content
+8445,16405543,"test.ipynb",2,0,"",python,selection_keyboard
+8446,16405548,"test.ipynb",2,0,"s",python,content
+8447,16405549,"test.ipynb",3,0,"",python,selection_keyboard
+8448,16405654,"test.ipynb",3,0,"t",python,content
+8449,16405655,"test.ipynb",4,0,"",python,selection_keyboard
+8450,16405847,"test.ipynb",4,0,"r",python,content
+8451,16405847,"test.ipynb",5,0,"",python,selection_keyboard
+8452,16405930,"test.ipynb",5,0,"a",python,content
+8453,16405930,"test.ipynb",6,0,"",python,selection_keyboard
+8454,16406083,"test.ipynb",6,0,"c",python,content
+8455,16406084,"test.ipynb",7,0,"",python,selection_keyboard
+8456,16406246,"test.ipynb",7,0,"t",python,content
+8457,16406247,"test.ipynb",8,0,"",python,selection_keyboard
+8458,16406448,"test.ipynb",8,0,"_",python,content
+8459,16406448,"test.ipynb",9,0,"",python,selection_keyboard
+8460,16406672,"test.ipynb",9,0,"o",python,content
+8461,16406672,"test.ipynb",10,0,"",python,selection_keyboard
+8462,16406699,"test.ipynb",10,0,"p",python,content
+8463,16406699,"test.ipynb",11,0,"",python,selection_keyboard
+8464,16406798,"test.ipynb",11,0,"t",python,content
+8465,16406798,"test.ipynb",12,0,"",python,selection_keyboard
+8466,16406913,"test.ipynb",12,0,"i",python,content
+8467,16406913,"test.ipynb",13,0,"",python,selection_keyboard
+8468,16406997,"test.ipynb",13,0,"m",python,content
+8469,16406997,"test.ipynb",14,0,"",python,selection_keyboard
+8470,16407114,"test.ipynb",14,0,"i",python,content
+8471,16407114,"test.ipynb",15,0,"",python,selection_keyboard
+8472,16407220,"test.ipynb",15,0,"z",python,content
+8473,16407220,"test.ipynb",16,0,"",python,selection_keyboard
+8474,16407282,"test.ipynb",16,0,"e",python,content
+8475,16407282,"test.ipynb",17,0,"",python,selection_keyboard
+8476,16407640,"test.ipynb",17,0,"_",python,content
+8477,16407640,"test.ipynb",18,0,"",python,selection_keyboard
+8478,16407741,"test.ipynb",18,0,"s",python,content
+8479,16407742,"test.ipynb",19,0,"",python,selection_keyboard
+8480,16407814,"test.ipynb",19,0,"t",python,content
+8481,16407815,"test.ipynb",20,0,"",python,selection_keyboard
+8482,16407879,"test.ipynb",20,0,"a",python,content
+8483,16407879,"test.ipynb",21,0,"",python,selection_keyboard
+8484,16407973,"test.ipynb",21,0,"t",python,content
+8485,16407973,"test.ipynb",22,0,"",python,selection_keyboard
+8486,16408006,"test.ipynb",22,0,"e",python,content
+8487,16408006,"test.ipynb",23,0,"",python,selection_keyboard
+8488,16408163,"test.ipynb",23,0,".",python,content
+8489,16408163,"test.ipynb",24,0,"",python,selection_keyboard
+8490,16408936,"test.ipynb",24,0,"m",python,content
+8491,16408936,"test.ipynb",25,0,"",python,selection_keyboard
+8492,16408962,"test.ipynb",25,0,"o",python,content
+8493,16408962,"test.ipynb",26,0,"",python,selection_keyboard
+8494,16409048,"test.ipynb",26,0,"d",python,content
+8495,16409048,"test.ipynb",27,0,"",python,selection_keyboard
+8496,16409095,"test.ipynb",27,0,"e",python,content
+8497,16409096,"test.ipynb",28,0,"",python,selection_keyboard
+8498,16409212,"test.ipynb",28,0,"l",python,content
+8499,16409213,"test.ipynb",29,0,"",python,selection_keyboard
+8500,16409329,"test.ipynb",29,0,".",python,content
+8501,16409329,"test.ipynb",30,0,"",python,selection_keyboard
+8502,16409937,"test.ipynb",30,0,"t",python,content
+8503,16409937,"test.ipynb",31,0,"",python,selection_keyboard
+8504,16409971,"test.ipynb",31,0,"o",python,content
+8505,16409971,"test.ipynb",32,0,"",python,selection_keyboard
+8506,16410043,"test.ipynb",32,0,"k",python,content
+8507,16410044,"test.ipynb",33,0,"",python,selection_keyboard
+8508,16410100,"test.ipynb",33,0,"e",python,content
+8509,16410100,"test.ipynb",34,0,"",python,selection_keyboard
+8510,16410270,"test.ipynb",34,0,"n",python,content
+8511,16410271,"test.ipynb",35,0,"",python,selection_keyboard
+8512,16410271,"test.ipynb",35,0,"i",python,content
+8513,16410271,"test.ipynb",36,0,"",python,selection_keyboard
+8514,16410327,"test.ipynb",36,0,"z",python,content
+8515,16410328,"test.ipynb",37,0,"",python,selection_keyboard
+8516,16410532,"test.ipynb",37,0,"er.vq.drop.rngs",python,content
+8517,16411120,"test.ipynb",51,1,"",python,content
+8518,16411359,"test.ipynb",50,1,"",python,content
+8519,16411389,"test.ipynb",49,1,"",python,content
+8520,16411429,"test.ipynb",48,1,"",python,content
+8521,16411461,"test.ipynb",47,1,"",python,content
+8522,16411492,"test.ipynb",46,1,"",python,content
+8523,16411526,"test.ipynb",45,1,"",python,content
+8524,16411551,"test.ipynb",44,1,"",python,content
+8525,16411583,"test.ipynb",43,1,"",python,content
+8526,16411934,"test.ipynb",42,1,"",python,content
+8527,16414265,"test.ipynb",41,0,"",python,selection_command
+8528,16415676,"test.ipynb",0,0,"",python,selection_command
+8529,16416069,"test.ipynb",0,0,"",python,tab
+8530,16416070,"test.ipynb",0,0,"",python,selection_command
+8531,16416126,"test.ipynb",1,0,"",python,selection_command
+8532,16418972,"test.ipynb",0,0,"",python,tab
+8533,16419315,"test.ipynb",1,0,"",python,selection_command
+8534,16419763,"test.ipynb",16,0,"",python,selection_command
+8535,16419984,"test.ipynb",22,0,"",python,selection_command
+8536,16420381,"test.ipynb",21,0,"",python,selection_command
+8537,16420628,"test.ipynb",20,0,"",python,selection_command
+8538,16420652,"test.ipynb",19,0,"",python,selection_command
+8539,16420746,"test.ipynb",18,0,"",python,selection_command
+8540,16420746,"test.ipynb",17,0,"",python,selection_command
+8541,16420869,"test.ipynb",16,0,"",python,selection_command
+8542,16421270,"test.ipynb",17,0,"",python,selection_command
+8543,16421302,"test.ipynb",17,0,"r",python,content
+8544,16421303,"test.ipynb",18,0,"",python,selection_keyboard
+8545,16454364,"test.ipynb",17,0,"",python,selection_command
+8546,16455435,"test.ipynb",43,0,"",python,selection_command
+8547,16455734,"test.ipynb",43,0," ",python,content
+8548,16455735,"test.ipynb",44,0,"",python,selection_keyboard
+8549,16455858,"test.ipynb",44,0,"=",python,content
+8550,16455858,"test.ipynb",45,0,"",python,selection_keyboard
+8551,16455930,"test.ipynb",45,0," ",python,content
+8552,16455931,"test.ipynb",46,0,"",python,selection_keyboard
+8553,16457320,"test.ipynb",45,0,"",python,selection_command
+8554,16457932,"test.ipynb",46,0,"",python,selection_command
+8555,16458071,"test.ipynb",45,1,"",python,content
+8556,16458204,"test.ipynb",44,1,"",python,content
+8557,16458333,"test.ipynb",43,1,"",python,content
+8558,16458682,"test.ipynb",43,0,".",python,content
+8559,16458682,"test.ipynb",44,0,"",python,selection_keyboard
+8560,16458777,"test.ipynb",44,0,"d",python,content
+8561,16458778,"test.ipynb",45,0,"",python,selection_keyboard
+8562,16458919,"test.ipynb",45,0,"r",python,content
+8563,16458920,"test.ipynb",46,0,"",python,selection_keyboard
+8564,16459001,"test.ipynb",46,0,"o",python,content
+8565,16459001,"test.ipynb",47,0,"",python,selection_keyboard
+8566,16459061,"test.ipynb",47,0,"p",python,content
+8567,16459062,"test.ipynb",48,0,"",python,selection_keyboard
+8568,16459215,"test.ipynb",48,0,"o",python,content
+8569,16459216,"test.ipynb",49,0,"",python,selection_keyboard
+8570,16459347,"test.ipynb",49,0,"u",python,content
+8571,16459347,"test.ipynb",50,0,"",python,selection_keyboard
+8572,16459414,"test.ipynb",50,0,"t",python,content
+8573,16459414,"test.ipynb",51,0,"",python,selection_keyboard
+8574,16460080,"test.ipynb",50,1,"",python,content
+8575,16460189,"test.ipynb",49,1,"",python,content
+8576,16460333,"test.ipynb",48,1,"",python,content
+8577,16460395,"test.ipynb",48,0," ",python,content
+8578,16460395,"test.ipynb",49,0,"",python,selection_keyboard
+8579,16460589,"test.ipynb",49,0,"=",python,content
+8580,16460589,"test.ipynb",50,0,"",python,selection_keyboard
+8581,16460612,"test.ipynb",50,0," ",python,content
+8582,16460612,"test.ipynb",51,0,"",python,selection_keyboard
+8583,16461894,"test.ipynb",51,0,"nnx.Dropout(0.1, rngs=rngs)\n\n\n\n\n\n\n\n\n\n\n",python,content
+8584,16463730,"test.ipynb",88,1,"\n",python,selection_command
+8585,16463987,"test.ipynb",87,2,"\n\n",python,selection_command
+8586,16464011,"test.ipynb",86,3,"\n\n\n",python,selection_command
+8587,16464082,"test.ipynb",85,4,"\n\n\n\n",python,selection_command
+8588,16464082,"test.ipynb",84,5,"\n\n\n\n\n",python,selection_command
+8589,16464104,"test.ipynb",83,6,"\n\n\n\n\n\n",python,selection_command
+8590,16464142,"test.ipynb",82,7,"\n\n\n\n\n\n\n",python,selection_command
+8591,16464192,"test.ipynb",81,8,"\n\n\n\n\n\n\n\n",python,selection_command
+8592,16464480,"test.ipynb",80,9,"\n\n\n\n\n\n\n\n\n",python,selection_command
+8593,16464646,"test.ipynb",79,10,"\n\n\n\n\n\n\n\n\n\n",python,selection_command
+8594,16464789,"test.ipynb",78,11,"",python,content
+8595,16464794,"test.ipynb",0,0,"",python,selection_command
+8596,16470356,"test.ipynb",0,0,"",python,tab
+8597,16470356,"test.ipynb",0,0,"",python,tab
+8598,16471766,"test.ipynb",0,0,"a",python,content
+8599,16471766,"test.ipynb",1,0,"",python,selection_keyboard
+8600,16471867,"test.ipynb",1,0,"b",python,content
+8601,16471868,"test.ipynb",2,0,"",python,selection_keyboard
+8602,16471929,"test.ipynb",2,0,"s",python,content
+8603,16471929,"test.ipynb",3,0,"",python,selection_keyboard
+8604,16472029,"test.ipynb",3,0,"t",python,content
+8605,16472029,"test.ipynb",4,0,"",python,selection_keyboard
+8606,16472201,"test.ipynb",4,0,"r",python,content
+8607,16472202,"test.ipynb",5,0,"",python,selection_keyboard
+8608,16472281,"test.ipynb",5,0,"a",python,content
+8609,16472281,"test.ipynb",6,0,"",python,selection_keyboard
+8610,16472447,"test.ipynb",6,0,"c",python,content
+8611,16472447,"test.ipynb",7,0,"",python,selection_keyboard
+8612,16472614,"test.ipynb",7,0,"t",python,content
+8613,16472615,"test.ipynb",8,0,"",python,selection_keyboard
+8614,16472903,"test.ipynb",8,0,"_optimizer = nnx.eval_shape(lambda: optimizer)",python,content
+8615,16473498,"test.ipynb",53,1,"",python,content
+8616,16473627,"test.ipynb",44,9,"",python,content
+8617,16473781,"test.ipynb",42,2,"",python,content
+8618,16473953,"test.ipynb",36,6,"",python,content
+8619,16474100,"test.ipynb",35,1,"",python,content
+8620,16474311,"test.ipynb",25,10,"",python,content
+8621,16474481,"test.ipynb",24,1,"",python,content
+8622,16474785,"test.ipynb",21,3,"",python,content
+8623,16475146,"test.ipynb",20,1,"",python,content
+8624,16475271,"test.ipynb",19,1,"",python,content
+8625,16475430,"test.ipynb",18,1,"",python,content
+8626,16475669,"test.ipynb",18,0,"_",python,content
+8627,16475670,"test.ipynb",19,0,"",python,selection_keyboard
+8628,16475850,"test.ipynb",19,0,"s",python,content
+8629,16475851,"test.ipynb",20,0,"",python,selection_keyboard
+8630,16475947,"test.ipynb",20,0,"a",python,content
+8631,16475947,"test.ipynb",21,0,"",python,selection_keyboard
+8632,16475952,"test.ipynb",21,0,"t",python,content
+8633,16475953,"test.ipynb",22,0,"",python,selection_keyboard
+8634,16476147,"test.ipynb",22,0,"t",python,content
+8635,16476148,"test.ipynb",23,0,"",python,selection_keyboard
+8636,16476153,"test.ipynb",23,0,"a",python,content
+8637,16476153,"test.ipynb",24,0,"",python,selection_keyboard
+8638,16476482,"test.ipynb",23,1,"",python,content
+8639,16476607,"test.ipynb",22,1,"",python,content
+8640,16476747,"test.ipynb",21,1,"",python,content
+8641,16476893,"test.ipynb",20,1,"",python,content
+8642,16476963,"test.ipynb",20,0,"t",python,content
+8643,16476963,"test.ipynb",21,0,"",python,selection_keyboard
+8644,16476977,"test.ipynb",21,0,"a",python,content
+8645,16476977,"test.ipynb",22,0,"",python,selection_keyboard
+8646,16477168,"test.ipynb",22,0,"e",python,content
+8647,16477168,"test.ipynb",23,0,"",python,selection_keyboard
+8648,16477710,"test.ipynb",22,1,"",python,content
+8649,16477788,"test.ipynb",22,0,"t",python,content
+8650,16477788,"test.ipynb",23,0,"",python,selection_keyboard
+8651,16477843,"test.ipynb",23,0,"e",python,content
+8652,16477843,"test.ipynb",24,0,"",python,selection_keyboard
+8653,16478856,"test.ipynb",24,0,".",python,content
+8654,16478857,"test.ipynb",25,0,"",python,selection_keyboard
+8655,16479230,"test.ipynb",25,0,"m",python,content
+8656,16479231,"test.ipynb",26,0,"",python,selection_keyboard
+8657,16479262,"test.ipynb",26,0,"o",python,content
+8658,16479262,"test.ipynb",27,0,"",python,selection_keyboard
+8659,16479396,"test.ipynb",27,0,"d",python,content
+8660,16479397,"test.ipynb",28,0,"",python,selection_keyboard
+8661,16479464,"test.ipynb",28,0,"e",python,content
+8662,16479464,"test.ipynb",29,0,"",python,selection_keyboard
+8663,16479549,"test.ipynb",29,0,"l",python,content
+8664,16479549,"test.ipynb",30,0,"",python,selection_keyboard
+8665,16479805,"test.ipynb",30,0,".",python,content
+8666,16479805,"test.ipynb",31,0,"",python,selection_keyboard
+8667,16480032,"test.ipynb",31,0,"t",python,content
+8668,16480032,"test.ipynb",32,0,"",python,selection_keyboard
+8669,16480094,"test.ipynb",32,0,"o",python,content
+8670,16480095,"test.ipynb",33,0,"",python,selection_keyboard
+8671,16480146,"test.ipynb",33,0,"k",python,content
+8672,16480146,"test.ipynb",34,0,"",python,selection_keyboard
+8673,16480261,"test.ipynb",34,0,"z",python,content
+8674,16480262,"test.ipynb",35,0,"",python,selection_keyboard
+8675,16480400,"test.ipynb",35,0,"i",python,content
+8676,16480401,"test.ipynb",36,0,"",python,selection_keyboard
+8677,16480865,"test.ipynb",35,1,"",python,content
+8678,16481007,"test.ipynb",34,1,"",python,content
+8679,16481114,"test.ipynb",34,0,"e",python,content
+8680,16481114,"test.ipynb",35,0,"",python,selection_keyboard
+8681,16481198,"test.ipynb",35,0,"n",python,content
+8682,16481198,"test.ipynb",36,0,"",python,selection_keyboard
+8683,16481295,"test.ipynb",36,0,"i",python,content
+8684,16481296,"test.ipynb",37,0,"",python,selection_keyboard
+8685,16481434,"test.ipynb",37,0,"z",python,content
+8686,16481434,"test.ipynb",38,0,"",python,selection_keyboard
+8687,16481626,"test.ipynb",38,0,"e",python,content
+8688,16481626,"test.ipynb",39,0,"",python,selection_keyboard
+8689,16481627,"test.ipynb",39,0,"r",python,content
+8690,16481628,"test.ipynb",40,0,"",python,selection_keyboard
+8691,16481759,"test.ipynb",40,0,".",python,content
+8692,16481759,"test.ipynb",41,0,"",python,selection_keyboard
+8693,16482148,"test.ipynb",41,0,"v",python,content
+8694,16482148,"test.ipynb",42,0,"",python,selection_keyboard
+8695,16482194,"test.ipynb",42,0,"q",python,content
+8696,16482195,"test.ipynb",43,0,"",python,selection_keyboard
+8697,16482380,"test.ipynb",43,0,".",python,content
+8698,16482380,"test.ipynb",44,0,"",python,selection_keyboard
+8699,16482788,"test.ipynb",43,1,"",python,content
+8700,16482859,"test.ipynb",43,0,"__module__",python,content
+8701,16483398,"test.ipynb",52,1,"",python,content
+8702,16483721,"test.ipynb",51,1,"",python,content
+8703,16483723,"test.ipynb",50,1,"",python,content
+8704,16483725,"test.ipynb",49,1,"",python,content
+8705,16483744,"test.ipynb",48,1,"",python,content
+8706,16483776,"test.ipynb",47,1,"",python,content
+8707,16483808,"test.ipynb",46,1,"",python,content
+8708,16483842,"test.ipynb",45,1,"",python,content
+8709,16483868,"test.ipynb",44,1,"",python,content
+8710,16483902,"test.ipynb",43,1,"",python,content
+8711,16484055,"test.ipynb",42,1,"",python,content
+8712,16484837,"test.ipynb",42,0,"q",python,content
+8713,16484837,"test.ipynb",43,0,"",python,selection_keyboard
+8714,16491077,"train_dynamics.py",0,0,"",python,tab
+8715,16491077,"train_dynamics.py",10404,0,"",python,selection_mouse
+8716,16491918,"train_dynamics.py",10442,0,"\n ",python,content
+8717,16493682,"train_dynamics.py",10451,0,"abstract_optimizer_state.model.tokenizer.vq.drop.rngs = rngs",python,content
+8718,16493925,"train_dynamics.py",10510,0,"",python,selection_command
+8719,16494212,"train_dynamics.py",10507,0,"",python,selection_command
+8720,16494540,"train_dynamics.py",10505,0,"",python,selection_command
+8721,16494540,"train_dynamics.py",10500,0,"",python,selection_command
+8722,16494541,"train_dynamics.py",10499,0,"",python,selection_command
+8723,16494541,"train_dynamics.py",10495,0,"",python,selection_command
+8724,16494574,"train_dynamics.py",10494,0,"",python,selection_command
+8725,16494803,"train_dynamics.py",10492,0,"",python,selection_command
+8726,16495064,"train_dynamics.py",10494,0,"",python,selection_command
+8727,16495255,"train_dynamics.py",10495,0,"",python,selection_command
+8728,16495588,"train_dynamics.py",10499,0,"",python,selection_command
+8729,16496112,"train_dynamics.py",10499,12,"",python,content
+8730,16496304,"train_dynamics.py",10499,0," ",python,content
+8731,16496304,"train_dynamics.py",10500,0,"",python,selection_keyboard
+8732,16496401,"train_dynamics.py",10500,0,"=",python,content
+8733,16496401,"train_dynamics.py",10501,0,"",python,selection_keyboard
+8734,16496482,"train_dynamics.py",10501,0," ",python,content
+8735,16496482,"train_dynamics.py",10502,0,"",python,selection_keyboard
+8736,16497291,"train_dynamics.py",10502,0,"nnx.Dropout(0.1, rngs=rngs)",python,content
+8737,16497514,"train_dynamics.py",10528,0,"",python,selection_command
+8738,16498045,"train_dynamics.py",10443,0,"",python,selection_command
+8739,16500360,"train_dynamics.py",10530,0,"",python,selection_command
+8740,16501542,"train_dynamics.py",10530,21,"",python,content
+8741,16501576,"train_dynamics.py",10538,0,"",python,selection_command
+8742,16502502,"train_dynamics.py",10585,0,"",python,selection_command
+8743,16502755,"train_dynamics.py",10631,0,"",python,selection_command
+8744,16502780,"train_dynamics.py",10668,0,"",python,selection_command
+8745,16502812,"train_dynamics.py",10746,0,"",python,selection_command
+8746,16503057,"train_dynamics.py",10831,0,"",python,selection_command
+8747,16503196,"train_dynamics.py",10846,0,"",python,selection_command
+8748,16503559,"train_dynamics.py",10847,0,"\n breakpoint()",python,content
+8749,16503582,"train_dynamics.py",10856,0,"",python,selection_command
+8750,16504588,"train_dynamics.py",10848,21,"",python,content
+8751,16504616,"train_dynamics.py",10856,0,"",python,selection_command
+8752,16504747,"train_dynamics.py",10846,0,"",python,selection_command
+8753,16542596,"test.ipynb",0,0,"",python,tab
+8754,16547630,"test.ipynb",42,0,"",python,selection_command
+8755,16549051,"test.ipynb",0,0,"",python,tab
+8756,16549052,"test.ipynb",50,0,"",python,selection_mouse
+8757,16549720,"test.ipynb",51,0,"",python,selection_command
+8758,16550909,"test.ipynb",51,0,"n",python,content
+8759,16550910,"test.ipynb",52,0,"",python,selection_keyboard
+8760,16551035,"test.ipynb",52,0,"n",python,content
+8761,16551035,"test.ipynb",53,0,"",python,selection_keyboard
+8762,16551119,"test.ipynb",53,0,"x",python,content
+8763,16551119,"test.ipynb",54,0,"",python,selection_keyboard
+8764,16551216,"test.ipynb",54,0,".",python,content
+8765,16551217,"test.ipynb",55,0,"",python,selection_keyboard
+8766,16552570,"test.ipynb",55,0,"e",python,content
+8767,16552571,"test.ipynb",56,0,"",python,selection_keyboard
+8768,16552683,"test.ipynb",56,0,"v",python,content
+8769,16552684,"test.ipynb",57,0,"",python,selection_keyboard
+8770,16552752,"test.ipynb",57,0,"a",python,content
+8771,16552753,"test.ipynb",58,0,"",python,selection_keyboard
+8772,16552931,"test.ipynb",58,0,"l",python,content
+8773,16552932,"test.ipynb",59,0,"",python,selection_keyboard
+8774,16553150,"test.ipynb",59,0,"_",python,content
+8775,16553151,"test.ipynb",60,0,"",python,selection_keyboard
+8776,16553352,"test.ipynb",60,0,"s",python,content
+8777,16553353,"test.ipynb",61,0,"",python,selection_keyboard
+8778,16553432,"test.ipynb",61,0,"h",python,content
+8779,16553432,"test.ipynb",62,0,"",python,selection_keyboard
+8780,16553511,"test.ipynb",62,0,"a",python,content
+8781,16553512,"test.ipynb",63,0,"",python,selection_keyboard
+8782,16553615,"test.ipynb",63,0,"p",python,content
+8783,16553615,"test.ipynb",64,0,"",python,selection_keyboard
+8784,16553668,"test.ipynb",64,0,"e",python,content
+8785,16553668,"test.ipynb",65,0,"",python,selection_keyboard
+8786,16554002,"test.ipynb",65,0,"(",python,content
+8787,16554003,"test.ipynb",66,0,"",python,selection_keyboard
+8788,16554518,"test.ipynb",65,0,"",python,selection_command
+8789,16555181,"test.ipynb",66,0,"",python,selection_command
+8790,16555925,"test.ipynb",66,0," ",python,content
+8791,16555925,"test.ipynb",67,0,"",python,selection_keyboard
+8792,16556096,"test.ipynb",67,0,"l",python,content
+8793,16556096,"test.ipynb",68,0,"",python,selection_keyboard
+8794,16556222,"test.ipynb",68,0,"a",python,content
+8795,16556223,"test.ipynb",69,0,"",python,selection_keyboard
+8796,16556466,"test.ipynb",68,1,"",python,content
+8797,16556579,"test.ipynb",67,1,"",python,content
+8798,16556729,"test.ipynb",66,1,"",python,content
+8799,16557047,"test.ipynb",66,0,"l",python,content
+8800,16557048,"test.ipynb",67,0,"",python,selection_keyboard
+8801,16557170,"test.ipynb",67,0,"a",python,content
+8802,16557171,"test.ipynb",68,0,"",python,selection_keyboard
+8803,16557235,"test.ipynb",68,0,"m",python,content
+8804,16557236,"test.ipynb",69,0,"",python,selection_keyboard
+8805,16557402,"test.ipynb",69,0,"b",python,content
+8806,16557403,"test.ipynb",70,0,"",python,selection_keyboard
+8807,16557452,"test.ipynb",70,0,"d",python,content
+8808,16557453,"test.ipynb",71,0,"",python,selection_keyboard
+8809,16557496,"test.ipynb",71,0,"a",python,content
+8810,16557496,"test.ipynb",72,0,"",python,selection_keyboard
+8811,16557797,"test.ipynb",72,0,":",python,content
+8812,16557798,"test.ipynb",73,0,"",python,selection_keyboard
+8813,16557833,"test.ipynb",73,0," ",python,content
+8814,16557834,"test.ipynb",74,0,"",python,selection_keyboard
+8815,16558050,"test.ipynb",73,0,"",python,selection_command
+8816,16558306,"test.ipynb",101,0,"",python,selection_command
+8817,16558380,"test.ipynb",101,0,")",python,content
+8818,16558381,"test.ipynb",102,0,"",python,selection_keyboard
+8819,16558830,"test.ipynb",101,0,"",python,selection_command
+8820,16563463,"train_dynamics.py",0,0,"",python,tab
+8821,16563829,"train_dynamics.py",10831,0,"",python,selection_command
+8822,16563961,"train_dynamics.py",10746,0,"",python,selection_command
+8823,16564109,"train_dynamics.py",10668,0,"",python,selection_command
+8824,16564266,"train_dynamics.py",10631,0,"",python,selection_command
+8825,16564396,"train_dynamics.py",10585,0,"",python,selection_command
+8826,16564600,"train_dynamics.py",10538,0,"",python,selection_command
+8827,16564673,"train_dynamics.py",10451,0,"",python,selection_command
+8828,16564811,"train_dynamics.py",10475,0,"",python,selection_command
+8829,16565124,"train_dynamics.py",10476,0,"",python,selection_command
+8830,16565124,"train_dynamics.py",10481,0,"",python,selection_command
+8831,16565129,"train_dynamics.py",10482,0,"",python,selection_command
+8832,16565161,"train_dynamics.py",10491,0,"",python,selection_command
+8833,16565194,"train_dynamics.py",10492,0,"",python,selection_command
+8834,16565228,"train_dynamics.py",10494,0,"",python,selection_command
+8835,16565315,"train_dynamics.py",10495,0,"",python,selection_command
+8836,16565316,"train_dynamics.py",10500,0,"",python,selection_command
+8837,16565544,"train_dynamics.py",10502,0,"",python,selection_command
+8838,16567304,"train_dynamics.py",10502,0,"n",python,content
+8839,16567304,"train_dynamics.py",10503,0,"",python,selection_keyboard
+8840,16567421,"train_dynamics.py",10503,0,"n",python,content
+8841,16567421,"train_dynamics.py",10504,0,"",python,selection_keyboard
+8842,16567535,"train_dynamics.py",10504,0,"x",python,content
+8843,16567536,"train_dynamics.py",10505,0,"",python,selection_keyboard
+8844,16567619,"train_dynamics.py",10505,0,".",python,content
+8845,16567619,"train_dynamics.py",10506,0,"",python,selection_keyboard
+8846,16568113,"train_dynamics.py",10506,0,"e",python,content
+8847,16568113,"train_dynamics.py",10507,0,"",python,selection_keyboard
+8848,16568133,"train_dynamics.py",10507,0,"v",python,content
+8849,16568133,"train_dynamics.py",10508,0,"",python,selection_keyboard
+8850,16568177,"train_dynamics.py",10508,0,"a",python,content
+8851,16568177,"train_dynamics.py",10509,0,"",python,selection_keyboard
+8852,16568272,"train_dynamics.py",10509,0,"l",python,content
+8853,16568273,"train_dynamics.py",10510,0,"",python,selection_keyboard
+8854,16568550,"train_dynamics.py",10510,0,"_",python,content
+8855,16568550,"train_dynamics.py",10511,0,"",python,selection_keyboard
+8856,16568798,"train_dynamics.py",10511,0,"s",python,content
+8857,16568798,"train_dynamics.py",10512,0,"",python,selection_keyboard
+8858,16568830,"train_dynamics.py",10512,0,"h",python,content
+8859,16568831,"train_dynamics.py",10513,0,"",python,selection_keyboard
+8860,16568988,"train_dynamics.py",10513,0,"a",python,content
+8861,16568988,"train_dynamics.py",10514,0,"",python,selection_keyboard
+8862,16568997,"train_dynamics.py",10514,0,"p",python,content
+8863,16568998,"train_dynamics.py",10515,0,"",python,selection_keyboard
+8864,16569116,"train_dynamics.py",10515,0,"e",python,content
+8865,16569117,"train_dynamics.py",10516,0,"",python,selection_keyboard
+8866,16569344,"train_dynamics.py",10516,0,"(",python,content
+8867,16569344,"train_dynamics.py",10517,0,"",python,selection_keyboard
+8868,16569739,"train_dynamics.py",10517,0,"l",python,content
+8869,16569739,"train_dynamics.py",10518,0,"",python,selection_keyboard
+8870,16569845,"train_dynamics.py",10518,0,"a",python,content
+8871,16569846,"train_dynamics.py",10519,0,"",python,selection_keyboard
+8872,16569863,"train_dynamics.py",10519,0,"m",python,content
+8873,16569863,"train_dynamics.py",10520,0,"",python,selection_keyboard
+8874,16570037,"train_dynamics.py",10520,0,"b",python,content
+8875,16570037,"train_dynamics.py",10521,0,"",python,selection_keyboard
+8876,16570064,"train_dynamics.py",10521,0,"d",python,content
+8877,16570064,"train_dynamics.py",10522,0,"",python,selection_keyboard
+8878,16570112,"train_dynamics.py",10522,0,"a",python,content
+8879,16570112,"train_dynamics.py",10523,0,"",python,selection_keyboard
+8880,16570370,"train_dynamics.py",10523,0,":",python,content
+8881,16570370,"train_dynamics.py",10524,0,"",python,selection_keyboard
+8882,16570414,"train_dynamics.py",10524,0," ",python,content
+8883,16570414,"train_dynamics.py",10525,0,"",python,selection_keyboard
+8884,16570894,"train_dynamics.py",10524,0,"",python,selection_command
+8885,16571095,"train_dynamics.py",10552,0,"",python,selection_command
+8886,16571164,"train_dynamics.py",10552,0,")",python,content
+8887,16571164,"train_dynamics.py",10553,0,"",python,selection_keyboard
+8888,16571609,"train_dynamics.py",10552,0,"",python,selection_command
+8889,16572134,"train_dynamics.py",10443,0,"",python,selection_command
+8890,16593441,"train_dynamics.py",10451,0,"",python,selection_command
+8891,16593630,"train_dynamics.py",10475,0,"",python,selection_command
+8892,16593649,"train_dynamics.py",10476,0,"",python,selection_command
+8893,16593681,"train_dynamics.py",10481,0,"",python,selection_command
+8894,16593714,"train_dynamics.py",10482,0,"",python,selection_command
+8895,16593748,"train_dynamics.py",10491,0,"",python,selection_command
+8896,16593781,"train_dynamics.py",10492,0,"",python,selection_command
+8897,16593814,"train_dynamics.py",10494,0,"",python,selection_command
+8898,16593849,"train_dynamics.py",10495,0,"",python,selection_command
+8899,16595220,"train_dynamics.py",10500,0,"",python,selection_command
+8900,16595396,"train_dynamics.py",10502,0,"",python,selection_command
+8901,16596251,"train_dynamics.py",10502,0,"n",python,content
+8902,16596251,"train_dynamics.py",10503,0,"",python,selection_keyboard
+8903,16596338,"train_dynamics.py",10503,0,"n",python,content
+8904,16596339,"train_dynamics.py",10504,0,"",python,selection_keyboard
+8905,16596486,"train_dynamics.py",10504,0,".",python,content
+8906,16596487,"train_dynamics.py",10505,0,"",python,selection_keyboard
+8907,16596585,"train_dynamics.py",10505,0,"x",python,content
+8908,16596585,"train_dynamics.py",10506,0,"",python,selection_keyboard
+8909,16596801,"train_dynamics.py",10506,0,"s",python,content
+8910,16596801,"train_dynamics.py",10507,0,"",python,selection_keyboard
+8911,16596887,"train_dynamics.py",10507,0,"t",python,content
+8912,16596887,"train_dynamics.py",10508,0,"",python,selection_keyboard
+8913,16596972,"train_dynamics.py",10508,0,"a",python,content
+8914,16596973,"train_dynamics.py",10509,0,"",python,selection_keyboard
+8915,16597108,"train_dynamics.py",10509,0,"t",python,content
+8916,16597109,"train_dynamics.py",10510,0,"",python,selection_keyboard
+8917,16597311,"train_dynamics.py",10509,1,"",python,content
+8918,16597444,"train_dynamics.py",10508,1,"",python,content
+8919,16597634,"train_dynamics.py",10507,1,"",python,content
+8920,16597725,"train_dynamics.py",10506,1,"",python,content
+8921,16597871,"train_dynamics.py",10505,1,"",python,content
+8922,16598351,"train_dynamics.py",10504,1,"",python,content
+8923,16598483,"train_dynamics.py",10503,0,"",python,selection_command
+8924,16600690,"test.ipynb",0,0,"",python,tab
+8925,16600691,"test.ipynb",61,0,"",python,selection_mouse
+8926,16601129,"test.ipynb",55,0,"",python,selection_command
+8927,16601303,"test.ipynb",54,0,"",python,selection_command
+8928,16601494,"test.ipynb",51,0,"",python,selection_command
+8929,16601905,"test.ipynb",51,0,"n",python,content
+8930,16601906,"test.ipynb",52,0,"",python,selection_keyboard
+8931,16602018,"test.ipynb",52,0,"n",python,content
+8932,16602019,"test.ipynb",53,0,"",python,selection_keyboard
+8933,16602129,"test.ipynb",53,0,"x",python,content
+8934,16602129,"test.ipynb",54,0,"",python,selection_keyboard
+8935,16602198,"test.ipynb",54,0,".",python,content
+8936,16602199,"test.ipynb",55,0,"",python,selection_keyboard
+8937,16602352,"test.ipynb",55,0,"s",python,content
+8938,16602352,"test.ipynb",56,0,"",python,selection_keyboard
+8939,16602732,"test.ipynb",56,0,"t",python,content
+8940,16602732,"test.ipynb",57,0,"",python,selection_keyboard
+8941,16602879,"test.ipynb",57,0,"a",python,content
+8942,16602880,"test.ipynb",58,0,"",python,selection_keyboard
+8943,16602907,"test.ipynb",58,0,"t",python,content
+8944,16602907,"test.ipynb",59,0,"",python,selection_keyboard
+8945,16602978,"test.ipynb",59,0,"e",python,content
+8946,16602979,"test.ipynb",60,0,"",python,selection_keyboard
+8947,16603254,"test.ipynb",60,0,"(",python,content
+8948,16603254,"test.ipynb",61,0,"",python,selection_keyboard
+8949,16603682,"test.ipynb",60,0,"",python,selection_command
+8950,16603936,"test.ipynb",112,0,"",python,selection_command
+8951,16604047,"test.ipynb",112,0,")",python,content
+8952,16604047,"test.ipynb",113,0,"",python,selection_keyboard
+8953,16605837,"test.ipynb",0,0,"",python,tab
+8954,16608489,"train_dynamics.py",0,0,"",python,tab
+8955,16609911,"train_dynamics.py",10553,0,")",python,content
+8956,16609911,"train_dynamics.py",10504,0,"x.state(",python,content
+8957,16609911,"train_dynamics.py",10562,0,"",python,selection_command
+8958,16610495,"train_dynamics.py",10564,0,"",python,selection_command
+8959,16610941,"train_dynamics.py",10563,0,"",python,selection_command
+8960,16611101,"train_dynamics.py",10443,0,"",python,selection_command
+8961,16641439,"train_dynamics.py",10442,0,"\n ",python,content
+8962,16641478,"train_dynamics.py",10451,0,"#",python,content
+8963,16641478,"train_dynamics.py",10452,0,"",python,selection_keyboard
+8964,16641530,"train_dynamics.py",10452,0," ",python,content
+8965,16641531,"train_dynamics.py",10453,0,"",python,selection_keyboard
+8966,16643203,"train_dynamics.py",10453,0,"F",python,content
+8967,16643203,"train_dynamics.py",10454,0,"",python,selection_keyboard
+8968,16643281,"train_dynamics.py",10454,0,"I",python,content
+8969,16643281,"train_dynamics.py",10455,0,"",python,selection_keyboard
+8970,16643335,"train_dynamics.py",10455,0,"X",python,content
+8971,16643336,"train_dynamics.py",10456,0,"",python,selection_keyboard
+8972,16643425,"train_dynamics.py",10456,0,"M",python,content
+8973,16643426,"train_dynamics.py",10457,0,"",python,selection_keyboard
+8974,16643493,"train_dynamics.py",10457,0,"E",python,content
+8975,16643493,"train_dynamics.py",10458,0,"",python,selection_keyboard
+8976,16643562,"train_dynamics.py",10458,0," ",python,content
+8977,16643562,"train_dynamics.py",10459,0,"",python,selection_keyboard
+8978,16643714,"train_dynamics.py",10459,0,"()",python,content
+8979,16643715,"train_dynamics.py",10460,0,"",python,selection_keyboard
+8980,16644016,"train_dynamics.py",10460,0,"f",python,content
+8981,16644016,"train_dynamics.py",10461,0,"",python,selection_keyboard
+8982,16644170,"train_dynamics.py",10461,0,".",python,content
+8983,16644171,"train_dynamics.py",10462,0,"",python,selection_keyboard
+8984,16644197,"train_dynamics.py",10462,0,"s",python,content
+8985,16644197,"train_dynamics.py",10463,0,"",python,selection_keyboard
+8986,16644276,"train_dynamics.py",10463,0,"r",python,content
+8987,16644276,"train_dynamics.py",10464,0,"",python,selection_keyboard
+8988,16644345,"train_dynamics.py",10464,0,"a",python,content
+8989,16644345,"train_dynamics.py",10465,0,"",python,selection_keyboard
+8990,16644382,"train_dynamics.py",10465,0,"m",python,content
+8991,16644382,"train_dynamics.py",10466,0,"",python,selection_keyboard
+8992,16644550,"train_dynamics.py",10466,0,"b",python,content
+8993,16644550,"train_dynamics.py",10467,0,"",python,selection_keyboard
+8994,16644612,"train_dynamics.py",10467,0,"i",python,content
+8995,16644612,"train_dynamics.py",10468,0,"",python,selection_keyboard
+8996,16644630,"train_dynamics.py",10468,0,"c",python,content
+8997,16644630,"train_dynamics.py",10469,0,"",python,selection_keyboard
+8998,16644681,"train_dynamics.py",10469,0,"a",python,content
+8999,16644681,"train_dynamics.py",10470,0,"",python,selection_keyboard
+9000,16644776,"train_dynamics.py",10470,0,"l",python,content
+9001,16644776,"train_dynamics.py",10471,0,"",python,selection_keyboard
+9002,16644980,"train_dynamics.py",10471,1,")",python,content
+9003,16644980,"train_dynamics.py",10472,0,"",python,selection_keyboard
+9004,16645101,"train_dynamics.py",10472,0,":",python,content
+9005,16645102,"train_dynamics.py",10473,0,"",python,selection_keyboard
+9006,16645238,"train_dynamics.py",10473,0," ",python,content
+9007,16645238,"train_dynamics.py",10474,0,"",python,selection_keyboard
+9008,16646430,"train_dynamics.py",10474,0,"Q",python,content
+9009,16646430,"train_dynamics.py",10475,0,"",python,selection_keyboard
+9010,16646498,"train_dynamics.py",10475,0,"U",python,content
+9011,16646499,"train_dynamics.py",10476,0,"",python,selection_keyboard
+9012,16646533,"train_dynamics.py",10476,0,"I",python,content
+9013,16646533,"train_dynamics.py",10477,0,"",python,selection_keyboard
+9014,16646936,"train_dynamics.py",10477,0,"C",python,content
+9015,16646936,"train_dynamics.py",10478,0,"",python,selection_keyboard
+9016,16647014,"train_dynamics.py",10478,0,"K",python,content
+9017,16647014,"train_dynamics.py",10479,0,"",python,selection_keyboard
+9018,16647276,"train_dynamics.py",10479,0,"F",python,content
+9019,16647276,"train_dynamics.py",10480,0,"",python,selection_keyboard
+9020,16647308,"train_dynamics.py",10480,0,"I",python,content
+9021,16647308,"train_dynamics.py",10481,0,"",python,selection_keyboard
+9022,16647379,"train_dynamics.py",10481,0,"X",python,content
+9023,16647380,"train_dynamics.py",10482,0,"",python,selection_keyboard
+9024,16647631,"train_dynamics.py",10481,0,"",python,selection_command
+9025,16647794,"train_dynamics.py",10443,0,"",python,selection_command
+9026,16652167,"train_dynamics.py",10483,0,"",python,selection_command
+9027,16689216,"train_dynamics.py",10483,121," abstract_optimizer_state.model.tokenizer.vq.drop = nnx.state(nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs)))",python,selection_command
+9028,16689881,"train_dynamics.py",10483,0,"",python,selection_command
+9029,16714280,"train_dynamics.py",13935,0,"",python,selection_command
+9030,16714724,"train_dynamics.py",13904,0,"",python,selection_command
+9031,16714983,"train_dynamics.py",13903,0,"",python,selection_command
+9032,16715010,"train_dynamics.py",13881,0,"",python,selection_command
+9033,16715043,"train_dynamics.py",13842,0,"",python,selection_command
+9034,16715073,"train_dynamics.py",13784,0,"",python,selection_command
+9035,16715108,"train_dynamics.py",13766,0,"",python,selection_command
+9036,16715144,"train_dynamics.py",13743,0,"",python,selection_command
+9037,16715195,"train_dynamics.py",13653,0,"",python,selection_command
+9038,16715217,"train_dynamics.py",13579,0,"",python,selection_command
+9039,16715266,"train_dynamics.py",13534,0,"",python,selection_command
+9040,16715282,"train_dynamics.py",13508,0,"",python,selection_command
+9041,16715386,"train_dynamics.py",13467,0,"",python,selection_command
+9042,16715553,"train_dynamics.py",13438,0,"",python,selection_command
+9043,16715909,"train_dynamics.py",13438,29,"",python,content
+9044,16715924,"train_dynamics.py",13454,0,"",python,selection_command
+9045,16721546,"train_dynamics.py",0,0,"",python,selection_command
+9046,16722096,"train_dynamics.py",1342,0,"",python,selection_command
+9047,16722492,"train_dynamics.py",2860,0,"",python,selection_command
+9048,16722878,"train_dynamics.py",4849,0,"",python,selection_command
+9049,16729486,"train_dynamics.py",10474,0,"",python,selection_command
+9050,16732563,"train_dynamics.py",10482,0,"",python,selection_command
+9051,16733429,"train_dynamics.py",10482,0," ",python,content
+9052,16733430,"train_dynamics.py",10483,0,"",python,selection_keyboard
+9053,16733513,"train_dynamics.py",10483,0,"d",python,content
+9054,16733513,"train_dynamics.py",10484,0,"",python,selection_keyboard
+9055,16733651,"train_dynamics.py",10484,0,"u",python,content
+9056,16733651,"train_dynamics.py",10485,0,"",python,selection_keyboard
+9057,16733696,"train_dynamics.py",10485,0,"e",python,content
+9058,16733696,"train_dynamics.py",10486,0,"",python,selection_keyboard
+9059,16733793,"train_dynamics.py",10486,0," ",python,content
+9060,16733794,"train_dynamics.py",10487,0,"",python,selection_keyboard
+9061,16733895,"train_dynamics.py",10487,0,"t",python,content
+9062,16733895,"train_dynamics.py",10488,0,"",python,selection_keyboard
+9063,16733960,"train_dynamics.py",10488,0,"o",python,content
+9064,16733961,"train_dynamics.py",10489,0,"",python,selection_keyboard
+9065,16734088,"train_dynamics.py",10489,0," ",python,content
+9066,16734088,"train_dynamics.py",10490,0,"",python,selection_keyboard
+9067,16736233,"train_dynamics.py",10490,0,"a",python,content
+9068,16736233,"train_dynamics.py",10491,0,"",python,selection_keyboard
+9069,16736352,"train_dynamics.py",10491,0," ",python,content
+9070,16736352,"train_dynamics.py",10492,0,"",python,selection_keyboard
+9071,16736443,"train_dynamics.py",10492,0,"b",python,content
+9072,16736444,"train_dynamics.py",10493,0,"",python,selection_keyboard
+9073,16736509,"train_dynamics.py",10493,0,"u",python,content
+9074,16736509,"train_dynamics.py",10494,0,"",python,selection_keyboard
+9075,16736593,"train_dynamics.py",10494,0,"g",python,content
+9076,16736593,"train_dynamics.py",10495,0,"",python,selection_keyboard
+9077,16736662,"train_dynamics.py",10495,0," ",python,content
+9078,16736663,"train_dynamics.py",10496,0,"",python,selection_keyboard
+9079,16736759,"train_dynamics.py",10496,0,"i",python,content
+9080,16736760,"train_dynamics.py",10497,0,"",python,selection_keyboard
+9081,16736827,"train_dynamics.py",10497,0,"n",python,content
+9082,16736827,"train_dynamics.py",10498,0,"",python,selection_keyboard
+9083,16736883,"train_dynamics.py",10498,0," ",python,content
+9084,16736883,"train_dynamics.py",10499,0,"",python,selection_keyboard
+9085,16738532,"train_dynamics.py",10499,0,"f",python,content
+9086,16738532,"train_dynamics.py",10500,0,"",python,selection_keyboard
+9087,16738595,"train_dynamics.py",10500,0,"l",python,content
+9088,16738595,"train_dynamics.py",10501,0,"",python,selection_keyboard
+9089,16738641,"train_dynamics.py",10501,0,"a",python,content
+9090,16738642,"train_dynamics.py",10502,0,"",python,selection_keyboard
+9091,16738778,"train_dynamics.py",10502,0,"x",python,content
+9092,16738779,"train_dynamics.py",10503,0,"",python,selection_keyboard
+9093,16739016,"train_dynamics.py",10503,0,".",python,content
+9094,16739016,"train_dynamics.py",10504,0,"",python,selection_keyboard
+9095,16739256,"train_dynamics.py",10504,0,"n",python,content
+9096,16739256,"train_dynamics.py",10505,0,"",python,selection_keyboard
+9097,16739419,"train_dynamics.py",10505,0,"n",python,content
+9098,16739419,"train_dynamics.py",10506,0,"",python,selection_keyboard
+9099,16739532,"train_dynamics.py",10506,0,"x",python,content
+9100,16739533,"train_dynamics.py",10507,0,"",python,selection_keyboard
+9101,16739785,"train_dynamics.py",10506,0,"",python,selection_command
+9102,16739925,"train_dynamics.py",10443,0,"",python,selection_command
+9103,16741130,"train_dynamics.py",10451,0,"",python,selection_command
+9104,16741280,"train_dynamics.py",10453,0,"",python,selection_command
+9105,16741432,"train_dynamics.py",10459,0,"",python,selection_command
+9106,16741566,"train_dynamics.py",10460,0,"",python,selection_command
+9107,16741680,"train_dynamics.py",10461,0,"",python,selection_command
+9108,16741865,"train_dynamics.py",10462,0,"",python,selection_command
+9109,16742119,"train_dynamics.py",10471,0,"",python,selection_command
+9110,16742285,"train_dynamics.py",10474,0,"",python,selection_command
+9111,16742554,"train_dynamics.py",10474,1,"Q",python,selection_command
+9112,16742626,"train_dynamics.py",10474,8,"QUICKFIX",python,selection_command
+9113,16742750,"train_dynamics.py",10474,12,"QUICKFIX due",python,selection_command
+9114,16742900,"train_dynamics.py",10474,15,"QUICKFIX due to",python,selection_command
+9115,16743161,"train_dynamics.py",10474,17,"QUICKFIX due to a",python,selection_command
+9116,16743484,"train_dynamics.py",10474,21,"QUICKFIX due to a bug",python,selection_command
+9117,16743953,"train_dynamics.py",10474,19,"QUICKFIX due to a b",python,selection_command
+9118,16744083,"train_dynamics.py",10474,17,"QUICKFIX due to a",python,selection_command
+9119,16744200,"train_dynamics.py",10474,14,"QUICKFIX due t",python,selection_command
+9120,16744381,"train_dynamics.py",10474,15,"QUICKFIX due to",python,selection_command
+9121,16744533,"train_dynamics.py",10474,15,"",python,content
+9122,16744972,"train_dynamics.py",10474,0,"q",python,content
+9123,16744972,"train_dynamics.py",10475,0,"",python,selection_keyboard
+9124,16745013,"train_dynamics.py",10475,0,"u",python,content
+9125,16745013,"train_dynamics.py",10476,0,"",python,selection_keyboard
+9126,16745082,"train_dynamics.py",10476,0,"i",python,content
+9127,16745082,"train_dynamics.py",10477,0,"",python,selection_keyboard
+9128,16745126,"train_dynamics.py",10477,0,"c",python,content
+9129,16745127,"train_dynamics.py",10478,0,"",python,selection_keyboard
+9130,16745249,"train_dynamics.py",10478,0,"k",python,content
+9131,16745250,"train_dynamics.py",10479,0,"",python,selection_keyboard
+9132,16745345,"train_dynamics.py",10479,0,"f",python,content
+9133,16745345,"train_dynamics.py",10480,0,"",python,selection_keyboard
+9134,16745461,"train_dynamics.py",10480,0,"i",python,content
+9135,16745462,"train_dynamics.py",10481,0,"",python,selection_keyboard
+9136,16745534,"train_dynamics.py",10481,0,"x",python,content
+9137,16745535,"train_dynamics.py",10482,0,"",python,selection_keyboard
+9138,16745611,"train_dynamics.py",10482,0," ",python,content
+9139,16745611,"train_dynamics.py",10483,0,"",python,selection_keyboard
+9140,16745928,"train_dynamics.py",10483,0,"o",python,content
+9141,16745928,"train_dynamics.py",10484,0,"",python,selection_keyboard
+9142,16745979,"train_dynamics.py",10484,0,"f",python,content
+9143,16745979,"train_dynamics.py",10485,0,"",python,selection_keyboard
+9144,16746449,"train_dynamics.py",10484,0,"",python,selection_command
+9145,16746783,"train_dynamics.py",10443,0,"",python,selection_command
+9146,16760122,"train_dynamics.py",10504,0,"",python,selection_command
+9147,16772513,"train_dynamics.py",10512,0,"",python,selection_command
+9148,16772796,"train_dynamics.py",10512,1,"a",python,selection_command
+9149,16772800,"train_dynamics.py",10512,24,"abstract_optimizer_state",python,selection_command
+9150,16773118,"train_dynamics.py",10512,114,"abstract_optimizer_state.model.tokenizer.vq.drop = nnx.state(nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs)))\n",python,selection_command
+9151,16773352,"train_dynamics.py",10512,113,"abstract_optimizer_state.model.tokenizer.vq.drop = nnx.state(nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs)))",python,selection_command
+9152,16773682,"train_dynamics.py",10624,0,"",python,selection_command
+9153,16958194,"train_dynamics.py",10504,0,"",python,selection_command
+9154,16958402,"train_dynamics.py",10443,0,"",python,selection_command
+9155,16958523,"train_dynamics.py",10451,0,"",python,selection_command
+9156,16958696,"train_dynamics.py",10453,0,"",python,selection_command
+9157,16958826,"train_dynamics.py",10459,0,"",python,selection_command
+9158,16959081,"train_dynamics.py",10460,0,"",python,selection_command
+9159,16959110,"train_dynamics.py",10461,0,"",python,selection_command
+9160,16959144,"train_dynamics.py",10462,0,"",python,selection_command
+9161,16959171,"train_dynamics.py",10471,0,"",python,selection_command
+9162,16959204,"train_dynamics.py",10474,0,"",python,selection_command
+9163,16959237,"train_dynamics.py",10483,0,"",python,selection_command
+9164,16959271,"train_dynamics.py",10486,0,"",python,selection_command
+9165,16959304,"train_dynamics.py",10488,0,"",python,selection_command
+9166,16959338,"train_dynamics.py",10492,0,"",python,selection_command
+9167,16959946,"train_dynamics.py",10488,0,"",python,selection_command
+9168,16960112,"train_dynamics.py",10486,0,"",python,selection_command
+9169,16960831,"train_dynamics.py",10488,0,"",python,selection_command
+9170,16961144,"train_dynamics.py",10492,0,"",python,selection_command
+9171,16961328,"train_dynamics.py",10495,0,"",python,selection_command
+9172,16962828,"train_dynamics.py",10503,0,"",python,selection_command
+9173,16963283,"train_dynamics.py",10503,0," ",python,content
+9174,16963283,"train_dynamics.py",10504,0,"",python,selection_keyboard
+9175,16963394,"train_dynamics.py",10504,0,"()",python,content
+9176,16963394,"train_dynamics.py",10505,0,"",python,selection_keyboard
+9177,16964848,"train_dynamics.py",10504,2,"",python,content
+9178,16964975,"train_dynamics.py",10503,1,"",python,content
+9179,16965525,"train_dynamics.py",10502,0,"",python,selection_command
+9180,16968042,"train_dynamics.py",10442,0,"\n ",python,content
+9181,16969629,"train_dynamics.py",10451,0,"#",python,content
+9182,16969630,"train_dynamics.py",10452,0,"",python,selection_keyboard
+9183,16969685,"train_dynamics.py",10452,0," ",python,content
+9184,16969686,"train_dynamics.py",10453,0,"",python,selection_keyboard
+9185,16969864,"train_dynamics.py",10453,0,"F",python,content
+9186,16969864,"train_dynamics.py",10454,0,"",python,selection_keyboard
+9187,16969912,"train_dynamics.py",10454,0,"I",python,content
+9188,16969912,"train_dynamics.py",10455,0,"",python,selection_keyboard
+9189,16969981,"train_dynamics.py",10455,0,"X",python,content
+9190,16969981,"train_dynamics.py",10456,0,"",python,selection_keyboard
+9191,16970076,"train_dynamics.py",10456,0,"M",python,content
+9192,16970076,"train_dynamics.py",10457,0,"",python,selection_keyboard
+9193,16970206,"train_dynamics.py",10457,0,"E",python,content
+9194,16970207,"train_dynamics.py",10458,0,"",python,selection_keyboard
+9195,16970393,"train_dynamics.py",10458,0," ",python,content
+9196,16970393,"train_dynamics.py",10459,0,"",python,selection_keyboard
+9197,16970533,"train_dynamics.py",10459,0,"()",python,content
+9198,16970533,"train_dynamics.py",10460,0,"",python,selection_keyboard
+9199,16971016,"train_dynamics.py",10460,0,"f",python,content
+9200,16971016,"train_dynamics.py",10461,0,"",python,selection_keyboard
+9201,16971126,"train_dynamics.py",10461,0,".",python,content
+9202,16971127,"train_dynamics.py",10462,0,"",python,selection_keyboard
+9203,16971174,"train_dynamics.py",10462,0,"s",python,content
+9204,16971174,"train_dynamics.py",10463,0,"",python,selection_keyboard
+9205,16971261,"train_dynamics.py",10463,0,"r",python,content
+9206,16971262,"train_dynamics.py",10464,0,"",python,selection_keyboard
+9207,16971326,"train_dynamics.py",10464,0,"a",python,content
+9208,16971326,"train_dynamics.py",10465,0,"",python,selection_keyboard
+9209,16971360,"train_dynamics.py",10465,0,"m",python,content
+9210,16971360,"train_dynamics.py",10466,0,"",python,selection_keyboard
+9211,16971510,"train_dynamics.py",10466,0,"b",python,content
+9212,16971511,"train_dynamics.py",10467,0,"",python,selection_keyboard
+9213,16971577,"train_dynamics.py",10467,0,"i",python,content
+9214,16971577,"train_dynamics.py",10468,0,"",python,selection_keyboard
+9215,16971649,"train_dynamics.py",10468,0,"c",python,content
+9216,16971650,"train_dynamics.py",10469,0,"",python,selection_keyboard
+9217,16971679,"train_dynamics.py",10469,0,"a",python,content
+9218,16971679,"train_dynamics.py",10470,0,"",python,selection_keyboard
+9219,16971780,"train_dynamics.py",10470,0,"l",python,content
+9220,16971780,"train_dynamics.py",10471,0,"",python,selection_keyboard
+9221,16971997,"train_dynamics.py",10470,0,"",python,selection_command
+9222,16972278,"train_dynamics.py",10472,0,"",python,selection_command
+9223,16972330,"train_dynamics.py",10472,0,":",python,content
+9224,16972330,"train_dynamics.py",10473,0,"",python,selection_keyboard
+9225,16972391,"train_dynamics.py",10473,0," ",python,content
+9226,16972391,"train_dynamics.py",10474,0,"",python,selection_keyboard
+9227,16973205,"train_dynamics.py",10474,0,"a",python,content
+9228,16973205,"train_dynamics.py",10475,0,"",python,selection_keyboard
+9229,16973292,"train_dynamics.py",10475,0,"d",python,content
+9230,16973292,"train_dynamics.py",10476,0,"",python,selection_keyboard
+9231,16973501,"train_dynamics.py",10476,0,"d",python,content
+9232,16973501,"train_dynamics.py",10477,0,"",python,selection_keyboard
+9233,16973609,"train_dynamics.py",10477,0," ",python,content
+9234,16973609,"train_dynamics.py",10478,0,"",python,selection_keyboard
+9235,16974247,"train_dynamics.py",10478,0,"l",python,content
+9236,16974247,"train_dynamics.py",10479,0,"",python,selection_keyboard
+9237,16974309,"train_dynamics.py",10479,0,"i",python,content
+9238,16974309,"train_dynamics.py",10480,0,"",python,selection_keyboard
+9239,16974329,"train_dynamics.py",10480,0,"n",python,content
+9240,16974329,"train_dynamics.py",10481,0,"",python,selection_keyboard
+9241,16974447,"train_dynamics.py",10481,0,"k",python,content
+9242,16974447,"train_dynamics.py",10482,0,"",python,selection_keyboard
+9243,16974612,"train_dynamics.py",10482,0," ",python,content
+9244,16974612,"train_dynamics.py",10483,0,"",python,selection_keyboard
+9245,16974713,"train_dynamics.py",10483,0,"t",python,content
+9246,16974714,"train_dynamics.py",10484,0,"",python,selection_keyboard
+9247,16974826,"train_dynamics.py",10484,0,"o",python,content
+9248,16974827,"train_dynamics.py",10485,0,"",python,selection_keyboard
+9249,16974878,"train_dynamics.py",10485,0," ",python,content
+9250,16974878,"train_dynamics.py",10486,0,"",python,selection_keyboard
+9251,16975224,"train_dynamics.py",10486,0,"i",python,content
+9252,16975225,"train_dynamics.py",10487,0,"",python,selection_keyboard
+9253,16975276,"train_dynamics.py",10487,0,"s",python,content
+9254,16975277,"train_dynamics.py",10488,0,"",python,selection_keyboard
+9255,16975407,"train_dynamics.py",10488,0,"s",python,content
+9256,16975408,"train_dynamics.py",10489,0,"",python,selection_keyboard
+9257,16975473,"train_dynamics.py",10489,0,"u",python,content
+9258,16975473,"train_dynamics.py",10490,0,"",python,selection_keyboard
+9259,16975556,"train_dynamics.py",10490,0,"e",python,content
+9260,16975556,"train_dynamics.py",10491,0,"",python,selection_keyboard
+9261,16975623,"train_dynamics.py",10491,0," ",python,content
+9262,16975623,"train_dynamics.py",10492,0,"",python,selection_keyboard
+9263,16976098,"train_dynamics.py",10491,1,"",python,content
+9264,16976175,"train_dynamics.py",10490,0,"",python,selection_command
+9265,16976807,"train_dynamics.py",10443,0,"",python,selection_command
+9266,16978582,"train_dynamics.py",10492,0,"",python,selection_command
+9267,16978730,"train_dynamics.py",10443,0,"",python,selection_command
+9268,16978875,"train_dynamics.py",10378,0,"",python,selection_command
+9269,16979007,"train_dynamics.py",10315,0,"",python,selection_command
+9270,16979160,"train_dynamics.py",10218,0,"",python,selection_command
+9271,16979360,"train_dynamics.py",10315,0,"",python,selection_command
+9272,16979534,"train_dynamics.py",10378,0,"",python,selection_command
+9273,16979660,"train_dynamics.py",10443,0,"",python,selection_command
+9274,16979986,"train_dynamics.py",10492,0,"",python,selection_command
+9275,16980150,"train_dynamics.py",10553,0,"",python,selection_command
+9276,16980294,"train_dynamics.py",10675,0,"",python,selection_command
+9277,16980655,"train_dynamics.py",10722,0,"",python,selection_command
+9278,17010744,"train_dynamics.py",10419,0,"",python,selection_mouse
+9279,17011875,"train_dynamics.py",10337,0,"",python,selection_mouse
+9280,17032647,"train_dynamics.py",0,0,"",python,tab
+9281,17032648,"train_dynamics.py",10443,0,"",python,selection_command
+9282,17041602,"train_dynamics.py",13694,89," dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),",python,content
+9283,17058098,"train_dynamics.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom genie import Genie, restore_genie_components\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n\n\nargs = tyro.cli(Args)\n\n\ndef dynamics_loss_fn(model, inputs):\n """"""Compute masked dynamics loss""""""\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n mask = outputs[""mask""]\n outputs[""token_logits""] = outputs[""token_logits""].astype(jnp.float32)\n ce_loss = optax.softmax_cross_entropy_with_integer_labels(\n outputs[""token_logits""], outputs[""video_tokens""]\n )\n ce_loss = (mask * ce_loss).sum() / mask.sum()\n acc = outputs[""token_logits""].argmax(-1) == outputs[""video_tokens""]\n acc = (mask * acc).sum() / mask.sum()\n select_probs = jax.nn.softmax(outputs[""token_logits""])\n gt = inputs[""videos""].clip(0, 1).reshape(-1, *inputs[""videos""].shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n _, index_counts_lam = jnp.unique_counts(\n jnp.ravel(outputs[""lam_indices""]), size=args.num_latent_actions, fill_value=0\n )\n _, index_counts_tokenizer = jnp.unique_counts(\n jnp.ravel(outputs[""video_tokens""]), size=args.num_patch_latents, fill_value=0\n )\n codebook_usage_lam = (index_counts_lam != 0).mean()\n codebook_usage_tokenizer = (index_counts_tokenizer != 0).mean()\n metrics = dict(\n cross_entropy_loss=ce_loss,\n masked_token_accuracy=acc,\n select_logit=outputs[""token_logits""].max(-1).mean(),\n select_p=select_probs.max(-1).mean(),\n entropy=jax.scipy.special.entr(select_probs).sum(-1).mean(),\n psnr=psnr,\n ssim=ssim,\n codebook_usage_lam=codebook_usage_lam,\n codebook_usage_tokenizer=codebook_usage_tokenizer,\n )\n return ce_loss, (outputs[""recon""], metrics)\n\n\n@nnx.jit\ndef train_step(model, optimizer, inputs):\n """"""Update state and compute metrics""""""\n\n def loss_fn(model):\n return dynamics_loss_fn(model, inputs)\n\n (loss, (recon, metrics)), grads = nnx.value_and_grad(loss_fn, has_aux=True)(model)\n optimizer.update(grads)\n if args.log_gradients:\n metrics[""gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""dynamics""]\n )\n return loss, recon, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n # FIXME (f.srambical): pass sharding information for restoration onto different topology\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n # FIXME (f.srambical): add link to issue\n # FIXME (f.srambical): quickfix of a bug in flax.nnx\n abstract_optimizer_state.model.tokenizer.vq.drop = nnx.state(nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs)))\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n else:\n # Restore from pre-trained tokenizer (and LAM)\n optimizer = restore_genie_components(\n optimizer, replicated_sharding, rng, args\n )\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng_mask = jax.random.split(rng, 2)\n inputs = dict(videos=videos, mask_rng=_rng_mask)\n loss, recon, metrics = train_step(genie, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[args.seq_len - 1])),\n recon=wandb.Image(np.asarray(recon_seq[args.seq_len - 1])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+9284,17058099,"train_dynamics.py",10843,0,"",python,selection_mouse
+9285,17058482,"train_dynamics.py",0,0,"",python,tab
+9286,17058483,"train_dynamics.py",0,0,"",python,tab
+9287,17060151,"train_dynamics.py",10400,0,"",python,selection_command
+9288,17060285,"train_dynamics.py",10465,0,"",python,selection_command
+9289,17060462,"train_dynamics.py",10400,0,"",python,selection_command
+9290,17060596,"train_dynamics.py",10337,0,"",python,selection_command
+9291,17064940,"train_dynamics.py",10377,0,"\n ",python,content
+9292,17065463,"train_dynamics.py",10386,0,"a",python,content
+9293,17065463,"train_dynamics.py",10387,0,"",python,selection_keyboard
+9294,17065524,"train_dynamics.py",10387,0,"b",python,content
+9295,17065525,"train_dynamics.py",10388,0,"",python,selection_keyboard
+9296,17065612,"train_dynamics.py",10388,0,"s",python,content
+9297,17065613,"train_dynamics.py",10389,0,"",python,selection_keyboard
+9298,17065750,"train_dynamics.py",10389,0,"t",python,content
+9299,17065751,"train_dynamics.py",10390,0,"",python,selection_keyboard
+9300,17065917,"train_dynamics.py",10390,0,"r",python,content
+9301,17065917,"train_dynamics.py",10391,0,"",python,selection_keyboard
+9302,17065997,"train_dynamics.py",10391,0,"a",python,content
+9303,17065998,"train_dynamics.py",10392,0,"",python,selection_keyboard
+9304,17066154,"train_dynamics.py",10392,0,"c",python,content
+9305,17066154,"train_dynamics.py",10393,0,"",python,selection_keyboard
+9306,17066334,"train_dynamics.py",10393,0,"t",python,content
+9307,17066334,"train_dynamics.py",10394,0,"",python,selection_keyboard
+9308,17066523,"train_dynamics.py",10394,0,"_",python,content
+9309,17066524,"train_dynamics.py",10395,0,"",python,selection_keyboard
+9310,17066866,"train_dynamics.py",10395,0,"o",python,content
+9311,17066867,"train_dynamics.py",10396,0,"",python,selection_keyboard
+9312,17066939,"train_dynamics.py",10396,0,"p",python,content
+9313,17066940,"train_dynamics.py",10397,0,"",python,selection_keyboard
+9314,17067042,"train_dynamics.py",10397,0,"t",python,content
+9315,17067043,"train_dynamics.py",10398,0,"",python,selection_keyboard
+9316,17067197,"train_dynamics.py",10398,0,"i",python,content
+9317,17067197,"train_dynamics.py",10399,0,"",python,selection_keyboard
+9318,17067219,"train_dynamics.py",10399,0,"m",python,content
+9319,17067219,"train_dynamics.py",10400,0,"",python,selection_keyboard
+9320,17067521,"train_dynamics.py",10400,0,"izer.model.tokenizer.vq.drop = nnx.Dropout(0.1, rngs=rngs)",python,content
+9321,17067814,"train_dynamics.py",10457,0,"",python,selection_command
+9322,17068096,"train_dynamics.py",10453,0,"",python,selection_command
+9323,17068268,"train_dynamics.py",10452,0,"",python,selection_command
+9324,17068407,"train_dynamics.py",10448,0,"",python,selection_command
+9325,17068545,"train_dynamics.py",10446,0,"",python,selection_command
+9326,17068798,"train_dynamics.py",10445,0,"",python,selection_command
+9327,17068826,"train_dynamics.py",10444,0,"",python,selection_command
+9328,17068858,"train_dynamics.py",10443,0,"",python,selection_command
+9329,17068892,"train_dynamics.py",10442,0,"",python,selection_command
+9330,17068925,"train_dynamics.py",10435,0,"",python,selection_command
+9331,17069181,"train_dynamics.py",10434,0,"",python,selection_command
+9332,17069347,"train_dynamics.py",10431,0,"",python,selection_command
+9333,17070572,"train_dynamics.py",10431,0,"n",python,content
+9334,17070573,"train_dynamics.py",10432,0,"",python,selection_keyboard
+9335,17070700,"train_dynamics.py",10432,0,"x",python,content
+9336,17070700,"train_dynamics.py",10433,0,"",python,selection_keyboard
+9337,17070794,"train_dynamics.py",10433,0,".",python,content
+9338,17070795,"train_dynamics.py",10434,0,"",python,selection_keyboard
+9339,17071331,"train_dynamics.py",10433,1,"",python,content
+9340,17071452,"train_dynamics.py",10432,1,"",python,content
+9341,17071597,"train_dynamics.py",10432,0,"n",python,content
+9342,17071597,"train_dynamics.py",10433,0,"",python,selection_keyboard
+9343,17071661,"train_dynamics.py",10433,0,"x",python,content
+9344,17071662,"train_dynamics.py",10434,0,"",python,selection_keyboard
+9345,17071784,"train_dynamics.py",10434,0,".",python,content
+9346,17071784,"train_dynamics.py",10435,0,"",python,selection_keyboard
+9347,17072396,"train_dynamics.py",10435,0,"e",python,content
+9348,17072396,"train_dynamics.py",10436,0,"",python,selection_keyboard
+9349,17072446,"train_dynamics.py",10436,0,"v",python,content
+9350,17072447,"train_dynamics.py",10437,0,"",python,selection_keyboard
+9351,17072494,"train_dynamics.py",10437,0,"a",python,content
+9352,17072494,"train_dynamics.py",10438,0,"",python,selection_keyboard
+9353,17072568,"train_dynamics.py",10438,0,"l",python,content
+9354,17072568,"train_dynamics.py",10439,0,"",python,selection_keyboard
+9355,17072819,"train_dynamics.py",10439,0,"_",python,content
+9356,17072820,"train_dynamics.py",10440,0,"",python,selection_keyboard
+9357,17072981,"train_dynamics.py",10440,0,"s",python,content
+9358,17072981,"train_dynamics.py",10441,0,"",python,selection_keyboard
+9359,17073045,"train_dynamics.py",10441,0,"h",python,content
+9360,17073046,"train_dynamics.py",10442,0,"",python,selection_keyboard
+9361,17073231,"train_dynamics.py",10442,0,"a",python,content
+9362,17073231,"train_dynamics.py",10443,0,"",python,selection_keyboard
+9363,17073295,"train_dynamics.py",10443,0,"p",python,content
+9364,17073296,"train_dynamics.py",10444,0,"",python,selection_keyboard
+9365,17073376,"train_dynamics.py",10444,0,"e",python,content
+9366,17073376,"train_dynamics.py",10445,0,"",python,selection_keyboard
+9367,17073567,"train_dynamics.py",10445,0,"(",python,content
+9368,17073568,"train_dynamics.py",10446,0,"",python,selection_keyboard
+9369,17074031,"train_dynamics.py",10446,0,"l",python,content
+9370,17074032,"train_dynamics.py",10447,0,"",python,selection_keyboard
+9371,17074116,"train_dynamics.py",10447,0,"a",python,content
+9372,17074117,"train_dynamics.py",10448,0,"",python,selection_keyboard
+9373,17074177,"train_dynamics.py",10448,0,"m",python,content
+9374,17074177,"train_dynamics.py",10449,0,"",python,selection_keyboard
+9375,17074326,"train_dynamics.py",10449,0,"b",python,content
+9376,17074327,"train_dynamics.py",10450,0,"",python,selection_keyboard
+9377,17074382,"train_dynamics.py",10450,0,"d",python,content
+9378,17074382,"train_dynamics.py",10451,0,"",python,selection_keyboard
+9379,17074409,"train_dynamics.py",10451,0,"a",python,content
+9380,17074409,"train_dynamics.py",10452,0,"",python,selection_keyboard
+9381,17074754,"train_dynamics.py",10452,0," ",python,content
+9382,17074755,"train_dynamics.py",10453,0,"",python,selection_keyboard
+9383,17075056,"train_dynamics.py",10452,1,"",python,content
+9384,17075228,"train_dynamics.py",10452,0,":",python,content
+9385,17075228,"train_dynamics.py",10453,0,"",python,selection_keyboard
+9386,17075333,"train_dynamics.py",10453,0," ",python,content
+9387,17075333,"train_dynamics.py",10454,0,"",python,selection_keyboard
+9388,17075512,"train_dynamics.py",10453,0,"",python,selection_command
+9389,17075783,"train_dynamics.py",10481,0,"",python,selection_command
+9390,17075795,"train_dynamics.py",10481,0,")",python,content
+9391,17075795,"train_dynamics.py",10482,0,"",python,selection_keyboard
+9392,17076260,"train_dynamics.py",10481,0,"",python,selection_command
+9393,17077395,"train_dynamics.py",10386,0,"",python,selection_command
+9394,17079366,"train_dynamics.py",10491,0,"",python,selection_command
+9395,17079489,"train_dynamics.py",10556,0,"",python,selection_command
+9396,17079639,"train_dynamics.py",10605,0,"",python,selection_command
+9397,17079786,"train_dynamics.py",10666,0,"",python,selection_command
+9398,17080218,"train_dynamics.py",10605,0,"",python,selection_command
+9399,17080365,"train_dynamics.py",10556,0,"",python,selection_command
+9400,17080709,"train_dynamics.py",10548,48," # FIXME (f.srambical): add link to issue",python,selection_command
+9401,17080882,"train_dynamics.py",10548,109," # FIXME (f.srambical): add link to issue\n # FIXME (f.srambical): quickfix of a bug in flax.nnx",python,selection_command
+9402,17081077,"train_dynamics.py",10548,110,"",python,content
+9403,17081087,"train_dynamics.py",10556,0,"",python,selection_command
+9404,17081245,"train_dynamics.py",10491,0,"",python,selection_command
+9405,17081394,"train_dynamics.py",10386,0,"",python,selection_command
+9406,17081512,"train_dynamics.py",10323,0,"",python,selection_command
+9407,17081691,"train_dynamics.py",10377,0,"\n # FIXME (f.srambical): add link to issue\n # FIXME (f.srambical): quickfix of a bug in flax.nnx",python,content
+9408,17081693,"train_dynamics.py",10386,0,"",python,selection_command
+9409,17081931,"train_dynamics.py",10435,0,"",python,selection_command
+9410,17082073,"train_dynamics.py",10496,0,"",python,selection_command
+9411,17082212,"train_dynamics.py",10601,0,"",python,selection_command
+9412,17082350,"train_dynamics.py",10666,0,"",python,selection_command
+9413,17085051,"train_dynamics.py",10658,122,"",python,content
+9414,17085059,"train_dynamics.py",10666,0,"",python,selection_command
+9415,17085268,"train_dynamics.py",10601,0,"",python,selection_command
+9416,17089911,"train_dynamics.py",10496,0,"",python,selection_command
+9417,17090057,"train_dynamics.py",10435,0,"",python,selection_command
+9418,17090216,"train_dynamics.py",10386,0,"",python,selection_command
+9419,17090373,"train_dynamics.py",10323,0,"",python,selection_command
+9420,17090471,"train_dynamics.py",10386,0,"",python,selection_command
+9421,17090632,"train_dynamics.py",10435,0,"",python,selection_command
+9422,17090780,"train_dynamics.py",10496,0,"",python,selection_command
+9423,17091063,"train_dynamics.py",10488,0,"",python,selection_command
+9424,17114363,"train_dynamics.py",10666,0,"abstract_optimizer_state.model.tokenizer.vq.drop = nnx.state(nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs)))\n ",python,content
+9425,17114378,"train_dynamics.py",10666,0,"",python,selection_command
+9426,17114533,"train_dynamics.py",10386,110,"",python,content
+9427,17114543,"train_dynamics.py",10323,0,"",python,selection_command
+9428,17114686,"train_dynamics.py",10556,0,"# FIXME (f.srambical): add link to issue\n # FIXME (f.srambical): quickfix of a bug in flax.nnx\n ",python,content
+9429,17114699,"train_dynamics.py",10556,0,"",python,selection_command
+9430,17116136,"train_dynamics.py",10481,1,"",python,content
+9431,17116243,"train_dynamics.py",10480,0,"",python,selection_command
+9432,17117091,"train_dynamics.py",10481,0,")",python,content
+9433,17117095,"train_dynamics.py",10481,0,"",python,selection_command
+9434,17117908,"train_dynamics.py",10481,1,"",python,content
+9435,17117926,"train_dynamics.py",10480,0,"",python,selection_command
+9436,17118154,"train_dynamics.py",10481,0,")",python,content
+9437,17118169,"train_dynamics.py",10481,0,"",python,selection_command
+9438,17123469,"train_dynamics.py",0,0,"",python,tab
+9439,17123469,"train_dynamics.py",10378,0,"",python,selection_command
+9440,17125590,"train_dynamics.py",10407,0,"",python,selection_mouse
+9441,17125908,"train_dynamics.py",10378,105,"",python,content
+9442,17125936,"train_dynamics.py",10386,0,"",python,selection_command
+9443,17127779,"train_dynamics.py",0,0,"",python,tab
+9444,17133288,"train_dynamics.py",0,0,"",python,tab
+9445,17133288,"train_dynamics.py",13694,0,"",python,selection_command
+9446,17151842,"train_dynamics.py",14030,0,"",python,selection_mouse
+9447,17153513,"train_dynamics.py",0,0,"",python,tab
+9448,17155548,"train_dynamics.py",10441,0,"",python,selection_command
+9449,17175541,"train_dynamics.py",0,0,"",python,tab
+9450,17175541,"train_dynamics.py",13694,0,"",python,selection_command
+9451,17183369,"train_dynamics.py",0,0,"",python,tab
+9452,17183369,"train_dynamics.py",13944,0,"",python,selection_mouse
+9453,17184107,"train_dynamics.py",0,0,"",python,tab
+9454,17184108,"train_dynamics.py",0,0,"",python,tab
+9455,17186487,"train_dynamics.py",10585,0,"",python,selection_mouse
+9456,17187414,"train_dynamics.py",10599,0,"",python,selection_mouse
+9457,17188351,"train_dynamics.py",10619,0,"",python,selection_mouse
+9458,17191793,"train_dynamics.py",10553,0,"",python,selection_command
+9459,17210266,"train_dynamics.py",10552,0,"",python,selection_mouse
+9460,17210270,"train_dynamics.py",10551,0,"",python,selection_command
+9461,17214225,"train_dynamics.py",10404,0,".model.tokenizer.vq.drop = nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs))\n abstract_optimizer",python,content
+9462,17214231,"train_dynamics.py",10407,0,"",python,selection_command
+9463,17215005,"train_dynamics.py",10481,1,"",python,content
+9464,17215009,"train_dynamics.py",10480,0,"",python,selection_command
+9465,17215528,"train_dynamics.py",10435,23,"",python,content
+9466,17215531,"train_dynamics.py",10431,0,"",python,selection_command
+9467,17215962,"train_dynamics.py",10404,81,"",python,content
+9468,17215966,"train_dynamics.py",13810,25,"",python,content
+9469,17215967,"train_dynamics.py",13767,29,"",python,content
+9470,17215976,"train_dynamics.py",10337,0,"",python,selection_command
+9471,17216773,"train_dynamics.py",10472,19,"",python,content
+9472,17216775,"train_dynamics.py",10471,0,"",python,selection_command
+9473,17217236,"train_dynamics.py",10472,30,"",python,content
+9474,17217251,"train_dynamics.py",10502,0,"",python,selection_command
+9475,17220625,"train_dynamics.py",10472,0,"\n # FIXME (f.srambical)",python,content
+9476,17220627,"train_dynamics.py",10471,0,"",python,selection_command
+9477,17220782,"train_dynamics.py",10472,0,": add link to issue",python,content
+9478,17220790,"train_dynamics.py",10472,0,"",python,selection_command
+9479,17221223,"train_dynamics.py",13767,0,"\n ",python,content
+9480,17221225,"train_dynamics.py",13810,0,"\n ",python,content
+9481,17221226,"train_dynamics.py",10404,0,".model.tokenizer.vq.drop = nnx.Dropout(0.1, rngs=rngs)\n abstract_optimizer",python,content
+9482,17221229,"train_dynamics.py",10337,0,"",python,selection_command
+9483,17221682,"train_dynamics.py",10435,0,"eval_shape(lambda: nnx.",python,content
+9484,17221683,"train_dynamics.py",10431,0,"",python,selection_command
+9485,17222885,"train_dynamics.py",10435,23,"",python,content
+9486,17223279,"train_dynamics.py",10404,81,"",python,content
+9487,17223281,"train_dynamics.py",13810,25,"",python,content
+9488,17223281,"train_dynamics.py",13767,29,"",python,content
+9489,17223293,"train_dynamics.py",10337,0,"",python,selection_command
+9490,17224614,"train_dynamics.py",10472,19,"",python,content
+9491,17224616,"train_dynamics.py",10471,0,"",python,selection_command
+9492,17225041,"train_dynamics.py",10472,0,": add link to issue",python,content
+9493,17225044,"train_dynamics.py",10472,0,"",python,selection_command
+9494,17235119,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+9495,17236303,"train_dynamics.py",0,0,"",python,tab
+9496,17296975,"train_dynamics.py",10443,48," # FIXME (f.srambical): add link to issue",python,selection_command
+9497,17297405,"train_dynamics.py",10443,109," # FIXME (f.srambical): add link to issue\n # FIXME (f.srambical): quickfix of a bug in flax.nnx",python,selection_command
+9498,17297512,"train_dynamics.py",10443,231," # FIXME (f.srambical): add link to issue\n # FIXME (f.srambical): quickfix of a bug in flax.nnx\n abstract_optimizer_state.model.tokenizer.vq.drop = nnx.state(nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs)))",python,selection_command
+9499,17299234,"train_dynamics.py",10443,232,"",python,content
+9500,17299247,"train_dynamics.py",10451,0,"",python,selection_command
+9501,17300411,"train_dynamics.py",10386,0,"",python,selection_command
+9502,17300653,"train_dynamics.py",10323,0,"",python,selection_command
+9503,17300677,"train_dynamics.py",10226,0,"",python,selection_command
+9504,17300707,"train_dynamics.py",10200,0,"",python,selection_command
+9505,17300796,"train_dynamics.py",10167,0,"",python,selection_command
+9506,17300797,"train_dynamics.py",10158,0,"",python,selection_command
+9507,17300809,"train_dynamics.py",10087,0,"",python,selection_command
+9508,17300843,"train_dynamics.py",10026,0,"",python,selection_command
+9509,17300876,"train_dynamics.py",10016,0,"",python,selection_command
+9510,17300912,"train_dynamics.py",9996,0,"",python,selection_command
+9511,17300945,"train_dynamics.py",9964,0,"",python,selection_command
+9512,17300979,"train_dynamics.py",9941,0,"",python,selection_command
+9513,17301012,"train_dynamics.py",9919,0,"",python,selection_command
+9514,17301047,"train_dynamics.py",9894,0,"",python,selection_command
+9515,17301081,"train_dynamics.py",9829,0,"",python,selection_command
+9516,17301115,"train_dynamics.py",9770,0,"",python,selection_command
+9517,17301148,"train_dynamics.py",9748,0,"",python,selection_command
+9518,17301184,"train_dynamics.py",9720,0,"",python,selection_command
+9519,17301220,"train_dynamics.py",9681,0,"",python,selection_command
+9520,17301322,"train_dynamics.py",9671,0,"",python,selection_command
+9521,17301322,"train_dynamics.py",9636,0,"",python,selection_command
+9522,17301323,"train_dynamics.py",9593,0,"",python,selection_command
+9523,17301356,"train_dynamics.py",9554,0,"",python,selection_command
+9524,17301389,"train_dynamics.py",9527,0,"",python,selection_command
+9525,17301424,"train_dynamics.py",9450,0,"",python,selection_command
+9526,17301455,"train_dynamics.py",9394,0,"",python,selection_command
+9527,17301489,"train_dynamics.py",9385,0,"",python,selection_command
+9528,17301523,"train_dynamics.py",9383,0,"",python,selection_command
+9529,17301555,"train_dynamics.py",9344,0,"",python,selection_command
+9530,17301589,"train_dynamics.py",9308,0,"",python,selection_command
+9531,17301620,"train_dynamics.py",9285,0,"",python,selection_command
+9532,17302414,"train_dynamics.py",9308,0,"",python,selection_command
+9533,17302661,"train_dynamics.py",9285,0,"",python,selection_command
+9534,17302931,"train_dynamics.py",9237,0,"",python,selection_command
+9535,17302946,"train_dynamics.py",9228,0,"",python,selection_command
+9536,17302974,"train_dynamics.py",9226,0,"",python,selection_command
+9537,17303334,"train_dynamics.py",9228,0,"",python,selection_command
+9538,17303682,"train_dynamics.py",9226,0,"",python,selection_command
+9539,17303931,"train_dynamics.py",9192,0,"",python,selection_command
+9540,17303945,"train_dynamics.py",9156,0,"",python,selection_command
+9541,17303975,"train_dynamics.py",9103,0,"",python,selection_command
+9542,17304008,"train_dynamics.py",9080,0,"",python,selection_command
+9543,17304042,"train_dynamics.py",9022,0,"",python,selection_command
+9544,17304076,"train_dynamics.py",8967,0,"",python,selection_command
+9545,17304113,"train_dynamics.py",8958,0,"",python,selection_command
+9546,17304147,"train_dynamics.py",8833,0,"",python,selection_command
+9547,17304180,"train_dynamics.py",8703,0,"",python,selection_command
+9548,17304213,"train_dynamics.py",8693,0,"",python,selection_command
+9549,17304246,"train_dynamics.py",8613,0,"",python,selection_command
+9550,17304280,"train_dynamics.py",8587,0,"",python,selection_command
+9551,17304313,"train_dynamics.py",8577,0,"",python,selection_command
+9552,17304346,"train_dynamics.py",8500,0,"",python,selection_command
+9553,17304380,"train_dynamics.py",8474,0,"",python,selection_command
+9554,17304414,"train_dynamics.py",8403,0,"",python,selection_command
+9555,17307098,"train_dynamics.py",8390,0,"",python,selection_command
+9556,17307337,"train_dynamics.py",8346,0,"",python,selection_command
+9557,17307358,"train_dynamics.py",8337,0,"",python,selection_command
+9558,17307389,"train_dynamics.py",8294,0,"",python,selection_command
+9559,17307422,"train_dynamics.py",8211,0,"",python,selection_command
+9560,17307455,"train_dynamics.py",8144,0,"",python,selection_command
+9561,17307488,"train_dynamics.py",8091,0,"",python,selection_command
+9562,17307521,"train_dynamics.py",8016,0,"",python,selection_command
+9563,17307556,"train_dynamics.py",7971,0,"",python,selection_command
+9564,17307590,"train_dynamics.py",7962,0,"",python,selection_command
+9565,17307624,"train_dynamics.py",7881,0,"",python,selection_command
+9566,17307658,"train_dynamics.py",7818,0,"",python,selection_command
+9567,17307692,"train_dynamics.py",7809,0,"",python,selection_command
+9568,17307727,"train_dynamics.py",7754,0,"",python,selection_command
+9569,17307763,"train_dynamics.py",7697,0,"",python,selection_command
+9570,17307797,"train_dynamics.py",7615,0,"",python,selection_command
+9571,17307831,"train_dynamics.py",7606,0,"",python,selection_command
+9572,17307872,"train_dynamics.py",7573,0,"",python,selection_command
+9573,17307905,"train_dynamics.py",7563,0,"",python,selection_command
+9574,17307932,"train_dynamics.py",7538,0,"",python,selection_command
+9575,17307962,"train_dynamics.py",7511,0,"",python,selection_command
+9576,17307997,"train_dynamics.py",7495,0,"",python,selection_command
+9577,17308031,"train_dynamics.py",7479,0,"",python,selection_command
+9578,17308066,"train_dynamics.py",7444,0,"",python,selection_command
+9579,17308096,"train_dynamics.py",7422,0,"",python,selection_command
+9580,17308577,"train_dynamics.py",7412,0,"",python,selection_command
+9581,17308831,"train_dynamics.py",7386,0,"",python,selection_command
+9582,17308858,"train_dynamics.py",7359,0,"",python,selection_command
+9583,17308890,"train_dynamics.py",7335,0,"",python,selection_command
+9584,17308921,"train_dynamics.py",7311,0,"",python,selection_command
+9585,17308974,"train_dynamics.py",7290,0,"",python,selection_command
+9586,17309024,"train_dynamics.py",7268,0,"",python,selection_command
+9587,17309025,"train_dynamics.py",7242,0,"",python,selection_command
+9588,17309055,"train_dynamics.py",7207,0,"",python,selection_command
+9589,17309088,"train_dynamics.py",7172,0,"",python,selection_command
+9590,17309123,"train_dynamics.py",7163,0,"",python,selection_command
+9591,17309155,"train_dynamics.py",7147,0,"",python,selection_command
+9592,17309187,"train_dynamics.py",7116,0,"",python,selection_command
+9593,17309221,"train_dynamics.py",7107,0,"",python,selection_command
+9594,17309253,"train_dynamics.py",7050,0,"",python,selection_command
+9595,17309287,"train_dynamics.py",7041,0,"",python,selection_command
+9596,17309321,"train_dynamics.py",7009,0,"",python,selection_command
+9597,17309355,"train_dynamics.py",6995,0,"",python,selection_command
+9598,17309389,"train_dynamics.py",6977,0,"",python,selection_command
+9599,17309423,"train_dynamics.py",6938,0,"",python,selection_command
+9600,17309455,"train_dynamics.py",6977,0,"",python,selection_command
+9601,17309711,"train_dynamics.py",6995,0,"",python,selection_command
+9602,17309742,"train_dynamics.py",7009,0,"",python,selection_command
+9603,17309771,"train_dynamics.py",7041,0,"",python,selection_command
+9604,17309798,"train_dynamics.py",7050,0,"",python,selection_command
+9605,17309831,"train_dynamics.py",7107,0,"",python,selection_command
+9606,17309865,"train_dynamics.py",7116,0,"",python,selection_command
+9607,17309898,"train_dynamics.py",7147,0,"",python,selection_command
+9608,17309932,"train_dynamics.py",7163,0,"",python,selection_command
+9609,17309966,"train_dynamics.py",7172,0,"",python,selection_command
+9610,17310007,"train_dynamics.py",7207,0,"",python,selection_command
+9611,17310038,"train_dynamics.py",7242,0,"",python,selection_command
+9612,17310072,"train_dynamics.py",7268,0,"",python,selection_command
+9613,17310105,"train_dynamics.py",7290,0,"",python,selection_command
+9614,17310136,"train_dynamics.py",7311,0,"",python,selection_command
+9615,17310170,"train_dynamics.py",7335,0,"",python,selection_command
+9616,17310204,"train_dynamics.py",7359,0,"",python,selection_command
+9617,17310236,"train_dynamics.py",7386,0,"",python,selection_command
+9618,17310270,"train_dynamics.py",7412,0,"",python,selection_command
+9619,17310304,"train_dynamics.py",7422,0,"",python,selection_command
+9620,17310359,"train_dynamics.py",7444,0,"",python,selection_command
+9621,17310381,"train_dynamics.py",7479,0,"",python,selection_command
+9622,17310496,"train_dynamics.py",7495,0,"",python,selection_command
+9623,17310497,"train_dynamics.py",7511,0,"",python,selection_command
+9624,17310497,"train_dynamics.py",7538,0,"",python,selection_command
+9625,17310503,"train_dynamics.py",7563,0,"",python,selection_command
+9626,17310535,"train_dynamics.py",7573,0,"",python,selection_command
+9627,17310571,"train_dynamics.py",7606,0,"",python,selection_command
+9628,17310604,"train_dynamics.py",7615,0,"",python,selection_command
+9629,17310638,"train_dynamics.py",7697,0,"",python,selection_command
+9630,17310671,"train_dynamics.py",7754,0,"",python,selection_command
+9631,17310705,"train_dynamics.py",7809,0,"",python,selection_command
+9632,17310738,"train_dynamics.py",7818,0,"",python,selection_command
+9633,17310771,"train_dynamics.py",7881,0,"",python,selection_command
+9634,17310805,"train_dynamics.py",7962,0,"",python,selection_command
+9635,17310839,"train_dynamics.py",7971,0,"",python,selection_command
+9636,17310872,"train_dynamics.py",8016,0,"",python,selection_command
+9637,17310905,"train_dynamics.py",8091,0,"",python,selection_command
+9638,17310940,"train_dynamics.py",8144,0,"",python,selection_command
+9639,17310973,"train_dynamics.py",8211,0,"",python,selection_command
+9640,17310989,"train_dynamics.py",8144,0,"",python,selection_command
+9641,17311244,"train_dynamics.py",8091,0,"",python,selection_command
+9642,17311275,"train_dynamics.py",8016,0,"",python,selection_command
+9643,17311305,"train_dynamics.py",7971,0,"",python,selection_command
+9644,17311411,"train_dynamics.py",7962,0,"",python,selection_command
+9645,17311566,"train_dynamics.py",7881,0,"",python,selection_command
+9646,17311710,"train_dynamics.py",7818,0,"",python,selection_command
+9647,17311897,"train_dynamics.py",7809,0,"",python,selection_command
+9648,17321582,"train_dynamics.py",7754,0,"",python,selection_command
+9649,17321825,"train_dynamics.py",7697,0,"",python,selection_command
+9650,17321855,"train_dynamics.py",7615,0,"",python,selection_command
+9651,17321879,"train_dynamics.py",7606,0,"",python,selection_command
+9652,17321912,"train_dynamics.py",7573,0,"",python,selection_command
+9653,17321945,"train_dynamics.py",7563,0,"",python,selection_command
+9654,17321979,"train_dynamics.py",7538,0,"",python,selection_command
+9655,17322013,"train_dynamics.py",7511,0,"",python,selection_command
+9656,17322047,"train_dynamics.py",7495,0,"",python,selection_command
+9657,17322081,"train_dynamics.py",7479,0,"",python,selection_command
+9658,17322115,"train_dynamics.py",7444,0,"",python,selection_command
+9659,17322154,"train_dynamics.py",7422,0,"",python,selection_command
+9660,17322189,"train_dynamics.py",7412,0,"",python,selection_command
+9661,17322224,"train_dynamics.py",7386,0,"",python,selection_command
+9662,17322255,"train_dynamics.py",7359,0,"",python,selection_command
+9663,17322287,"train_dynamics.py",7335,0,"",python,selection_command
+9664,17322675,"train_dynamics.py",7967,0,"",python,selection_command
+9665,17323424,"train_dynamics.py",9022,0,"",python,selection_command
+9666,17324260,"train_dynamics.py",9677,0,"",python,selection_command
+9667,17325229,"train_dynamics.py",10502,0,"",python,selection_command
+9668,17325902,"train_dynamics.py",10548,0,"",python,selection_command
+9669,17326147,"train_dynamics.py",10585,0,"",python,selection_command
+9670,17326174,"train_dynamics.py",10663,0,"",python,selection_command
+9671,17326206,"train_dynamics.py",10748,0,"",python,selection_command
+9672,17326240,"train_dynamics.py",10759,0,"",python,selection_command
+9673,17326273,"train_dynamics.py",10773,0,"",python,selection_command
+9674,17326306,"train_dynamics.py",10832,0,"",python,selection_command
+9675,17326337,"train_dynamics.py",10888,0,"",python,selection_command
+9676,17326371,"train_dynamics.py",10942,0,"",python,selection_command
+9677,17326402,"train_dynamics.py",10995,0,"",python,selection_command
+9678,17326436,"train_dynamics.py",11062,0,"",python,selection_command
+9679,17326469,"train_dynamics.py",11076,0,"",python,selection_command
+9680,17326502,"train_dynamics.py",11131,0,"",python,selection_command
+9681,17326539,"train_dynamics.py",11177,0,"",python,selection_command
+9682,17326569,"train_dynamics.py",11227,0,"",python,selection_command
+9683,17326605,"train_dynamics.py",11229,0,"",python,selection_command
+9684,17327827,"train_dynamics.py",11227,0,"",python,selection_command
+9685,17328085,"train_dynamics.py",11228,0,"\n ",python,content
+9686,17328492,"train_dynamics.py",11233,4,"",python,content
+9687,17329631,"train_dynamics.py",11229,4,"",python,content
+9688,17330066,"train_dynamics.py",11228,1,"",python,content
+9689,17330581,"train_dynamics.py",11228,0,"\n ",python,content
+9690,17331174,"train_dynamics.py",11229,8,"",python,content
+9691,17331223,"train_dynamics.py",11229,0,"\n # FIXME (f.srambical): add link to issue\n # FIXME (f.srambical): quickfix of a bug in flax.nnx\n abstract_optimizer_state.model.tokenizer.vq.drop = nnx.state(nnx.eval_shape(lambda: nnx.Dropout(0.1, rngs=rngs)))",python,content
+9692,17331226,"train_dynamics.py",11238,0,"",python,selection_command
+9693,17331925,"train_dynamics.py",11229,0,"",python,selection_command
+9694,17332198,"train_dynamics.py",11229,1,"",python,content
+9695,17332213,"train_dynamics.py",11237,0,"",python,selection_command
+9696,17332627,"train_dynamics.py",11286,0,"",python,selection_command
+9697,17332763,"train_dynamics.py",11347,0,"",python,selection_command
+9698,17334436,"train_dynamics.py",11347,24,"",python,content
+9699,17334669,"train_dynamics.py",11347,0,"o",python,content
+9700,17334669,"train_dynamics.py",11348,0,"",python,selection_keyboard
+9701,17334723,"train_dynamics.py",11348,0,"p",python,content
+9702,17334723,"train_dynamics.py",11349,0,"",python,selection_keyboard
+9703,17334755,"train_dynamics.py",11349,0,"t",python,content
+9704,17334756,"train_dynamics.py",11350,0,"",python,selection_keyboard
+9705,17334874,"train_dynamics.py",11350,0,"i",python,content
+9706,17334874,"train_dynamics.py",11351,0,"",python,selection_keyboard
+9707,17334972,"train_dynamics.py",11351,0,"m",python,content
+9708,17334972,"train_dynamics.py",11352,0,"",python,selection_keyboard
+9709,17335062,"train_dynamics.py",11352,0,"i",python,content
+9710,17335063,"train_dynamics.py",11353,0,"",python,selection_keyboard
+9711,17335123,"train_dynamics.py",11353,0,"z",python,content
+9712,17335124,"train_dynamics.py",11354,0,"",python,selection_keyboard
+9713,17335200,"train_dynamics.py",11354,0,"e",python,content
+9714,17335200,"train_dynamics.py",11355,0,"",python,selection_keyboard
+9715,17335683,"train_dynamics.py",11355,0,"r",python,content
+9716,17335683,"train_dynamics.py",11356,0,"",python,selection_keyboard
+9717,17335998,"train_dynamics.py",11355,0,"",python,selection_command
+9718,17336380,"train_dynamics.py",11356,0,"",python,selection_command
+9719,17336543,"train_dynamics.py",11357,0,"",python,selection_command
+9720,17336717,"train_dynamics.py",11362,0,"",python,selection_command
+9721,17336892,"train_dynamics.py",11363,0,"",python,selection_command
+9722,17337059,"train_dynamics.py",11372,0,"",python,selection_command
+9723,17337211,"train_dynamics.py",11373,0,"",python,selection_command
+9724,17337374,"train_dynamics.py",11375,0,"",python,selection_command
+9725,17337614,"train_dynamics.py",11376,0,"",python,selection_command
+9726,17337877,"train_dynamics.py",11381,0,"",python,selection_command
+9727,17338305,"train_dynamics.py",11383,0,"",python,selection_command
+9728,17339264,"train_dynamics.py",11382,0,"",python,selection_command
+9729,17339416,"train_dynamics.py",11381,0,"",python,selection_command
+9730,17339567,"train_dynamics.py",11380,0,"",python,selection_command
+9731,17340013,"train_dynamics.py",11380,65,"",python,content
+9732,17340013,"train_dynamics.py",11379,0,"",python,selection_command
+9733,17340346,"train_dynamics.py",11376,0,"",python,selection_command
+9734,17340816,"utils/nn.py",0,0,"",python,tab
+9735,17340816,"utils/nn.py",7101,0,"",python,selection_command
+9736,17342057,"train_dynamics.py",0,0,"",python,tab
+9737,17342057,"train_dynamics.py",11376,0,"",python,selection_command
+9738,17342936,"train_dynamics.py",11347,0,"",python,selection_command
+9739,17343099,"train_dynamics.py",11347,0,"d",python,content
+9740,17343099,"train_dynamics.py",11348,0,"",python,selection_keyboard
+9741,17343143,"train_dynamics.py",11348,0,"e",python,content
+9742,17343144,"train_dynamics.py",11349,0,"",python,selection_keyboard
+9743,17343245,"train_dynamics.py",11349,0,"l",python,content
+9744,17343245,"train_dynamics.py",11350,0,"",python,selection_keyboard
+9745,17343350,"train_dynamics.py",11350,0," ",python,content
+9746,17343350,"train_dynamics.py",11351,0,"",python,selection_keyboard
+9747,17343456,"train_dynamics.py",11350,0,"",python,selection_command
+9748,17354212,"train_dynamics.py",11384,0,"",python,selection_mouse
+9749,17354212,"train_dynamics.py",11383,0,"",python,selection_command
+9750,17378975,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+9751,17379617,"experiments/dynamics_grain_tok_restore.sh",457,21,"",shellscript,content
+9752,17379634,"experiments/dynamics_grain_tok_restore.sh",461,0,"",shellscript,selection_command
+9753,17380592,"train_dynamics.py",0,0,"",python,tab
+9754,17384556,"train_dynamics.py",11339,0,"",python,selection_command
+9755,17387276,"train_dynamics.py",11347,0,"",python,selection_command
+9756,17387534,"train_dynamics.py",11351,0,"",python,selection_command
+9757,17387558,"train_dynamics.py",11360,0,"",python,selection_command
+9758,17387591,"train_dynamics.py",11361,0,"",python,selection_command
+9759,17387702,"train_dynamics.py",11366,0,"",python,selection_command
+9760,17387703,"train_dynamics.py",11367,0,"",python,selection_command
+9761,17387873,"train_dynamics.py",11376,0,"",python,selection_command
+9762,17388063,"train_dynamics.py",11377,0,"",python,selection_command
+9763,17388226,"train_dynamics.py",11379,0,"",python,selection_command
+9764,17388533,"train_dynamics.py",11380,0,"",python,selection_command
+9765,17390028,"utils/nn.py",0,0,"",python,tab
+9766,17390028,"utils/nn.py",7101,0,"",python,selection_command
+9767,17457379,"utils/nn.py",7086,0,"",python,selection_command
+9768,17457609,"utils/nn.py",7076,0,"",python,selection_command
+9769,17457638,"utils/nn.py",7059,0,"",python,selection_command
+9770,17457672,"utils/nn.py",6988,0,"",python,selection_command
+9771,17457705,"utils/nn.py",6938,0,"",python,selection_command
+9772,17457739,"utils/nn.py",6915,0,"",python,selection_command
+9773,17457829,"utils/nn.py",6880,0,"",python,selection_command
+9774,17457829,"utils/nn.py",6866,0,"",python,selection_command
+9775,17457841,"utils/nn.py",6848,0,"",python,selection_command
+9776,17457874,"utils/nn.py",6809,0,"",python,selection_command
+9777,17457908,"utils/nn.py",6772,0,"",python,selection_command
+9778,17458019,"utils/nn.py",6757,0,"",python,selection_command
+9779,17458129,"utils/nn.py",6685,0,"",python,selection_command
+9780,17458353,"utils/nn.py",6667,0,"",python,selection_command
+9781,17458543,"utils/nn.py",6632,0,"",python,selection_command
+9782,17463788,"models/tokenizer.py",0,0,"",python,tab
+9783,17463788,"models/tokenizer.py",1550,15,"VectorQuantizer",python,selection_command
+9784,17464020,"models/tokenizer.py",1564,0,"",python,selection_command
+9785,17464357,"models/tokenizer.py",1540,0,"",python,selection_command
+9786,17464645,"models/tokenizer.py",1544,0,"",python,selection_command
+9787,17464730,"models/tokenizer.py",1545,0,"",python,selection_command
+9788,17465032,"models/tokenizer.py",2984,0,"",python,selection_command
+9789,17466242,"models/tokenizer.py",2986,0,"",python,selection_command
+9790,17466451,"models/tokenizer.py",2987,0,"",python,selection_command
+9791,17466546,"models/tokenizer.py",2988,0,"",python,selection_command
+9792,17466934,"models/tokenizer.py",2990,0,"",python,selection_command
+9793,17467792,"models/tokenizer.py",2638,0,"",python,selection_command
+9794,17468511,"models/tokenizer.py",2605,0,"",python,selection_command
+9795,17468732,"models/tokenizer.py",2609,0,"",python,selection_command
+9796,17468893,"models/tokenizer.py",2618,0,"",python,selection_command
+9797,17469368,"models/tokenizer.py",2609,0,"",python,selection_command
+9798,17492543,"models/tokenizer.py",2613,0,"",python,selection_mouse
+9799,17503546,"models/tokenizer.py",2609,9,"vq_encode",python,selection_command
+9800,17504030,"models/tokenizer.py",2617,0,"",python,selection_command
+9801,17507265,"models/tokenizer.py",2692,0,"",python,selection_command
+9802,17507444,"models/tokenizer.py",2730,0,"",python,selection_command
+9803,17509751,"models/tokenizer.py",482,0,"",python,selection_command
+9804,17511477,"models/tokenizer.py",515,0,"",python,selection_command
+9805,17511909,"models/tokenizer.py",948,0,"",python,selection_command
+9806,17512141,"models/tokenizer.py",958,0,"",python,selection_command
+9807,17516908,"models/tokenizer.py",2279,0,"",python,selection_command
+9808,17517529,"models/tokenizer.py",2609,0,"",python,selection_command
+9809,17518847,"models/tokenizer.py",2688,0,"",python,selection_command
+9810,17519096,"models/tokenizer.py",2726,0,"",python,selection_command
+9811,17519121,"models/tokenizer.py",2758,0,"",python,selection_command
+9812,17519152,"models/tokenizer.py",2804,0,"",python,selection_command
+9813,17519181,"models/tokenizer.py",2827,0,"",python,selection_command
+9814,17519214,"models/tokenizer.py",2863,0,"",python,selection_command
+9815,17519247,"models/tokenizer.py",2872,0,"",python,selection_command
+9816,17519281,"models/tokenizer.py",2906,0,"",python,selection_command
+9817,17519320,"models/tokenizer.py",2956,0,"",python,selection_command
+9818,17519348,"models/tokenizer.py",3008,0,"",python,selection_command
+9819,17519382,"models/tokenizer.py",3060,0,"",python,selection_command
+9820,17519479,"models/tokenizer.py",3103,0,"",python,selection_command
+9821,17519480,"models/tokenizer.py",3155,0,"",python,selection_command
+9822,17519639,"models/tokenizer.py",3164,0,"",python,selection_command
+9823,17519880,"models/tokenizer.py",3155,0,"",python,selection_command
+9824,17520083,"models/tokenizer.py",3103,0,"",python,selection_command
+9825,17520216,"models/tokenizer.py",3155,0,"",python,selection_command
+9826,17520526,"models/tokenizer.py",3164,0,"",python,selection_command
+9827,17520528,"models/tokenizer.py",3227,0,"",python,selection_command
+9828,17520529,"models/tokenizer.py",3265,0,"",python,selection_command
+9829,17520553,"models/tokenizer.py",3297,0,"",python,selection_command
+9830,17520587,"models/tokenizer.py",3339,0,"",python,selection_command
+9831,17520888,"models/tokenizer.py",3297,0,"",python,selection_command
+9832,17521080,"models/tokenizer.py",3265,0,"",python,selection_command
+9833,17521246,"models/tokenizer.py",3227,0,"",python,selection_command
+9834,17521408,"models/tokenizer.py",3229,0,"",python,selection_command
+9835,17521589,"models/tokenizer.py",3231,0,"",python,selection_command
+9836,17521742,"models/tokenizer.py",3235,0,"",python,selection_command
+9837,17521941,"models/tokenizer.py",3236,0,"",python,selection_command
+9838,17523210,"models/tokenizer.py",2984,0,"",python,selection_command
+9839,17523897,"models/tokenizer.py",1545,0,"",python,selection_command
+9840,17525014,"models/tokenizer.py",1548,0,"",python,selection_command
+9841,17525409,"models/tokenizer.py",1550,0,"",python,selection_command
+9842,17525884,"models/tokenizer.py",1548,0,"",python,selection_command
+9843,17526016,"models/tokenizer.py",1545,0,"",python,selection_command
+9844,17526610,"models/tokenizer.py",1548,0,"",python,selection_command
+9845,17526729,"models/tokenizer.py",1550,0,"",python,selection_command
+9846,17527038,"utils/nn.py",0,0,"",python,tab
+9847,17527038,"utils/nn.py",6625,0,"",python,selection_command
+9848,17527996,"utils/nn.py",6660,0,"",python,selection_command
+9849,17528228,"utils/nn.py",6678,0,"",python,selection_command
+9850,17528259,"utils/nn.py",6757,0,"",python,selection_command
+9851,17528292,"utils/nn.py",6765,0,"",python,selection_command
+9852,17528326,"utils/nn.py",6802,0,"",python,selection_command
+9853,17528358,"utils/nn.py",6841,0,"",python,selection_command
+9854,17528393,"utils/nn.py",6866,0,"",python,selection_command
+9855,17528426,"utils/nn.py",6873,0,"",python,selection_command
+9856,17528459,"utils/nn.py",6908,0,"",python,selection_command
+9857,17528493,"utils/nn.py",6931,0,"",python,selection_command
+9858,17528526,"utils/nn.py",6981,0,"",python,selection_command
+9859,17528559,"utils/nn.py",7052,0,"",python,selection_command
+9860,17528594,"utils/nn.py",7070,0,"",python,selection_command
+9861,17528627,"utils/nn.py",7084,0,"",python,selection_command
+9862,17528660,"utils/nn.py",7094,0,"",python,selection_command
+9863,17528694,"utils/nn.py",7145,0,"",python,selection_command
+9864,17528727,"utils/nn.py",7152,0,"",python,selection_command
+9865,17528762,"utils/nn.py",7170,0,"",python,selection_command
+9866,17528795,"utils/nn.py",7213,0,"",python,selection_command
+9867,17528829,"utils/nn.py",7273,0,"",python,selection_command
+9868,17528863,"utils/nn.py",7309,0,"",python,selection_command
+9869,17529079,"utils/nn.py",7334,0,"",python,selection_command
+9870,17529233,"utils/nn.py",7389,0,"",python,selection_command
+9871,17529381,"utils/nn.py",7446,0,"",python,selection_command
+9872,17716360,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+9873,17717269,"experiments/dynamics_grain_tok_restore.sh",456,0,"\n",shellscript,content
+9874,17717277,"experiments/dynamics_grain_tok_restore.sh",457,0," ",shellscript,content
+9875,17718101,"experiments/dynamics_grain_tok_restore.sh",461,0,"--restore_ckpt \",shellscript,content
+9876,17718295,"experiments/dynamics_grain_tok_restore.sh",476,0,"",shellscript,selection_command
+9877,17722903,"train_dynamics.py",0,0,"",python,tab
+9878,17749884,"train_dynamics.py",11319,0,"",python,selection_command
+9879,17750022,"train_dynamics.py",11270,0,"",python,selection_command
+9880,17750858,"train_dynamics.py",11229,49,"",python,content
+9881,17750878,"train_dynamics.py",11237,0,"",python,selection_command
+9882,17751246,"train_dynamics.py",11229,61,"",python,content
+9883,17751263,"train_dynamics.py",11237,0,"",python,selection_command
+9884,17752074,"train_dynamics.py",11228,0,"\n ",python,content
+9885,17752190,"train_dynamics.py",11237,0,"#",python,content
+9886,17752191,"train_dynamics.py",11238,0,"",python,selection_keyboard
+9887,17752213,"train_dynamics.py",11238,0," ",python,content
+9888,17752213,"train_dynamics.py",11239,0,"",python,selection_keyboard
+9889,17752662,"train_dynamics.py",11239,0,"N",python,content
+9890,17752662,"train_dynamics.py",11240,0,"",python,selection_keyboard
+9891,17752688,"train_dynamics.py",11240,0,"O",python,content
+9892,17752689,"train_dynamics.py",11241,0,"",python,selection_keyboard
+9893,17752737,"train_dynamics.py",11241,0,"T",python,content
+9894,17752737,"train_dynamics.py",11242,0,"",python,selection_keyboard
+9895,17752849,"train_dynamics.py",11242,0,"E",python,content
+9896,17752849,"train_dynamics.py",11243,0,"",python,selection_keyboard
+9897,17752924,"train_dynamics.py",11243,0,":",python,content
+9898,17752924,"train_dynamics.py",11244,0,"",python,selection_keyboard
+9899,17753004,"train_dynamics.py",11244,0," ",python,content
+9900,17753004,"train_dynamics.py",11245,0,"",python,selection_keyboard
+9901,17754052,"train_dynamics.py",11245,0,"W",python,content
+9902,17754052,"train_dynamics.py",11246,0,"",python,selection_keyboard
+9903,17754210,"train_dynamics.py",11246,0,"e",python,content
+9904,17754210,"train_dynamics.py",11247,0,"",python,selection_keyboard
+9905,17754253,"train_dynamics.py",11247,0," ",python,content
+9906,17754253,"train_dynamics.py",11248,0,"",python,selection_keyboard
+9907,17754387,"train_dynamics.py",11248,0,"h",python,content
+9908,17754387,"train_dynamics.py",11249,0,"",python,selection_keyboard
+9909,17754408,"train_dynamics.py",11249,0,"a",python,content
+9910,17754408,"train_dynamics.py",11250,0,"",python,selection_keyboard
+9911,17754474,"train_dynamics.py",11250,0,"v",python,content
+9912,17754474,"train_dynamics.py",11251,0,"",python,selection_keyboard
+9913,17754575,"train_dynamics.py",11251,0,"e",python,content
+9914,17754575,"train_dynamics.py",11252,0,"",python,selection_keyboard
+9915,17754697,"train_dynamics.py",11252,0," ",python,content
+9916,17754697,"train_dynamics.py",11253,0,"",python,selection_keyboard
+9917,17754761,"train_dynamics.py",11253,0,"t",python,content
+9918,17754761,"train_dynamics.py",11254,0,"",python,selection_keyboard
+9919,17754829,"train_dynamics.py",11254,0,"o",python,content
+9920,17754830,"train_dynamics.py",11255,0,"",python,selection_keyboard
+9921,17754919,"train_dynamics.py",11255,0," ",python,content
+9922,17754920,"train_dynamics.py",11256,0,"",python,selection_keyboard
+9923,17755013,"train_dynamics.py",11256,0,"r",python,content
+9924,17755014,"train_dynamics.py",11257,0,"",python,selection_keyboard
+9925,17755170,"train_dynamics.py",11257,0,"e",python,content
+9926,17755170,"train_dynamics.py",11258,0,"",python,selection_keyboard
+9927,17755171,"train_dynamics.py",11258,0,"m",python,content
+9928,17755171,"train_dynamics.py",11259,0,"",python,selection_keyboard
+9929,17755221,"train_dynamics.py",11259,0,"o",python,content
+9930,17755221,"train_dynamics.py",11260,0,"",python,selection_keyboard
+9931,17755304,"train_dynamics.py",11260,0,"v",python,content
+9932,17755305,"train_dynamics.py",11261,0,"",python,selection_keyboard
+9933,17755354,"train_dynamics.py",11261,0,"e",python,content
+9934,17755355,"train_dynamics.py",11262,0,"",python,selection_keyboard
+9935,17755455,"train_dynamics.py",11262,0," ",python,content
+9936,17755455,"train_dynamics.py",11263,0,"",python,selection_keyboard
+9937,17757935,"train_dynamics.py",11263,0,"t",python,content
+9938,17757935,"train_dynamics.py",11264,0,"",python,selection_keyboard
+9939,17758105,"train_dynamics.py",11264,0,"h",python,content
+9940,17758106,"train_dynamics.py",11265,0,"",python,selection_keyboard
+9941,17758112,"train_dynamics.py",11265,0,"e",python,content
+9942,17758112,"train_dynamics.py",11266,0,"",python,selection_keyboard
+9943,17758225,"train_dynamics.py",11266,0," ",python,content
+9944,17758225,"train_dynamics.py",11267,0,"",python,selection_keyboard
+9945,17758568,"train_dynamics.py",11267,0,"t",python,content
+9946,17758568,"train_dynamics.py",11268,0,"",python,selection_keyboard
+9947,17758588,"train_dynamics.py",11268,0,"o",python,content
+9948,17758588,"train_dynamics.py",11269,0,"",python,selection_keyboard
+9949,17758628,"train_dynamics.py",11269,0,"k",python,content
+9950,17758629,"train_dynamics.py",11270,0,"",python,selection_keyboard
+9951,17758722,"train_dynamics.py",11270,0,"e",python,content
+9952,17758723,"train_dynamics.py",11271,0,"",python,selection_keyboard
+9953,17758838,"train_dynamics.py",11271,0,"n",python,content
+9954,17758839,"train_dynamics.py",11272,0,"",python,selection_keyboard
+9955,17758874,"train_dynamics.py",11272,0,"i",python,content
+9956,17758874,"train_dynamics.py",11273,0,"",python,selection_keyboard
+9957,17759004,"train_dynamics.py",11273,0,"z",python,content
+9958,17759004,"train_dynamics.py",11274,0,"",python,selection_keyboard
+9959,17759054,"train_dynamics.py",11274,0,"e",python,content
+9960,17759054,"train_dynamics.py",11275,0,"",python,selection_keyboard
+9961,17759159,"train_dynamics.py",11275,0,"r",python,content
+9962,17759159,"train_dynamics.py",11276,0,"",python,selection_keyboard
+9963,17759220,"train_dynamics.py",11276,0," ",python,content
+9964,17759220,"train_dynamics.py",11277,0,"",python,selection_keyboard
+9965,17759580,"train_dynamics.py",11277,0,"d",python,content
+9966,17759580,"train_dynamics.py",11278,0,"",python,selection_keyboard
+9967,17760194,"train_dynamics.py",11277,1,"",python,content
+9968,17760335,"train_dynamics.py",11267,10,"",python,content
+9969,17760946,"train_dynamics.py",11267,0,"t",python,content
+9970,17760946,"train_dynamics.py",11268,0,"",python,selection_keyboard
+9971,17761039,"train_dynamics.py",11268,0,"o",python,content
+9972,17761039,"train_dynamics.py",11269,0,"",python,selection_keyboard
+9973,17761046,"train_dynamics.py",11269,0,"k",python,content
+9974,17761046,"train_dynamics.py",11270,0,"",python,selection_keyboard
+9975,17761148,"train_dynamics.py",11270,0,"e",python,content
+9976,17761148,"train_dynamics.py",11271,0,"",python,selection_keyboard
+9977,17761238,"train_dynamics.py",11271,0,"n",python,content
+9978,17761239,"train_dynamics.py",11272,0,"",python,selection_keyboard
+9979,17761273,"train_dynamics.py",11272,0,"i",python,content
+9980,17761274,"train_dynamics.py",11273,0,"",python,selection_keyboard
+9981,17761386,"train_dynamics.py",11273,0,"z",python,content
+9982,17761387,"train_dynamics.py",11274,0,"",python,selection_keyboard
+9983,17761474,"train_dynamics.py",11274,0,"e",python,content
+9984,17761474,"train_dynamics.py",11275,0,"",python,selection_keyboard
+9985,17761538,"train_dynamics.py",11275,0,"r",python,content
+9986,17761538,"train_dynamics.py",11276,0,"",python,selection_keyboard
+9987,17761588,"train_dynamics.py",11276,0," ",python,content
+9988,17761589,"train_dynamics.py",11277,0,"",python,selection_keyboard
+9989,17762910,"train_dynamics.py",11267,10,"",python,content
+9990,17763478,"train_dynamics.py",11267,0,"t",python,content
+9991,17763478,"train_dynamics.py",11268,0,"",python,selection_keyboard
+9992,17763622,"train_dynamics.py",11268,0,"o",python,content
+9993,17763622,"train_dynamics.py",11269,0,"",python,selection_keyboard
+9994,17763652,"train_dynamics.py",11269,0,"k",python,content
+9995,17763653,"train_dynamics.py",11270,0,"",python,selection_keyboard
+9996,17763752,"train_dynamics.py",11270,0,"e",python,content
+9997,17763753,"train_dynamics.py",11271,0,"",python,selection_keyboard
+9998,17763864,"train_dynamics.py",11271,0,"n",python,content
+9999,17763864,"train_dynamics.py",11272,0,"",python,selection_keyboard
+10000,17763946,"train_dynamics.py",11272,0,"i",python,content
+10001,17763946,"train_dynamics.py",11273,0,"",python,selection_keyboard
+10002,17764045,"train_dynamics.py",11273,0,"e",python,content
+10003,17764045,"train_dynamics.py",11274,0,"",python,selection_keyboard
+10004,17764113,"train_dynamics.py",11274,0,"r",python,content
+10005,17764113,"train_dynamics.py",11275,0,"",python,selection_keyboard
+10006,17764427,"train_dynamics.py",11274,1,"",python,content
+10007,17764557,"train_dynamics.py",11273,1,"",python,content
+10008,17764588,"train_dynamics.py",11273,0,"z",python,content
+10009,17764588,"train_dynamics.py",11274,0,"",python,selection_keyboard
+10010,17764646,"train_dynamics.py",11274,0,"e",python,content
+10011,17764646,"train_dynamics.py",11275,0,"",python,selection_keyboard
+10012,17764775,"train_dynamics.py",11275,0,"r",python,content
+10013,17764775,"train_dynamics.py",11276,0,"",python,selection_keyboard
+10014,17764842,"train_dynamics.py",11276,0," ",python,content
+10015,17764843,"train_dynamics.py",11277,0,"",python,selection_keyboard
+10016,17765499,"train_dynamics.py",11277,0,"v",python,content
+10017,17765499,"train_dynamics.py",11278,0,"",python,selection_keyboard
+10018,17765575,"train_dynamics.py",11278,0,"q",python,content
+10019,17765576,"train_dynamics.py",11279,0,"",python,selection_keyboard
+10020,17765690,"train_dynamics.py",11279,0," ",python,content
+10021,17765690,"train_dynamics.py",11280,0,"",python,selection_keyboard
+10022,17765795,"train_dynamics.py",11280,0,"d",python,content
+10023,17765795,"train_dynamics.py",11281,0,"",python,selection_keyboard
+10024,17765921,"train_dynamics.py",11281,0,"r",python,content
+10025,17765921,"train_dynamics.py",11282,0,"",python,selection_keyboard
+10026,17766003,"train_dynamics.py",11282,0,"o",python,content
+10027,17766004,"train_dynamics.py",11283,0,"",python,selection_keyboard
+10028,17766103,"train_dynamics.py",11283,0,"p",python,content
+10029,17766103,"train_dynamics.py",11284,0,"",python,selection_keyboard
+10030,17766190,"train_dynamics.py",11284,0,"o",python,content
+10031,17766191,"train_dynamics.py",11285,0,"",python,selection_keyboard
+10032,17766296,"train_dynamics.py",11285,0,"u",python,content
+10033,17766296,"train_dynamics.py",11286,0,"",python,selection_keyboard
+10034,17766372,"train_dynamics.py",11286,0,"t",python,content
+10035,17766372,"train_dynamics.py",11287,0,"",python,selection_keyboard
+10036,17766453,"train_dynamics.py",11287,0," ",python,content
+10037,17766453,"train_dynamics.py",11288,0,"",python,selection_keyboard
+10038,17766816,"train_dynamics.py",11288,0,"d",python,content
+10039,17766816,"train_dynamics.py",11289,0,"",python,selection_keyboard
+10040,17766939,"train_dynamics.py",11289,0,"u",python,content
+10041,17766940,"train_dynamics.py",11290,0,"",python,selection_keyboard
+10042,17766958,"train_dynamics.py",11290,0,"e",python,content
+10043,17766959,"train_dynamics.py",11291,0,"",python,selection_keyboard
+10044,17767036,"train_dynamics.py",11291,0," ",python,content
+10045,17767036,"train_dynamics.py",11292,0,"",python,selection_keyboard
+10046,17767174,"train_dynamics.py",11292,0,"t",python,content
+10047,17767174,"train_dynamics.py",11293,0,"",python,selection_keyboard
+10048,17767293,"train_dynamics.py",11293,0,"o",python,content
+10049,17767293,"train_dynamics.py",11294,0,"",python,selection_keyboard
+10050,17767447,"train_dynamics.py",11294,0," ",python,content
+10051,17767448,"train_dynamics.py",11295,0,"",python,selection_keyboard
+10052,17769292,"train_dynamics.py",11294,0,"",python,selection_command
+10053,17775932,"train_dynamics.py",11295,0,"",python,selection_command
+10054,17776753,"train_dynamics.py",11295,0,"a",python,content
+10055,17776753,"train_dynamics.py",11296,0,"",python,selection_keyboard
+10056,17776811,"train_dynamics.py",11296,0," ",python,content
+10057,17776811,"train_dynamics.py",11297,0,"",python,selection_keyboard
+10058,17776901,"train_dynamics.py",11297,0,"d",python,content
+10059,17776901,"train_dynamics.py",11298,0,"",python,selection_keyboard
+10060,17777096,"train_dynamics.py",11298,0,"i",python,content
+10061,17777096,"train_dynamics.py",11299,0,"",python,selection_keyboard
+10062,17777122,"train_dynamics.py",11299,0,"s",python,content
+10063,17777122,"train_dynamics.py",11300,0,"",python,selection_keyboard
+10064,17777359,"train_dynamics.py",11300,0,"c",python,content
+10065,17777359,"train_dynamics.py",11301,0,"",python,selection_keyboard
+10066,17777788,"train_dynamics.py",11301,0,"r",python,content
+10067,17777788,"train_dynamics.py",11302,0,"",python,selection_keyboard
+10068,17777827,"train_dynamics.py",11302,0,"e",python,content
+10069,17777827,"train_dynamics.py",11303,0,"",python,selection_keyboard
+10070,17777993,"train_dynamics.py",11303,0,"p",python,content
+10071,17777993,"train_dynamics.py",11304,0,"",python,selection_keyboard
+10072,17778141,"train_dynamics.py",11304,0,"a",python,content
+10073,17778142,"train_dynamics.py",11305,0,"",python,selection_keyboard
+10074,17778189,"train_dynamics.py",11305,0,"n",python,content
+10075,17778190,"train_dynamics.py",11306,0,"",python,selection_keyboard
+10076,17778325,"train_dynamics.py",11306,0,"c",python,content
+10077,17778326,"train_dynamics.py",11307,0,"",python,selection_keyboard
+10078,17778408,"train_dynamics.py",11307,0,"y",python,content
+10079,17778409,"train_dynamics.py",11308,0,"",python,selection_keyboard
+10080,17778517,"train_dynamics.py",11308,0," ",python,content
+10081,17778518,"train_dynamics.py",11309,0,"",python,selection_keyboard
+10082,17778636,"train_dynamics.py",11309,0,"b",python,content
+10083,17778636,"train_dynamics.py",11310,0,"",python,selection_keyboard
+10084,17778677,"train_dynamics.py",11310,0,"e",python,content
+10085,17778678,"train_dynamics.py",11311,0,"",python,selection_keyboard
+10086,17778788,"train_dynamics.py",11311,0,"t",python,content
+10087,17778788,"train_dynamics.py",11312,0,"",python,selection_keyboard
+10088,17778946,"train_dynamics.py",11312,0,"w",python,content
+10089,17778946,"train_dynamics.py",11313,0,"",python,selection_keyboard
+10090,17779008,"train_dynamics.py",11313,0,"e",python,content
+10091,17779008,"train_dynamics.py",11314,0,"",python,selection_keyboard
+10092,17779156,"train_dynamics.py",11314,0,"e",python,content
+10093,17779157,"train_dynamics.py",11315,0,"",python,selection_keyboard
+10094,17779241,"train_dynamics.py",11315,0,"n",python,content
+10095,17779241,"train_dynamics.py",11316,0,"",python,selection_keyboard
+10096,17779308,"train_dynamics.py",11316,0," ",python,content
+10097,17779309,"train_dynamics.py",11317,0,"",python,selection_keyboard
+10098,17781580,"train_dynamics.py",11317,0,"f",python,content
+10099,17781580,"train_dynamics.py",11318,0,"",python,selection_keyboard
+10100,17781638,"train_dynamics.py",11318,0,"l",python,content
+10101,17781639,"train_dynamics.py",11319,0,"",python,selection_keyboard
+10102,17781671,"train_dynamics.py",11319,0,"a",python,content
+10103,17781671,"train_dynamics.py",11320,0,"",python,selection_keyboard
+10104,17781840,"train_dynamics.py",11320,0,"x",python,content
+10105,17781840,"train_dynamics.py",11321,0,"",python,selection_keyboard
+10106,17781924,"train_dynamics.py",11321,0,"n",python,content
+10107,17781924,"train_dynamics.py",11322,0,"",python,selection_keyboard
+10108,17782198,"train_dynamics.py",11321,1,"",python,content
+10109,17782354,"train_dynamics.py",11321,0,".",python,content
+10110,17782354,"train_dynamics.py",11322,0,"",python,selection_keyboard
+10111,17782545,"train_dynamics.py",11322,0,"n",python,content
+10112,17782545,"train_dynamics.py",11323,0,"",python,selection_keyboard
+10113,17782795,"train_dynamics.py",11323,0,"x",python,content
+10114,17782795,"train_dynamics.py",11324,0,"",python,selection_keyboard
+10115,17783055,"train_dynamics.py",11323,1,"",python,content
+10116,17783190,"train_dynamics.py",11323,0,"n",python,content
+10117,17783191,"train_dynamics.py",11324,0,"",python,selection_keyboard
+10118,17783237,"train_dynamics.py",11324,0,"x",python,content
+10119,17783237,"train_dynamics.py",11325,0,"",python,selection_keyboard
+10120,17783355,"train_dynamics.py",11325,0,"'",python,content
+10121,17783355,"train_dynamics.py",11326,0,"",python,selection_keyboard
+10122,17783454,"train_dynamics.py",11326,0," ",python,content
+10123,17783454,"train_dynamics.py",11327,0,"",python,selection_keyboard
+10124,17784320,"train_dynamics.py",11327,0,"s",python,content
+10125,17784320,"train_dynamics.py",11328,0,"",python,selection_keyboard
+10126,17784428,"train_dynamics.py",11328,0,"a",python,content
+10127,17784428,"train_dynamics.py",11329,0,"",python,selection_keyboard
+10128,17784520,"train_dynamics.py",11329,0,"v",python,content
+10129,17784520,"train_dynamics.py",11330,0,"",python,selection_keyboard
+10130,17784607,"train_dynamics.py",11330,0,"e",python,content
+10131,17784608,"train_dynamics.py",11331,0,"",python,selection_keyboard
+10132,17784757,"train_dynamics.py",11331,0," ",python,content
+10133,17784757,"train_dynamics.py",11332,0,"",python,selection_keyboard
+10134,17785157,"train_dynamics.py",11332,0,"a",python,content
+10135,17785157,"train_dynamics.py",11333,0,"",python,selection_keyboard
+10136,17785261,"train_dynamics.py",11333,0,"n",python,content
+10137,17785262,"train_dynamics.py",11334,0,"",python,selection_keyboard
+10138,17785322,"train_dynamics.py",11334,0,"d",python,content
+10139,17785323,"train_dynamics.py",11335,0,"",python,selection_keyboard
+10140,17785373,"train_dynamics.py",11335,0," ",python,content
+10141,17785374,"train_dynamics.py",11336,0,"",python,selection_keyboard
+10142,17785514,"train_dynamics.py",11336,0,"r",python,content
+10143,17785514,"train_dynamics.py",11337,0,"",python,selection_keyboard
+10144,17785556,"train_dynamics.py",11337,0,"e",python,content
+10145,17785556,"train_dynamics.py",11338,0,"",python,selection_keyboard
+10146,17785606,"train_dynamics.py",11338,0,"s",python,content
+10147,17785607,"train_dynamics.py",11339,0,"",python,selection_keyboard
+10148,17785706,"train_dynamics.py",11339,0,"t",python,content
+10149,17785706,"train_dynamics.py",11340,0,"",python,selection_keyboard
+10150,17785788,"train_dynamics.py",11340,0,"o",python,content
+10151,17785789,"train_dynamics.py",11341,0,"",python,selection_keyboard
+10152,17785860,"train_dynamics.py",11341,0,"r",python,content
+10153,17785860,"train_dynamics.py",11342,0,"",python,selection_keyboard
+10154,17785906,"train_dynamics.py",11342,0,"e",python,content
+10155,17785906,"train_dynamics.py",11343,0,"",python,selection_keyboard
+10156,17786242,"train_dynamics.py",11342,0,"",python,selection_command
+10157,17786389,"train_dynamics.py",11229,0,"",python,selection_command
+10158,17787305,"train_dynamics.py",11237,0,"",python,selection_command
+10159,17787557,"train_dynamics.py",11239,0,"",python,selection_command
+10160,17787572,"train_dynamics.py",11243,0,"",python,selection_command
+10161,17787602,"train_dynamics.py",11245,0,"",python,selection_command
+10162,17787636,"train_dynamics.py",11248,0,"",python,selection_command
+10163,17787671,"train_dynamics.py",11253,0,"",python,selection_command
+10164,17787708,"train_dynamics.py",11256,0,"",python,selection_command
+10165,17787738,"train_dynamics.py",11263,0,"",python,selection_command
+10166,17787773,"train_dynamics.py",11267,0,"",python,selection_command
+10167,17787805,"train_dynamics.py",11277,0,"",python,selection_command
+10168,17787839,"train_dynamics.py",11280,0,"",python,selection_command
+10169,17787873,"train_dynamics.py",11288,0,"",python,selection_command
+10170,17787908,"train_dynamics.py",11292,0,"",python,selection_command
+10171,17787941,"train_dynamics.py",11295,0,"",python,selection_command
+10172,17787974,"train_dynamics.py",11297,0,"",python,selection_command
+10173,17788008,"train_dynamics.py",11309,0,"",python,selection_command
+10174,17788241,"train_dynamics.py",11317,0,"",python,selection_command
+10175,17788397,"train_dynamics.py",11321,0,"",python,selection_command
+10176,17788551,"train_dynamics.py",11322,0,"",python,selection_command
+10177,17788828,"train_dynamics.py",11323,0,"",python,selection_command
+10178,17788978,"train_dynamics.py",11324,0,"",python,selection_command
+10179,17789111,"train_dynamics.py",11325,0,"",python,selection_command
+10180,17789224,"train_dynamics.py",11325,1,"",python,content
+10181,17789450,"train_dynamics.py",11229,0,"",python,selection_command
+10182,17792043,"train_dynamics.py",11237,0,"",python,selection_command
+10183,17792364,"train_dynamics.py",11342,0,"",python,selection_command
+10184,17793239,"train_dynamics.py",11342,0,"\n ",python,content
+10185,17793985,"train_dynamics.py",11351,0,"#",python,content
+10186,17793985,"train_dynamics.py",11352,0,"",python,selection_keyboard
+10187,17794042,"train_dynamics.py",11352,0," ",python,content
+10188,17794042,"train_dynamics.py",11353,0,"",python,selection_keyboard
+10189,17794274,"train_dynamics.py",11353,0,"i",python,content
+10190,17794275,"train_dynamics.py",11354,0,"",python,selection_keyboard
+10191,17794347,"train_dynamics.py",11354,0,"n",python,content
+10192,17794347,"train_dynamics.py",11355,0,"",python,selection_keyboard
+10193,17794829,"train_dynamics.py",11355,0," ",python,content
+10194,17794830,"train_dynamics.py",11356,0,"",python,selection_keyboard
+10195,17794923,"train_dynamics.py",11356,0,"t",python,content
+10196,17794923,"train_dynamics.py",11357,0,"",python,selection_keyboard
+10197,17795028,"train_dynamics.py",11357,0,"e",python,content
+10198,17795028,"train_dynamics.py",11358,0,"",python,selection_keyboard
+10199,17795104,"train_dynamics.py",11358,0,"r",python,content
+10200,17795104,"train_dynamics.py",11359,0,"",python,selection_keyboard
+10201,17795170,"train_dynamics.py",11359,0,"m",python,content
+10202,17795171,"train_dynamics.py",11360,0,"",python,selection_keyboard
+10203,17795271,"train_dynamics.py",11360,0,"s",python,content
+10204,17795271,"train_dynamics.py",11361,0,"",python,selection_keyboard
+10205,17795336,"train_dynamics.py",11361,0," ",python,content
+10206,17795336,"train_dynamics.py",11362,0,"",python,selection_keyboard
+10207,17795464,"train_dynamics.py",11362,0,"o",python,content
+10208,17795465,"train_dynamics.py",11363,0,"",python,selection_keyboard
+10209,17795523,"train_dynamics.py",11363,0,"f",python,content
+10210,17795523,"train_dynamics.py",11364,0,"",python,selection_keyboard
+10211,17795592,"train_dynamics.py",11364,0," ",python,content
+10212,17795593,"train_dynamics.py",11365,0,"",python,selection_keyboard
+10213,17797923,"train_dynamics.py",11365,0,"l",python,content
+10214,17797923,"train_dynamics.py",11366,0,"",python,selection_keyboard
+10215,17798073,"train_dynamics.py",11366,0,"a",python,content
+10216,17798074,"train_dynamics.py",11367,0,"",python,selection_keyboard
+10217,17798966,"train_dynamics.py",11365,2,"",python,content
+10218,17799195,"train_dynamics.py",11365,0,"u",python,content
+10219,17799195,"train_dynamics.py",11366,0,"",python,selection_keyboard
+10220,17799223,"train_dynamics.py",11366,0,"n",python,content
+10221,17799223,"train_dynamics.py",11367,0,"",python,selection_keyboard
+10222,17799373,"train_dynamics.py",11367,0,"u",python,content
+10223,17799373,"train_dynamics.py",11368,0,"",python,selection_keyboard
+10224,17799473,"train_dynamics.py",11368,0,"s",python,content
+10225,17799473,"train_dynamics.py",11369,0,"",python,selection_keyboard
+10226,17799540,"train_dynamics.py",11369,0,"u",python,content
+10227,17799540,"train_dynamics.py",11370,0,"",python,selection_keyboard
+10228,17799659,"train_dynamics.py",11370,0,"e",python,content
+10229,17799659,"train_dynamics.py",11371,0,"",python,selection_keyboard
+10230,17799797,"train_dynamics.py",11371,0,"d",python,content
+10231,17799797,"train_dynamics.py",11372,0,"",python,selection_keyboard
+10232,17799886,"train_dynamics.py",11372,0," ",python,content
+10233,17799886,"train_dynamics.py",11373,0,"",python,selection_keyboard
+10234,17800707,"train_dynamics.py",11373,0,"m",python,content
+10235,17800708,"train_dynamics.py",11374,0,"",python,selection_keyboard
+10236,17800741,"train_dynamics.py",11374,0,"o",python,content
+10237,17800741,"train_dynamics.py",11375,0,"",python,selection_keyboard
+10238,17800819,"train_dynamics.py",11375,0,"d",python,content
+10239,17800820,"train_dynamics.py",11376,0,"",python,selection_keyboard
+10240,17800920,"train_dynamics.py",11376,0,"u",python,content
+10241,17800920,"train_dynamics.py",11377,0,"",python,selection_keyboard
+10242,17801037,"train_dynamics.py",11377,0,"l",python,content
+10243,17801038,"train_dynamics.py",11378,0,"",python,selection_keyboard
+10244,17801086,"train_dynamics.py",11378,0,"e",python,content
+10245,17801087,"train_dynamics.py",11379,0,"",python,selection_keyboard
+10246,17801141,"train_dynamics.py",11379,0,"s",python,content
+10247,17801142,"train_dynamics.py",11380,0,"",python,selection_keyboard
+10248,17801236,"train_dynamics.py",11380,0,".",python,content
+10249,17801237,"train_dynamics.py",11381,0,"",python,selection_keyboard
+10250,17801376,"train_dynamics.py",11380,0,"",python,selection_command
+10251,17801725,"train_dynamics.py",11343,0,"",python,selection_command
+10252,17802851,"train_dynamics.py",11380,1,"",python,content
+10253,17802851,"train_dynamics.py",11369,1,"",python,content
+10254,17803774,"train_dynamics.py",11229,0,"",python,selection_command
+10255,17805290,"train_dynamics.py",11237,0,"",python,selection_command
+10256,17805540,"train_dynamics.py",11239,0,"",python,selection_command
+10257,17805569,"train_dynamics.py",11243,0,"",python,selection_command
+10258,17805596,"train_dynamics.py",11245,0,"",python,selection_command
+10259,17805626,"train_dynamics.py",11248,0,"",python,selection_command
+10260,17805660,"train_dynamics.py",11253,0,"",python,selection_command
+10261,17805693,"train_dynamics.py",11256,0,"",python,selection_command
+10262,17805727,"train_dynamics.py",11263,0,"",python,selection_command
+10263,17805761,"train_dynamics.py",11267,0,"",python,selection_command
+10264,17805795,"train_dynamics.py",11277,0,"",python,selection_command
+10265,17805829,"train_dynamics.py",11280,0,"",python,selection_command
+10266,17805862,"train_dynamics.py",11288,0,"",python,selection_command
+10267,17805896,"train_dynamics.py",11292,0,"",python,selection_command
+10268,17805929,"train_dynamics.py",11295,0,"",python,selection_command
+10269,17805963,"train_dynamics.py",11297,0,"",python,selection_command
+10270,17805996,"train_dynamics.py",11309,0,"",python,selection_command
+10271,17806030,"train_dynamics.py",11317,0,"",python,selection_command
+10272,17806069,"train_dynamics.py",11321,0,"",python,selection_command
+10273,17806102,"train_dynamics.py",11322,0,"",python,selection_command
+10274,17806134,"train_dynamics.py",11326,0,"",python,selection_command
+10275,17806167,"train_dynamics.py",11331,0,"",python,selection_command
+10276,17806200,"train_dynamics.py",11335,0,"",python,selection_command
+10277,17806236,"train_dynamics.py",11351,0,"",python,selection_command
+10278,17806268,"train_dynamics.py",11353,0,"",python,selection_command
+10279,17806301,"train_dynamics.py",11356,0,"",python,selection_command
+10280,17806334,"train_dynamics.py",11362,0,"",python,selection_command
+10281,17807015,"train_dynamics.py",11343,0,"",python,selection_command
+10282,18364793,"train_dynamics.py",11380,0,"",python,selection_command
+10283,18377241,"train_dynamics.py",11343,0,"",python,selection_command
+10284,18377665,"train_dynamics.py",11343,37,"",python,content
+10285,18377695,"train_dynamics.py",11351,0,"",python,selection_command
+10286,18377797,"train_dynamics.py",11237,0,"",python,selection_command
+10287,18377899,"train_dynamics.py",11239,0,"",python,selection_command
+10288,18378068,"train_dynamics.py",11243,0,"",python,selection_command
+10289,18378345,"train_dynamics.py",11245,0,"",python,selection_command
+10290,18379984,"train_dynamics.py",11295,47,"",python,content
+10291,18380878,"train_dynamics.py",11295,0,"a",python,content
+10292,18380878,"train_dynamics.py",11296,0,"",python,selection_keyboard
+10293,18380974,"train_dynamics.py",11296,0," ",python,content
+10294,18380974,"train_dynamics.py",11297,0,"",python,selection_keyboard
+10295,18381151,"train_dynamics.py",11297,0,"b",python,content
+10296,18381152,"train_dynamics.py",11298,0,"",python,selection_keyboard
+10297,18381153,"train_dynamics.py",11298,0,"u",python,content
+10298,18381153,"train_dynamics.py",11299,0,"",python,selection_keyboard
+10299,18381226,"train_dynamics.py",11299,0,"g",python,content
+10300,18381226,"train_dynamics.py",11300,0,"",python,selection_keyboard
+10301,18381301,"train_dynamics.py",11300,0," ",python,content
+10302,18381302,"train_dynamics.py",11301,0,"",python,selection_keyboard
+10303,18381795,"train_dynamics.py",11301,0,"in flax.nnx",python,content
+10304,18382086,"train_dynamics.py",11311,0,"",python,selection_command
+10305,18382723,"train_dynamics.py",11229,0,"",python,selection_command
+10306,18387648,"train_dynamics.py",0,0,"",python,tab
+10307,18387648,"train_dynamics.py",10443,0,"",python,selection_command
+10308,18393800,"train_dynamics.py",11384,0,"",python,selection_mouse
+10309,18393800,"train_dynamics.py",11383,0,"",python,selection_command
+10310,18395187,"train_dynamics.py",0,0,"",python,tab
+10311,18702133,"train_dynamics.py",11329,0,"",python,selection_mouse
+10312,18702591,"train_dynamics.py",11313,45," del optimizer.model.tokenizer.vq.drop",python,selection_command
+10313,18702903,"train_dynamics.py",11329,0,"",python,selection_command
+10314,18761005,"experiments/sample.sh",0,0,"source .venv/bin/activate\n\ndata_dir=""$PWD/data_arrayrecord/dummy""\nckpt_dir=""$PWD/checkpoints/dynamics_openai_grain_tok_lam_restore""\n\nexport XLA_FLAGS=--xla_gpu_autotune_level=0\nPYTHONUNBUFFERED=1 python sample.py \\n --batch_size 1 \\n --seq_len 2 \\n --start_frame 1 \\n --checkpoint $ckpt_dir \\n --data_dir $data_dir",shellscript,tab
+10315,18799822,"experiments/sample.sh",232,0,"",shellscript,selection_command
+10316,18799976,"experiments/sample.sh",252,0,"",shellscript,selection_command
+10317,18800317,"experiments/sample.sh",236,0,"",shellscript,selection_command
+10318,18929825,"experiments/sample.sh",215,0,"",shellscript,selection_command
+10319,18930067,"experiments/sample.sh",177,0,"",shellscript,selection_command
+10320,18930255,"experiments/sample.sh",133,0,"",shellscript,selection_command
+10321,18930553,"experiments/sample.sh",177,0,"",shellscript,selection_command
+10322,18930690,"experiments/sample.sh",177,1,"P",shellscript,selection_command
+10323,18930748,"experiments/sample.sh",177,16,"PYTHONUNBUFFERED",shellscript,selection_command
+10324,18930900,"experiments/sample.sh",177,17,"PYTHONUNBUFFERED=",shellscript,selection_command
+10325,18931935,"experiments/sample.sh",177,18,"PYTHONUNBUFFERED=1",shellscript,selection_command
+10326,18932690,"experiments/sample.sh",177,18,"",shellscript,content
+10327,18932895,"experiments/sample.sh",177,0,"s",shellscript,content
+10328,18932895,"experiments/sample.sh",178,0,"",shellscript,selection_keyboard
+10329,18932986,"experiments/sample.sh",178,0,"r",shellscript,content
+10330,18932986,"experiments/sample.sh",179,0,"",shellscript,selection_keyboard
+10331,18933035,"experiments/sample.sh",179,0,"u",shellscript,content
+10332,18933035,"experiments/sample.sh",180,0,"",shellscript,selection_keyboard
+10333,18933098,"experiments/sample.sh",180,0,"n",shellscript,content
+10334,18933098,"experiments/sample.sh",181,0,"",shellscript,selection_keyboard
+10335,18933252,"experiments/sample.sh",180,0,"",shellscript,selection_command
+10336,18938299,"experiments/sample.sh",204,0,"",shellscript,selection_command
+10337,18938554,"experiments/sample.sh",225,0,"",shellscript,selection_command
+10338,18938574,"experiments/sample.sh",243,0,"",shellscript,selection_command
+10339,18938602,"experiments/sample.sh",265,0,"",shellscript,selection_command
+10340,18938636,"experiments/sample.sh",294,0,"",shellscript,selection_command
+10341,18939960,"experiments/sample.sh",291,0,"",shellscript,selection_command
+10342,18942373,"sample.py",0,0,"from dataclasses import dataclass\nimport time\nimport os\nimport optax\n\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nimport orbax.checkpoint as ocp\nfrom PIL import Image, ImageDraw\nimport tyro\nfrom flax import nnx\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\nrng = jax.random.PRNGKey(args.seed)\n\n# --- Load Genie checkpoint ---\nrngs = nnx.Rngs(rng)\ngenie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n)\n\nhandler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n)\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n)\ncheckpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n)\ncheckpoint_manager = ocp.CheckpointManager(\n args.checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n)\n\ndummy_tx = optax.adamw(\n learning_rate=optax.linear_schedule(0.0001, 0.0001, 10000),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\ndummy_optimizer = nnx.Optimizer(genie, dummy_tx)\n\nabstract_optimizer = nnx.eval_shape(lambda: dummy_optimizer)\nabstract_optimizer_state = nnx.state(abstract_optimizer)\nrestored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n ),\n )\nrestored_optimizer_state = restored[""model_state""]\nnnx.update(dummy_optimizer, restored_optimizer_state)\n\n# --- Define sampling function ---\n@nnx.jit\ndef _sampling_fn(model, batch):\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n """"""Convenience wrapper that prepares inputs and invokes the jitted sampling fn.""""""\n vid = video_batch[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = _sampling_fn(genie, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n)\nvideo_batch = next(iter(dataloader))\n# Get latent actions for all videos in the batch\nbatch = dict(videos=video_batch)\naction_batch = genie.vq_encode(batch, training=False) # type: ignore[arg-type]\naction_batch = jnp.asarray(action_batch).reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n# --- Sample + evaluate video ---\nvid = _autoreg_sample(rng, video_batch, action_batch)\ngt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\nrecon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\nssim = jnp.mean(pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]))\nprint(f""SSIM: {ssim}"")\n\n# --- Construct video ---\ntrue_videos = (video_batch * 255).astype(np.uint8)\npred_videos = (vid * 255).astype(np.uint8)\nvideo_comparison = np.zeros((2, *vid.shape), dtype=np.uint8)\nvideo_comparison[0] = true_videos[:, : args.seq_len]\nvideo_comparison[1] = pred_videos\nframes = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n# --- Save video ---\nimgs = [Image.fromarray(img) for img in frames]\n# Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\nfor t, img in enumerate(imgs[1:]):\n d = ImageDraw.Draw(img)\n for row in range(action_batch.shape[0]):\n action = action_batch[row, t, 0]\n y_offset = row * video_batch.shape[2] + 2\n d.text((2, y_offset), f""{action}"", fill=255)\nimgs[0].save(\n f""generation_{time.time()}.gif"",\n save_all=True,\n append_images=imgs[1:],\n duration=250,\n loop=0,\n)\n",python,tab
+10343,19068171,"experiments/sample.sh",0,0,"",shellscript,tab
+10344,19070605,"experiments/sample.sh",262,0,"",shellscript,selection_command
+10345,19070849,"experiments/sample.sh",240,0,"",shellscript,selection_command
+10346,19070864,"experiments/sample.sh",222,0,"",shellscript,selection_command
+10347,19070894,"experiments/sample.sh",201,0,"",shellscript,selection_command
+10348,19071187,"experiments/sample.sh",177,0,"",shellscript,selection_command
+10349,19071343,"experiments/sample.sh",133,0,"",shellscript,selection_command
+10350,19071638,"experiments/sample.sh",177,0,"",shellscript,selection_command
+10351,19071802,"experiments/sample.sh",201,0,"",shellscript,selection_command
+10352,19073061,"experiments/sample.sh",205,0,"",shellscript,selection_command
+10353,19073311,"experiments/sample.sh",207,0,"",shellscript,selection_command
+10354,19073334,"experiments/sample.sh",218,0,"",shellscript,selection_command
+10355,19073365,"experiments/sample.sh",220,0,"",shellscript,selection_command
+10356,19073520,"experiments/sample.sh",226,0,"",shellscript,selection_command
+10357,19073831,"experiments/sample.sh",228,0,"",shellscript,selection_command
+10358,19073831,"experiments/sample.sh",236,0,"",shellscript,selection_command
+10359,19073832,"experiments/sample.sh",238,0,"",shellscript,selection_command
+10360,19074119,"experiments/sample.sh",244,0,"",shellscript,selection_command
+10361,19074371,"experiments/sample.sh",246,0,"",shellscript,selection_command
+10362,19074396,"experiments/sample.sh",258,0,"",shellscript,selection_command
+10363,19074427,"experiments/sample.sh",260,0,"",shellscript,selection_command
+10364,19074462,"experiments/sample.sh",266,0,"",shellscript,selection_command
+10365,19074547,"experiments/sample.sh",268,0,"",shellscript,selection_command
+10366,19074547,"experiments/sample.sh",279,0,"",shellscript,selection_command
+10367,19074571,"experiments/sample.sh",280,0,"",shellscript,selection_command
+10368,19074594,"experiments/sample.sh",289,0,"",shellscript,selection_command
+10369,19074626,"experiments/sample.sh",295,0,"",shellscript,selection_command
+10370,19074660,"experiments/sample.sh",297,0,"",shellscript,selection_command
+10371,19074694,"experiments/sample.sh",306,0,"",shellscript,selection_command
+10372,19074727,"experiments/sample.sh",307,0,"",shellscript,selection_command
+10373,19074760,"experiments/sample.sh",314,0,"",shellscript,selection_command
+10374,19259194,"sample.py",0,0,"",python,tab
+10375,19260616,"/fast/home/franz.srambical/jafar/sample.py",0,0,"from dataclasses import dataclass\nimport time\nimport os\nimport optax\n\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nimport orbax.checkpoint as ocp\nfrom PIL import Image, ImageDraw\nimport tyro\nfrom flax import nnx\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\nrng = jax.random.PRNGKey(args.seed)\n\n# --- Load Genie checkpoint ---\nrngs = nnx.Rngs(rng)\ngenie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n)\n\nhandler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n)\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n)\ncheckpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n)\ncheckpoint_manager = ocp.CheckpointManager(\n args.checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n)\n\ndummy_tx = optax.adamw(\n learning_rate=optax.linear_schedule(0.0001, 0.0001, 10000),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\ndummy_optimizer = nnx.Optimizer(genie, dummy_tx)\n\nabstract_optimizer = nnx.eval_shape(lambda: dummy_optimizer)\nabstract_optimizer_state = nnx.state(abstract_optimizer)\nrestored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n ),\n )\nrestored_optimizer_state = restored[""model_state""]\nnnx.update(dummy_optimizer, restored_optimizer_state)\n\n# --- Define sampling function ---\n@nnx.jit\ndef _sampling_fn(model, batch):\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n """"""Convenience wrapper that prepares inputs and invokes the jitted sampling fn.""""""\n vid = video_batch[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = _sampling_fn(genie, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n)\nvideo_batch = next(iter(dataloader))\n# Get latent actions for all videos in the batch\nbatch = dict(videos=video_batch)\naction_batch = genie.vq_encode(batch, training=False) # type: ignore[arg-type]\naction_batch = jnp.asarray(action_batch).reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n# --- Sample + evaluate video ---\nvid = _autoreg_sample(rng, video_batch, action_batch)\ngt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\nrecon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\nssim = jnp.mean(pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]))\nprint(f""SSIM: {ssim}"")\n\n# --- Construct video ---\ntrue_videos = (video_batch * 255).astype(np.uint8)\npred_videos = (vid * 255).astype(np.uint8)\nvideo_comparison = np.zeros((2, *vid.shape), dtype=np.uint8)\nvideo_comparison[0] = true_videos[:, : args.seq_len]\nvideo_comparison[1] = pred_videos\nframes = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n# --- Save video ---\nimgs = [Image.fromarray(img) for img in frames]\n# Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\nfor t, img in enumerate(imgs[1:]):\n d = ImageDraw.Draw(img)\n for row in range(action_batch.shape[0]):\n action = action_batch[row, t, 0]\n y_offset = row * video_batch.shape[2] + 2\n d.text((2, y_offset), f""{action}"", fill=255)\nimgs[0].save(\n f""generation_{time.time()}.gif"",\n save_all=True,\n append_images=imgs[1:],\n duration=250,\n loop=0,\n)\n",python,tab
+10376,19260617,"/fast/home/franz.srambical/jafar/sample.py",4804,0,"",python,selection_command
+10377,19264752,"sample.py",0,0,"",python,tab
+10378,19275258,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+10379,19275258,"/fast/home/franz.srambical/jafar/sample.py",4804,0,"",python,selection_command
+10380,19277674,"sample.py",0,0,"",python,tab
+10381,19282623,"sample.py",4804,0,"",python,selection_command
+10382,19283966,"sample.py",4816,0,"",python,selection_command
+10383,19284018,"sample.py",4818,0,"",python,selection_command
+10384,19284293,"sample.py",4822,0,"",python,selection_command
+10385,19284490,"sample.py",4823,0,"",python,selection_command
+10386,19284584,"sample.py",4827,0,"",python,selection_command
+10387,19284747,"sample.py",4828,0,"",python,selection_command
+10388,19288926,"experiments/sample.sh",0,0,"",shellscript,tab
+10389,19289957,"experiments/sample.sh",285,0,"",shellscript,selection_command
+10390,19290210,"experiments/sample.sh",260,0,"",shellscript,selection_command
+10391,19290233,"experiments/sample.sh",238,0,"",shellscript,selection_command
+10392,19290264,"experiments/sample.sh",220,0,"",shellscript,selection_command
+10393,19290298,"experiments/sample.sh",199,0,"",shellscript,selection_command
+10394,19290332,"experiments/sample.sh",156,0,"",shellscript,selection_command
+10395,19290366,"experiments/sample.sh",132,0,"",shellscript,selection_command
+10396,19290399,"experiments/sample.sh",89,0,"",shellscript,selection_command
+10397,19290595,"experiments/sample.sh",50,0,"",shellscript,selection_command
+10398,19294097,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+10399,19295367,"experiments/sample.sh",0,0,"",shellscript,tab
+10400,19296034,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+10401,19411796,"experiments/sample.sh",0,0,"",shellscript,tab
+10402,19412686,"experiments/dynamics_grain_tok_restore.sh",0,0,"",shellscript,tab
+10403,19413549,"sample.py",0,0,"",python,tab
+10404,19414734,"sample.py",4802,0,"",python,selection_command
+10405,19414983,"sample.py",4800,0,"",python,selection_command
+10406,19415011,"sample.py",4778,0,"",python,selection_command
+10407,19415043,"sample.py",4752,0,"",python,selection_command
+10408,19415071,"sample.py",4733,0,"",python,selection_command
+10409,19415101,"sample.py",4708,0,"",python,selection_command
+10410,19415134,"sample.py",4686,0,"",python,selection_command
+10411,19415167,"sample.py",4663,0,"",python,selection_command
+10412,19415204,"sample.py",4642,0,"",python,selection_command
+10413,19415233,"sample.py",4624,0,"",python,selection_command
+10414,19415267,"sample.py",4597,0,"",python,selection_command
+10415,19415300,"sample.py",4571,0,"",python,selection_command
+10416,19415344,"sample.py",4560,0,"",python,selection_command
+10417,19415377,"sample.py",4521,0,"",python,selection_command
+10418,19415404,"sample.py",4486,0,"",python,selection_command
+10419,19415434,"sample.py",4460,0,"",python,selection_command
+10420,19415471,"sample.py",4426,0,"",python,selection_command
+10421,19415500,"sample.py",4401,0,"",python,selection_command
+10422,19415534,"sample.py",4400,0,"",python,selection_command
+10423,19415567,"sample.py",4398,0,"",python,selection_command
+10424,19415600,"sample.py",4352,0,"",python,selection_command
+10425,19415644,"sample.py",4284,0,"",python,selection_command
+10426,19415677,"sample.py",4246,0,"",python,selection_command
+10427,19415704,"sample.py",4197,0,"",python,selection_command
+10428,19416581,"sample.py",4110,0,"",python,selection_command
+10429,19417883,"sample.py",4197,0,"",python,selection_command
+10430,19418136,"sample.py",4246,0,"",python,selection_command
+10431,19418163,"sample.py",4284,0,"",python,selection_command
+10432,19418193,"sample.py",4352,0,"",python,selection_command
+10433,19418253,"sample.py",4398,0,"",python,selection_command
+10434,19418255,"sample.py",4400,0,"",python,selection_command
+10435,19418288,"sample.py",4401,0,"",python,selection_command
+10436,19418321,"sample.py",4426,0,"",python,selection_command
+10437,19418355,"sample.py",4460,0,"",python,selection_command
+10438,19418394,"sample.py",4486,0,"",python,selection_command
+10439,19418427,"sample.py",4521,0,"",python,selection_command
+10440,19418459,"sample.py",4560,0,"",python,selection_command
+10441,19418631,"sample.py",4521,0,"",python,selection_command
+10442,19418810,"sample.py",4486,0,"",python,selection_command
+10443,19418950,"sample.py",4460,0,"",python,selection_command
+10444,19419119,"sample.py",4486,0,"",python,selection_command
+10445,19419349,"sample.py",4460,0,"",python,selection_command
+10446,19419772,"sample.py",4486,0,"",python,selection_command
+10447,19420020,"sample.py",4521,0,"",python,selection_command
+10448,19420045,"sample.py",4560,0,"",python,selection_command
+10449,19420077,"sample.py",4571,0,"",python,selection_command
+10450,19420111,"sample.py",4597,0,"",python,selection_command
+10451,19420144,"sample.py",4624,0,"",python,selection_command
+10452,19420177,"sample.py",4642,0,"",python,selection_command
+10453,19420209,"sample.py",4663,0,"",python,selection_command
+10454,19420244,"sample.py",4686,0,"",python,selection_command
+10455,19420278,"sample.py",4708,0,"",python,selection_command
+10456,19420309,"sample.py",4733,0,"",python,selection_command
+10457,19420343,"sample.py",4752,0,"",python,selection_command
+10458,19420377,"sample.py",4778,0,"",python,selection_command
+10459,19420409,"sample.py",4800,0,"",python,selection_command
+10460,19420444,"sample.py",4802,0,"",python,selection_command
+10461,19420475,"sample.py",4828,0,"",python,selection_command
+10462,19420564,"sample.py",4802,0,"",python,selection_command
+10463,19420831,"sample.py",4800,0,"",python,selection_command
+10464,19420853,"sample.py",4778,0,"",python,selection_command
+10465,19420884,"sample.py",4752,0,"",python,selection_command
+10466,19420916,"sample.py",4733,0,"",python,selection_command
+10467,19420971,"sample.py",4708,0,"",python,selection_command
+10468,19420984,"sample.py",4686,0,"",python,selection_command
+10469,19421019,"sample.py",4663,0,"",python,selection_command
+10470,19421143,"sample.py",4642,0,"",python,selection_command
+10471,19421408,"sample.py",4624,0,"",python,selection_command
+10472,19421782,"sample.py",4597,0,"",python,selection_command
+10473,19422719,"sample.py",4624,0,"",python,selection_command
+10474,19422968,"sample.py",4642,0,"",python,selection_command
+10475,19422996,"sample.py",4663,0,"",python,selection_command
+10476,19423021,"sample.py",4686,0,"",python,selection_command
+10477,19423052,"sample.py",4708,0,"",python,selection_command
+10478,19423165,"sample.py",4733,0,"",python,selection_command
+10479,19423355,"sample.py",4752,0,"",python,selection_command
+10480,19423773,"sample.py",4751,0,"",python,selection_command
+10481,19428079,"sample.py",4751,1,"1",python,content
+10482,19437403,"sample.py",4751,1,"8",python,content
+10483,19438253,"sample.py",4770,0,"",python,selection_command
+10484,19438370,"sample.py",4778,0,"",python,selection_command
+10485,19438468,"sample.py",4779,0,"",python,selection_command
+10486,19442233,"train_dynamics.py",0,0,"",python,tab
+10487,19443949,"train_dynamics.py",445,0,"",python,selection_command
+10488,19444168,"train_dynamics.py",9696,0,"",python,selection_command
+10489,19446519,"sample.py",0,0,"",python,tab
+10490,19449682,"sample.py",4779,1,"0",python,content
+10491,19498807,"TERMINAL",0,0," return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with. warnings.warn(2025-07-25 16:22:58.570793: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memory2025-07-25 16:22:58.583791: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryTraceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)Traceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)2025-07-25 16:22:58.786439: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryTraceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)2025-07-25 16:23:00.095031: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryTraceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 174, in video_batch = next(iter(dataloader)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/data_loader.py"", line 479, in __next__ result_record = next(self._iterator) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/data_loader.py"", line 380, in _iterator_with_context yield from it File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 784, in __next__ raise element File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 607, in _process_elements_in_grain_pool with GrainPool( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 422, in __init__ parallel.run_in_parallel( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/core/parallel.py"", line 70, in run_in_parallel raise completed.exception() File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/concurrent/futures/thread.py"", line 58, in run result = self.fn(*self.args, **self.kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 423, in function=lambda child_process: child_process.start(), File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/process.py"", line 121, in start self._popen = self._Popen(self) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/context.py"", line 288, in _Popen return Popen(process_obj) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/popen_spawn_posix.py"", line 32, in __init__ super().__init__(process_obj) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/popen_fork.py"", line 19, in __init__ self._launch(process_obj) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/popen_spawn_posix.py"", line 42, in _launch prep_data = spawn.get_preparation_data(process_obj._name) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 154, in get_preparation_data _check_not_importing_main() File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 134, in _check_not_importing_main raise RuntimeError('''RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase. This probably means that you are not using fork to start your child processes and you have forgotten to use the proper idiom in the main module: if __name__ == '__main__': freeze_support() ... The ""freeze_support()"" line can be omitted if the program is not going to be frozen to produce an executable.(jafar) [franz.srambical@hai003.haicore.berlin:~/jafar] $ bash experiments/sample.sh /fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with. warnings.warn(E0725 16:24:15.264406 1600031 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.264473 1600031 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.E0725 16:24:15.267300 1600031 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.267338 1600031 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.E0725 16:24:15.269648 1600037 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.269799 1600037 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.E0725 16:24:15.272470 1600037 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.278304 1600037 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryE0725 16:24:15.397122 1600031 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.404450 1600031 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.E0725 16:24:15.407978 1600031 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.408150 1600031 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)jaxlib._jax.XlaRuntimeError: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.E0725 16:24:15.478617 1600037 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.493273 1600037 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.E0725 16:24:15.497270 1600037 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE0725 16:24:15.497309 1600037 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)jaxlib._jax.XlaRuntimeError: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryjax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryERROR:absl:Processing Failed. Shutting down./fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with. warnings.warn(/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with. warnings.warn(2025-07-25 16:24:37.987107: W external/xla/xla/tsl/framework/bfc_allocator.cc:501] Allocator (GPU_0_bfc) ran out of memory trying to allocate 4.88MiB (rounded to 5120000)requested by op If the cause is memory fragmentation maybe the environment variable 'TF_GPU_ALLOCATOR=cuda_malloc_async' will improve the situation. Current allocation summary follows.Current allocation summary follows.2025-07-25 16:24:37.987805: W external/xla/xla/tsl/framework/bfc_allocator.cc:512] *******x********************************************************************************************E0725 16:24:37.987942 1600038 pjrt_stream_executor_client.cc:2916] Execution of replica 0 failed: RESOURCE_EXHAUSTED: Out of memory while trying to allocate 5120000 bytes. [tf-allocator-allocation-error='']Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 68, in genie = Genie( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__ return _graph_node_meta_call(cls, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call cls._object_meta_construct(node, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct self.__init__(*args, **kwargs) File ""/fast/home/franz.srambical/jafar/genie.py"", line 94, in __init__ self.lam = LatentActionModel( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__ return _graph_node_meta_call(cls, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call cls._object_meta_construct(node, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct self.__init__(*args, **kwargs) File ""/fast/home/franz.srambical/jafar/models/lam.py"", line 83, in __init__ self.decoder = STTransformer( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__ return _graph_node_meta_call(cls, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call cls._object_meta_construct(node, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct self.__init__(*args, **kwargs) File ""/fast/home/franz.srambical/jafar/utils/nn.py"", line 191, in __init__ STBlock( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__ return _graph_node_meta_call(cls, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call cls._object_meta_construct(node, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct self.__init__(*args, **kwargs) File ""/fast/home/franz.srambical/jafar/utils/nn.py"", line 51, in __init__ self.spatial_pos_enc = PositionalEncoding(self.dim) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__ return _graph_node_meta_call(cls, *args, **kwargs) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call(jafar) [franz.srambical@hai003.haicore.berlin:~/jafar] $ bash experiments/sample.sh ^Csrun: interrupt (one more within 1 sec to abort)srun: StepId=13885.1 task 0: running^Csrun: sending Ctrl-C to StepId=13885.1srun: forcing job terminationsrun: Job step aborted: Waiting up to 32 seconds for job step to finish.[2025-07-25T16:32:05.412] error: *** STEP 13885.1 ON hai003 CANCELLED AT 2025-07-25T16:32:05 DUE to SIGNAL Killed ***^Csrun: sending Ctrl-C to StepId=13885.1srun: job abort in progress(jafar) [franz.srambical@hai003.haicore.berlin:~/jafar] $ bash experiments/sample.sh /fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with. warnings.warn(jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memory2025-07-25 16:32:55.422761: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryTraceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)2025-07-25 16:32:55.572021: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memory2025-07-25 16:32:55.575094: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryTraceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)Traceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)2025-07-25 16:32:55.985487: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memoryTraceback (most recent call last): File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends backend = _init_backend(platform) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend backend = registration.factory() File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 518, in factory return xla_client.make_c_api_client(plugin_name, updated_options, None) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client return _xla.get_c_api_client(plugin_name, options, distributed_client)jaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDADuring handling of the above exception, another exception occurred:jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.The above exception was the direct cause of the following exception:Traceback (most recent call last): File """", line 1, in File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main prepare(preparation_data) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path return _run_module_code(code, init_globals, run_name, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code exec(code, run_globals) File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in rng = jax.random.PRNGKey(args.seed) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey return _return_prng_keys(True, _key('PRNGKey', seed, impl)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key return prng.random_seed(seed, impl=impl) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed seeds_arr = jnp.asarray(np.int64(seeds)) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray return array(a, dtype=dtype, copy=bool(copy), order=order, device=device) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array out_array: Array = lax._convert_element_type( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type return convert_element_type_p.bind( File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind return self._true_bind(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind return self.bind_with_trace(prev_trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace return trace.process_primitive(self, args, params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive return primitive.impl(*args, **params) File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive outs = fun(*args)RuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)^Csrun: interrupt (one more within 1 sec to abort)srun: StepId=13885.2 task 0: running^Csrun: sending Ctrl-C to StepId=13885.2srun: forcing job terminationsrun: Job step aborted: Waiting up to 32 seconds for job step to finish.[2025-07-25T16:33:04.884] error: *** STEP 13885.2 ON hai003 CANCELLED AT 2025-07-25T16:33:04 DUE to SIGNAL Killed ***^Csrun: sending Ctrl-C to StepId=13885.2srun: job abort in progress(jafar) [franz.srambical@hai003.haicore.berlin:~/jafar] $ ^C(jafar) [franz.srambical@hai003.haicore.berlin:~/jafar] $ nvidia-smi Fri Jul 25 16:33:07 2025 +-----------------------------------------------------------------------------------------+| NVIDIA-SMI 570.124.06 Driver Version: 570.124.06 CUDA Version: 12.8 ||-----------------------------------------+------------------------+----------------------+| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC || Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. || | | MIG M. ||=========================================+========================+======================|| 0 NVIDIA H100 80GB HBM3 On | 00000000:19:00.0 Off | 0 || N/A 42C P0 128W / 700W | 1MiB / 81559MiB | 0% Default || | | Disabled |+-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=========================================================================================|| No running processes found |+-----------------------------------------------------------------------------------------+(jafar) [franz.srambical@hai003.haicore.berlin:~/jafar] $ exitexitsalloc: Relinquishing job allocation 13885",,terminal_command
+10492,19504423,"TERMINAL",0,0,"salloc --gpus=1 --ntasks-per-node=1 --cpus-per-task=1 --mem=100G",,terminal_command
+10493,19504475,"TERMINAL",0,0,"]633;Csalloc: Granted job allocation 13888\r\n",,terminal_output
+10494,19504558,"TERMINAL",0,0,"salloc: Nodes hai003 are ready for job\r\n",,terminal_output
+10495,19504923,"TERMINAL",0,0,"Running inside SLURM, Job ID 13888.\r\n",,terminal_output
+10496,19504975,"TERMINAL",0,0,"]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10497,19505378,"TERMINAL",0,0,"exit",,terminal_output
+10498,19505637,"TERMINAL",0,0,"nvidia-smi ",,terminal_output
+10499,19506066,"TERMINAL",0,0,"[16@bash experiments/sample.sh[C",,terminal_output
+10500,19506563,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+10501,19508306,"sample.py",0,0,"",python,selection_command
+10502,19511719,"sample.py",280,0,"",python,selection_command
+10503,19512063,"sample.py",586,0,"",python,selection_command
+10504,19512226,"sample.py",1005,0,"",python,selection_command
+10505,19513280,"sample.py",1428,0,"",python,selection_command
+10506,19513578,"sample.py",2344,0,"",python,selection_command
+10507,19514113,"sample.py",3186,0,"",python,selection_command
+10508,19514876,"sample.py",4226,0,"",python,selection_command
+10509,19516617,"sample.py",5130,0,"",python,selection_command
+10510,19517469,"sample.py",6325,0,"",python,selection_command
+10511,19518012,"sample.py",5432,0,"",python,selection_command
+10512,19518076,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+10513,19518342,"sample.py",4401,0,"",python,selection_command
+10514,19518744,"sample.py",3405,0,"",python,selection_command
+10515,19519342,"sample.py",2501,0,"",python,selection_command
+10516,19520287,"sample.py",1489,0,"",python,selection_command
+10517,19520621,"sample.py",713,0,"",python,selection_command
+10518,19521336,"sample.py",70,0,"",python,selection_command
+10519,19525007,"sample.py",0,0,"from dataclasses import dataclass\nimport time\nimport os\nimport optax\n\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nimport orbax.checkpoint as ocp\nfrom PIL import Image, ImageDraw\nimport tyro\nfrom flax import nnx\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\nrng = jax.random.PRNGKey(args.seed)\n\n# --- Load Genie checkpoint ---\nrngs = nnx.Rngs(rng)\ngenie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n)\n\nhandler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n)\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n)\ncheckpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n)\ncheckpoint_manager = ocp.CheckpointManager(\n args.checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n)\n\ndummy_tx = optax.adamw(\n learning_rate=optax.linear_schedule(0.0001, 0.0001, 10000),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\ndummy_optimizer = nnx.Optimizer(genie, dummy_tx)\n\nabstract_optimizer = nnx.eval_shape(lambda: dummy_optimizer)\nabstract_optimizer_state = nnx.state(abstract_optimizer)\nrestored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n ),\n )\nrestored_optimizer_state = restored[""model_state""]\nnnx.update(dummy_optimizer, restored_optimizer_state)\n\n# --- Define sampling function ---\n@nnx.jit\ndef _sampling_fn(model, batch):\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n """"""Convenience wrapper that prepares inputs and invokes the jitted sampling fn.""""""\n vid = video_batch[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = _sampling_fn(genie, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n)\nvideo_batch = next(iter(dataloader))\n# Get latent actions for all videos in the batch\nbatch = dict(videos=video_batch)\naction_batch = genie.vq_encode(batch, training=False) # type: ignore[arg-type]\naction_batch = jnp.asarray(action_batch).reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n# --- Sample + evaluate video ---\nvid = _autoreg_sample(rng, video_batch, action_batch)\ngt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\nrecon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\nssim = jnp.mean(pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]))\nprint(f""SSIM: {ssim}"")\n\n# --- Construct video ---\ntrue_videos = (video_batch * 255).astype(np.uint8)\npred_videos = (vid * 255).astype(np.uint8)\nvideo_comparison = np.zeros((2, *vid.shape), dtype=np.uint8)\nvideo_comparison[0] = true_videos[:, : args.seq_len]\nvideo_comparison[1] = pred_videos\nframes = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n# --- Save video ---\nimgs = [Image.fromarray(img) for img in frames]\n# Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\nfor t, img in enumerate(imgs[1:]):\n d = ImageDraw.Draw(img)\n for row in range(action_batch.shape[0]):\n action = action_batch[row, t, 0]\n y_offset = row * video_batch.shape[2] + 2\n d.text((2, y_offset), f""{action}"", fill=255)\nimgs[0].save(\n f""generation_{time.time()}.gif"",\n save_all=True,\n append_images=imgs[1:],\n duration=250,\n loop=0,\n)\n",python,tab
+10520,19525007,"sample.py",56,0,"",python,selection_command
+10521,19566697,"sample.py",0,0,"",python,tab
+10522,19585706,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\nRuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memory\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\nRuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memory\r\nE0725 16:34:35.755152 1608320 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.755807 1608320 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.758557 1608320 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.758763 1608313 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.758880 1608313 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.761502 1608313 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.761664 1608320 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.768299 1608313 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.803020 1608316 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.803079 1608316 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.805701 1608316 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.805737 1608316 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\n",,terminal_output
+10523,19585884,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\nRuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memory\r\nE0725 16:34:35.886870 1608313 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.892340 1608320 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.900095 1608320 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.903998 1608320 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.904183 1608313 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.908239 1608313 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.908427 1608320 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.909975 1608313 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\njaxlib._jax.XlaRuntimeError: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\njaxlib._jax.XlaRuntimeError: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.\r\nE0725 16:34:35.947059 1608316 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.947210 1608316 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\nE0725 16:34:35.950816 1608316 cuda_dnn.cc:535] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR\r\nE0725 16:34:35.950959 1608316 cuda_dnn.cc:539] Memory usage: 131072 bytes free, 85029158912 bytes total.\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\njaxlib._jax.XlaRuntimeError: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.\r\n",,terminal_output
+10524,19587692,"TERMINAL",0,0,"ERROR:absl:Processing Failed. Shutting down.\r\n",,terminal_output
+10525,19591292,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 64, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\nRuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memory\r\n",,terminal_output
+10526,19596773,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+10527,19598644,"TERMINAL",0,0,"Traceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 174, in \r\n video_batch = next(iter(dataloader))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/data_loader.py"", line 479, in __next__\r\n result_record = next(self._iterator)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/data_loader.py"", line 380, in _iterator_with_context\r\n yield from it\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 784, in __next__\r\n raise element\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 616, in _process_elements_in_grain_pool\r\n for element in g_pool:\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 505, in __next__\r\n raise RuntimeError(\r\nRuntimeError: Grain worker process 0 was terminated unexpectedly with exit code 1. Search the logs above for the source of the crash.\r\n",,terminal_output
+10528,19599407,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10529,19649941,"sample.py",1452,0,"\n# Initialize distributed computing\njax.distributed.initialize()\n\n",python,content
+10530,19661445,"sample.py",280,0,"",python,selection_mouse
+10531,19661778,"sample.py",586,0,"",python,selection_command
+10532,19662008,"sample.py",1005,0,"",python,selection_command
+10533,19662347,"sample.py",1428,0,"",python,selection_command
+10534,19662557,"sample.py",1713,0,"",python,selection_command
+10535,19664373,"sample.py",1452,0,"",python,selection_mouse
+10536,19665481,"sample.py",1453,0,"",python,selection_command
+10537,19665826,"sample.py",1453,35,"",python,content
+10538,19666501,"sample.py",1898,0,"",python,selection_command
+10539,19666719,"sample.py",2415,0,"",python,selection_command
+10540,19666953,"sample.py",2890,0,"",python,selection_command
+10541,19667300,"sample.py",3266,0,"",python,selection_command
+10542,19667515,"sample.py",3796,0,"",python,selection_command
+10543,19667830,"sample.py",4295,0,"",python,selection_command
+10544,19668130,"sample.py",4700,0,"",python,selection_command
+10545,19668454,"sample.py",5215,0,"",python,selection_command
+10546,19668749,"sample.py",5880,0,"",python,selection_command
+10547,19669036,"sample.py",6356,0,"",python,selection_command
+10548,19669854,"sample.py",5974,0,"",python,selection_command
+10549,19670087,"sample.py",5298,0,"",python,selection_command
+10550,19670114,"sample.py",4723,0,"",python,selection_command
+10551,19670147,"sample.py",4363,0,"",python,selection_command
+10552,19670181,"sample.py",3870,0,"",python,selection_command
+10553,19670220,"sample.py",3267,0,"",python,selection_command
+10554,19670962,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10555,19671040,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+10556,19671257,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+10557,19682925,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+10558,19706489,"TERMINAL",0,0,"2025-07-25 16:36:36.583075: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n2025-07-25 16:36:36.584218: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:36.584489: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 16:36:36.584675: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n\r\nRPC: /tensorflow.CoordinationService/PollForError [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10559,19707164,"TERMINAL",0,0,"2025-07-25 16:36:37.240655: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n2025-07-25 16:36:37.240884: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.241172: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 16:36:37.241458: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n\r\nRPC: /tensorflow.CoordinationService/PollForError [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10560,19707319,"TERMINAL",0,0,"2025-07-25 16:36:37.332668: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n2025-07-25 16:36:37.332865: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.333133: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 16:36:37.333400: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n\r\nRPC: /tensorflow.CoordinationService/PollForError [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.334182: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.334338: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.336580: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.336714: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.338865: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.339000: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.350269: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.350413: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.380791: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.380936: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.414625: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.414773: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.419618: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.419753: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10561,19707461,"TERMINAL",0,0,"2025-07-25 16:36:37.555997: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.556226: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.560669: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.560822: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10562,19707532,"TERMINAL",0,0,"2025-07-25 16:36:37.629767: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:37.629951: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10563,19708942,"TERMINAL",0,0,"2025-07-25 16:36:39.037126: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:39.037352: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10564,19712750,"TERMINAL",0,0,"2025-07-25 16:36:42.755058: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 16:36:42.755634: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: UNAVAILABLE: Failed to send RPC to coordination service. Either the leader task was preempted/died/restarted unexpectedly or this task is experiencing network issues. Check earlier logs from 1) this task, 2) the leader (usually slice 0 task 0), and 3) cluster scheduler to debug further.\r\nAdditional GRPC error information from remote target coordination_service while calling /tensorflow.CoordinationService/PollForError:\r\n:{""created"":""@1753454202.754901620"",""description"":""Error received from peer ipv4:10.86.2.30:63040"",""file"":""external/com_github_grpc_grpc/src/core/lib/surface/call.cc"",""file_line"":1056,""grpc_message"":""Socket closed"",""grpc_status"":14}\r\n2025-07-25 16:36:42.759778: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n2025-07-25 16:36:42.759939: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.760212: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 16:36:42.760510: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n\r\nRPC: /tensorflow.CoordinationService/PollForError [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.771715: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.771864: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.802178: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.802335: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.835983: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.836113: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.840902: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.841021: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.849029: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.849180: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10565,19712887,"TERMINAL",0,0,"2025-07-25 16:36:42.977160: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.977383: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.981805: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:42.981957: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10566,19712955,"TERMINAL",0,0,"2025-07-25 16:36:43.050849: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:43.051019: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10567,19713634,"TERMINAL",0,0,"2025-07-25 16:36:43.704846: W external/xla/xla/service/platform_util.cc:220] unable to create StreamExecutor for CUDA:0: : CUDA_ERROR_OUT_OF_MEMORY: out of memory\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 742, in backends\r\n backend = _init_backend(platform)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 828, in _init_backend\r\n backend = registration.factory()\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/xla_bridge.py"", line 528, in factory\r\n return xla_client.make_c_api_client(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jaxlib/xla_client.py"", line 153, in make_c_api_client\r\n return _xla.get_c_api_client(plugin_name, options, distributed_client)\r\njaxlib._jax.XlaRuntimeError: INTERNAL: no supported devices found for platform CUDA\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 67, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\nRuntimeError: Unable to initialize backend 'cuda': INTERNAL: no supported devices found for platform CUDA (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)\r\n",,terminal_output
+10568,19714360,"TERMINAL",0,0,"2025-07-25 16:36:44.458146: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:44.458311: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10569,19717098,"TERMINAL",0,0,"2025-07-25 16:36:47.166441: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:47.166478: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10570,19717913,"TERMINAL",0,0,"2025-07-25 16:36:48.011069: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 16:36:48.011175: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: UNAVAILABLE: Failed to send RPC to coordination service. Either the leader task was preempted/died/restarted unexpectedly or this task is experiencing network issues. Check earlier logs from 1) this task, 2) the leader (usually slice 0 task 0), and 3) cluster scheduler to debug further.\r\nAdditional GRPC error information from remote target coordination_service while calling /tensorflow.CoordinationService/PollForError:\r\n:{""created"":""@1753454208.010965219"",""description"":""Error received from peer ipv4:10.86.2.30:63040"",""file"":""external/com_github_grpc_grpc/src/core/lib/surface/call.cc"",""file_line"":1056,""grpc_message"":""Connection reset by peer"",""grpc_status"":14}\r\n",,terminal_output
+10571,19718183,"TERMINAL",0,0,"2025-07-25 16:36:48.279339: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:48.279577: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10572,19722501,"TERMINAL",0,0,"2025-07-25 16:36:52.596811: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:52.596846: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10573,19727784,"TERMINAL",0,0,"2025-07-25 16:36:57.880796: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:36:57.880826: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10574,19733214,"TERMINAL",0,0,"2025-07-25 16:37:03.311052: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:03.311071: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10575,19734321,"TERMINAL",0,0,"2025-07-25 16:37:04.337651: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.337855: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.349225: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.349395: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.379858: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.380079: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.413956: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.414176: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.419087: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.419206: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10576,19734458,"TERMINAL",0,0,"2025-07-25 16:37:04.555473: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 16:37:04.555623: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10577,19735467,"TERMINAL",0,0,"srun: error: hai003: task 0: Aborted (core dumped)\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10578,20673865,"sample.py",3328,0,"",python,selection_command
+10579,20673997,"sample.py",3385,0,"",python,selection_command
+10580,20678207,"sample.py",1453,0,"# Initialize distributed computing\n",python,content
+10581,20683581,"sample.py",1453,35,"",python,content
+10582,20683629,"sample.py",1453,0,"# Set JAX to use CPU if no CUDA devices are available\nimport os\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""cpu""\n\n# Initialize distributed computing\n",python,content
+10583,20693980,"sample.py",1453,180,"",python,content
+10584,20694021,"sample.py",1453,0,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""cpu""\n\n# Initialize distributed computing\n",python,content
+10585,20704028,"sample.py",1492,0,"",python,selection_mouse
+10586,20735551,"sample.py",1453,54,"",python,content
+10587,20735861,"sample.py",1493,0,"",python,selection_command
+10588,20736669,"sample.py",1453,0,"",python,selection_command
+10589,20737089,"sample.py",1453,40,"",python,content
+10590,20737112,"sample.py",1457,0,"",python,selection_command
+10591,20737737,"sample.py",1453,0,"if not os.environ.get(""JAX_PLATFORMS""):\n",python,content
+10592,20737744,"sample.py",1453,0,"",python,selection_command
+10593,20737912,"sample.py",1453,80,"are available\n",python,content
+10594,20737915,"sample.py",1465,0,"",python,selection_command
+10595,20739248,"sample.py",1453,14,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""c",python,content
+10596,20739260,"sample.py",1492,0,"",python,selection_command
+10597,20742137,"sample.py",1453,53,"# Set JAX to use CPU if no CUDA devices are available",python,selection_command
+10598,20742318,"sample.py",1453,93,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):",python,selection_command
+10599,20742483,"sample.py",1453,130,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""c",python,selection_command
+10600,20742613,"sample.py",1453,165,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""c\n# Initialize distributed computing",python,selection_command
+10601,20742991,"sample.py",1453,166,"",python,content
+10602,20746329,"sample.py",1452,0,"",python,selection_command
+10603,20746593,"sample.py",1453,0,"",python,selection_command
+10604,20747952,"sample.py",1453,0,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""c\n# Initialize distributed computing\n",python,content
+10605,20747954,"sample.py",1492,0,"",python,selection_command
+10606,20752385,"sample.py",1453,53,"# Set JAX to use CPU if no CUDA devices are available",python,selection_command
+10607,20752430,"sample.py",1492,0,"",python,selection_command
+10608,20752731,"sample.py",1545,0,"",python,selection_command
+10609,20753215,"sample.py",1492,0,"",python,selection_command
+10610,20753534,"sample.py",1453,53,"# Set JAX to use CPU if no CUDA devices are available",python,selection_command
+10611,20753884,"sample.py",1453,93,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):",python,selection_command
+10612,20754066,"sample.py",1453,130,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""c",python,selection_command
+10613,20754176,"sample.py",1453,165,"# Set JAX to use CPU if no CUDA devices are available\nif not os.environ.get(""JAX_PLATFORMS""):\n os.environ[""JAX_PLATFORMS""] = ""c\n# Initialize distributed computing",python,selection_command
+10614,20755412,"sample.py",1453,166,"",python,content
+10615,21302426,"TERMINAL",0,0,"\r[K[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10616,21303396,"sample.py",1893,0,"",python,selection_mouse
+10617,21303402,"sample.py",1892,0,"",python,selection_command
+10618,21307174,"sample.py",1518,0,"",python,selection_mouse
+10619,21307177,"sample.py",1517,0,"",python,selection_command
+10620,21309591,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ bash experiments/sample.sh ",,terminal_output
+10621,21309840,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+10622,21321635,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+10623,21332260,"TERMINAL",0,0,"2025-07-25 17:03:42.356814: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n2025-07-25 17:03:42.356928: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.357123: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 17:03:42.357348: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n\r\nRPC: /tensorflow.CoordinationService/PollForError [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10624,21332488,"TERMINAL",0,0,"2025-07-25 17:03:42.495986: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n2025-07-25 17:03:42.496148: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.496391: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 17:03:42.496638: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n\r\nRPC: /tensorflow.CoordinationService/PollForError [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.500416: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.500555: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.503612: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.503724: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.506003: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.506108: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.517466: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.517568: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.547947: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.548063: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.581745: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.581851: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.586705: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.586814: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10625,21332631,"TERMINAL",0,0,"2025-07-25 17:03:42.722977: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.723132: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.727560: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.727686: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10626,21332702,"TERMINAL",0,0,"2025-07-25 17:03:42.796568: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.796687: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10627,21332962,"TERMINAL",0,0,"2025-07-25 17:03:42.974720: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n2025-07-25 17:03:42.974915: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.975178: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 17:03:42.975428: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted.\r\n\r\nRPC: /tensorflow.CoordinationService/PollForError [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.976267: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.976431: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.978733: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.978899: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.981142: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.981299: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.992648: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:42.992831: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.023245: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.023403: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.057130: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.057306: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.062187: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.062329: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10628,21333102,"TERMINAL",0,0,"2025-07-25 17:03:43.198545: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.198752: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.203176: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.203322: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10629,21333175,"TERMINAL",0,0,"2025-07-25 17:03:43.272239: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:43.272408: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10630,21334167,"TERMINAL",0,0,"2025-07-25 17:03:44.203874: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:44.204049: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 67, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\nRuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memory\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 67, in \r\n rng = jax.random.PRNGKey(args.seed)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 249, in PRNGKey\r\n return _return_prng_keys(True, _key('PRNGKey', seed, impl))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 201, in _key\r\n return prng.random_seed(seed, impl=impl)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/prng.py"", line 551, in random_seed\r\n seeds_arr = jnp.asarray(np.int64(seeds))\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 383, in asarray\r\n return array(a, dtype=dtype, copy=bool(copy), order=order, device=device)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/numpy/array.py"", line 268, in array\r\n out_array: Array = lax._convert_element_type(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 1726, in _convert_element_type\r\n return convert_element_type_p.bind(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 536, in bind\r\n return self._true_bind(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 552, in _true_bind\r\n return self.bind_with_trace(prev_trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/lax/lax.py"", line 4902, in _convert_element_type_bind_with_trace\r\n operand = core.Primitive.bind_with_trace(convert_element_type_p, trace, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 562, in bind_with_trace\r\n return trace.process_primitive(self, args, params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 1066, in process_primitive\r\n return primitive.impl(*args, **params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/dispatch.py"", line 91, in apply_primitive\r\n outs = fun(*args)\r\nRuntimeError: Bad StatusOr access: RESOURCE_EXHAUSTED: : CUDA_ERROR_OUT_OF_MEMORY: out of memory\r\n",,terminal_output
+10631,21334587,"TERMINAL",0,0,"2025-07-25 17:03:44.679590: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:44.679630: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10632,21335434,"TERMINAL",0,0,"2025-07-25 17:03:45.529642: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc:429] Polled an error from coordination service (this can be an error from this or another task).\r\n2025-07-25 17:03:45.529885: F external/xla/xla/pjrt/distributed/client.h:88] Terminating process because the JAX distributed service detected fatal errors. This most likely indicates that another task died; see the other task logs for more details. Disable Python buffering, i.e. `python -u`, to be sure to see all the previous output. absl::Status: UNAVAILABLE: Failed to send RPC to coordination service. Either the leader task was preempted/died/restarted unexpectedly or this task is experiencing network issues. Check earlier logs from 1) this task, 2) the leader (usually slice 0 task 0), and 3) cluster scheduler to debug further.\r\nAdditional GRPC error information from remote target coordination_service while calling /tensorflow.CoordinationService/PollForError:\r\n:{""created"":""@1753455825.529535287"",""description"":""Error received from peer ipv4:10.86.2.30:63040"",""file"":""external/com_github_grpc_grpc/src/core/lib/surface/call.cc"",""file_line"":1056,""grpc_message"":""Connection reset by peer"",""grpc_status"":14}\r\n",,terminal_output
+10633,21337922,"TERMINAL",0,0,"2025-07-25 17:03:48.015838: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:48.015881: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10634,21338421,"TERMINAL",0,0,"2025-07-25 17:03:48.491407: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:48.491646: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10635,21342310,"TERMINAL",0,0,"2025-07-25 17:03:52.333142: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:52.333326: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10636,21342714,"TERMINAL",0,0,"2025-07-25 17:03:52.808965: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:656] /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n2025-07-25 17:03:52.809138: E external/xla/xla/tsl/distributed_runtime/coordination/coordination_service.cc:1839] Use error polling to propagate the following error to all tasks: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect while it is already in error. ResetTask() should be called before a subsequent connect attempt. Existing error: ABORTED: /job:jax_worker/replica:0/task:0 unexpectedly tried to connect with a different incarnation. It has likely restarted. [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker'] [type.googleapis.com/tensorflow.CoordinationServiceError='\""\x0c\n\njax_worker']\r\n",,terminal_output
+10637,21344513,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+10638,21346942,"TERMINAL",0,0,"^Csrun: interrupt (one more within 1 sec to abort)\r\nsrun: StepId=13888.2 task 0: running\r\n",,terminal_output
+10639,21347045,"TERMINAL",0,0,"^Csrun: sending Ctrl-C to StepId=13888.2\r\nsrun: forcing job termination\r\nsrun: Job step aborted: Waiting up to 32 seconds for job step to finish.\r\n[2025-07-25T17:03:57.146] error: *** STEP 13888.2 ON hai003 CANCELLED AT 2025-07-25T17:03:57 DUE to SIGNAL Killed ***\r\n",,terminal_output
+10640,21347219,"TERMINAL",0,0,"^Csrun: sending Ctrl-C to StepId=13888.2\r\nsrun: job abort in progress\r\n",,terminal_output
+10641,21347660,"TERMINAL",0,0,"]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10642,21348298,"TERMINAL",0,0,"nv",,terminal_output
+10643,21348425,"TERMINAL",0,0,"i",,terminal_output
+10644,21348518,"TERMINAL",0,0,"d",,terminal_output
+10645,21348708,"TERMINAL",0,0,"ia-",,terminal_output
+10646,21348821,"TERMINAL",0,0,"s",,terminal_output
+10647,21348927,"TERMINAL",0,0,"mi",,terminal_output
+10648,21349233,"TERMINAL",0,0," \r\n[?2004l\rFri Jul 25 17:03:59 2025 \r\n+-----------------------------------------------------------------------------------------+\r\n| NVIDIA-SMI 570.124.06 Driver Version: 570.124.06 CUDA Version: 12.8 |\r\n|-----------------------------------------+------------------------+----------------------+\r\n| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\r\n| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\r\n| | | MIG M. |\r\n|=========================================+========================+======================|\r\n| 0 NVIDIA H100 80GB HBM3 On | 00000000:19:00.0 Off | 0 |\r\n| N/A 41C P0 129W / 700W | 1MiB / 81559MiB | 0% Default |\r\n| | | Disabled |\r\n+-----------------------------------------+------------------------+----------------------+\r\n \r\n+-----------------------------------------------------------------------------------------+\r\n| Processes: |\r\n| GPU GI CI PID Type Process name GPU Memory |\r\n| ID ID Usage |\r\n|=========================================================================================|\r\n| No running processes found |\r\n+-----------------------------------------------------------------------------------------+\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10649,21351224,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10650,21352244,"TERMINAL",0,0,"\r(reverse-i-search)`': [K",,terminal_output
+10651,21352379,"TERMINAL",0,0,"[28@b': [7mb[27mash experiments/sample.sh\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C",,terminal_output
+10652,21352462,"TERMINAL",0,0,"s': sacctmgr show qos format=name,priority,maxtresperuser,grptres,maxjobs,maxsubmitjo[7mbs[27m",,terminal_output
+10653,21352519,"TERMINAL",0,0,"\r[Cfailed reverse-i-search)`bsa': sacctmgr show qos format=name,priority,maxtresperuser,grptres,maxjobs,maxsubmitjobs",,terminal_output
+10654,21353236,"TERMINAL",0,0,"\r[Creverse-i-search)`bs': sacctmgr show qos format=name,priority,maxtresperuser,grptres,maxjobs,maxsubmitjo[7mbs[27m,maxtime",,terminal_output
+10655,21353332,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[1P': sacctmgr show qos format=name,priority,maxtresperuser,grptres,maxjobs,maxsubmitjo[7mb[27ms,maxtime",,terminal_output
+10656,21353848,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Ca': . ""/fast/home/franz.srambical/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-[7mba[27msh.sh""\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cs': . ""/fast/home/franz.srambical/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-[7mbas[27mh.sh""",,terminal_output
+10657,21354809,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Ch': . ""/fast/home/franz.srambical/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-[7mbash[27m.sh""",,terminal_output
+10658,21355086,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[7mbash[27m experiments/tokenizer_grain_checkpointing.sh [K\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C",,terminal_output
+10659,21355417,"TERMINAL",0,0,"\r[24@[franz.srambical@hai003.haicore.berlin:~/jafar] $ bashexit[K",,terminal_output
+10660,21355857,"TERMINAL",0,0,"scontrol show job 13211. ""/fast/home/franz.srambical/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh""\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Csqueue -u $USER[Kacctmgr show qos format=name,maxtresperuserqueue[K",,terminal_output
+10661,21355918,"TERMINAL",0,0,"acctmgr show user franz.srambical format=qos,defaultqos,cluster,account",,terminal_output
+10662,21356467,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C [K",,terminal_output
+10663,21356738,"TERMINAL",0,0,"\r(reverse-i-search)`': [K",,terminal_output
+10664,21357100,"TERMINAL",0,0,"b': sacctmgr show user franz.sram[7mb[27mical format=qos,defaultqos,cluster,account",,terminal_output
+10665,21357188,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Ca': . ""/fast/home/franz.srambical/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-[7mba[27msh.sh""\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cs': . ""/fast/home/franz.srambical/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-[7mbas[27mh.sh""",,terminal_output
+10666,21357269,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Ch': . ""/fast/home/franz.srambical/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-[7mbash[27m.sh""",,terminal_output
+10667,21357778,"TERMINAL",0,0,"\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[7mbash[27m experiments/tokenizer_grain_checkpointing.sh [K\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C",,terminal_output
+10668,21358568,"TERMINAL",0,0,"\r[24@[franz.srambical@hai003.haicore.berlin:~/jafar] $ bash[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C",,terminal_output
+10669,21359420,"TERMINAL",0,0,"\r(reverse-i-search)`': bash experiments/tokenizer_grain_checkpointing.sh [K",,terminal_output
+10670,21360056,"TERMINAL",0,0,"\r[28@[franz.srambical@hai003.haicore.berlin:~/jafar] $[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C",,terminal_output
+10671,21360663,"TERMINAL",0,0,"[K",,terminal_output
+10672,21361103,"TERMINAL",0,0,"[K[K[K[K[K[K[K[K",,terminal_output
+10673,21361295,"TERMINAL",0,0,"[K[K[K[K[K[K",,terminal_output
+10674,21361627,"TERMINAL",0,0,"[K[K[K[K[K[K[K[K[K[K",,terminal_output
+10675,21361723,"TERMINAL",0,0,"[K[K[K[K",,terminal_output
+10676,21361904,"TERMINAL",0,0,"[K",,terminal_output
+10677,21361989,"TERMINAL",0,0,"[K",,terminal_output
+10678,21362342,"TERMINAL",0,0,"[K[K",,terminal_output
+10679,21362543,"TERMINAL",0,0,"dy",,terminal_output
+10680,21362676,"TERMINAL",0,0,"n",,terminal_output
+10681,21362763,"TERMINAL",0,0,"amics_grain_",,terminal_output
+10682,21363200,"TERMINAL",0,0,"g",,terminal_output
+10683,21363508,"TERMINAL",0,0,"[K",,terminal_output
+10684,21363635,"TERMINAL",0,0,"t",,terminal_output
+10685,21363915,"TERMINAL",0,0,"ok_",,terminal_output
+10686,21364132,"TERMINAL",0,0,"r",,terminal_output
+10687,21364306,"TERMINAL",0,0,"e",,terminal_output
+10688,21364439,"TERMINAL",0,0,"store.sh ",,terminal_output
+10689,21364666,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+10690,21369160,"TERMINAL",0,0,"Running on 1 devices.\r\n",,terminal_output
+10691,21369884,"sample.py",1519,0,"",python,selection_command
+10692,21370208,"sample.py",1550,0,"",python,selection_command
+10693,21370209,"sample.py",1571,0,"",python,selection_command
+10694,21370209,"sample.py",1586,0,"",python,selection_command
+10695,21370362,"sample.py",1602,0,"",python,selection_command
+10696,21370546,"sample.py",1634,0,"",python,selection_command
+10697,21370797,"sample.py",1670,0,"",python,selection_command
+10698,21370821,"sample.py",1708,0,"",python,selection_command
+10699,21370856,"sample.py",1754,0,"",python,selection_command
+10700,21370888,"sample.py",1798,0,"",python,selection_command
+10701,21370916,"sample.py",1840,0,"",python,selection_command
+10702,21370951,"sample.py",1876,0,"",python,selection_command
+10703,21371112,"sample.py",1840,0,"",python,selection_command
+10704,21371360,"sample.py",1798,0,"",python,selection_command
+10705,21371388,"sample.py",1754,0,"",python,selection_command
+10706,21371420,"sample.py",1708,0,"",python,selection_command
+10707,21371454,"sample.py",1670,0,"",python,selection_command
+10708,21371487,"sample.py",1634,0,"",python,selection_command
+10709,21371591,"sample.py",1602,0,"",python,selection_command
+10710,21371592,"sample.py",1586,0,"",python,selection_command
+10711,21371592,"sample.py",1571,0,"",python,selection_command
+10712,21371781,"sample.py",1550,0,"",python,selection_command
+10713,21373723,"sample.py",1571,0,"",python,selection_command
+10714,21374064,"sample.py",2064,0,"",python,selection_command
+10715,21374505,"sample.py",2534,0,"",python,selection_command
+10716,21374739,"sample.py",3028,0,"",python,selection_command
+10717,21374993,"sample.py",3482,0,"",python,selection_command
+10718,21375172,"sample.py",3964,0,"",python,selection_command
+10719,21375332,"sample.py",4433,0,"",python,selection_command
+10720,21375398,"TERMINAL",0,0,"Counting all components: ['dynamics', 'lam', 'tokenizer']\r\nParameter counts:\r\n{'dynamics': 26555904, 'lam': 35115232, 'tokenizer': 33750256, 'total': 95421392}\r\n",,terminal_output
+10721,21375582,"sample.py",4817,0,"",python,selection_command
+10722,21375606,"sample.py",5464,0,"",python,selection_command
+10723,21375638,"sample.py",6131,0,"",python,selection_command
+10724,21375669,"sample.py",6356,0,"",python,selection_command
+10725,21377789,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+10726,21380074,"sample.py",0,0,"",python,tab
+10727,21380077,"sample.py",1452,0,"",python,selection_command
+10728,21384785,"sample.py",4810,0,"",python,selection_mouse
+10729,21384956,"sample.py",4810,1,"1",python,content
+10730,21385495,"TERMINAL",0,0,"Restored dataloader and model state from step 370\r\nStarting training from step 370...\r\n",,terminal_output
+10731,21388861,"TERMINAL",0,0,"^CTraceback (most recent call last):\r\n File """", line 1, in \r\nTraceback (most recent call last):\r\n File """", line 1, in \r\nTraceback (most recent call last):\r\n File """", line 1, in \r\nTraceback (most recent call last):\r\n File """", line 1, in \r\nTraceback (most recent call last):\r\n File """", line 1, in \r\nTraceback (most recent call last):\r\n File """", line 1, in \r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 116, in spawn_main\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n main_content = runpy.run_path(main_path,\r\n exitcode = _main(fd, parent_sentinel)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 125, in _main\r\n prepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n prepare(preparation_data) \r\n_fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n _fixup_main_from_path(data['init_main_from_path']) \r\nprepare(preparation_data)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 236, in prepare\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 8, in \r\n main_content = runpy.run_path(main_path,main_content = runpy.run_path(main_path,\r\n\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n _fixup_main_from_path(data['init_main_from_path'])\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/spawn.py"", line 287, in _fixup_main_from_path\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n import orbax.checkpoint as ocp\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/__init__.py"", line 22, in \r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n return _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n main_content = runpy.run_path(main_path,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 289, in run_path\r\n _run_code(code, mod_globals, init_globals,return _run_module_code(code, init_globals, run_name,\r\n\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\nreturn _run_module_code(code, init_globals, run_name,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n from orbax.checkpoint.experimental import v1\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/__init__.py"", line 25, in \r\n exec(code, run_globals)\r\n _run_code(code, mod_globals, init_globals, File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 8, in \r\n\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n exec(code, run_globals)from orbax.checkpoint.experimental.v1 import training\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 8, in \r\n\r\n return _run_module_code(code, init_globals, run_name, File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/training.py"", line 19, in \r\n\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 96, in _run_module_code\r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n import orbax.checkpoint as ocp\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/__init__.py"", line 22, in \r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 8, in \r\n import orbax.checkpoint as ocp\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/__init__.py"", line 22, in \r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 8, in \r\n _run_code(code, mod_globals, init_globals,\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/runpy.py"", line 86, in _run_code\r\n from orbax.checkpoint.experimental.v1._src.training.checkpointer import (\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/_src/training/checkpointer.py"", line 23, in \r\n from orbax.checkpoint.experimental import v1\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/__init__.py"", line 25, in \r\n import orbax.checkpoint as ocp\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/__init__.py"", line 22, in \r\n from orbax.checkpoint.experimental import v1\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/__init__.py"", line 25, in \r\n import orbax.checkpoint as ocp\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/__init__.py"", line 22, in \r\n exec(code, run_globals)\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 8, in \r\n from orbax.checkpoint.experimental.v1 import training\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/training.py"", line 19, in \r\n from orbax.checkpoint.experimental import v1\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/__init__.py"", line 25, in \r\n from orbax.checkpoint import checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py"", line 32, in \r\n from orbax.checkpoint.experimental.v1 import training\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/training.py"", line 19, in \r\n import orbax.checkpoint as ocp\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/__init__.py"", line 22, in \r\n from orbax.checkpoint.experimental import v1\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/__init__.py"", line 25, in \r\n from orbax.checkpoint.experimental.v1._src.training.checkpointer import (\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/_src/training/checkpointer.py"", line 23, in \r\n from orbax.checkpoint.experimental.v1 import training\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/training.py"", line 19, in \r\n from orbax.checkpoint.experimental.v1._src.training.checkpointer import (\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/_src/training/checkpointer.py"", line 23, in \r\n from orbax.checkpoint import abstract_checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/abstract_checkpoint_manager.py"", line 21, in \r\n from orbax.checkpoint.experimental.v1 import training\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/training.py"", line 19, in \r\n from orbax.checkpoint.experimental import v1\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/__init__.py"", line 25, in \r\n from orbax.checkpoint import checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py"", line 32, in \r\n from orbax.checkpoint.experimental.v1._src.training.checkpointer import (\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/_src/training/checkpointer.py"", line 23, in \r\n from orbax.checkpoint import checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py"", line 32, in \r\n from orbax.checkpoint.experimental.v1._src.training.checkpointer import (\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/_src/training/checkpointer.py"", line 23, in \r\n from orbax.checkpoint.experimental.v1 import training\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/training.py"", line 19, in \r\n from orbax.checkpoint import abstract_checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/abstract_checkpoint_manager.py"", line 21, in \r\n from orbax.checkpoint import args as args_lib\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/args.py"", line 36, in \r\n from orbax.checkpoint import checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py"", line 32, in \r\n from orbax.checkpoint import abstract_checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/abstract_checkpoint_manager.py"", line 21, in \r\n from orbax.checkpoint import checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py"", line 32, in \r\n from orbax.checkpoint.experimental.v1._src.training.checkpointer import (\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/experimental/v1/_src/training/checkpointer.py"", line 23, in \r\n from orbax.checkpoint import args as args_lib\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/args.py"", line 29, in \r\n from orbax.checkpoint._src.handlers.pytree_checkpoint_handler import PyTreeRestoreArgs as PyTreeRestore\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/handlers/pytree_checkpoint_handler.py"", line 38, in \r\n from orbax.checkpoint import abstract_checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/abstract_checkpoint_manager.py"", line 21, in \r\n from orbax.checkpoint import args as args_lib\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/args.py"", line 31, in \r\n from orbax.checkpoint import abstract_checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/abstract_checkpoint_manager.py"", line 21, in \r\n from orbax.checkpoint import checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/checkpoint_manager.py"", line 32, in \r\n from orbax.checkpoint._src.handlers.array_checkpoint_handler import ArrayRestoreArgs as ArrayRestore\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/handlers/array_checkpoint_handler.py"", line 25, in \r\n from orbax.checkpoint import transform_utils\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/transform_utils.py"", line 113, in \r\n from orbax.checkpoint import args as args_lib\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/args.py"", line 36, in \r\n from orbax.checkpoint._src.handlers.composite_checkpoint_handler import CompositeArgs as Composite\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/handlers/composite_checkpoint_handler.py"", line 71, in \r\n from orbax.checkpoint import args as args_lib\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/args.py"", line 40, in \r\n from orbax.checkpoint import abstract_checkpoint_manager\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/abstract_checkpoint_manager.py"", line 21, in \r\n from orbax.checkpoint._src.handlers.pytree_checkpoint_handler import PyTreeRestoreArgs as PyTreeRestore\r\n File """", line 1027, in _find_and_load\r\n from orbax.checkpoint import aggregate_handlers\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/aggregate_handlers.py"", line 22, in \r\n from orbax.checkpoint._src.path import atomicity\r\n File """", line 1027, in _find_and_load\r\n class RestoreTransform(Transform):\r\nKeyboardInterrupt\r\n from orbax.checkpoint._src.handlers.random_key_checkpoint_handler import JaxRandomKeySaveArgs as JaxRandomKeySave\r\n File """", line 1027, in _find_and_load\r\n from orbax.checkpoint import args as args_lib\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/args.py"", line 38, in \r\n from orbax.checkpoint import msgpack_utils\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/msgpack_utils.py"", line 20, in \r\n from orbax.checkpoint._src.handlers.standard_checkpoint_handler import StandardRestoreArgs as StandardRestore\r\n File """", line 1027, in _find_and_load\r\n File """", line 1006, in _find_and_load_unlocked\r\n File """", line 1006, in _find_and_load_unlocked\r\n File """", line 1002, in _find_and_load_unlocked\r\n import msgpack\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/msgpack/__init__.py"", line 15, in \r\n File """", line 688, in _load_unlocked\r\n File """", line 688, in _load_unlocked\r\n from ._cmsgpack import Packer, Unpacker, unpackb\r\nKeyboardInterrupt\r\n File """", line 1002, in _find_and_load_unlocked\r\n File """", line 879, in exec_module\r\n File """", line 879, in exec_module\r\n File """", line 945, in _find_spec\r\n File """", line 975, in get_code\r\n File """", line 945, in _find_spec\r\n File """", line 975, in get_code\r\n File """", line 1439, in find_spec\r\n File """", line 1074, in get_data\r\n File """", line 1439, in find_spec\r\n File """", line 1074, in get_data\r\n File """", line 1411, in _get_spec\r\nKeyboardInterrupt\r\nKeyboardInterrupt\r\n File """", line 1411, in _get_spec\r\n File """", line 1577, in find_spec\r\n File """", line 1577, in find_spec\r\n File """", line 161, in _path_isfile\r\n File """", line 161, in _path_isfile\r\n File """", line 153, in _path_is_mode_type\r\n File """", line 153, in _path_is_mode_type\r\n File """", line 147, in _path_stat\r\n File """", line 147, in _path_stat\r\nKeyboardInterrupt\r\nKeyboardInterrupt\r\n",,terminal_output
+10732,21388999,"TERMINAL",0,0,"^CTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/data_loader.py"", line 380, in _iterator_with_context\r\n yield from it\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 780, in __next__\r\n element = multiprocessing_common.get_element_from_queue(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/multiprocessing_common.py"", line 68, in get_element_from_queue\r\n return elements_queue.get(timeout=_QUEUE_WAIT_TIMEOUT_SECONDS)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/queue.py"", line 180, in get\r\n self.not_empty.wait(remaining)\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/threading.py"", line 324, in wait\r\n gotit = waiter.acquire(True, timeout)\r\nKeyboardInterrupt\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 336, in \r\n for videos in dataloader:\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 333, in \r\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/data_loader.py"", line 479, in __next__\r\n result_record = next(self._iterator)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/data_loader.py"", line 379, in _iterator_with_context\r\n with iterator as it:\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 752, in __exit__\r\n self.stop_prefetch()\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/grain_pool.py"", line 739, in stop_prefetch\r\n self._reader_thread.join()\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/threading.py"", line 1096, in join\r\n self._wait_for_tstate_lock()\r\n File ""/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/threading.py"", line 1116, in _wait_for_tstate_lock\r\n if lock.acquire(block, timeout):\r\nKeyboardInterrupt\r\n",,terminal_output
+10733,21389168,"TERMINAL",0,0,"^C",,terminal_output
+10734,21389319,"TERMINAL",0,0,"^C",,terminal_output
+10735,21389533,"TERMINAL",0,0,"^C\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10736,21391656,"sample.py",0,0,"",python,tab
+10737,21391656,"sample.py",56,0,"",python,selection_command
+10738,21416520,"sample.py",0,0,"",python,tab
+10739,21416522,"sample.py",1452,0,"",python,selection_command
+10740,21422367,"train_dynamics.py",0,0,"",python,tab
+10741,21423061,"train_dynamics.py",0,0,"",python,selection_command
+10742,21423458,"train_dynamics.py",710,0,"",python,selection_command
+10743,21423879,"train_dynamics.py",1598,0,"",python,selection_command
+10744,21425250,"train_dynamics.py",0,0,"",python,selection_command
+10745,21425865,"sample.py",0,0,"",python,tab
+10746,21429521,"train_dynamics.py",0,0,"",python,tab
+10747,21430195,"train_dynamics.py",710,0,"",python,selection_command
+10748,21430591,"train_dynamics.py",1598,0,"",python,selection_command
+10749,21431504,"train_dynamics.py",1626,0,"",python,selection_command
+10750,21431746,"train_dynamics.py",1653,0,"",python,selection_command
+10751,21431782,"train_dynamics.py",1682,0,"",python,selection_command
+10752,21431809,"train_dynamics.py",1697,0,"",python,selection_command
+10753,21431847,"train_dynamics.py",1721,0,"",python,selection_command
+10754,21431883,"train_dynamics.py",1750,0,"",python,selection_command
+10755,21432127,"train_dynamics.py",2583,0,"",python,selection_command
+10756,21432624,"train_dynamics.py",4060,0,"",python,selection_command
+10757,21434438,"train_dynamics.py",4115,0,"",python,selection_command
+10758,21434678,"train_dynamics.py",4125,0,"",python,selection_command
+10759,21434708,"train_dynamics.py",4165,0,"",python,selection_command
+10760,21435655,"sample.py",0,0,"",python,tab
+10761,21436681,"sample.py",1453,0,"",python,selection_command
+10762,21436843,"sample.py",1482,0,"",python,selection_command
+10763,21437408,"sample.py",1453,0,"",python,selection_command
+10764,21438252,"sample.py",1482,0,"",python,selection_command
+10765,21439340,"sample.py",1453,0,"",python,selection_command
+10766,21442433,"sample.py",1452,0,"\n",python,content
+10767,21442771,"sample.py",1453,0,"i",python,content
+10768,21442771,"sample.py",1454,0,"",python,selection_keyboard
+10769,21442829,"sample.py",1454,0,"f",python,content
+10770,21442829,"sample.py",1455,0,"",python,selection_keyboard
+10771,21442960,"sample.py",1455,0," ",python,content
+10772,21442961,"sample.py",1456,0,"",python,selection_keyboard
+10773,21444342,"sample.py",1456,0,"_",python,content
+10774,21444343,"sample.py",1457,0,"",python,selection_keyboard
+10775,21444426,"sample.py",1457,0,"_",python,content
+10776,21444426,"sample.py",1458,0,"",python,selection_keyboard
+10777,21445256,"sample.py",1459,0," ",python,content
+10778,21445256,"sample.py",1458,0,"name__ == ""__main__"":",python,content
+10779,21445578,"sample.py",1478,0,"",python,selection_command
+10780,21445941,"sample.py",1505,0,"",python,selection_command
+10781,21447041,"sample.py",1513,0,"",python,selection_command
+10782,21448247,"sample.py",1539,0,"",python,selection_command
+10783,21448864,"sample.py",1514,35,"rng = jax.random.PRNGKey(args.seed)",python,selection_command
+10784,21449248,"sample.py",1514,4873,"rng = jax.random.PRNGKey(args.seed)\n\n# --- Load Genie checkpoint ---\nrngs = nnx.Rngs(rng)\ngenie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n)\n\nhandler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n)\nhandler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n)\ncheckpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n)\ncheckpoint_manager = ocp.CheckpointManager(\n args.checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n)\n\ndummy_tx = optax.adamw(\n learning_rate=optax.linear_schedule(0.0001, 0.0001, 10000),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\ndummy_optimizer = nnx.Optimizer(genie, dummy_tx)\n\nabstract_optimizer = nnx.eval_shape(lambda: dummy_optimizer)\nabstract_optimizer_state = nnx.state(abstract_optimizer)\nrestored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n ),\n )\nrestored_optimizer_state = restored[""model_state""]\nnnx.update(dummy_optimizer, restored_optimizer_state)\n\n# --- Define sampling function ---\n@nnx.jit\ndef _sampling_fn(model, batch):\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n """"""Convenience wrapper that prepares inputs and invokes the jitted sampling fn.""""""\n vid = video_batch[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = _sampling_fn(genie, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n)\nvideo_batch = next(iter(dataloader))\n# Get latent actions for all videos in the batch\nbatch = dict(videos=video_batch)\naction_batch = genie.vq_encode(batch, training=False) # type: ignore[arg-type]\naction_batch = jnp.asarray(action_batch).reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n# --- Sample + evaluate video ---\nvid = _autoreg_sample(rng, video_batch, action_batch)\ngt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\nrecon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\nssim = jnp.mean(pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]))\nprint(f""SSIM: {ssim}"")\n\n# --- Construct video ---\ntrue_videos = (video_batch * 255).astype(np.uint8)\npred_videos = (vid * 255).astype(np.uint8)\nvideo_comparison = np.zeros((2, *vid.shape), dtype=np.uint8)\nvideo_comparison[0] = true_videos[:, : args.seq_len]\nvideo_comparison[1] = pred_videos\nframes = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n# --- Save video ---\nimgs = [Image.fromarray(img) for img in frames]\n# Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\nfor t, img in enumerate(imgs[1:]):\n d = ImageDraw.Draw(img)\n for row in range(action_batch.shape[0]):\n action = action_batch[row, t, 0]\n y_offset = row * video_batch.shape[2] + 2\n d.text((2, y_offset), f""{action}"", fill=255)\nimgs[0].save(\n f""generation_{time.time()}.gif"",\n save_all=True,\n append_images=imgs[1:],\n duration=250,\n loop=0,\n)\n",python,selection_command
+10785,21449816,"sample.py",6385,0," ",python,content
+10786,21449816,"sample.py",6373,4," ",python,content
+10787,21449816,"sample.py",6355,4," ",python,content
+10788,21449816,"sample.py",6327,4," ",python,content
+10789,21449816,"sample.py",6308,4," ",python,content
+10790,21449816,"sample.py",6271,4," ",python,content
+10791,21449816,"sample.py",6257,0," ",python,content
+10792,21449816,"sample.py",6204,8," ",python,content
+10793,21449816,"sample.py",6154,8," ",python,content
+10794,21449816,"sample.py",6113,8," ",python,content
+10795,21449816,"sample.py",6068,4," ",python,content
+10796,21449816,"sample.py",6040,4," ",python,content
+10797,21449816,"sample.py",6005,0," ",python,content
+10798,21449816,"sample.py",5911,0," ",python,content
+10799,21449816,"sample.py",5863,0," ",python,content
+10800,21449816,"sample.py",5842,0," ",python,content
+10801,21449816,"sample.py",5763,0," ",python,content
+10802,21449816,"sample.py",5729,0," ",python,content
+10803,21449816,"sample.py",5676,0," ",python,content
+10804,21449816,"sample.py",5615,0," ",python,content
+10805,21449816,"sample.py",5572,0," ",python,content
+10806,21449816,"sample.py",5521,0," ",python,content
+10807,21449816,"sample.py",5495,0," ",python,content
+10808,21449816,"sample.py",5471,0," ",python,content
+10809,21449816,"sample.py",5380,0," ",python,content
+10810,21449816,"sample.py",5329,0," ",python,content
+10811,21449816,"sample.py",5246,0," ",python,content
+10812,21449816,"sample.py",5192,0," ",python,content
+10813,21449816,"sample.py",5158,0," ",python,content
+10814,21449816,"sample.py",5065,0," ",python,content
+10815,21449816,"sample.py",4985,0," ",python,content
+10816,21449816,"sample.py",4952,0," ",python,content
+10817,21449816,"sample.py",4903,0," ",python,content
+10818,21449816,"sample.py",4866,0," ",python,content
+10819,21449816,"sample.py",4864,0," ",python,content
+10820,21449816,"sample.py",4844,4," ",python,content
+10821,21449816,"sample.py",4816,4," ",python,content
+10822,21449816,"sample.py",4797,4," ",python,content
+10823,21449816,"sample.py",4772,4," ",python,content
+10824,21449816,"sample.py",4750,4," ",python,content
+10825,21449816,"sample.py",4727,4," ",python,content
+10826,21449816,"sample.py",4706,4," ",python,content
+10827,21449816,"sample.py",4688,4," ",python,content
+10828,21449816,"sample.py",4664,4," ",python,content
+10829,21449816,"sample.py",4635,0," ",python,content
+10830,21449817,"sample.py",4633,0," ",python,content
+10831,21449817,"sample.py",4598,4," ",python,content
+10832,21449817,"sample.py",4559,4," ",python,content
+10833,21449817,"sample.py",4524,4," ",python,content
+10834,21449817,"sample.py",4501,0," ",python,content
+10835,21449817,"sample.py",4464,0," ",python,content
+10836,21449817,"sample.py",4437,4," ",python,content
+10837,21449817,"sample.py",4390,4," ",python,content
+10838,21449817,"sample.py",4322,4," ",python,content
+10839,21449817,"sample.py",4284,4," ",python,content
+10840,21449817,"sample.py",4235,4," ",python,content
+10841,21449817,"sample.py",4148,4," ",python,content
+10842,21449817,"sample.py",4095,0," ",python,content
+10843,21449817,"sample.py",4049,0," ",python,content
+10844,21449817,"sample.py",4041,4," ",python,content
+10845,21449817,"sample.py",4013,8," ",python,content
+10846,21449817,"sample.py",3987,8," ",python,content
+10847,21449817,"sample.py",3959,8," ",python,content
+10848,21449817,"sample.py",3937,8," ",python,content
+10849,21449817,"sample.py",3922,8," ",python,content
+10850,21449817,"sample.py",3897,4," ",python,content
+10851,21449817,"sample.py",3823,4," ",python,content
+10852,21449817,"sample.py",3791,0," ",python,content
+10853,21449817,"sample.py",3782,0," ",python,content
+10854,21449817,"sample.py",3747,0," ",python,content
+10855,21449817,"sample.py",3692,0," ",python,content
+10856,21449817,"sample.py",3641,0," ",python,content
+10857,21449817,"sample.py",3631,8," ",python,content
+10858,21449817,"sample.py",3616,12," ",python,content
+10859,21449817,"sample.py",3538,16," ",python,content
+10860,21449817,"sample.py",3501,12," ",python,content
+10861,21449817,"sample.py",3455,12," ",python,content
+10862,21449817,"sample.py",3416,0," ",python,content
+10863,21449817,"sample.py",3359,0," ",python,content
+10864,21449817,"sample.py",3298,0," ",python,content
+10865,21449817,"sample.py",3248,0," ",python,content
+10866,21449817,"sample.py",3242,4," ",python,content
+10867,21449817,"sample.py",3213,8," ",python,content
+10868,21449817,"sample.py",3186,8," ",python,content
+10869,21449817,"sample.py",3170,8," ",python,content
+10870,21449817,"sample.py",3154,8," ",python,content
+10871,21449817,"sample.py",3086,8," ",python,content
+10872,21449817,"sample.py",3062,0," ",python,content
+10873,21449817,"sample.py",3059,0," ",python,content
+10874,21449817,"sample.py",3020,4," ",python,content
+10875,21449817,"sample.py",2988,4," ",python,content
+10876,21449817,"sample.py",2967,4," ",python,content
+10877,21449817,"sample.py",2923,0," ",python,content
+10878,21449817,"sample.py",2921,0," ",python,content
+10879,21449817,"sample.py",2889,4," ",python,content
+10880,21449817,"sample.py",2838,0," ",python,content
+10881,21449817,"sample.py",2836,0," ",python,content
+10882,21449817,"sample.py",2756,4," ",python,content
+10883,21449817,"sample.py",2734,0," ",python,content
+10884,21449817,"sample.py",2732,0," ",python,content
+10885,21449817,"sample.py",2655,4," ",python,content
+10886,21449817,"sample.py",2633,0," ",python,content
+10887,21449817,"sample.py",2566,0," ",python,content
+10888,21449817,"sample.py",2563,0," ",python,content
+10889,21449817,"sample.py",2548,4," ",python,content
+10890,21449817,"sample.py",2498,4," ",python,content
+10891,21449817,"sample.py",2476,4," ",python,content
+10892,21449817,"sample.py",2442,4," ",python,content
+10893,21449817,"sample.py",2402,4," ",python,content
+10894,21449817,"sample.py",2360,4," ",python,content
+10895,21449817,"sample.py",2324,4," ",python,content
+10896,21449817,"sample.py",2296,4," ",python,content
+10897,21449817,"sample.py",2281,4," ",python,content
+10898,21449817,"sample.py",2257,4," ",python,content
+10899,21449817,"sample.py",2219,4," ",python,content
+10900,21449817,"sample.py",2179,4," ",python,content
+10901,21449817,"sample.py",2139,4," ",python,content
+10902,21449817,"sample.py",2091,4," ",python,content
+10903,21449817,"sample.py",2045,4," ",python,content
+10904,21449817,"sample.py",2011,4," ",python,content
+10905,21449817,"sample.py",1985,4," ",python,content
+10906,21449817,"sample.py",1975,4," ",python,content
+10907,21449817,"sample.py",1925,4," ",python,content
+10908,21449817,"sample.py",1873,4," ",python,content
+10909,21449817,"sample.py",1841,4," ",python,content
+10910,21449817,"sample.py",1795,4," ",python,content
+10911,21449817,"sample.py",1751,4," ",python,content
+10912,21449817,"sample.py",1705,4," ",python,content
+10913,21449817,"sample.py",1667,4," ",python,content
+10914,21449817,"sample.py",1635,4," ",python,content
+10915,21449817,"sample.py",1619,4," ",python,content
+10916,21449817,"sample.py",1604,0," ",python,content
+10917,21449817,"sample.py",1583,0," ",python,content
+10918,21449817,"sample.py",1551,0," ",python,content
+10919,21449817,"sample.py",1514,0," ",python,content
+10920,21449826,"sample.py",1518,0,"",python,selection_command
+10921,21453253,"train_dynamics.py",0,0,"",python,tab
+10922,21455230,"sample.py",0,0,"",python,tab
+10923,21455539,"sample.py",6927,0,"",python,selection_command
+10924,21455927,"sample.py",6497,0,"",python,selection_command
+10925,21456064,"sample.py",5769,0,"",python,selection_command
+10926,21456689,"sample.py",5138,0,"",python,selection_command
+10927,21456996,"sample.py",4726,0,"",python,selection_command
+10928,21457446,"sample.py",4181,0,"",python,selection_command
+10929,21457780,"sample.py",3522,0,"",python,selection_command
+10930,21458291,"sample.py",3095,0,"",python,selection_command
+10931,21458601,"sample.py",2596,0,"",python,selection_command
+10932,21459018,"sample.py",2035,0,"",python,selection_command
+10933,21459922,"sample.py",1620,0,"",python,selection_keyboard
+10934,21460261,"sample.py",1595,0,"",python,selection_command
+10935,21460592,"sample.py",1559,0,"",python,selection_command
+10936,21460592,"sample.py",1554,0,"",python,selection_command
+10937,21460673,"sample.py",1518,0,"",python,selection_command
+10938,21460833,"sample.py",1513,0,"",python,selection_command
+10939,21463469,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10940,21463737,"TERMINAL",0,0,"bash experiments/dynamics_grain_tok_restore.sh ",,terminal_output
+10941,21464013,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+10942,21468704,"TERMINAL",0,0,"Running on 1 devices.\r\n",,terminal_output
+10943,21471454,"TERMINAL",0,0,"^C",,terminal_output
+10944,21471792,"TERMINAL",0,0,"^CTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/compiler.py"", line 385, in backend_compile_and_load\r\n return backend.compile_and_load(\r\njaxlib._jax.XlaRuntimeError: INTERNAL: ptxas exited with non-zero error code 2, output: \r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 168, in \r\n genie = Genie(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__\r\n return _graph_node_meta_call(cls, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call\r\n cls._object_meta_construct(node, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct\r\n self.__init__(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 78, in __init__\r\n self.tokenizer = TokenizerVQVAE(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__\r\n return _graph_node_meta_call(cls, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call\r\n cls._object_meta_construct(node, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct\r\n self.__init__(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/models/tokenizer.py"", line 44, in __init__\r\n self.encoder = STTransformer(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__\r\n return _graph_node_meta_call(cls, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call\r\n cls._object_meta_construct(node, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct\r\n self.__init__(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/utils/nn.py"", line 203, in __init__\r\n self.output_dense = nnx.Linear(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 143, in __call__\r\n return _graph_node_meta_call(cls, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 152, in _graph_node_meta_call\r\n cls._object_meta_construct(node, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/object.py"", line 146, in _object_meta_construct\r\n self.__init__(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/nn/linear.py"", line 352, in __init__\r\n kernel_init(kernel_key, (in_features, out_features), param_dtype)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/nn/initializers.py"", line 347, in init\r\n return random.truncated_normal(key, -2, 2, shape, dtype,\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/random.py"", line 900, in truncated_normal\r\n return maybe_auto_axes(_truncated_normal, out_sharding,\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/traceback_util.py"", line 182, in reraise_with_filtered_traceback\r\n return fun(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/pjit.py"", line 292, in cache_miss\r\n executable, pgle_profiler) = _python_pjit_helper(fun, jit_info, *args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/pjit.py"", line 153, in _python_pjit_helper\r\n out_flat, compiled, profiler = _pjit_call_impl_python(*args_flat, **p.params)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/pjit.py"", line 1855, in _pjit_call_impl_python\r\n ).compile()\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/interpreters/pxla.py"", line 2410, in compile\r\n executable = UnloadedMeshExecutable.from_hlo(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/interpreters/pxla.py"", line 2952, in from_hlo\r\n xla_executable = _cached_compilation(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/interpreters/pxla.py"", line 2743, in _cached_compilation\r\n xla_executable = compiler.compile_or_get_cached(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/compiler.py"", line 500, in compile_or_get_cached\r\n return _compile_and_write_cache(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/compiler.py"", line 768, in _compile_and_write_cache\r\n executable = backend_compile_and_load(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/profiler.py"", line 354, in wrapper\r\n return func(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/compiler.py"", line 385, in backend_compile_and_load\r\n return backend.compile_and_load(\r\nKeyboardInterrupt\r\n^C",,terminal_output
+10945,21471877,"TERMINAL",0,0,"^C",,terminal_output
+10946,21472007,"TERMINAL",0,0,"\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10947,21472126,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10948,21472209,"TERMINAL",0,0,"bash experiments/dynamics_grain_tok_restore.sh ",,terminal_output
+10949,21472551,"TERMINAL",0,0,"nvidia-smi [K",,terminal_output
+10950,21473262,"TERMINAL",0,0,"[16@bash experiments/sample.sh[C",,terminal_output
+10951,21473977,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+10952,21485233,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+10953,21503182,"TERMINAL",0,0,"2025-07-25 17:06:33.177885: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+10954,21504303,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 185, in \r\n vid = _autoreg_sample(rng, video_batch, action_batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 157, in _autoreg_sample\r\n generated_vid = _sampling_fn(genie, batch)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 431, in __call__\r\n pure_args_out, pure_kwargs_out, pure_out = self.jitted_fn(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 126, in __call__\r\n out = self.f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 142, in _sampling_fn\r\n return model.sample(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 233, in sample\r\n final_carry, _ = jax.lax.scan(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 222, in generation_step_fn\r\n final_carry_maskgit, _ = scanned_maskgit_loop(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/graph.py"", line 2051, in update_context_manager_wrapper\r\n return f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/iteration.py"", line 1213, in scan_wrapper\r\n pure_args: tuple = extract.to_tree(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 234, in to_tree\r\n check_consistent_aliasing(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 62, in check_consistent_aliasing\r\n raise ValueError(\r\nValueError: Cannot extract graph node from different trace level, got Param( # 512 (2.0 KB)\r\n value=Tracedwith\r\n)\r\n",,terminal_output
+10955,21504746,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+10956,21504919,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+10957,21505276,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+10958,21527827,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+10959,21527827,"/fast/home/franz.srambical/jafar/sample.py",5620,0,"",python,selection_command
+10960,21530198,"/fast/home/franz.srambical/jafar/sample.py",4718,0,"",python,selection_command
+10961,21533723,"/fast/home/franz.srambical/jafar/sample.py",4173,0,"",python,selection_command
+10962,21535942,"/fast/home/franz.srambical/jafar/genie.py",0,0,"from typing import Dict, Any\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nfrom flax.training.train_state import TrainState\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\nimport grain\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n tokenizer_outputs = self.tokenizer.vq_encode(batch[""videos""], training=False)\n lam_outputs = self.lam.vq_encode(batch[""videos""], training=False)\n latent_actions = jax.lax.cond(\n self.lam_co_train,\n lambda: lam_outputs[""z_q""],\n lambda: jax.lax.stop_gradient(lam_outputs[""z_q""]),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(tokenizer_outputs[""indices""]),\n latent_actions=latent_actions,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_outputs = self.dynamics(outputs, training)\n outputs.update(dyna_outputs)\n mle_indices = jnp.argmax(outputs[""token_logits""], axis=-1)\n outputs[""recon""] = self.tokenizer.decode(\n mle_indices, batch[""videos""].shape[2:4]\n )\n outputs[""lam_indices""] = lam_outputs[""indices""]\n return outputs\n\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n final_carry_maskgit = carry\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None\n\n\n# FIXME (f.srambical): add conversion script for old checkpoints\ndef restore_genie_components(\n optimizer: nnx.Optimizer,\n sharding: jax.sharding.NamedSharding,\n rng: jax.Array,\n args,\n):\n """"""Restore pre-trained Genie components""""""\n rngs = nnx.Rngs(rng)\n\n # dummy values since we only use tx to initialize the dummy train states\n dummy_tx = optax.adamw(\n learning_rate=optax.constant_schedule(args.max_lr),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n )\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n tokenizer_checkpoint_manager = ocp.CheckpointManager(\n directory=args.tokenizer_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.tokenizer_dim,\n ffn_dim=args.tokenizer_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n num_blocks=args.tokenizer_num_blocks,\n num_heads=args.tokenizer_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_tokenizer_optimizer = nnx.Optimizer(dummy_tokenizer, dummy_tx)\n dummy_tokenizer_optimizer_state = nnx.state(dummy_tokenizer_optimizer)\n abstract_sharded_tokenizer_optimizer_state = _create_abstract_sharded_pytree(\n dummy_tokenizer_optimizer_state, sharding\n )\n restored_tokenizer = tokenizer_checkpoint_manager.restore(\n step=tokenizer_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_tokenizer_optimizer.model, restored_tokenizer.model)\n optimizer.model.tokenizer = dummy_tokenizer_optimizer.model\n tokenizer_checkpoint_manager.close()\n\n if args.lam_checkpoint:\n lam_checkpoint_manager = ocp.CheckpointManager(\n directory=args.lam_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.lam_dim,\n ffn_dim=args.lam_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_latent_actions,\n patch_size=args.lam_patch_size,\n num_blocks=args.lam_num_blocks,\n num_heads=args.lam_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_lam_optimizer = nnx.Optimizer(dummy_lam, dummy_tx)\n dummy_lam_optimizer_state = nnx.state(dummy_lam_optimizer)\n abstract_sharded_lam_optimizer_state = _create_abstract_sharded_pytree(\n dummy_lam_optimizer_state, sharding\n )\n restored_lam_optimizer = lam_checkpoint_manager.restore(\n step=lam_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_lam_optimizer.model, restored_lam_optimizer.model)\n optimizer.model.lam = dummy_lam_optimizer.model\n # Remove the LAM decoder to save memory and avoid unnecessary computation.\n del optimizer.model.lam.decoder\n lam_checkpoint_manager.close()\n\n return optimizer\n\n\ndef _create_abstract_sharded_pytree(pytree_template, sharding_spec):\n """"""Replaces arrays in a pytree with ShapeDtypeStructs having the given sharding.""""""\n\n def map_fn(leaf_template):\n if hasattr(leaf_template, ""shape"") and hasattr(leaf_template, ""dtype""):\n return jax.ShapeDtypeStruct(\n leaf_template.shape, leaf_template.dtype, sharding=sharding_spec\n )\n return leaf_template\n\n return jax.tree_util.tree_map(map_fn, pytree_template)\n",python,tab
+10963,21535942,"/fast/home/franz.srambical/jafar/genie.py",8390,0,"",python,selection_command
+10964,21538151,"/fast/home/franz.srambical/jafar/genie.py",7902,0,"",python,selection_command
+10965,21575027,"/fast/home/franz.srambical/jafar/genie.py",8043,40,"",python,content
+10966,21581612,"/fast/home/franz.srambical/jafar/genie.py",8043,0," final_carry_maskgit = carry\n",python,content
+10967,21581687,"/fast/home/franz.srambical/jafar/genie.py",13234,154," args=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state",python,content
+10968,21581687,"/fast/home/franz.srambical/jafar/genie.py",8043,40,"",python,content
+10969,21585326,"/fast/home/franz.srambical/jafar/genie.py",7961,0,"",python,selection_command
+10970,21585489,"/fast/home/franz.srambical/jafar/genie.py",8029,0,"",python,selection_command
+10971,21585709,"/fast/home/franz.srambical/jafar/genie.py",8043,0,"",python,selection_command
+10972,21585876,"/fast/home/franz.srambical/jafar/genie.py",8055,0,"",python,selection_command
+10973,21586120,"/fast/home/franz.srambical/jafar/genie.py",13194,91," args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),",python,content
+10974,21586120,"/fast/home/franz.srambical/jafar/genie.py",8043,0," final_carry_maskgit = carry\n",python,content
+10975,21586171,"/fast/home/franz.srambical/jafar/genie.py",14833,164," args=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state",python,content
+10976,21586171,"/fast/home/franz.srambical/jafar/genie.py",13234,154," args=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state",python,content
+10977,21586171,"/fast/home/franz.srambical/jafar/genie.py",8043,40,"",python,content
+10978,21586220,"/fast/home/franz.srambical/jafar/genie.py",8041,0,"",python,selection_command
+10979,21593106,"/fast/home/franz.srambical/jafar/genie.py",8115,0,"",python,selection_command
+10980,21594411,"/fast/home/franz.srambical/jafar/genie.py",14730,93," args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),",python,content
+10981,21594412,"/fast/home/franz.srambical/jafar/genie.py",13194,91," args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),",python,content
+10982,21594412,"/fast/home/franz.srambical/jafar/genie.py",8043,0," final_carry_maskgit = carry\n",python,content
+10983,21594473,"/fast/home/franz.srambical/jafar/genie.py",14833,164," args=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state",python,content
+10984,21594473,"/fast/home/franz.srambical/jafar/genie.py",13267,121," model_state=ocp.args.PyTreeRestore(abstract_sharded_tokenizer_optimizer_state),",python,content
+10985,21594473,"/fast/home/franz.srambical/jafar/genie.py",8043,40,"",python,content
+10986,21595055,"/fast/home/franz.srambical/jafar/genie.py",8059,0,"",python,selection_command
+10987,21595419,"/fast/home/franz.srambical/jafar/genie.py",8041,0,"",python,selection_command
+10988,21596021,"/fast/home/franz.srambical/jafar/genie.py",8115,0,"",python,selection_command
+10989,21596442,"/fast/home/franz.srambical/jafar/genie.py",11152,0,"",python,selection_command
+10990,21596538,"/fast/home/franz.srambical/jafar/genie.py",8264,0,"",python,selection_command
+10991,21597491,"/fast/home/franz.srambical/jafar/genie.py",0,0,"",python,selection_command
+10992,21597555,"/fast/home/franz.srambical/jafar/genie.py",8115,0,"",python,selection_command
+10993,21598038,"/fast/home/franz.srambical/jafar/genie.py",8264,0,"",python,selection_command
+10994,21598721,"/fast/home/franz.srambical/jafar/genie.py",8115,0,"",python,selection_command
+10995,21598888,"/fast/home/franz.srambical/jafar/genie.py",14763,93," args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),",python,content
+10996,21598889,"/fast/home/franz.srambical/jafar/genie.py",13227,91," model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),",python,content
+10997,21598889,"/fast/home/franz.srambical/jafar/genie.py",8043,0," final_carry_maskgit = carry\n",python,content
+10998,21599065,"/fast/home/franz.srambical/jafar/genie.py",14870,127," model_state=ocp.args.PyTreeRestore(abstract_sharded_lam_optimizer_state),",python,content
+10999,21599065,"/fast/home/franz.srambical/jafar/genie.py",13267,121," model_state=ocp.args.PyTreeRestore(abstract_sharded_tokenizer_optimizer_state),",python,content
+11000,21599065,"/fast/home/franz.srambical/jafar/genie.py",8043,40,"",python,content
+11001,21599245,"/fast/home/franz.srambical/jafar/genie.py",8059,0,"",python,selection_command
+11002,21599397,"/fast/home/franz.srambical/jafar/genie.py",8041,0,"",python,selection_command
+11003,21599589,"/fast/home/franz.srambical/jafar/genie.py",7977,0,"",python,selection_command
+11004,21599806,"/fast/home/franz.srambical/jafar/genie.py",8041,0,"",python,selection_command
+11005,21600636,"/fast/home/franz.srambical/jafar/genie.py",8059,0,"",python,selection_command
+11006,21602596,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+11007,21604472,"genie.py",0,0,"",python,tab
+11008,21606907,"genie.py",5064,0,"",python,selection_command
+11009,21608881,"genie.py",6922,0,"",python,selection_command
+11010,21610257,"genie.py",6967,0,"",python,selection_command
+11011,21610511,"genie.py",7073,0,"",python,selection_command
+11012,21610857,"genie.py",7116,0,"",python,selection_command
+11013,21611162,"genie.py",7195,0,"",python,selection_command
+11014,21611491,"genie.py",7249,0,"",python,selection_command
+11015,21611983,"genie.py",7827,0,"",python,selection_command
+11016,21613310,"genie.py",7841,0,"",python,selection_command
+11017,21613555,"genie.py",7914,0,"",python,selection_command
+11018,21613589,"genie.py",7973,0,"",python,selection_command
+11019,21613622,"genie.py",8041,0,"",python,selection_command
+11020,21626266,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11021,21626330,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+11022,21626583,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+11023,21636930,"sample.py",0,0,"",python,tab
+11024,21638191,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+11025,21655651,"TERMINAL",0,0,"2025-07-25 17:09:05.745993: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11026,21656867,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 185, in \r\n vid = _autoreg_sample(rng, video_batch, action_batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 157, in _autoreg_sample\r\n generated_vid = _sampling_fn(genie, batch)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 431, in __call__\r\n pure_args_out, pure_kwargs_out, pure_out = self.jitted_fn(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 126, in __call__\r\n out = self.f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 142, in _sampling_fn\r\n return model.sample(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 232, in sample\r\n final_carry, _ = jax.lax.scan(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 222, in generation_step_fn\r\n final_carry_maskgit, _ = scanned_maskgit_loop(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/graph.py"", line 2051, in update_context_manager_wrapper\r\n return f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/iteration.py"", line 1213, in scan_wrapper\r\n pure_args: tuple = extract.to_tree(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 234, in to_tree\r\n check_consistent_aliasing(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 62, in check_consistent_aliasing\r\n raise ValueError(\r\nValueError: Cannot extract graph node from different trace level, got Param( # 512 (2.0 KB)\r\n value=Tracedwith\r\n)\r\n",,terminal_output
+11027,21657303,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+11028,21657476,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+11029,21657805,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11030,21685573,"sample.py",3727,0,"",python,selection_mouse
+11031,21686751,"sample.py",3720,0,"",python,selection_command
+11032,21689456,"genie.py",0,0,"",python,tab
+11033,21696436,"sample.py",0,0,"",python,tab
+11034,21698047,"sample.py",4051,0,"",python,selection_command
+11035,21698489,"sample.py",4050,0,"",python,selection_command
+11036,21698713,"sample.py",4050,0,"#",python,content
+11037,21698713,"sample.py",4051,0,"",python,selection_keyboard
+11038,21698784,"sample.py",4051,0," ",python,content
+11039,21698784,"sample.py",4052,0,"",python,selection_keyboard
+11040,21699045,"sample.py",4051,0,"",python,selection_command
+11041,21700860,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+11042,21701471,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+11043,21702743,"genie.py",0,0,"",python,tab
+11044,21703965,"sample.py",0,0,"",python,tab
+11045,21704627,"sample.py",0,0,"",python,tab
+11046,21712906,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+11047,21749387,"TERMINAL",0,0,"2025-07-25 17:10:39.472781: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11048,21750845,"TERMINAL",0,0,"2025-07-25 17:10:40.938861: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11049,21754365,"TERMINAL",0,0,"2025-07-25 17:10:44.461659: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11050,21755020,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 185, in \r\n vid = _autoreg_sample(rng, video_batch, action_batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 157, in _autoreg_sample\r\n generated_vid = _sampling_fn(genie, batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 142, in _sampling_fn\r\n return model.sample(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 232, in sample\r\n final_carry, _ = jax.lax.scan(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 222, in generation_step_fn\r\n final_carry_maskgit, _ = scanned_maskgit_loop(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/graph.py"", line 2051, in update_context_manager_wrapper\r\n return f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/iteration.py"", line 1213, in scan_wrapper\r\n pure_args: tuple = extract.to_tree(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 234, in to_tree\r\n check_consistent_aliasing(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 62, in check_consistent_aliasing\r\n raise ValueError(\r\nValueError: Cannot extract graph node from different trace level, got Param( # 512 (2.0 KB)\r\n value=Array([ 5.79902204e-04, 1.83785363e-04, -4.59459057e-04, 8.86579161e-04,\r\n -9.27979272e-05, -9.69715067e-04, -4.53975401e-04, 9.66143620e-04,\r\n 6.35958044e-04, 8.12941696e-04, -1.59645584e-04, 8.73808283e-04,\r\n 5.54829487e-04, -3.31153715e-04, -2.80674431e-04, 2.08017969e-04,\r\n 5.70197881e-04, 2.15050895e-04, 5.40059758e-04, -4.79549635e-05,\r\n -4.15008763e-05, -2.08970683e-04, -1.21672614e-03, 1.19385462e-04,\r\n 1.27799038e-04, -5.29211015e-04, 1.21446757e-03, -5.71820536e-04,\r\n 9.03176318e-04, -3.26241832e-04, 1.94552151e-04, 1.03536039e-03,\r\n -1.39086973e-04, 1.61354081e-04, -6.76629366e-04, 5.75365848e-04,\r\n -9.89008113e-04, -4.70508414e-04, 4.30073997e-04, -9.32542316e-04,\r\n 1.78392953e-03, 8.52322148e-04, 6.27272122e-04, -1.00176403e-05,\r\n -4.88205958e-04, 1.08008273e-03, -1.03389437e-03, 1.23284571e-03,\r\n -8.64696514e-04, 2.81569461e-04, 1.85537362e-03, -1.39499875e-03,\r\n 1.22260256e-03, 2.67286028e-04, 3.99140990e-04, -3.88738234e-04,\r\n 3.53423529e-04, -1.82328338e-04, -1.15320901e-03, -6.54615753e-04,\r\n 1.59805757e-04, -9.94076603e-04, -3.16731515e-04, -7.01153127e-04,\r\n 1.10227498e-03, 8.80063686e-04, -2.45422620e-04, -3.21568987e-05,\r\n -3.20224732e-04, 5.96415019e-04, 7.74631277e-04, 3.79502053e-05,\r\n -1.14807324e-03, -6.37564226e-04, 1.10084063e-03, -1.24254508e-03,\r\n -1.88223156e-03, 3.91570269e-04, 1.26973784e-04, -6.07062539e-04,\r\n 4.42030723e-04, 1.08278170e-03, -2.53870567e-05, 8.86333932e-04,\r\n -4.35208873e-04, -9.83790029e-04, 5.52977144e-04, -7.75978493e-04,\r\n 7.02897145e-04, -5.66870905e-04, -1.17189578e-04, -2.46665877e-04,\r\n 8.37000145e-04, 2.41109577e-04, -1.92638050e-04, -8.07702600e-06,\r\n -1.01163960e-03, 1.29226910e-05, 2.71586876e-04, -5.78537700e-04,\r\n 3.61651502e-04, 9.29420494e-05, -8.47803545e-04, 5.12732367e-04,\r\n 6.88695232e-04, 8.45044036e-04, -5.75123529e-04, 9.38976242e-04,\r\n 2.80764725e-05, 1.29268126e-04, -2.86230148e-04, 4.62087628e-04,\r\n 1.21393276e-03, -1.06451521e-03, -3.19257990e-04, 2.99410924e-04,\r\n 7.36906542e-04, 4.28144063e-04, -5.71604993e-04, 1.06423293e-04,\r\n -1.00667239e-03, -7.52831867e-04, -3.59850051e-03, -1.87116399e-04,\r\n -4.14791692e-04, -8.31779034e-04, -3.25797912e-04, 8.16694403e-04,\r\n -9.11948664e-05, -4.20872530e-04, -6.35586970e-04, 6.33112912e-04,\r\n -6.17303536e-04, -2.89018299e-05, -5.22513525e-04, 4.04142193e-04,\r\n 5.91298565e-04, -1.46551800e-04, -3.64537060e-04, 3.70698632e-04,\r\n -8.62165005e-04, -1.01958367e-03, 1.31774781e-04, 7.06719642e-04,\r\n 4.59892675e-04, 6.08660514e-04, 7.37728260e-04, 9.00431187e-04,\r\n 2.97220395e-04, -5.90034761e-04, 1.08272862e-03, -1.25857792e-03,\r\n 4.49936197e-04, 4.72550513e-04, -4.46944527e-04, -1.89290964e-03,\r\n 4.92720632e-04, -1.54460227e-04, -3.73741816e-04, -4.02631325e-04,\r\n 7.99135596e-04, -9.80796642e-04, 8.25236260e-04, 5.57116349e-04,\r\n -2.10288522e-06, -6.69197412e-04, -1.66126192e-05, -1.53326517e-04,\r\n -2.82244346e-05, -4.02772828e-04, -8.12421786e-04, 8.35117011e-04,\r\n -2.69911343e-05, -7.43109034e-04, -1.37779469e-04, -2.41833441e-05,\r\n -7.38260802e-04, -1.96821813e-04, -2.41502148e-05, -9.97454161e-04,\r\n 2.64732487e-04, -1.75832678e-03, 1.17485710e-04, -9.78037788e-05,\r\n 5.26464079e-04, -5.53459337e-04, 6.35085307e-05, 1.40959528e-04,\r\n -1.60802004e-03, 1.16834894e-03, -5.71387936e-04, 4.59257135e-04,\r\n -2.16942135e-04, -8.20923306e-04, -8.22454283e-04, -8.91073432e-04,\r\n 2.80208944e-04, 9.43574269e-05, 3.45775508e-04, 3.24587803e-04,\r\n 2.38559805e-04, -2.06248820e-04, 6.20714738e-04, -5.87494171e-04,\r\n 5.99128893e-04, -4.89475846e-04, -5.58521075e-04, 5.39315806e-06,\r\n -3.42503714e-04, 1.41901127e-03, -7.57163682e-04, -5.64522692e-04,\r\n -7.91520986e-04, 5.21145121e-04, 2.02408852e-03, -1.06384607e-04,\r\n -1.21695211e-03, -9.05069406e-04, -2.70358782e-04, -1.09641609e-04,\r\n -5.39235072e-04, -7.67180027e-05, -9.86311701e-04, 9.68765526e-04,\r\n -1.53652707e-03, 1.21926062e-03, 2.52706406e-04, -7.57116533e-04,\r\n 1.04164751e-03, -5.71496435e-04, 1.35344639e-03, 1.13940553e-03,\r\n 1.18351798e-03, 3.16733378e-04, -1.22747966e-04, 1.00750802e-03,\r\n 5.21870737e-04, -6.90255489e-04, 8.15491658e-04, -2.37966480e-04,\r\n -8.04664160e-04, -2.43383824e-04, 1.04590249e-03, 4.09602129e-04,\r\n 2.98886618e-04, 5.60442335e-04, -9.23424595e-05, 1.13964127e-03,\r\n 1.63377903e-03, -3.52117167e-05, -1.01013153e-04, 4.21650271e-04,\r\n -1.90464052e-05, 4.41401382e-04, 4.17727046e-04, 2.26323973e-04,\r\n 1.99855678e-03, -4.36673610e-04, 5.34953084e-04, -2.98760744e-04,\r\n 7.57532369e-04, -4.41849406e-05, 8.95082660e-04, -1.57386050e-04,\r\n 1.00758346e-03, 1.31029997e-03, 1.05182955e-03, 6.29643851e-04,\r\n 7.18104246e-04, 6.72722759e-04, 4.02423204e-04, 7.48195569e-04,\r\n 1.25203666e-03, 8.22027563e-04, 9.40077298e-04, -4.74464643e-04,\r\n -5.54924889e-04, 1.37185189e-03, -5.98437502e-04, 5.39190311e-04,\r\n -1.77317968e-04, 4.34110880e-05, 2.80075270e-04, 9.38114536e-05,\r\n -5.74664795e-04, -2.56602390e-04, -3.57944460e-04, 3.20801977e-04,\r\n -8.67931580e-04, 8.37371685e-04, 7.27320032e-04, -1.76582369e-04,\r\n 7.91078957e-04, 4.23305173e-04, 4.62880242e-04, -1.37596298e-03,\r\n -1.13309245e-03, 2.28138175e-04, -2.17030523e-04, 4.47029161e-04,\r\n -3.13183031e-04, -8.57597843e-06, -1.70763378e-04, -3.13189346e-04,\r\n 5.98123414e-04, 7.43433542e-04, -6.40252256e-04, 1.16536394e-03,\r\n 4.43872443e-04, 2.68466742e-04, -5.92972443e-04, -3.28011083e-04,\r\n -1.38441182e-03, 1.32673758e-05, -7.58231850e-04, -8.87676724e-05,\r\n 5.78527339e-04, 5.90835582e-04, 2.03411822e-04, 1.24355123e-04,\r\n 5.48458833e-04, 9.78736498e-05, -1.03728543e-03, -3.01620224e-04,\r\n -1.74664694e-03, 7.20503740e-04, 6.87097199e-04, 1.52700138e-03,\r\n -3.92811460e-04, -9.12196847e-05, -1.20099890e-03, -2.41123402e-04,\r\n 4.94409003e-04, -2.18983478e-04, -3.60000195e-05, -3.65556945e-04,\r\n 1.96742803e-05, -2.71012366e-04, -1.73564782e-04, 8.47964198e-04,\r\n 2.21183691e-05, 1.03721082e-04, 2.08908197e-04, -1.21639017e-03,\r\n 1.95942193e-04, 7.62266631e-04, 6.94759656e-04, 4.05154628e-04,\r\n -3.88813118e-04, 4.04668244e-04, -9.64264269e-04, -9.78495809e-04,\r\n 2.63609021e-04, 1.28671119e-03, 1.50890446e-06, -1.47685735e-03,\r\n -3.91801033e-04, 6.89492153e-04, 1.54065288e-04, -7.52089254e-05,\r\n -5.16254688e-04, 1.22117333e-03, -7.89227721e-04, 3.10281350e-04,\r\n 6.04541274e-04, -8.08428042e-04, -4.07220388e-04, 1.63781169e-05,\r\n -1.83526252e-03, -2.85982329e-04, 3.72489012e-04, -1.18422118e-04,\r\n -5.50847062e-06, 7.97088665e-04, 8.39237880e-04, 4.19908756e-04,\r\n -8.03221890e-04, -1.84057732e-04, -4.45082173e-04, 4.99040994e-04,\r\n 4.33483481e-04, 3.49355309e-04, 1.16468131e-04, 5.28083183e-04,\r\n -3.33790085e-04, 4.05789819e-04, -4.99511254e-04, 4.47895145e-04,\r\n 9.16178920e-04, 1.27455336e-04, -7.90875114e-04, -1.87337559e-04,\r\n 5.46464056e-04, -1.97961679e-04, 5.16001717e-04, -3.01448978e-04,\r\n -7.32789398e-04, -5.35160907e-05, 8.00862035e-04, 2.55532126e-04,\r\n -1.20945135e-03, 1.30921791e-04, -8.28967197e-04, 6.94736780e-04,\r\n 5.37068641e-04, 6.49138179e-04, -1.28828734e-03, -1.65148254e-03,\r\n -2.39196524e-04, 2.97041523e-04, 6.82452170e-04, 9.58763529e-04,\r\n -3.23396933e-04, -4.11480432e-04, -6.44017302e-04, -5.29786339e-05,\r\n -1.78653211e-03, -5.08558238e-04, -1.45838130e-04, -9.38410463e-04,\r\n -2.31247221e-04, -1.38276344e-04, 5.02012146e-04, 1.82994161e-04,\r\n 4.50831198e-04, -6.57172059e-04, -5.29879937e-04, 8.19339533e-04,\r\n 2.27263183e-04, -5.64834918e-04, 5.89020328e-06, 4.24688362e-04,\r\n -5.74991354e-05, -8.38618609e-04, 1.10551220e-04, 8.83210625e-04,\r\n 4.11351357e-04, -1.51288128e-04, -2.01765855e-04, -1.03000458e-03,\r\n 7.08942418e-04, 1.48007052e-03, -1.95403220e-04, 3.60081875e-04,\r\n 1.25058158e-03, -9.34130658e-05, 3.20896826e-04, 5.42961898e-05,\r\n -6.80940284e-04, 2.27259043e-05, -7.13856833e-04, -1.52521738e-04,\r\n 3.61050043e-04, -4.69459046e-05, 8.40932131e-04, -5.49682882e-04,\r\n -9.92985209e-04, -9.39348538e-04, -2.16365544e-04, -1.67845748e-04,\r\n -3.82347789e-05, 8.46338633e-04, -2.00853450e-04, 5.91547636e-04,\r\n -9.63313098e-04, 6.26304129e-04, 2.89927382e-04, 5.83152694e-04,\r\n -4.67221427e-04, 7.69491307e-05, 1.00245490e-03, 1.41421019e-03,\r\n 1.21694221e-03, -4.21749137e-04, 1.32508183e-04, -4.79456852e-04,\r\n 1.40894449e-03, 3.07102455e-04, 6.03875902e-04, -2.19981390e-04,\r\n -5.80208725e-04, -5.96643367e-04, -8.09447083e-04, -1.09303067e-03,\r\n -1.87922409e-03, -2.33222730e-04, -8.87487477e-05, 1.19461096e-03,\r\n 1.01204154e-04, 3.86784523e-04, 1.93878368e-04, -1.12958800e-03,\r\n -5.13361825e-04, -1.28040544e-03, 1.13598770e-03, -5.96334517e-04,\r\n -5.94493118e-04, -8.42069203e-05, -1.37871888e-03, -5.04129624e-04,\r\n 2.57312262e-04, 1.25586567e-03, -9.58606310e-04, -1.31114866e-04,\r\n -1.08709582e-03, 2.01435620e-03, -4.94437059e-04, -3.38324317e-04,\r\n -5.50381432e-04, -2.00382055e-04, -1.38255578e-04, 2.45632022e-04], dtype=float32)\r\n)\r\n",,terminal_output
+11051,21755573,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+11052,21755737,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 3 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+11053,21756107,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11054,21801519,"sample.py",56,5353,"\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nfrom orbax.checkpoint import PyTreeCheckpointer\nfrom PIL import Image, ImageDraw\nimport tyro\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\nrng = jax.random.PRNGKey(args.seed)\n\n# --- Load Genie checkpoint ---\ngenie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n)\nrng, _rng = jax.random.split(rng)\nimage_shape = (args.image_height, args.image_width, args.image_channels)\ndummy_inputs = dict(\n videos=jnp.zeros((args.batch_size, args.seq_len, *image_shape), dtype=jnp.float32),\n mask_rng=_rng,\n)\nrng, _rng = jax.random.split(rng)\nparams = genie.init(_rng, dummy_inputs)\nckpt = PyTreeCheckpointer().restore(args.checkpoint)[""model""][""params""][""params""]\nparams[""params""].update(ckpt)\n\n\ndef _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n)\nvideo_batch = next(iter(dataloader))\n# Get latent actions for all videos in the batch\nbatch = dict(videos=video_batch)\naction_batch = genie.apply(params, batch, False, method=Genie.vq_encode)\naction_batch = action_batch.reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n# --- Sample + evaluate video ---\nvid = _autoreg_sample(rng, video_batch, action_batch)\ngt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\nrecon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\nssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()\n",python,content
+11055,21801680,"sample.py",0,0,"",python,tab
+11056,21801680,"sample.py",56,0,"",python,selection_command
+11057,21818545,"sample.py",4474,0,"",python,selection_mouse
+11058,21819784,"sample.py",4462,91,"",python,content
+11059,21819786,"sample.py",4470,0,"",python,selection_command
+11060,21826933,"sample.py",4662,0,"",python,selection_mouse
+11061,21866937,"sample.py",5743,0,"",python,selection_mouse
+11062,21867828,"sample.py",5742,0,"",python,selection_command
+11063,21867877,"sample.py",5742,1,"j",python,selection_command
+11064,21867935,"sample.py",5742,3,"jnp",python,selection_command
+11065,21868053,"sample.py",5742,4,"jnp.",python,selection_command
+11066,21868352,"sample.py",5742,8,"jnp.mean",python,selection_command
+11067,21868676,"sample.py",5742,9,"jnp.mean(",python,selection_command
+11068,21868756,"sample.py",5742,9,"",python,content
+11069,21869153,"sample.py",5816,0,"",python,selection_command
+11070,21869741,"sample.py",5815,1,"",python,content
+11071,21869965,"sample.py",5815,0,".",python,content
+11072,21869965,"sample.py",5816,0,"",python,selection_keyboard
+11073,21870256,"sample.py",5816,0,"m",python,content
+11074,21870256,"sample.py",5817,0,"",python,selection_keyboard
+11075,21870341,"sample.py",5817,0,"e",python,content
+11076,21870341,"sample.py",5818,0,"",python,selection_keyboard
+11077,21870450,"sample.py",5818,0,"a",python,content
+11078,21870450,"sample.py",5819,0,"",python,selection_keyboard
+11079,21870529,"sample.py",5819,0,"n",python,content
+11080,21870529,"sample.py",5820,0,"",python,selection_keyboard
+11081,21870741,"sample.py",5820,0,"()",python,content
+11082,21870741,"sample.py",5821,0,"",python,selection_keyboard
+11083,21870789,"sample.py",5821,1,")",python,content
+11084,21870790,"sample.py",5822,0,"",python,selection_keyboard
+11085,21870975,"sample.py",5821,0,"",python,selection_command
+11086,21871209,"sample.py",5731,0,"",python,selection_command
+11087,21957915,"sample.py",5433,0,"",python,selection_mouse
+11088,22052257,"sample.py",0,0,"from dataclasses import dataclass\nimport time\nimport os\n\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nfrom orbax.checkpoint import PyTreeCheckpointer\nfrom PIL import Image, ImageDraw\nimport tyro\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\nrng = jax.random.PRNGKey(args.seed)\n\n# --- Load Genie checkpoint ---\ngenie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n)\nrng, _rng = jax.random.split(rng)\nimage_shape = (args.image_height, args.image_width, args.image_channels)\ndummy_inputs = dict(\n videos=jnp.zeros((args.batch_size, args.seq_len, *image_shape), dtype=jnp.float32),\n mask_rng=_rng,\n)\nrng, _rng = jax.random.split(rng)\nparams = genie.init(_rng, dummy_inputs)\nckpt = PyTreeCheckpointer().restore(args.checkpoint)[""model""][""params""][""params""]\nparams[""params""].update(ckpt)\n\n\ndef _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n)\nvideo_batch = next(iter(dataloader))\n# Get latent actions for all videos in the batch\nbatch = dict(videos=video_batch)\naction_batch = genie.apply(params, batch, False, method=Genie.vq_encode)\naction_batch = action_batch.reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n# --- Sample + evaluate video ---\nvid = _autoreg_sample(rng, video_batch, action_batch)\ngt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\nrecon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\nssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()\nprint(f""SSIM: {ssim}"")\n\n# --- Construct video ---\ntrue_videos = (video_batch * 255).astype(np.uint8)\npred_videos = (vid * 255).astype(np.uint8)\nvideo_comparison = np.zeros((2, *vid.shape), dtype=np.uint8)\nvideo_comparison[0] = true_videos[:, : args.seq_len]\nvideo_comparison[1] = pred_videos\nframes = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n# --- Save video ---\nimgs = [Image.fromarray(img) for img in frames]\n# Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\nfor t, img in enumerate(imgs[1:]):\n d = ImageDraw.Draw(img)\n for row in range(action_batch.shape[0]):\n action = action_batch[row, t, 0]\n y_offset = row * video_batch.shape[2] + 2\n d.text((2, y_offset), f""{action}"", fill=255)\nimgs[0].save(\n f""generation_{time.time()}.gif"",\n save_all=True,\n append_images=imgs[1:],\n duration=250,\n loop=0,\n)\n",python,tab
+11089,22052257,"sample.py",2888,0,"",python,selection_mouse
+11090,22052414,"sample.py",2879,17,"_sampling_wrapper",python,selection_mouse
+11091,22052537,"sample.py",2875,38,"def _sampling_wrapper(module, batch):\n",python,selection_mouse
+11092,22052812,"sample.py",2875,64,"def _sampling_wrapper(module, batch):\n return module.sample(\n",python,selection_mouse
+11093,22052812,"sample.py",2875,156,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n",python,selection_mouse
+11094,22053551,"sample.py",2875,157,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n",python,selection_mouse
+11095,22053551,"sample.py",2875,204,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\n",python,selection_mouse
+11096,22053571,"sample.py",2875,257,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n",python,selection_mouse
+11097,22053988,"sample.py",2875,306,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n",python,selection_mouse
+11098,22053988,"sample.py",2875,368,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n",python,selection_mouse
+11099,22053988,"sample.py",2875,406,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n",python,selection_mouse
+11100,22053988,"sample.py",2875,474,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n",python,selection_mouse
+11101,22053989,"sample.py",2875,546,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n",python,selection_mouse
+11102,22053989,"sample.py",2875,548,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n",python,selection_mouse
+11103,22054049,"sample.py",2875,643,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n",python,selection_mouse
+11104,22054049,"sample.py",2875,717,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n",python,selection_mouse
+11105,22054049,"sample.py",2875,719,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\n",python,selection_mouse
+11106,22054049,"sample.py",2875,772,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n",python,selection_mouse
+11107,22054129,"sample.py",2875,811,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n",python,selection_mouse
+11108,22054129,"sample.py",2875,856,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n",python,selection_mouse
+11109,22054129,"sample.py",2875,900,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n",python,selection_mouse
+11110,22054129,"sample.py",2875,928,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n",python,selection_mouse
+11111,22054143,"sample.py",2875,950,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n)\n",python,selection_mouse
+11112,22054153,"sample.py",2875,948,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n",python,selection_mouse
+11113,22054171,"sample.py",2875,928,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n",python,selection_mouse
+11114,22054202,"sample.py",2875,900,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n",python,selection_mouse
+11115,22054267,"sample.py",2875,881,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n",python,selection_mouse
+11116,22055140,"sample.py",2875,856,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n",python,selection_mouse
+11117,22055155,"sample.py",2875,834,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n",python,selection_mouse
+11118,22055188,"sample.py",2875,772,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\ndataloader = get_dataloader(\n array_record_files,\n",python,selection_mouse
+11119,22055202,"sample.py",2875,719,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n]\n",python,selection_mouse
+11120,22055219,"sample.py",2875,717,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n",python,selection_mouse
+11121,22055235,"sample.py",2875,682,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n",python,selection_mouse
+11122,22055251,"sample.py",2875,643,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n os.path.join(args.data_dir, x)\n",python,selection_mouse
+11123,22055471,"sample.py",2875,608,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\narray_record_files = [\n",python,selection_mouse
+11124,22055560,"sample.py",2875,585,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n# --- Get video + latent actions ---\n",python,selection_mouse
+11125,22055560,"sample.py",2875,548,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n\n",python,selection_mouse
+11126,22055561,"sample.py",2875,547,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n\n",python,selection_mouse
+11127,22055569,"sample.py",2875,546,"def _sampling_wrapper(module, batch):\n return module.sample(\n batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax\n )\n\n\n# --- Define autoregressive sampling loop ---\ndef _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n sampling_fn = jax.jit(nn.apply(_sampling_wrapper, genie))\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = sampling_fn(params, batch)\n return generated_vid\n",python,selection_mouse
+11128,22056785,"sample.py",3419,0,"",python,selection_command
+11129,22061800,"sample.py",0,0,"",python,tab
+11130,22061800,"sample.py",4354,0,"",python,selection_mouse
+11131,23357268,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11132,23357749,"TERMINAL",0,0,"g",,terminal_output
+11133,23357997,"TERMINAL",0,0,"t l",,terminal_output
+11134,23358194,"TERMINAL",0,0,"og",,terminal_output
+11135,23358368,"TERMINAL",0,0,"\r\n[?2004l\rbash: gt: command not found\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11136,23358894,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11137,23359117,"TERMINAL",0,0,"g",,terminal_output
+11138,23359224,"TERMINAL",0,0,"i",,terminal_output
+11139,23359312,"TERMINAL",0,0,"t",,terminal_output
+11140,23359383,"TERMINAL",0,0," ",,terminal_output
+11141,23359497,"TERMINAL",0,0,"l",,terminal_output
+11142,23359698,"TERMINAL",0,0,"og",,terminal_output
+11143,23359827,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+11144,23359951,"TERMINAL",0,0,"[?1h=\r[33mcommit 57e6f3e1754fa5d7c66657eb8596889650938dbc[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mflax-nnx-migration[m[33m, [m[1;31morigin/flax-nnx-migration[m[33m)[m[m\r\nMerge: 5762908 e296267[m\r\nAuthor: Franz Srambical [m\r\nDate: Thu Jul 24 16:34:39 2025 +0200[m\r\n[m\r\n Merge branch 'main' into flax-nnx-migration[m\r\n[m\r\n[33mcommit 57629081ebbb3ec596ee97717f7a1d10dbf05e80[m[m\r\nAuthor: Franz Srambical [m\r\nDate: Thu Jul 24 16:33:05 2025 +0200[m\r\n[m\r\n feat: migrate to flax.nnx API[m\r\n[m\r\n[33mcommit e296267fd3bdd400b720d8d6568b1583eda675dd[m[m\r\nMerge: 14e6c02 bff38fa[m\r\nAuthor: mihir <78321484+maharajamihir@users.noreply.github.com>[m\r\nDate: Thu Jul 24 11:09:41 2025 +0200[m\r\n[m\r\n Merge pull request #95 from p-doom/fix-dtype-hint-warning[m\r\n [m\r\n chore: infer dtype type annotation (fix warning)[m\r\n:[K",,terminal_output
+11145,23365393,"TERMINAL",0,0,"\r[K[?1l>]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11146,23366597,"utils/parameter_utils.py",0,0,"from jax.tree_util import tree_map, tree_reduce\n\n\ndef _count_leaf(x):\n """"""Count parameters in a single leaf node.""""""\n if hasattr(x, ""size""):\n return x.size\n return 0\n\n\ndef _count_component(component_params):\n """"""Count total parameters in a component.""""""\n return tree_reduce(\n lambda x, y: x + y, tree_map(_count_leaf, component_params), initializer=0\n )\n\n\ndef count_parameters_by_component(params):\n """"""Count parameters for each component of the model.\n\n Args:\n params: Model parameters from nnx.split(model, nnx.Param, ...)\n\n Returns:\n Dictionary with parameter counts for each component\n """"""\n component_names = list(params.keys())\n print(f""Counting all components: {component_names}"")\n\n counts = {}\n total_params = 0\n\n for name in component_names:\n component_params = params[name]\n count = _count_component(component_params)\n counts[name] = count\n total_params += count\n\n counts[""total""] = total_params\n return counts\n",python,tab
+11147,23366597,"utils/parameter_utils.py",499,0,"",python,selection_command
+11148,23367237,"utils/nn.py",0,0,"import math\nfrom typing import Tuple\n\nfrom flax import nnx\nimport jax\nimport jax.numpy as jnp\nimport einops\n\n\nclass PositionalEncoding(nnx.Module):\n """"""https://uvadlc-notebooks.readthedocs.io/en/latest/tutorial_notebooks/JAX/tutorial6/Transformers_and_MHAttention.html""""""\n\n def __init__(self, d_model: int, max_len: int = 5000):\n self.d_model = d_model\n self.max_len = max_len\n\n pe = jnp.zeros((self.max_len, self.d_model))\n position = jnp.arange(0, self.max_len, dtype=jnp.float32)[:, None]\n div_term = jnp.exp(\n jnp.arange(0, self.d_model, 2) * (-math.log(10000.0) / self.d_model)\n )\n pe = pe.at[:, 0::2].set(jnp.sin(position * div_term))\n pe = pe.at[:, 1::2].set(jnp.cos(position * div_term))\n self.pe = nnx.Variable(pe)\n\n def __call__(self, x):\n x = x + self.pe[: x.shape[2]]\n return x\n\n\nclass STBlock(nnx.Module):\n def __init__(\n self,\n dim: int,\n ffn_dim: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.dim = dim\n self.ffn_dim = ffn_dim\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.spatial_pos_enc = PositionalEncoding(self.dim)\n self.spatial_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.spatial_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.dim,\n qkv_features=self.dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=False\n ),\n rngs=rngs,\n # FIXME (f.srambical): Propagate this up and change during sampling\n decode=False,\n )\n\n self.temporal_pos_enc = PositionalEncoding(self.dim)\n self.temporal_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.temporal_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.dim,\n qkv_features=self.dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=True\n ),\n rngs=rngs,\n decode=False,\n )\n\n self.ffn_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_dense1 = nnx.Linear(\n in_features=self.dim,\n out_features=self.ffn_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_dense2 = nnx.Linear(\n in_features=self.ffn_dim,\n out_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n @nnx.remat\n def __call__(self, x: jax.Array) -> jax.Array:\n # --- Spatial attention ---\n z = self.spatial_pos_enc(x)\n z = self.spatial_norm(z)\n z = self.spatial_attention(z)\n x = x + z\n\n # --- Temporal attention ---\n x = x.swapaxes(1, 2)\n z = self.temporal_pos_enc(x)\n z = self.temporal_norm(z)\n causal_mask = jnp.tri(z.shape[-2])\n z = self.temporal_attention(z, mask=causal_mask)\n x = x + z\n x = x.swapaxes(1, 2)\n\n # --- Feedforward ---\n z = self.ffn_norm(x)\n z = self.ffn_dense1(z)\n z = jax.nn.gelu(z)\n z = self.ffn_dense2(z)\n x = x + z\n\n return x\n\n\nclass STTransformer(nnx.Module):\n def __init__(\n self,\n input_dim: int,\n model_dim: int,\n ffn_dim: int,\n out_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.input_dim = input_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.out_dim = out_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.input_norm1 = nnx.LayerNorm(\n num_features=self.input_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_dense = nnx.Linear(\n in_features=self.input_dim,\n out_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_norm2 = nnx.LayerNorm(\n num_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n self.blocks = []\n for _ in range(self.num_blocks):\n self.blocks.append(\n STBlock(\n dim=self.model_dim,\n ffn_dim=self.ffn_dim,\n num_heads=self.num_heads,\n dropout=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n )\n\n self.output_dense = nnx.Linear(\n in_features=self.model_dim,\n out_features=self.out_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(self, x: jax.Array) -> jax.Array:\n x = self.input_norm1(x)\n x = self.input_dense(x)\n x = self.input_norm2(x)\n\n for block in self.blocks:\n x = block(x)\n\n x = self.output_dense(x)\n return x # (B, T, E)\n\n\ndef normalize(x):\n return x / (jnp.linalg.norm(x, ord=2, axis=-1, keepdims=True) + 1e-8)\n\n\nclass VectorQuantizer(nnx.Module):\n def __init__(\n self, latent_dim: int, num_latents: int, dropout: float, rngs: nnx.Rngs\n ):\n self.latent_dim = latent_dim\n self.num_latents = num_latents\n self.dropout = dropout\n\n self.codebook = nnx.Param(\n normalize(\n nnx.initializers.lecun_uniform()(\n rngs.params(), (self.num_latents, self.latent_dim)\n )\n )\n )\n self.drop = nnx.Dropout(self.dropout, rngs=rngs)\n\n def __call__(\n self, x: jax.Array, training: bool\n ) -> Tuple[jax.Array, jax.Array, jax.Array, jax.Array]:\n # --- Compute distances ---\n x = normalize(x)\n normalized_codebook = normalize(self.codebook)\n distance = -jnp.matmul(x, normalized_codebook.T)\n if training:\n distance = self.drop(distance)\n\n # --- Get indices and embeddings ---\n indices = jnp.argmin(distance, axis=-1)\n z = self.codebook[indices]\n\n # --- Straight through estimator ---\n z_q = x + jax.lax.stop_gradient(z - x)\n return z_q, z, x, indices\n\n def get_codes(self, indices: jax.Array):\n return self.codebook[indices]\n\n\ndef _create_flash_attention_fn(use_flash_attention: bool, is_causal: bool):\n """"""\n Create an attention function that uses flash attention if enabled.\n\n Flax MultiHeadAttention provides tensors with shape (batch..., length, num_heads, head_dim)\n jax.nn.dot_product_attention expects (batch, length, num_heads, head_dim).\n\n We need to reshape to ensure compatibility. cuDNN's flash attention additionally\n requires a sequence length that is a multiple of 4. We pad the sequence length to the nearest\n multiple of 4 and mask accordingly.\n """"""\n\n def attention_fn(query, key, value, bias=None, mask=None, **kwargs):\n implementation = ""cudnn"" if use_flash_attention else None\n\n def _rearrange(x):\n return einops.rearrange(x, ""... l h d -> (...) l h d"")\n\n def _pad(x):\n return jnp.pad(x, ((0, 0), (0, pad_size), (0, 0), (0, 0)))\n\n def _fuse_masks(mask: jax.Array, attention_mask: jax.Array) -> jax.Array:\n mask_bool = mask.astype(jnp.bool_)\n expanded_mask = jnp.pad(\n mask_bool, ((0, pad_size), (0, pad_size)), constant_values=False\n )\n return jnp.logical_and(attention_mask, expanded_mask)\n\n original_shape = query.shape\n original_seq_len = query.shape[-3]\n\n # Pad to nearest multiple of 4\n target_seq_len = ((original_seq_len + 3) // 4) * 4\n pad_size = target_seq_len - original_seq_len\n\n query_4d = _pad(_rearrange(query))\n key_4d = _pad(_rearrange(key))\n value_4d = _pad(_rearrange(value))\n\n attention_mask = jnp.ones((target_seq_len, target_seq_len), dtype=jnp.bool_)\n attention_mask = attention_mask.at[original_seq_len:, :].set(False)\n attention_mask = attention_mask.at[:, original_seq_len:].set(False)\n\n mask_4d = (\n _fuse_masks(mask, attention_mask) if mask is not None else attention_mask\n )\n mask_4d = mask_4d[jnp.newaxis, jnp.newaxis, :, :] # (1, 1, seq_len, seq_len)\n\n bias_4d = _pad(_rearrange(bias)) if bias is not None else None\n\n # NOTE: jax.nn.dot_product_attention does not support dropout\n output_4d = jax.nn.dot_product_attention(\n query=query_4d,\n key=key_4d,\n value=value_4d,\n bias=bias_4d,\n mask=mask_4d,\n implementation=implementation,\n is_causal=is_causal,\n )\n return output_4d[..., :original_seq_len, :, :].reshape(original_shape)\n\n return attention_fn\n",python,tab
+11149,23367237,"utils/nn.py",398,0,"",python,selection_command
+11150,23368787,"models/tokenizer.py",0,0,"from typing import Dict, Any, Tuple\n\nimport flax.nnx as nnx\nimport jax.numpy as jnp\n\nfrom utils.preprocess import patchify, unpatchify\nfrom utils.nn import STTransformer, VectorQuantizer\n\n\nclass TokenizerVQVAE(nnx.Module):\n """"""ST-ViVit VQ-VAE""""""\n\n def __init__(\n self,\n in_dim: int,\n model_dim: int,\n ffn_dim: int,\n latent_dim: int,\n num_latents: int,\n patch_size: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n codebook_dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.in_dim = in_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.latent_dim = latent_dim\n self.num_latents = num_latents\n self.patch_size = patch_size\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.codebook_dropout = codebook_dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.encoder = STTransformer(\n self.in_dim * self.patch_size**2,\n self.model_dim,\n self.ffn_dim,\n self.latent_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.vq = VectorQuantizer(\n self.latent_dim,\n self.num_latents,\n self.codebook_dropout,\n rngs=rngs,\n )\n self.out_dim = self.in_dim * self.patch_size**2\n self.decoder = STTransformer(\n self.latent_dim,\n self.model_dim,\n self.ffn_dim,\n self.out_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n H, W = batch[""videos""].shape[2:4]\n outputs = self.vq_encode(batch[""videos""], training)\n recon = self.decoder(outputs[""z_q""]) # (B, T, H_down * W_down, C)\n recon = recon.astype(jnp.float32)\n recon = nnx.sigmoid(recon)\n recon = recon.astype(self.dtype)\n outputs[""recon""] = unpatchify(recon, self.patch_size, H, W)\n return outputs\n\n def vq_encode(self, videos: Any, training: bool = True) -> Dict[str, Any]:\n # --- Preprocess + encode ---\n B, T = videos.shape[:2]\n x = patchify(videos, self.patch_size)\n N = x.shape[2]\n x = self.encoder(x) # (B, T, N, E)\n\n # --- Vector quantize ---\n x = x.reshape(B * T * N, self.latent_dim)\n z_q, z, emb, indices = self.vq(x, training)\n z_q = z_q.reshape(B, T, N, self.latent_dim)\n indices = indices.reshape(B, T, N)\n return dict(z_q=z_q, z=z, emb=emb, indices=indices)\n\n def decode(self, indices: Any, video_hw: Tuple[int, int]):\n z = self.vq.codebook[indices]\n recon = self.decoder(z)\n recon = recon.astype(jnp.float32)\n recon = nnx.sigmoid(recon)\n recon = recon.astype(self.dtype)\n return unpatchify(recon, self.patch_size, *video_hw)\n",python,tab
+11151,23368788,"models/tokenizer.py",1175,0,"",python,selection_command
+11152,23369780,"models/lam.py",0,0,"from typing import Dict, Any\n\nimport jax.numpy as jnp\nimport flax.nnx as nnx\n\nfrom utils.preprocess import patchify, unpatchify\nfrom utils.nn import STTransformer, VectorQuantizer\n\n\nclass LatentActionModel(nnx.Module):\n """"""Latent Action ST-ViVit VQ-VAE""""""\n\n def __init__(\n self,\n in_dim: int,\n model_dim: int,\n ffn_dim: int,\n latent_dim: int,\n num_latents: int,\n patch_size: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n codebook_dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.in_dim = in_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.latent_dim = latent_dim\n self.num_latents = num_latents\n self.patch_size = patch_size\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.codebook_dropout = codebook_dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.patch_token_dim = self.in_dim * self.patch_size**2\n self.encoder = STTransformer(\n self.in_dim * self.patch_size**2,\n self.model_dim,\n self.ffn_dim,\n self.latent_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.action_in = nnx.Param(\n nnx.initializers.lecun_uniform()(\n rngs.params(), (1, 1, 1, self.patch_token_dim)\n )\n )\n self.vq = VectorQuantizer(\n self.latent_dim,\n self.num_latents,\n self.codebook_dropout,\n rngs=rngs,\n )\n self.patch_up = nnx.Linear(\n self.patch_token_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.action_up = nnx.Linear(\n self.latent_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.decoder = STTransformer(\n self.model_dim,\n self.model_dim,\n self.ffn_dim,\n self.patch_token_dim,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n # --- Encode + VQ ---\n H, W = batch[""videos""].shape[2:4]\n outputs = self.vq_encode(batch[""videos""], training)\n video_action_patches = self.action_up(outputs[""z_q""]) + self.patch_up(\n outputs[""patches""][:, :-1]\n )\n del outputs[""patches""]\n\n # --- Decode ---\n video_recon = self.decoder(video_action_patches)\n video_recon = video_recon.astype(jnp.float32)\n video_recon = nnx.sigmoid(video_recon)\n video_recon = video_recon.astype(self.dtype)\n outputs[""recon""] = unpatchify(video_recon, self.patch_size, H, W)\n return outputs\n\n def vq_encode(self, videos: Any, training: bool = True) -> Dict[str, Any]:\n # --- Preprocess videos ---\n B, T = videos.shape[:2]\n patches = patchify(videos, self.patch_size)\n action_pad = jnp.broadcast_to(\n self.action_in.value, (B, T, 1, self.patch_token_dim)\n )\n padded_patches = jnp.concatenate((action_pad, patches), axis=2)\n\n # --- Encode ---\n z = self.encoder(padded_patches) # (B, T, N, E)\n # Get latent action for all future frames\n z = z[:, 1:, 0] # (B, T-1, E)\n\n # --- Vector quantize ---\n z = z.reshape(B * (T - 1), self.latent_dim)\n z_q, z, emb, indices = self.vq(z, training)\n z_q = z_q.reshape(B, T - 1, 1, self.latent_dim)\n return dict(patches=patches, z_q=z_q, z=z, emb=emb, indices=indices)\n",python,tab
+11153,23369780,"models/lam.py",1249,0,"",python,selection_command
+11154,23370722,"models/dynamics.py",0,0,"from typing import Dict, Any\n\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\n\nfrom utils.nn import STTransformer\n\n\nclass DynamicsMaskGIT(nnx.Module):\n """"""MaskGIT dynamics model""""""\n\n def __init__(\n self,\n model_dim: int,\n ffn_dim: int,\n num_latents: int,\n latent_action_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n mask_limit: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.num_latents = num_latents\n self.latent_action_dim = latent_action_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.mask_limit = mask_limit\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.dynamics = STTransformer(\n self.model_dim,\n self.model_dim,\n self.ffn_dim,\n self.num_latents,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.patch_embed = nnx.Embed(self.num_latents, self.model_dim, rngs=rngs)\n self.mask_token = nnx.Param(\n nnx.initializers.lecun_uniform()(rngs.params(), (1, 1, 1, self.model_dim))\n )\n self.action_up = nnx.Linear(\n self.latent_action_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n # --- Mask videos ---\n vid_embed = self.patch_embed(batch[""video_tokens""])\n if training:\n batch_size = vid_embed.shape[0]\n _rng_prob, *_rngs_mask = jax.random.split(batch[""mask_rng""], batch_size + 1)\n mask_prob = jax.random.uniform(\n _rng_prob, shape=(batch_size,), minval=self.mask_limit\n )\n per_sample_shape = vid_embed.shape[1:-1]\n mask = jax.vmap(\n lambda rng, prob: jax.random.bernoulli(rng, prob, per_sample_shape),\n in_axes=(0, 0),\n )(jnp.asarray(_rngs_mask), mask_prob)\n mask = mask.at[:, 0].set(False)\n vid_embed = jnp.where(\n jnp.expand_dims(mask, -1), self.mask_token.value, vid_embed\n )\n else:\n mask = None\n\n # --- Predict transition ---\n act_embed = self.action_up(batch[""latent_actions""])\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n logits = self.dynamics(vid_embed)\n return dict(token_logits=logits, mask=mask)\n",python,tab
+11155,23370722,"models/dynamics.py",299,0,"",python,selection_command
+11156,23371434,"train_tokenizer.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom models.tokenizer import TokenizerVQVAE\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 300_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n vq_beta: float = 0.25\n batch_size: int = 48\n init_lr: float = 0.0\n max_lr: float = 3e-4\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 20000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n warmup_steps: int = 10000\n # Tokenizer\n model_dim: int = 512\n ffn_dim: int = 2048\n latent_dim: int = 32\n num_latents: int = 1024\n patch_size: int = 4\n num_blocks: int = 4\n num_heads: int = 8\n dropout: float = 0.0\n codebook_dropout: float = 0.01\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_tokenizer""\n tags: list[str] = field(default_factory=lambda: [""tokenizer""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 10000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\n\n\ndef tokenizer_loss_fn(model, inputs):\n # --- Compute loss ---\n # FIXME (f.srambical): Can we even do native int8 training without casting the video at all?\n # FIXME (f.srambical): If the tokenizer is the reason for the dynamics model being memory-bound,\n # should we at least train the tokenizer natively in int8?\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n mse = jnp.square(inputs[""videos""] - outputs[""recon""]).mean()\n q_loss = jnp.square(jax.lax.stop_gradient(outputs[""emb""]) - outputs[""z""]).mean()\n commitment_loss = jnp.square(\n outputs[""emb""] - jax.lax.stop_gradient(outputs[""z""])\n ).mean()\n loss = mse + q_loss + args.vq_beta * commitment_loss\n\n # --- Compute validation metrics ---\n gt = inputs[""videos""].clip(0, 1).reshape(-1, *inputs[""videos""].shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n _, index_counts = jnp.unique_counts(\n jnp.ravel(outputs[""indices""]), size=args.num_latents, fill_value=0\n )\n codebook_usage = (index_counts != 0).mean()\n metrics = dict(\n loss=loss,\n mse=mse,\n q_loss=q_loss,\n commitment_loss=commitment_loss,\n psnr=psnr,\n ssim=ssim,\n codebook_usage=codebook_usage,\n )\n return loss, (outputs[""recon""], metrics)\n\n\n@nnx.jit\ndef train_step(tokenizer, optimizer, inputs):\n def loss_fn(model):\n return tokenizer_loss_fn(model, inputs)\n\n (loss, (recon, metrics)), grads = nnx.value_and_grad(loss_fn, has_aux=True)(\n tokenizer\n )\n optimizer.update(grads)\n if args.log_gradients:\n metrics[""encoder_gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""encoder""]\n )\n metrics[""vq_gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""vq""]\n )\n metrics[""decoder_gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""decoder""]\n )\n return loss, recon, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.model_dim,\n ffn_dim=args.ffn_dim,\n latent_dim=args.latent_dim,\n num_latents=args.num_latents,\n patch_size=args.patch_size,\n num_blocks=args.num_blocks,\n num_heads=args.num_heads,\n dropout=args.dropout,\n codebook_dropout=args.codebook_dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(tokenizer, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(tokenizer, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n # FIXME (f.srambical): change all checkpointing/ restore logic to separately checkpoint model and optimizer\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n # FIXME (f.srambical): also checkpoint optimizer state\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n inputs = dict(videos=videos)\n loss, recon, metrics = train_step(tokenizer, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n # NOTE: Process-dependent control flow deliberately happens\n # after indexing operation since it must not contain code\n # sections that lead to cross-accelerator communication.\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[0])),\n recon=wandb.Image(np.asarray(recon_seq[0])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+11157,23371435,"train_tokenizer.py",7392,0,"",python,selection_command
+11158,23373466,"train_lam.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom models.lam import LatentActionModel\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n vq_beta: float = 0.25\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n vq_reset_thresh: int = 50\n # LAM\n model_dim: int = 512\n ffn_dim: int = 2048\n latent_dim: int = 32\n num_latents: int = 6\n patch_size: int = 16\n num_blocks: int = 4\n num_heads: int = 8\n dropout: float = 0.0\n codebook_dropout: float = 0.0\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_lam""\n tags: list[str] = field(default_factory=lambda: [""lam""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 10000\n log_checkpoint_keep_period: int = 20000\n wandb_id: str = """"\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\n\n\ndef lam_loss_fn(model: LatentActionModel, inputs: dict):\n # --- Compute loss ---\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n gt_future_frames = inputs[""videos""][:, 1:]\n mse = jnp.square(gt_future_frames - outputs[""recon""]).mean()\n q_loss = jnp.square(jax.lax.stop_gradient(outputs[""emb""]) - outputs[""z""]).mean()\n commitment_loss = jnp.square(\n outputs[""emb""] - jax.lax.stop_gradient(outputs[""z""])\n ).mean()\n loss = mse + q_loss + args.vq_beta * commitment_loss\n\n # --- Compute validation metrics ---\n gt = gt_future_frames.clip(0, 1).reshape(-1, *gt_future_frames.shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n count_fn = jax.vmap(lambda i: (outputs[""indices""] == i).sum())\n index_counts = count_fn(jnp.arange(args.num_latents))\n metrics = dict(\n loss=loss,\n mse=mse,\n q_loss=q_loss,\n commitment_loss=commitment_loss,\n psnr=psnr,\n ssim=ssim,\n codebook_usage=(index_counts != 0).mean(),\n )\n return loss, (outputs[""recon""], index_counts, metrics)\n\n\n@nnx.jit\ndef train_step(lam, optimizer, inputs, action_last_active, rng):\n def loss_fn(model):\n return lam_loss_fn(model, inputs)\n\n # --- Update model ---\n (loss, (recon, idx_counts, metrics)), grads = nnx.value_and_grad(\n loss_fn, has_aux=True\n )(lam)\n optimizer.update(grads)\n\n # --- Reset inactive latent actions ---\n codebook = lam.vq.codebook\n num_codes = len(codebook)\n active_codes = idx_counts != 0.0\n action_last_active = jnp.where(active_codes, 0, action_last_active + 1)\n p_code = active_codes / active_codes.sum()\n reset_idxs = jax.random.choice(rng, num_codes, shape=(num_codes,), p=p_code)\n do_reset = action_last_active >= args.vq_reset_thresh\n new_codebook = jnp.where(\n jnp.expand_dims(do_reset, -1), codebook[reset_idxs], codebook\n )\n lam.vq.codebook.value = new_codebook\n action_last_active = jnp.where(do_reset, 0, action_last_active)\n return loss, recon, action_last_active, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.model_dim,\n ffn_dim=args.ffn_dim,\n latent_dim=args.latent_dim,\n num_latents=args.num_latents,\n patch_size=args.patch_size,\n num_blocks=args.num_blocks,\n num_heads=args.num_heads,\n dropout=args.dropout,\n codebook_dropout=args.codebook_dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n # Count parameters\n _, params, _ = nnx.split(lam, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(lam, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n action_last_active = jnp.zeros(args.num_latents, dtype=jnp.int32)\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng = jax.random.split(rng)\n\n inputs = dict(videos=videos, rng=_rng)\n rng, _rng = jax.random.split(rng)\n loss, recon, action_last_active, metrics = train_step(\n lam, optimizer, inputs, action_last_active, _rng\n )\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0, 1:].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n # NOTE: Process-dependent control flow deliberately happens\n # after indexing operation since it must not contain code\n # sections that lead to cross-accelerator communication.\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[0])),\n recon=wandb.Image(np.asarray(recon_seq[0])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(\n grain_iterator\n ),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+11159,23373466,"train_lam.py",4036,0,"",python,selection_command
+11160,23373990,"train_dynamics.py",0,0,"from dataclasses import dataclass, field\nimport os\n\nimport einops\nfrom jax.sharding import Mesh, PartitionSpec, NamedSharding\nfrom jax.experimental.mesh_utils import create_device_mesh\nimport optax\nimport orbax.checkpoint as ocp\nimport numpy as np\nimport dm_pix as pix\nimport jax\nimport jax.numpy as jnp\nimport tyro\nimport wandb\nimport grain\nimport flax.nnx as nnx\n\nfrom genie import Genie, restore_genie_components\nfrom utils.dataloader import get_dataloader\nfrom utils.lr_utils import get_lr_schedule\nfrom utils.parameter_utils import count_parameters_by_component\n\n\n@dataclass\nclass Args:\n # Experiment\n num_steps: int = 200_000\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = """"\n save_ckpt: bool = False\n restore_ckpt: bool = False\n # Optimization\n batch_size: int = 36\n init_lr: float = 0.0\n max_lr: float = 3e-5\n decay_end: float = 0.0\n wsd_decay_steps: int = (\n 10000 # NOTE: wsd_decay_steps will only be used when using a wsd-schedule\n )\n warmup_steps: int = 5000\n lr_schedule: str = ""wsd"" # supported options: wsd, cos\n # Tokenizer\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n tokenizer_checkpoint: str = """"\n # LAM\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n lam_checkpoint: str = """"\n # Dynamics\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n dropout: float = 0.0\n mask_limit: float = 0.5\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n # Logging\n log: bool = False\n entity: str = """"\n project: str = """"\n name: str = ""train_dynamics""\n tags: list[str] = field(default_factory=lambda: [""dynamics""])\n log_interval: int = 5\n log_image_interval: int = 250\n ckpt_dir: str = """"\n log_checkpoint_interval: int = 25000\n log_checkpoint_keep_period: int = 20000\n log_gradients: bool = False\n wandb_id: str = """"\n\n\nargs = tyro.cli(Args)\n\n\ndef dynamics_loss_fn(model, inputs):\n """"""Compute masked dynamics loss""""""\n inputs[""videos""] = inputs[""videos""].astype(args.dtype) / 255.0\n model.train()\n outputs = model(inputs, training=True)\n mask = outputs[""mask""]\n outputs[""token_logits""] = outputs[""token_logits""].astype(jnp.float32)\n ce_loss = optax.softmax_cross_entropy_with_integer_labels(\n outputs[""token_logits""], outputs[""video_tokens""]\n )\n ce_loss = (mask * ce_loss).sum() / mask.sum()\n acc = outputs[""token_logits""].argmax(-1) == outputs[""video_tokens""]\n acc = (mask * acc).sum() / mask.sum()\n select_probs = jax.nn.softmax(outputs[""token_logits""])\n gt = inputs[""videos""].clip(0, 1).reshape(-1, *inputs[""videos""].shape[2:])\n recon = outputs[""recon""].clip(0, 1).reshape(-1, *outputs[""recon""].shape[2:])\n psnr = pix.psnr(gt, recon).mean() # type: ignore\n ssim = pix.ssim(gt, recon).mean() # type: ignore\n _, index_counts_lam = jnp.unique_counts(\n jnp.ravel(outputs[""lam_indices""]), size=args.num_latent_actions, fill_value=0\n )\n _, index_counts_tokenizer = jnp.unique_counts(\n jnp.ravel(outputs[""video_tokens""]), size=args.num_patch_latents, fill_value=0\n )\n codebook_usage_lam = (index_counts_lam != 0).mean()\n codebook_usage_tokenizer = (index_counts_tokenizer != 0).mean()\n metrics = dict(\n cross_entropy_loss=ce_loss,\n masked_token_accuracy=acc,\n select_logit=outputs[""token_logits""].max(-1).mean(),\n select_p=select_probs.max(-1).mean(),\n entropy=jax.scipy.special.entr(select_probs).sum(-1).mean(),\n psnr=psnr,\n ssim=ssim,\n codebook_usage_lam=codebook_usage_lam,\n codebook_usage_tokenizer=codebook_usage_tokenizer,\n )\n return ce_loss, (outputs[""recon""], metrics)\n\n\n@nnx.jit\ndef train_step(model, optimizer, inputs):\n """"""Update state and compute metrics""""""\n\n def loss_fn(model):\n return dynamics_loss_fn(model, inputs)\n\n (loss, (recon, metrics)), grads = nnx.value_and_grad(loss_fn, has_aux=True)(model)\n optimizer.update(grads)\n if args.log_gradients:\n metrics[""gradients_std/""] = jax.tree.map(\n lambda x: x.std(), grads[""params""][""dynamics""]\n )\n return loss, recon, metrics\n\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n num_devices = jax.device_count()\n if num_devices == 0:\n raise ValueError(""No JAX devices found."")\n print(f""Running on {num_devices} devices."")\n\n if args.batch_size % num_devices != 0:\n raise ValueError(\n f""Global batch size {args.batch_size} must be divisible by ""\n f""number of devices {num_devices}.""\n )\n\n per_device_batch_size_for_init = args.batch_size // num_devices\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Initialize model ---\n rng, _rng = jax.random.split(rng)\n rngs = nnx.Rngs(_rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=not args.lam_checkpoint,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n dropout=args.dropout,\n mask_limit=args.mask_limit,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n _, params, _ = nnx.split(genie, nnx.Param, ...)\n param_counts = count_parameters_by_component(params)\n\n if args.log and jax.process_index() == 0:\n wandb_init_kwargs = {\n ""entity"": args.entity,\n ""project"": args.project,\n ""name"": args.name,\n ""tags"": args.tags,\n ""group"": ""debug"",\n ""config"": args,\n }\n\n if args.wandb_id:\n wandb_init_kwargs.update(\n {\n ""id"": args.wandb_id,\n ""resume"": ""allow"",\n }\n )\n wandb.init(**wandb_init_kwargs)\n\n wandb.config.update({""model_param_count"": param_counts})\n\n print(""Parameter counts:"")\n print(param_counts)\n\n # --- Initialize optimizer ---\n lr_schedule = get_lr_schedule(\n args.lr_schedule,\n args.init_lr,\n args.max_lr,\n args.decay_end,\n args.num_steps,\n args.warmup_steps,\n args.wsd_decay_steps,\n )\n tx = optax.adamw(\n learning_rate=lr_schedule,\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n optimizer = nnx.Optimizer(genie, tx)\n\n # FIXME: switch to create_hybrid_device_mesh for runs spanning multiple nodes\n device_mesh_arr = create_device_mesh((num_devices,))\n mesh = Mesh(devices=device_mesh_arr, axis_names=(""data"",))\n\n replicated_sharding = NamedSharding(mesh, PartitionSpec())\n videos_sharding = NamedSharding(mesh, PartitionSpec(""data"", None, None, None, None))\n\n model_state = nnx.state(optimizer.model)\n model_sharded_state = jax.device_put(model_state, replicated_sharding)\n nnx.update(optimizer.model, model_sharded_state)\n optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)\n optimizer_sharded_state = jax.device_put(optimizer_state, replicated_sharding)\n nnx.update(optimizer, optimizer_sharded_state)\n\n # --- Initialize checkpoint manager ---\n step = 0\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointSave, grain.checkpoint.CheckpointHandler) # type: ignore\n handler_registry.add(""dataloader_state"", grain.checkpoint.CheckpointRestore, grain.checkpoint.CheckpointHandler) # type: ignore\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n save_interval_steps=args.log_checkpoint_interval,\n max_to_keep=3,\n keep_period=args.log_checkpoint_keep_period,\n step_format_fixed_length=6,\n cleanup_tmp_directories=True,\n )\n\n checkpoint_manager = ocp.CheckpointManager(\n args.ckpt_dir,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n # --- Create DataLoaderIterator from dataloader ---\n image_shape = (args.image_height, args.image_width, args.image_channels)\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n grain_dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n # NOTE: We deliberately pass the global batch size\n # The dataloader shards the dataset across all processes\n args.batch_size,\n *image_shape,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n initial_state = grain_dataloader._create_initial_state()\n grain_iterator = grain.DataLoaderIterator(grain_dataloader, initial_state)\n\n # --- Restore checkpoint ---\n if args.restore_ckpt:\n # FIXME (f.srambical): pass sharding information for restoration onto different topology\n abstract_optimizer = nnx.eval_shape(lambda: optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointRestore(grain_iterator),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(optimizer, restored_optimizer_state)\n grain_iterator = restored[""dataloader_state""]\n step = checkpoint_manager.latest_step() or 0\n print(f""Restored dataloader and model state from step {step}"")\n else:\n # Restore from pre-trained tokenizer (and LAM)\n optimizer = restore_genie_components(\n optimizer, replicated_sharding, rng, args\n )\n # NOTE: We have to remove the tokenizer vq dropout due to a bug in flax.nnx\n del optimizer.model.tokenizer.vq.drop\n\n # --- TRAIN LOOP ---\n dataloader = (jax.make_array_from_process_local_data(videos_sharding, elem) for elem in grain_iterator) # type: ignore\n print(f""Starting training from step {step}..."")\n while step < args.num_steps:\n for videos in dataloader:\n # --- Train step ---\n rng, _rng_mask = jax.random.split(rng, 2)\n inputs = dict(videos=videos, mask_rng=_rng_mask)\n loss, recon, metrics = train_step(genie, optimizer, inputs)\n metrics[""lr""] = lr_schedule(step)\n print(f""Step {step}, loss: {loss}"")\n step += 1\n\n # --- Logging ---\n if args.log:\n if step % args.log_interval == 0 and jax.process_index() == 0:\n wandb.log(\n {\n ""loss"": loss,\n ""step"": step,\n **metrics,\n }\n )\n if step % args.log_image_interval == 0:\n gt_seq = inputs[""videos""][0].astype(jnp.float32) / 255.0\n recon_seq = recon[0].clip(0, 1)\n comparison_seq = jnp.concatenate((gt_seq, recon_seq), axis=1)\n comparison_seq = einops.rearrange(\n comparison_seq * 255, ""t h w c -> h (t w) c""\n )\n if jax.process_index() == 0:\n log_images = dict(\n image=wandb.Image(np.asarray(gt_seq[args.seq_len - 1])),\n recon=wandb.Image(np.asarray(recon_seq[args.seq_len - 1])),\n true_vs_recon=wandb.Image(\n np.asarray(comparison_seq.astype(np.uint8))\n ),\n )\n wandb.log(log_images)\n # --- Checkpointing ---\n if args.save_ckpt and step % args.log_checkpoint_interval == 0:\n optimizer_state = nnx.state(optimizer)\n checkpoint_manager.save(\n step,\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeSave(optimizer_state),\n dataloader_state=grain.checkpoint.CheckpointSave(grain_iterator),\n ),\n )\n print(f""Saved checkpoint at step {step}"")\n if step >= args.num_steps:\n break\n\n checkpoint_manager.close()\n",python,tab
+11161,23373990,"train_dynamics.py",8492,0,"",python,selection_command
+11162,23374454,"genie.py",0,0,"from typing import Dict, Any\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nfrom flax.training.train_state import TrainState\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\nimport grain\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n tokenizer_outputs = self.tokenizer.vq_encode(batch[""videos""], training=False)\n lam_outputs = self.lam.vq_encode(batch[""videos""], training=False)\n latent_actions = jax.lax.cond(\n self.lam_co_train,\n lambda: lam_outputs[""z_q""],\n lambda: jax.lax.stop_gradient(lam_outputs[""z_q""]),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(tokenizer_outputs[""indices""]),\n latent_actions=latent_actions,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_outputs = self.dynamics(outputs, training)\n outputs.update(dyna_outputs)\n mle_indices = jnp.argmax(outputs[""token_logits""], axis=-1)\n outputs[""recon""] = self.tokenizer.decode(\n mle_indices, batch[""videos""].shape[2:4]\n )\n outputs[""lam_indices""] = lam_outputs[""indices""]\n return outputs\n\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n final_carry_maskgit = carry\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None\n\n\n# FIXME (f.srambical): add conversion script for old checkpoints\ndef restore_genie_components(\n optimizer: nnx.Optimizer,\n sharding: jax.sharding.NamedSharding,\n rng: jax.Array,\n args,\n):\n """"""Restore pre-trained Genie components""""""\n rngs = nnx.Rngs(rng)\n\n # dummy values since we only use tx to initialize the dummy train states\n dummy_tx = optax.adamw(\n learning_rate=optax.constant_schedule(args.max_lr),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n )\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n tokenizer_checkpoint_manager = ocp.CheckpointManager(\n directory=args.tokenizer_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.tokenizer_dim,\n ffn_dim=args.tokenizer_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n num_blocks=args.tokenizer_num_blocks,\n num_heads=args.tokenizer_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_tokenizer_optimizer = nnx.Optimizer(dummy_tokenizer, dummy_tx)\n dummy_tokenizer_optimizer_state = nnx.state(dummy_tokenizer_optimizer)\n abstract_sharded_tokenizer_optimizer_state = _create_abstract_sharded_pytree(\n dummy_tokenizer_optimizer_state, sharding\n )\n restored_tokenizer = tokenizer_checkpoint_manager.restore(\n step=tokenizer_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_tokenizer_optimizer.model, restored_tokenizer.model)\n optimizer.model.tokenizer = dummy_tokenizer_optimizer.model\n tokenizer_checkpoint_manager.close()\n\n if args.lam_checkpoint:\n lam_checkpoint_manager = ocp.CheckpointManager(\n directory=args.lam_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.lam_dim,\n ffn_dim=args.lam_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_latent_actions,\n patch_size=args.lam_patch_size,\n num_blocks=args.lam_num_blocks,\n num_heads=args.lam_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_lam_optimizer = nnx.Optimizer(dummy_lam, dummy_tx)\n dummy_lam_optimizer_state = nnx.state(dummy_lam_optimizer)\n abstract_sharded_lam_optimizer_state = _create_abstract_sharded_pytree(\n dummy_lam_optimizer_state, sharding\n )\n restored_lam_optimizer = lam_checkpoint_manager.restore(\n step=lam_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_lam_optimizer.model, restored_lam_optimizer.model)\n optimizer.model.lam = dummy_lam_optimizer.model\n # Remove the LAM decoder to save memory and avoid unnecessary computation.\n del optimizer.model.lam.decoder\n lam_checkpoint_manager.close()\n\n return optimizer\n\n\ndef _create_abstract_sharded_pytree(pytree_template, sharding_spec):\n """"""Replaces arrays in a pytree with ShapeDtypeStructs having the given sharding.""""""\n\n def map_fn(leaf_template):\n if hasattr(leaf_template, ""shape"") and hasattr(leaf_template, ""dtype""):\n return jax.ShapeDtypeStruct(\n leaf_template.shape, leaf_template.dtype, sharding=sharding_spec\n )\n return leaf_template\n\n return jax.tree_util.tree_map(map_fn, pytree_template)\n",python,tab
+11163,23374454,"genie.py",3690,0,"",python,selection_command
+11164,23389236,"genie.py",0,0,"",python,tab
+11165,23389236,"genie.py",8043,0,"",python,selection_command
+11166,23649439,"sample.py",0,0,"",python,tab
+11167,23649441,"sample.py",56,0,"",python,selection_command
+11168,23655818,"sample.py",4075,0,"",python,selection_mouse
+11169,23657295,"sample.py",4657,0,"",python,selection_mouse
+11170,23659498,"sample.py",4658,0,"",python,selection_command
+11171,23780508,"sample.py",4058,0,"",python,selection_mouse
+11172,23786386,"sample.py",4050,0,"",python,selection_command
+11173,23786655,"sample.py",4050,1,"",python,content
+11174,23787269,"sample.py",4050,1,"",python,content
+11175,23787479,"sample.py",4050,1,"",python,content
+11176,23787685,"sample.py",4050,1,"",python,content
+11177,23787857,"sample.py",4050,1,"",python,content
+11178,23788386,"sample.py",4050,1,"",python,content
+11179,23789516,"sample.py",4049,0,"",python,selection_command
+11180,23789672,"sample.py",4050,0,"x",python,content
+11181,23789684,"sample.py",4050,0,"",python,selection_command
+11182,23790057,"sample.py",4050,0,"n",python,content
+11183,23790060,"sample.py",4050,0,"",python,selection_command
+11184,23790270,"sample.py",4051,0,"n",python,content
+11185,23790540,"sample.py",4050,0,"@",python,content
+11186,23790541,"sample.py",4050,0,"",python,selection_command
+11187,23791306,"sample.py",4050,0," ",python,content
+11188,23791318,"sample.py",4050,0,"",python,selection_command
+11189,23791798,"sample.py",4050,0,"#",python,content
+11190,23791801,"sample.py",4050,0,"",python,selection_command
+11191,23792223,"sample.py",4060,0,"\n ",python,content
+11192,23792527,"sample.py",4065,0,"j",python,content
+11193,23792527,"sample.py",4066,0,"",python,selection_keyboard
+11194,23792637,"sample.py",4066,0,"a",python,content
+11195,23792638,"sample.py",4067,0,"",python,selection_keyboard
+11196,23792827,"sample.py",4067,0,"x",python,content
+11197,23792828,"sample.py",4068,0,"",python,selection_keyboard
+11198,23792964,"sample.py",4068,0,".",python,content
+11199,23792964,"sample.py",4069,0,"",python,selection_keyboard
+11200,23793149,"sample.py",4069,0,"j",python,content
+11201,23793150,"sample.py",4070,0,"",python,selection_keyboard
+11202,23793204,"sample.py",4070,0,"i",python,content
+11203,23793205,"sample.py",4071,0,"",python,selection_keyboard
+11204,23793246,"sample.py",4071,0,"t",python,content
+11205,23793246,"sample.py",4072,0,"",python,selection_keyboard
+11206,23794005,"sample.py",4071,0,"",python,selection_command
+11207,23794314,"sample.py",4065,0,"",python,selection_command
+11208,23794429,"sample.py",4065,0,"@",python,content
+11209,23794430,"sample.py",4066,0,"",python,selection_keyboard
+11210,23795069,"sample.py",4065,0,"",python,selection_command
+11211,23796544,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11212,23796640,"TERMINAL",0,0,"git log",,terminal_output
+11213,23798052,"TERMINAL",0,0,"[K",,terminal_output
+11214,23799096,"TERMINAL",0,0,"\r(reverse-i-search)`': [K",,terminal_output
+11215,23799352,"TERMINAL",0,0,"[28@b': [7mb[27mash experiments/sample.sh\r[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C",,terminal_output
+11216,23799448,"TERMINAL",0,0,"[1@a': [7mba[27m[1@s': [7mbas[27m",,terminal_output
+11217,23799530,"TERMINAL",0,0,"[1@h': [7mbash[27m",,terminal_output
+11218,23799746,"TERMINAL",0,0,"\r[24@[franz.srambical@hai003.haicore.berlin:~/jafar] $ bash[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C",,terminal_output
+11219,23800180,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+11220,23811871,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+11221,23829479,"TERMINAL",0,0,"2025-07-25 17:45:19.576231: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11222,23830406,"TERMINAL",0,0,"Traceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/core.py"", line 936, in __getattr__\r\n attr = getattr(self.aval, name)\r\nAttributeError: 'ShapedArray' object has no attribute 'sample'\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 185, in \r\n vid = _autoreg_sample(rng, video_batch, action_batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 157, in _autoreg_sample\r\n generated_vid = _sampling_fn(genie, batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 143, in _sampling_fn\r\n return model.sample(\r\nAttributeError: DynamicJaxprTracer has no attribute sample\r\n",,terminal_output
+11223,23830854,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+11224,23831016,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+11225,23831344,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11226,23940803,"sample.py",4060,0,"",python,selection_mouse
+11227,23940803,"sample.py",4059,0,"",python,selection_command
+11228,23941190,"sample.py",4073,0,"",python,selection_mouse
+11229,23941191,"sample.py",4072,0,"",python,selection_command
+11230,23941700,"sample.py",4073,0,"",python,selection_command
+11231,23941871,"sample.py",4073,0,"()",python,content
+11232,23941871,"sample.py",4074,0,"",python,selection_keyboard
+11233,23942378,"sample.py",4074,0,"s",python,content
+11234,23942378,"sample.py",4075,0,"",python,selection_keyboard
+11235,23942379,"sample.py",4075,0,"t",python,content
+11236,23942379,"sample.py",4076,0,"",python,selection_keyboard
+11237,23942428,"sample.py",4076,0,"a",python,content
+11238,23942428,"sample.py",4077,0,"",python,selection_keyboard
+11239,23942568,"sample.py",4077,0,"t",python,content
+11240,23942568,"sample.py",4078,0,"",python,selection_keyboard
+11241,23942734,"sample.py",4078,0,"i",python,content
+11242,23942734,"sample.py",4079,0,"",python,selection_keyboard
+11243,23942909,"sample.py",4079,0,"c",python,content
+11244,23942909,"sample.py",4080,0,"",python,selection_keyboard
+11245,23943095,"sample.py",4080,0,"_",python,content
+11246,23943096,"sample.py",4081,0,"",python,selection_keyboard
+11247,23943425,"sample.py",4081,0,"argnums=(0,)",python,content
+11248,23943646,"sample.py",4092,0,"",python,selection_command
+11249,23945926,"sample.py",4091,0,"",python,selection_command
+11250,23946463,"sample.py",4090,0,"",python,selection_command
+11251,23946631,"sample.py",4089,0,"",python,selection_command
+11252,23946819,"sample.py",4089,1,"",python,content
+11253,23947095,"sample.py",4090,0,"",python,selection_command
+11254,23947201,"sample.py",4090,1,"",python,content
+11255,23947375,"sample.py",4090,1,"",python,content
+11256,23948360,"sample.py",4089,0,"",python,selection_command
+11257,23949250,"sample.py",4120,0,"",python,selection_command
+11258,23949515,"sample.py",4089,0,"",python,selection_command
+11259,23951480,"sample.py",4089,0,"(",python,content
+11260,23951480,"sample.py",4090,0,"",python,selection_keyboard
+11261,23951813,"sample.py",4089,0,"",python,selection_command
+11262,23951845,"sample.py",4090,0,"",python,selection_command
+11263,23952004,"sample.py",4091,0,"",python,selection_command
+11264,23952337,"sample.py",4091,0,")",python,content
+11265,23952337,"sample.py",4092,0,"",python,selection_keyboard
+11266,23952618,"sample.py",4091,0,"",python,selection_command
+11267,23957462,"sample.py",4090,0,"",python,selection_command
+11268,23957771,"sample.py",4123,0,"",python,selection_command
+11269,23958168,"sample.py",4090,0,"",python,selection_command
+11270,23958651,"sample.py",4091,0,"",python,selection_command
+11271,23960202,"sample.py",4091,0,",",python,content
+11272,23960202,"sample.py",4092,0,"",python,selection_keyboard
+11273,23960394,"sample.py",4092,0," ",python,content
+11274,23960394,"sample.py",4093,0,"",python,selection_keyboard
+11275,23960727,"sample.py",4093,0,"0",python,content
+11276,23960727,"sample.py",4094,0,"",python,selection_keyboard
+11277,23960917,"sample.py",4093,0,"",python,selection_command
+11278,23961775,"sample.py",4129,0,"",python,selection_command
+11279,23962125,"sample.py",4093,0,"",python,selection_command
+11280,23964614,"sample.py",4090,4,"",python,content
+11281,23965480,"sample.py",4088,0,"",python,selection_command
+11282,23965796,"sample.py",4074,0,"",python,selection_command
+11283,23965968,"sample.py",4073,0,"",python,selection_command
+11284,23966081,"sample.py",4070,0,"",python,selection_command
+11285,23966396,"sample.py",4071,0,"",python,selection_command
+11286,23966553,"sample.py",4072,0,"",python,selection_command
+11287,23966733,"sample.py",4073,0,"",python,selection_command
+11288,23967031,"sample.py",4073,19,"",python,content
+11289,23967032,"sample.py",4072,0,"",python,selection_command
+11290,23967446,"sample.py",4065,0,"",python,selection_command
+11291,23967701,"sample.py",4065,0,"#",python,content
+11292,23967701,"sample.py",4066,0,"",python,selection_keyboard
+11293,23967733,"sample.py",4066,0," ",python,content
+11294,23967733,"sample.py",4067,0,"",python,selection_keyboard
+11295,23967979,"sample.py",4066,0,"",python,selection_command
+11296,23970303,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11297,23970409,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+11298,23970633,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+11299,23982285,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+11300,24009660,"TERMINAL",0,0,"2025-07-25 17:48:19.709902: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11301,24011069,"TERMINAL",0,0,"2025-07-25 17:48:21.166705: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11302,24014570,"TERMINAL",0,0,"2025-07-25 17:48:24.666014: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11303,24015298,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 185, in \r\n vid = _autoreg_sample(rng, video_batch, action_batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 157, in _autoreg_sample\r\n generated_vid = _sampling_fn(genie, batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 143, in _sampling_fn\r\n return model.sample(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 232, in sample\r\n final_carry, _ = jax.lax.scan(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 222, in generation_step_fn\r\n final_carry_maskgit, _ = scanned_maskgit_loop(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/graph.py"", line 2051, in update_context_manager_wrapper\r\n return f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/iteration.py"", line 1213, in scan_wrapper\r\n pure_args: tuple = extract.to_tree(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 234, in to_tree\r\n check_consistent_aliasing(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 62, in check_consistent_aliasing\r\n raise ValueError(\r\nValueError: Cannot extract graph node from different trace level, got Param( # 512 (2.0 KB)\r\n value=Array([ 5.79902204e-04, 1.83785363e-04, -4.59459057e-04, 8.86579161e-04,\r\n -9.27979272e-05, -9.69715067e-04, -4.53975401e-04, 9.66143620e-04,\r\n 6.35958044e-04, 8.12941696e-04, -1.59645584e-04, 8.73808283e-04,\r\n 5.54829487e-04, -3.31153715e-04, -2.80674431e-04, 2.08017969e-04,\r\n 5.70197881e-04, 2.15050895e-04, 5.40059758e-04, -4.79549635e-05,\r\n -4.15008763e-05, -2.08970683e-04, -1.21672614e-03, 1.19385462e-04,\r\n 1.27799038e-04, -5.29211015e-04, 1.21446757e-03, -5.71820536e-04,\r\n 9.03176318e-04, -3.26241832e-04, 1.94552151e-04, 1.03536039e-03,\r\n -1.39086973e-04, 1.61354081e-04, -6.76629366e-04, 5.75365848e-04,\r\n -9.89008113e-04, -4.70508414e-04, 4.30073997e-04, -9.32542316e-04,\r\n 1.78392953e-03, 8.52322148e-04, 6.27272122e-04, -1.00176403e-05,\r\n -4.88205958e-04, 1.08008273e-03, -1.03389437e-03, 1.23284571e-03,\r\n -8.64696514e-04, 2.81569461e-04, 1.85537362e-03, -1.39499875e-03,\r\n 1.22260256e-03, 2.67286028e-04, 3.99140990e-04, -3.88738234e-04,\r\n 3.53423529e-04, -1.82328338e-04, -1.15320901e-03, -6.54615753e-04,\r\n 1.59805757e-04, -9.94076603e-04, -3.16731515e-04, -7.01153127e-04,\r\n 1.10227498e-03, 8.80063686e-04, -2.45422620e-04, -3.21568987e-05,\r\n -3.20224732e-04, 5.96415019e-04, 7.74631277e-04, 3.79502053e-05,\r\n -1.14807324e-03, -6.37564226e-04, 1.10084063e-03, -1.24254508e-03,\r\n -1.88223156e-03, 3.91570269e-04, 1.26973784e-04, -6.07062539e-04,\r\n 4.42030723e-04, 1.08278170e-03, -2.53870567e-05, 8.86333932e-04,\r\n -4.35208873e-04, -9.83790029e-04, 5.52977144e-04, -7.75978493e-04,\r\n 7.02897145e-04, -5.66870905e-04, -1.17189578e-04, -2.46665877e-04,\r\n 8.37000145e-04, 2.41109577e-04, -1.92638050e-04, -8.07702600e-06,\r\n -1.01163960e-03, 1.29226910e-05, 2.71586876e-04, -5.78537700e-04,\r\n 3.61651502e-04, 9.29420494e-05, -8.47803545e-04, 5.12732367e-04,\r\n 6.88695232e-04, 8.45044036e-04, -5.75123529e-04, 9.38976242e-04,\r\n 2.80764725e-05, 1.29268126e-04, -2.86230148e-04, 4.62087628e-04,\r\n 1.21393276e-03, -1.06451521e-03, -3.19257990e-04, 2.99410924e-04,\r\n 7.36906542e-04, 4.28144063e-04, -5.71604993e-04, 1.06423293e-04,\r\n -1.00667239e-03, -7.52831867e-04, -3.59850051e-03, -1.87116399e-04,\r\n -4.14791692e-04, -8.31779034e-04, -3.25797912e-04, 8.16694403e-04,\r\n -9.11948664e-05, -4.20872530e-04, -6.35586970e-04, 6.33112912e-04,\r\n -6.17303536e-04, -2.89018299e-05, -5.22513525e-04, 4.04142193e-04,\r\n 5.91298565e-04, -1.46551800e-04, -3.64537060e-04, 3.70698632e-04,\r\n -8.62165005e-04, -1.01958367e-03, 1.31774781e-04, 7.06719642e-04,\r\n 4.59892675e-04, 6.08660514e-04, 7.37728260e-04, 9.00431187e-04,\r\n 2.97220395e-04, -5.90034761e-04, 1.08272862e-03, -1.25857792e-03,\r\n 4.49936197e-04, 4.72550513e-04, -4.46944527e-04, -1.89290964e-03,\r\n 4.92720632e-04, -1.54460227e-04, -3.73741816e-04, -4.02631325e-04,\r\n 7.99135596e-04, -9.80796642e-04, 8.25236260e-04, 5.57116349e-04,\r\n -2.10288522e-06, -6.69197412e-04, -1.66126192e-05, -1.53326517e-04,\r\n -2.82244346e-05, -4.02772828e-04, -8.12421786e-04, 8.35117011e-04,\r\n -2.69911343e-05, -7.43109034e-04, -1.37779469e-04, -2.41833441e-05,\r\n -7.38260802e-04, -1.96821813e-04, -2.41502148e-05, -9.97454161e-04,\r\n 2.64732487e-04, -1.75832678e-03, 1.17485710e-04, -9.78037788e-05,\r\n 5.26464079e-04, -5.53459337e-04, 6.35085307e-05, 1.40959528e-04,\r\n -1.60802004e-03, 1.16834894e-03, -5.71387936e-04, 4.59257135e-04,\r\n -2.16942135e-04, -8.20923306e-04, -8.22454283e-04, -8.91073432e-04,\r\n 2.80208944e-04, 9.43574269e-05, 3.45775508e-04, 3.24587803e-04,\r\n 2.38559805e-04, -2.06248820e-04, 6.20714738e-04, -5.87494171e-04,\r\n 5.99128893e-04, -4.89475846e-04, -5.58521075e-04, 5.39315806e-06,\r\n -3.42503714e-04, 1.41901127e-03, -7.57163682e-04, -5.64522692e-04,\r\n -7.91520986e-04, 5.21145121e-04, 2.02408852e-03, -1.06384607e-04,\r\n -1.21695211e-03, -9.05069406e-04, -2.70358782e-04, -1.09641609e-04,\r\n -5.39235072e-04, -7.67180027e-05, -9.86311701e-04, 9.68765526e-04,\r\n -1.53652707e-03, 1.21926062e-03, 2.52706406e-04, -7.57116533e-04,\r\n 1.04164751e-03, -5.71496435e-04, 1.35344639e-03, 1.13940553e-03,\r\n 1.18351798e-03, 3.16733378e-04, -1.22747966e-04, 1.00750802e-03,\r\n 5.21870737e-04, -6.90255489e-04, 8.15491658e-04, -2.37966480e-04,\r\n -8.04664160e-04, -2.43383824e-04, 1.04590249e-03, 4.09602129e-04,\r\n 2.98886618e-04, 5.60442335e-04, -9.23424595e-05, 1.13964127e-03,\r\n 1.63377903e-03, -3.52117167e-05, -1.01013153e-04, 4.21650271e-04,\r\n -1.90464052e-05, 4.41401382e-04, 4.17727046e-04, 2.26323973e-04,\r\n 1.99855678e-03, -4.36673610e-04, 5.34953084e-04, -2.98760744e-04,\r\n 7.57532369e-04, -4.41849406e-05, 8.95082660e-04, -1.57386050e-04,\r\n 1.00758346e-03, 1.31029997e-03, 1.05182955e-03, 6.29643851e-04,\r\n 7.18104246e-04, 6.72722759e-04, 4.02423204e-04, 7.48195569e-04,\r\n 1.25203666e-03, 8.22027563e-04, 9.40077298e-04, -4.74464643e-04,\r\n -5.54924889e-04, 1.37185189e-03, -5.98437502e-04, 5.39190311e-04,\r\n -1.77317968e-04, 4.34110880e-05, 2.80075270e-04, 9.38114536e-05,\r\n -5.74664795e-04, -2.56602390e-04, -3.57944460e-04, 3.20801977e-04,\r\n -8.67931580e-04, 8.37371685e-04, 7.27320032e-04, -1.76582369e-04,\r\n 7.91078957e-04, 4.23305173e-04, 4.62880242e-04, -1.37596298e-03,\r\n -1.13309245e-03, 2.28138175e-04, -2.17030523e-04, 4.47029161e-04,\r\n -3.13183031e-04, -8.57597843e-06, -1.70763378e-04, -3.13189346e-04,\r\n 5.98123414e-04, 7.43433542e-04, -6.40252256e-04, 1.16536394e-03,\r\n 4.43872443e-04, 2.68466742e-04, -5.92972443e-04, -3.28011083e-04,\r\n -1.38441182e-03, 1.32673758e-05, -7.58231850e-04, -8.87676724e-05,\r\n 5.78527339e-04, 5.90835582e-04, 2.03411822e-04, 1.24355123e-04,\r\n 5.48458833e-04, 9.78736498e-05, -1.03728543e-03, -3.01620224e-04,\r\n -1.74664694e-03, 7.20503740e-04, 6.87097199e-04, 1.52700138e-03,\r\n -3.92811460e-04, -9.12196847e-05, -1.20099890e-03, -2.41123402e-04,\r\n 4.94409003e-04, -2.18983478e-04, -3.60000195e-05, -3.65556945e-04,\r\n 1.96742803e-05, -2.71012366e-04, -1.73564782e-04, 8.47964198e-04,\r\n 2.21183691e-05, 1.03721082e-04, 2.08908197e-04, -1.21639017e-03,\r\n 1.95942193e-04, 7.62266631e-04, 6.94759656e-04, 4.05154628e-04,\r\n -3.88813118e-04, 4.04668244e-04, -9.64264269e-04, -9.78495809e-04,\r\n 2.63609021e-04, 1.28671119e-03, 1.50890446e-06, -1.47685735e-03,\r\n -3.91801033e-04, 6.89492153e-04, 1.54065288e-04, -7.52089254e-05,\r\n -5.16254688e-04, 1.22117333e-03, -7.89227721e-04, 3.10281350e-04,\r\n 6.04541274e-04, -8.08428042e-04, -4.07220388e-04, 1.63781169e-05,\r\n -1.83526252e-03, -2.85982329e-04, 3.72489012e-04, -1.18422118e-04,\r\n -5.50847062e-06, 7.97088665e-04, 8.39237880e-04, 4.19908756e-04,\r\n -8.03221890e-04, -1.84057732e-04, -4.45082173e-04, 4.99040994e-04,\r\n 4.33483481e-04, 3.49355309e-04, 1.16468131e-04, 5.28083183e-04,\r\n -3.33790085e-04, 4.05789819e-04, -4.99511254e-04, 4.47895145e-04,\r\n 9.16178920e-04, 1.27455336e-04, -7.90875114e-04, -1.87337559e-04,\r\n 5.46464056e-04, -1.97961679e-04, 5.16001717e-04, -3.01448978e-04,\r\n -7.32789398e-04, -5.35160907e-05, 8.00862035e-04, 2.55532126e-04,\r\n -1.20945135e-03, 1.30921791e-04, -8.28967197e-04, 6.94736780e-04,\r\n 5.37068641e-04, 6.49138179e-04, -1.28828734e-03, -1.65148254e-03,\r\n -2.39196524e-04, 2.97041523e-04, 6.82452170e-04, 9.58763529e-04,\r\n -3.23396933e-04, -4.11480432e-04, -6.44017302e-04, -5.29786339e-05,\r\n -1.78653211e-03, -5.08558238e-04, -1.45838130e-04, -9.38410463e-04,\r\n -2.31247221e-04, -1.38276344e-04, 5.02012146e-04, 1.82994161e-04,\r\n 4.50831198e-04, -6.57172059e-04, -5.29879937e-04, 8.19339533e-04,\r\n 2.27263183e-04, -5.64834918e-04, 5.89020328e-06, 4.24688362e-04,\r\n -5.74991354e-05, -8.38618609e-04, 1.10551220e-04, 8.83210625e-04,\r\n 4.11351357e-04, -1.51288128e-04, -2.01765855e-04, -1.03000458e-03,\r\n 7.08942418e-04, 1.48007052e-03, -1.95403220e-04, 3.60081875e-04,\r\n 1.25058158e-03, -9.34130658e-05, 3.20896826e-04, 5.42961898e-05,\r\n -6.80940284e-04, 2.27259043e-05, -7.13856833e-04, -1.52521738e-04,\r\n 3.61050043e-04, -4.69459046e-05, 8.40932131e-04, -5.49682882e-04,\r\n -9.92985209e-04, -9.39348538e-04, -2.16365544e-04, -1.67845748e-04,\r\n -3.82347789e-05, 8.46338633e-04, -2.00853450e-04, 5.91547636e-04,\r\n -9.63313098e-04, 6.26304129e-04, 2.89927382e-04, 5.83152694e-04,\r\n -4.67221427e-04, 7.69491307e-05, 1.00245490e-03, 1.41421019e-03,\r\n 1.21694221e-03, -4.21749137e-04, 1.32508183e-04, -4.79456852e-04,\r\n 1.40894449e-03, 3.07102455e-04, 6.03875902e-04, -2.19981390e-04,\r\n -5.80208725e-04, -5.96643367e-04, -8.09447083e-04, -1.09303067e-03,\r\n -1.87922409e-03, -2.33222730e-04, -8.87487477e-05, 1.19461096e-03,\r\n 1.01204154e-04, 3.86784523e-04, 1.93878368e-04, -1.12958800e-03,\r\n -5.13361825e-04, -1.28040544e-03, 1.13598770e-03, -5.96334517e-04,\r\n -5.94493118e-04, -8.42069203e-05, -1.37871888e-03, -5.04129624e-04,\r\n 2.57312262e-04, 1.25586567e-03, -9.58606310e-04, -1.31114866e-04,\r\n -1.08709582e-03, 2.01435620e-03, -4.94437059e-04, -3.38324317e-04,\r\n -5.50381432e-04, -2.00382055e-04, -1.38255578e-04, 2.45632022e-04], dtype=float32)\r\n)\r\n",,terminal_output
+11304,24015805,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+11305,24015937,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 3 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+11306,24016296,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11307,24026322,"sample.py",4075,0,"",python,selection_mouse
+11308,24026322,"sample.py",4074,0,"",python,selection_command
+11309,24038325,"sample.py",4089,0,"",python,selection_command
+11310,24038588,"sample.py",4125,0,"",python,selection_command
+11311,24038614,"sample.py",4203,0,"",python,selection_command
+11312,24038712,"sample.py",4232,0,"",python,selection_command
+11313,24038713,"sample.py",4251,0,"",python,selection_command
+11314,24038713,"sample.py",4277,0,"",python,selection_command
+11315,24038734,"sample.py",4309,0,"",python,selection_command
+11316,24038767,"sample.py",4339,0,"",python,selection_command
+11317,24038809,"sample.py",4366,0,"",python,selection_command
+11318,24038963,"sample.py",4368,0,"",python,selection_command
+11319,24039244,"sample.py",4369,0,"",python,selection_command
+11320,24039636,"sample.py",4383,0,"",python,selection_command
+11321,24040003,"sample.py",4369,0,"",python,selection_command
+11322,24040150,"sample.py",4368,0,"",python,selection_command
+11323,24040318,"sample.py",4366,0,"",python,selection_command
+11324,24043745,"sample.py",0,0,"",python,tab
+11325,24043745,"sample.py",3205,0,"",python,selection_mouse
+11326,24046866,"sample.py",3209,0,"",python,selection_mouse
+11327,24047511,"sample.py",3228,0,"",python,selection_mouse
+11328,24077573,"sample.py",0,0,"",python,tab
+11329,24077573,"sample.py",4436,0,"",python,selection_mouse
+11330,24078579,"sample.py",4672,0,"",python,selection_mouse
+11331,24084084,"sample.py",4088,0,"",python,selection_mouse
+11332,24095759,"sample.py",4668,0,"",python,selection_mouse
+11333,24101131,"sample.py",4668,26,"",python,content
+11334,24101430,"sample.py",4668,0,"m",python,content
+11335,24101430,"sample.py",4669,0,"",python,selection_keyboard
+11336,24101476,"sample.py",4669,0,"o",python,content
+11337,24101477,"sample.py",4670,0,"",python,selection_keyboard
+11338,24101545,"sample.py",4670,0,"d",python,content
+11339,24101546,"sample.py",4671,0,"",python,selection_keyboard
+11340,24101699,"sample.py",4671,0,"e",python,content
+11341,24101700,"sample.py",4672,0,"",python,selection_keyboard
+11342,24101743,"sample.py",4672,0,"l",python,content
+11343,24101743,"sample.py",4673,0,"",python,selection_keyboard
+11344,24101945,"sample.py",4673,0,".",python,content
+11345,24101945,"sample.py",4674,0,"",python,selection_keyboard
+11346,24102236,"sample.py",4674,0," ",python,content
+11347,24102237,"sample.py",4675,0,"",python,selection_keyboard
+11348,24102605,"sample.py",4674,1,"",python,content
+11349,24102696,"sample.py",4674,0,"s",python,content
+11350,24102696,"sample.py",4675,0,"",python,selection_keyboard
+11351,24102776,"sample.py",4675,0,"a",python,content
+11352,24102776,"sample.py",4676,0,"",python,selection_keyboard
+11353,24102807,"sample.py",4676,0,"m",python,content
+11354,24102808,"sample.py",4677,0,"",python,selection_keyboard
+11355,24102876,"sample.py",4677,0,"p",python,content
+11356,24102876,"sample.py",4678,0,"",python,selection_keyboard
+11357,24102916,"sample.py",4678,0,"l",python,content
+11358,24102916,"sample.py",4679,0,"",python,selection_keyboard
+11359,24103045,"sample.py",4679,0,"e",python,content
+11360,24103046,"sample.py",4680,0,"",python,selection_keyboard
+11361,24103301,"sample.py",4680,0,"()",python,content
+11362,24103301,"sample.py",4681,0,"",python,selection_keyboard
+11363,24105386,"sample.py",4681,0,"batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax",python,content
+11364,24105666,"sample.py",4757,0,"",python,selection_command
+11365,24106006,"sample.py",4644,0,"",python,selection_command
+11366,24107096,"sample.py",4652,0,"",python,selection_command
+11367,24107230,"sample.py",4666,0,"",python,selection_command
+11368,24107375,"sample.py",4668,0,"",python,selection_command
+11369,24107736,"sample.py",4668,5,"",python,content
+11370,24107872,"sample.py",4668,0,"g",python,content
+11371,24107873,"sample.py",4669,0,"",python,selection_keyboard
+11372,24107961,"sample.py",4669,0,"e",python,content
+11373,24107961,"sample.py",4670,0,"",python,selection_keyboard
+11374,24108027,"sample.py",4670,0,"n",python,content
+11375,24108028,"sample.py",4671,0,"",python,selection_keyboard
+11376,24108076,"sample.py",4671,0,"i",python,content
+11377,24108076,"sample.py",4672,0,"",python,selection_keyboard
+11378,24108161,"sample.py",4672,0,"e",python,content
+11379,24108161,"sample.py",4673,0,"",python,selection_keyboard
+11380,24108350,"sample.py",4672,0,"",python,selection_command
+11381,24110570,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11382,24110627,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+11383,24110856,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+11384,24122632,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+11385,24124692,"sample.py",4673,0,"",python,selection_command
+11386,24124845,"sample.py",4674,0,"",python,selection_command
+11387,24125462,"genie.py",0,0,"",python,tab
+11388,24125462,"genie.py",5064,0,"",python,selection_command
+11389,24137242,"sample.py",0,0,"",python,tab
+11390,24137242,"sample.py",4674,0,"",python,selection_command
+11391,24144013,"TERMINAL",0,0,"2025-07-25 17:50:34.086510: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11392,24145459,"TERMINAL",0,0,"2025-07-25 17:50:35.556220: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11393,24149030,"TERMINAL",0,0,"2025-07-25 17:50:39.082675: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11394,24149647,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 185, in \r\n vid = _autoreg_sample(rng, video_batch, action_batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 157, in _autoreg_sample\r\n generated_vid = genie.sample(batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax)\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 232, in sample\r\n final_carry, _ = jax.lax.scan(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 222, in generation_step_fn\r\n final_carry_maskgit, _ = scanned_maskgit_loop(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/graph.py"", line 2051, in update_context_manager_wrapper\r\n return f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/iteration.py"", line 1213, in scan_wrapper\r\n pure_args: tuple = extract.to_tree(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 234, in to_tree\r\n check_consistent_aliasing(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/extract.py"", line 62, in check_consistent_aliasing\r\n raise ValueError(\r\nValueError: Cannot extract graph node from different trace level, got Param( # 512 (2.0 KB)\r\n value=Array([ 5.79902204e-04, 1.83785363e-04, -4.59459057e-04, 8.86579161e-04,\r\n -9.27979272e-05, -9.69715067e-04, -4.53975401e-04, 9.66143620e-04,\r\n 6.35958044e-04, 8.12941696e-04, -1.59645584e-04, 8.73808283e-04,\r\n 5.54829487e-04, -3.31153715e-04, -2.80674431e-04, 2.08017969e-04,\r\n 5.70197881e-04, 2.15050895e-04, 5.40059758e-04, -4.79549635e-05,\r\n -4.15008763e-05, -2.08970683e-04, -1.21672614e-03, 1.19385462e-04,\r\n 1.27799038e-04, -5.29211015e-04, 1.21446757e-03, -5.71820536e-04,\r\n 9.03176318e-04, -3.26241832e-04, 1.94552151e-04, 1.03536039e-03,\r\n -1.39086973e-04, 1.61354081e-04, -6.76629366e-04, 5.75365848e-04,\r\n -9.89008113e-04, -4.70508414e-04, 4.30073997e-04, -9.32542316e-04,\r\n 1.78392953e-03, 8.52322148e-04, 6.27272122e-04, -1.00176403e-05,\r\n -4.88205958e-04, 1.08008273e-03, -1.03389437e-03, 1.23284571e-03,\r\n -8.64696514e-04, 2.81569461e-04, 1.85537362e-03, -1.39499875e-03,\r\n 1.22260256e-03, 2.67286028e-04, 3.99140990e-04, -3.88738234e-04,\r\n 3.53423529e-04, -1.82328338e-04, -1.15320901e-03, -6.54615753e-04,\r\n 1.59805757e-04, -9.94076603e-04, -3.16731515e-04, -7.01153127e-04,\r\n 1.10227498e-03, 8.80063686e-04, -2.45422620e-04, -3.21568987e-05,\r\n -3.20224732e-04, 5.96415019e-04, 7.74631277e-04, 3.79502053e-05,\r\n -1.14807324e-03, -6.37564226e-04, 1.10084063e-03, -1.24254508e-03,\r\n -1.88223156e-03, 3.91570269e-04, 1.26973784e-04, -6.07062539e-04,\r\n 4.42030723e-04, 1.08278170e-03, -2.53870567e-05, 8.86333932e-04,\r\n -4.35208873e-04, -9.83790029e-04, 5.52977144e-04, -7.75978493e-04,\r\n 7.02897145e-04, -5.66870905e-04, -1.17189578e-04, -2.46665877e-04,\r\n 8.37000145e-04, 2.41109577e-04, -1.92638050e-04, -8.07702600e-06,\r\n -1.01163960e-03, 1.29226910e-05, 2.71586876e-04, -5.78537700e-04,\r\n 3.61651502e-04, 9.29420494e-05, -8.47803545e-04, 5.12732367e-04,\r\n 6.88695232e-04, 8.45044036e-04, -5.75123529e-04, 9.38976242e-04,\r\n 2.80764725e-05, 1.29268126e-04, -2.86230148e-04, 4.62087628e-04,\r\n 1.21393276e-03, -1.06451521e-03, -3.19257990e-04, 2.99410924e-04,\r\n 7.36906542e-04, 4.28144063e-04, -5.71604993e-04, 1.06423293e-04,\r\n -1.00667239e-03, -7.52831867e-04, -3.59850051e-03, -1.87116399e-04,\r\n -4.14791692e-04, -8.31779034e-04, -3.25797912e-04, 8.16694403e-04,\r\n -9.11948664e-05, -4.20872530e-04, -6.35586970e-04, 6.33112912e-04,\r\n -6.17303536e-04, -2.89018299e-05, -5.22513525e-04, 4.04142193e-04,\r\n 5.91298565e-04, -1.46551800e-04, -3.64537060e-04, 3.70698632e-04,\r\n -8.62165005e-04, -1.01958367e-03, 1.31774781e-04, 7.06719642e-04,\r\n 4.59892675e-04, 6.08660514e-04, 7.37728260e-04, 9.00431187e-04,\r\n 2.97220395e-04, -5.90034761e-04, 1.08272862e-03, -1.25857792e-03,\r\n 4.49936197e-04, 4.72550513e-04, -4.46944527e-04, -1.89290964e-03,\r\n 4.92720632e-04, -1.54460227e-04, -3.73741816e-04, -4.02631325e-04,\r\n 7.99135596e-04, -9.80796642e-04, 8.25236260e-04, 5.57116349e-04,\r\n -2.10288522e-06, -6.69197412e-04, -1.66126192e-05, -1.53326517e-04,\r\n -2.82244346e-05, -4.02772828e-04, -8.12421786e-04, 8.35117011e-04,\r\n -2.69911343e-05, -7.43109034e-04, -1.37779469e-04, -2.41833441e-05,\r\n -7.38260802e-04, -1.96821813e-04, -2.41502148e-05, -9.97454161e-04,\r\n 2.64732487e-04, -1.75832678e-03, 1.17485710e-04, -9.78037788e-05,\r\n 5.26464079e-04, -5.53459337e-04, 6.35085307e-05, 1.40959528e-04,\r\n -1.60802004e-03, 1.16834894e-03, -5.71387936e-04, 4.59257135e-04,\r\n -2.16942135e-04, -8.20923306e-04, -8.22454283e-04, -8.91073432e-04,\r\n 2.80208944e-04, 9.43574269e-05, 3.45775508e-04, 3.24587803e-04,\r\n 2.38559805e-04, -2.06248820e-04, 6.20714738e-04, -5.87494171e-04,\r\n 5.99128893e-04, -4.89475846e-04, -5.58521075e-04, 5.39315806e-06,\r\n -3.42503714e-04, 1.41901127e-03, -7.57163682e-04, -5.64522692e-04,\r\n -7.91520986e-04, 5.21145121e-04, 2.02408852e-03, -1.06384607e-04,\r\n -1.21695211e-03, -9.05069406e-04, -2.70358782e-04, -1.09641609e-04,\r\n -5.39235072e-04, -7.67180027e-05, -9.86311701e-04, 9.68765526e-04,\r\n -1.53652707e-03, 1.21926062e-03, 2.52706406e-04, -7.57116533e-04,\r\n 1.04164751e-03, -5.71496435e-04, 1.35344639e-03, 1.13940553e-03,\r\n 1.18351798e-03, 3.16733378e-04, -1.22747966e-04, 1.00750802e-03,\r\n 5.21870737e-04, -6.90255489e-04, 8.15491658e-04, -2.37966480e-04,\r\n -8.04664160e-04, -2.43383824e-04, 1.04590249e-03, 4.09602129e-04,\r\n 2.98886618e-04, 5.60442335e-04, -9.23424595e-05, 1.13964127e-03,\r\n 1.63377903e-03, -3.52117167e-05, -1.01013153e-04, 4.21650271e-04,\r\n -1.90464052e-05, 4.41401382e-04, 4.17727046e-04, 2.26323973e-04,\r\n 1.99855678e-03, -4.36673610e-04, 5.34953084e-04, -2.98760744e-04,\r\n 7.57532369e-04, -4.41849406e-05, 8.95082660e-04, -1.57386050e-04,\r\n 1.00758346e-03, 1.31029997e-03, 1.05182955e-03, 6.29643851e-04,\r\n 7.18104246e-04, 6.72722759e-04, 4.02423204e-04, 7.48195569e-04,\r\n 1.25203666e-03, 8.22027563e-04, 9.40077298e-04, -4.74464643e-04,\r\n -5.54924889e-04, 1.37185189e-03, -5.98437502e-04, 5.39190311e-04,\r\n -1.77317968e-04, 4.34110880e-05, 2.80075270e-04, 9.38114536e-05,\r\n -5.74664795e-04, -2.56602390e-04, -3.57944460e-04, 3.20801977e-04,\r\n -8.67931580e-04, 8.37371685e-04, 7.27320032e-04, -1.76582369e-04,\r\n 7.91078957e-04, 4.23305173e-04, 4.62880242e-04, -1.37596298e-03,\r\n -1.13309245e-03, 2.28138175e-04, -2.17030523e-04, 4.47029161e-04,\r\n -3.13183031e-04, -8.57597843e-06, -1.70763378e-04, -3.13189346e-04,\r\n 5.98123414e-04, 7.43433542e-04, -6.40252256e-04, 1.16536394e-03,\r\n 4.43872443e-04, 2.68466742e-04, -5.92972443e-04, -3.28011083e-04,\r\n -1.38441182e-03, 1.32673758e-05, -7.58231850e-04, -8.87676724e-05,\r\n 5.78527339e-04, 5.90835582e-04, 2.03411822e-04, 1.24355123e-04,\r\n 5.48458833e-04, 9.78736498e-05, -1.03728543e-03, -3.01620224e-04,\r\n -1.74664694e-03, 7.20503740e-04, 6.87097199e-04, 1.52700138e-03,\r\n -3.92811460e-04, -9.12196847e-05, -1.20099890e-03, -2.41123402e-04,\r\n 4.94409003e-04, -2.18983478e-04, -3.60000195e-05, -3.65556945e-04,\r\n 1.96742803e-05, -2.71012366e-04, -1.73564782e-04, 8.47964198e-04,\r\n 2.21183691e-05, 1.03721082e-04, 2.08908197e-04, -1.21639017e-03,\r\n 1.95942193e-04, 7.62266631e-04, 6.94759656e-04, 4.05154628e-04,\r\n -3.88813118e-04, 4.04668244e-04, -9.64264269e-04, -9.78495809e-04,\r\n 2.63609021e-04, 1.28671119e-03, 1.50890446e-06, -1.47685735e-03,\r\n -3.91801033e-04, 6.89492153e-04, 1.54065288e-04, -7.52089254e-05,\r\n -5.16254688e-04, 1.22117333e-03, -7.89227721e-04, 3.10281350e-04,\r\n 6.04541274e-04, -8.08428042e-04, -4.07220388e-04, 1.63781169e-05,\r\n -1.83526252e-03, -2.85982329e-04, 3.72489012e-04, -1.18422118e-04,\r\n -5.50847062e-06, 7.97088665e-04, 8.39237880e-04, 4.19908756e-04,\r\n -8.03221890e-04, -1.84057732e-04, -4.45082173e-04, 4.99040994e-04,\r\n 4.33483481e-04, 3.49355309e-04, 1.16468131e-04, 5.28083183e-04,\r\n -3.33790085e-04, 4.05789819e-04, -4.99511254e-04, 4.47895145e-04,\r\n 9.16178920e-04, 1.27455336e-04, -7.90875114e-04, -1.87337559e-04,\r\n 5.46464056e-04, -1.97961679e-04, 5.16001717e-04, -3.01448978e-04,\r\n -7.32789398e-04, -5.35160907e-05, 8.00862035e-04, 2.55532126e-04,\r\n -1.20945135e-03, 1.30921791e-04, -8.28967197e-04, 6.94736780e-04,\r\n 5.37068641e-04, 6.49138179e-04, -1.28828734e-03, -1.65148254e-03,\r\n -2.39196524e-04, 2.97041523e-04, 6.82452170e-04, 9.58763529e-04,\r\n -3.23396933e-04, -4.11480432e-04, -6.44017302e-04, -5.29786339e-05,\r\n -1.78653211e-03, -5.08558238e-04, -1.45838130e-04, -9.38410463e-04,\r\n -2.31247221e-04, -1.38276344e-04, 5.02012146e-04, 1.82994161e-04,\r\n 4.50831198e-04, -6.57172059e-04, -5.29879937e-04, 8.19339533e-04,\r\n 2.27263183e-04, -5.64834918e-04, 5.89020328e-06, 4.24688362e-04,\r\n -5.74991354e-05, -8.38618609e-04, 1.10551220e-04, 8.83210625e-04,\r\n 4.11351357e-04, -1.51288128e-04, -2.01765855e-04, -1.03000458e-03,\r\n 7.08942418e-04, 1.48007052e-03, -1.95403220e-04, 3.60081875e-04,\r\n 1.25058158e-03, -9.34130658e-05, 3.20896826e-04, 5.42961898e-05,\r\n -6.80940284e-04, 2.27259043e-05, -7.13856833e-04, -1.52521738e-04,\r\n 3.61050043e-04, -4.69459046e-05, 8.40932131e-04, -5.49682882e-04,\r\n -9.92985209e-04, -9.39348538e-04, -2.16365544e-04, -1.67845748e-04,\r\n -3.82347789e-05, 8.46338633e-04, -2.00853450e-04, 5.91547636e-04,\r\n -9.63313098e-04, 6.26304129e-04, 2.89927382e-04, 5.83152694e-04,\r\n -4.67221427e-04, 7.69491307e-05, 1.00245490e-03, 1.41421019e-03,\r\n 1.21694221e-03, -4.21749137e-04, 1.32508183e-04, -4.79456852e-04,\r\n 1.40894449e-03, 3.07102455e-04, 6.03875902e-04, -2.19981390e-04,\r\n -5.80208725e-04, -5.96643367e-04, -8.09447083e-04, -1.09303067e-03,\r\n -1.87922409e-03, -2.33222730e-04, -8.87487477e-05, 1.19461096e-03,\r\n 1.01204154e-04, 3.86784523e-04, 1.93878368e-04, -1.12958800e-03,\r\n -5.13361825e-04, -1.28040544e-03, 1.13598770e-03, -5.96334517e-04,\r\n -5.94493118e-04, -8.42069203e-05, -1.37871888e-03, -5.04129624e-04,\r\n 2.57312262e-04, 1.25586567e-03, -9.58606310e-04, -1.31114866e-04,\r\n -1.08709582e-03, 2.01435620e-03, -4.94437059e-04, -3.38324317e-04,\r\n -5.50381432e-04, -2.00382055e-04, -1.38255578e-04, 2.45632022e-04], dtype=float32)\r\n)\r\n",,terminal_output
+11395,24150258,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+11396,24150350,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 3 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+11397,24150773,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11398,24163566,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+11399,24163567,"/fast/home/franz.srambical/jafar/sample.py",5620,0,"",python,selection_command
+11400,24163677,"/fast/home/franz.srambical/jafar/sample.py",4046,1869," # @nnx.jit\n # @jax.jit\n def _sampling_fn(model, batch):\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n\n\n # --- Define autoregressive sampling loop ---\n def _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = genie.sample(batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax)\n return generated_vid\n\n\n # --- Get video + latent actions ---\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n video_batch = next(iter(dataloader))\n # Get latent actions for all videos in the batch\n batch = dict(videos=video_batch)\n action_batch = genie.vq_encode(batch, training=False) # type: ignore[arg-type]\n action_batch = jnp.asarray(action_batch).reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n # --- Sample + evaluate video ---\n vid = _autoreg_sample(rng, video_batch, action_batch)\n gt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\n recon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\n ssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()\n",python,content
+11401,24166561,"/fast/home/franz.srambical/jafar/sample.py",5611,0,"",python,selection_command
+11402,24169575,"/fast/home/franz.srambical/jafar/sample.py",4644,0,"",python,selection_command
+11403,24171716,"/fast/home/franz.srambical/jafar/genie.py",0,0,"",python,tab
+11404,24171716,"/fast/home/franz.srambical/jafar/genie.py",8350,0,"",python,selection_command
+11405,24178772,"/fast/home/franz.srambical/jafar/genie.py",7902,0,"",python,selection_command
+11406,24182417,"genie.py",0,0,"",python,tab
+11407,24195729,"genie.py",0,0,"from typing import Dict, Any\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nfrom flax.training.train_state import TrainState\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\nimport grain\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n tokenizer_outputs = self.tokenizer.vq_encode(batch[""videos""], training=False)\n lam_outputs = self.lam.vq_encode(batch[""videos""], training=False)\n latent_actions = jax.lax.cond(\n self.lam_co_train,\n lambda: lam_outputs[""z_q""],\n lambda: jax.lax.stop_gradient(lam_outputs[""z_q""]),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(tokenizer_outputs[""indices""]),\n latent_actions=latent_actions,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_outputs = self.dynamics(outputs, training)\n outputs.update(dyna_outputs)\n mle_indices = jnp.argmax(outputs[""token_logits""], axis=-1)\n outputs[""recon""] = self.tokenizer.decode(\n mle_indices, batch[""videos""].shape[2:4]\n )\n outputs[""lam_indices""] = lam_outputs[""indices""]\n return outputs\n\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n final_carry_maskgit = carry\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None\n\n\n# FIXME (f.srambical): add conversion script for old checkpoints\ndef restore_genie_components(\n optimizer: nnx.Optimizer,\n sharding: jax.sharding.NamedSharding,\n rng: jax.Array,\n args,\n):\n """"""Restore pre-trained Genie components""""""\n rngs = nnx.Rngs(rng)\n\n # dummy values since we only use tx to initialize the dummy train states\n dummy_tx = optax.adamw(\n learning_rate=optax.constant_schedule(args.max_lr),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n )\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n tokenizer_checkpoint_manager = ocp.CheckpointManager(\n directory=args.tokenizer_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.tokenizer_dim,\n ffn_dim=args.tokenizer_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n num_blocks=args.tokenizer_num_blocks,\n num_heads=args.tokenizer_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_tokenizer_optimizer = nnx.Optimizer(dummy_tokenizer, dummy_tx)\n dummy_tokenizer_optimizer_state = nnx.state(dummy_tokenizer_optimizer)\n abstract_sharded_tokenizer_optimizer_state = _create_abstract_sharded_pytree(\n dummy_tokenizer_optimizer_state, sharding\n )\n restored_tokenizer = tokenizer_checkpoint_manager.restore(\n step=tokenizer_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_tokenizer_optimizer.model, restored_tokenizer.model)\n optimizer.model.tokenizer = dummy_tokenizer_optimizer.model\n tokenizer_checkpoint_manager.close()\n\n if args.lam_checkpoint:\n lam_checkpoint_manager = ocp.CheckpointManager(\n directory=args.lam_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.lam_dim,\n ffn_dim=args.lam_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_latent_actions,\n patch_size=args.lam_patch_size,\n num_blocks=args.lam_num_blocks,\n num_heads=args.lam_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_lam_optimizer = nnx.Optimizer(dummy_lam, dummy_tx)\n dummy_lam_optimizer_state = nnx.state(dummy_lam_optimizer)\n abstract_sharded_lam_optimizer_state = _create_abstract_sharded_pytree(\n dummy_lam_optimizer_state, sharding\n )\n restored_lam_optimizer = lam_checkpoint_manager.restore(\n step=lam_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_lam_optimizer.model, restored_lam_optimizer.model)\n optimizer.model.lam = dummy_lam_optimizer.model\n # Remove the LAM decoder to save memory and avoid unnecessary computation.\n del optimizer.model.lam.decoder\n lam_checkpoint_manager.close()\n\n return optimizer\n\n\ndef _create_abstract_sharded_pytree(pytree_template, sharding_spec):\n """"""Replaces arrays in a pytree with ShapeDtypeStructs having the given sharding.""""""\n\n def map_fn(leaf_template):\n if hasattr(leaf_template, ""shape"") and hasattr(leaf_template, ""dtype""):\n return jax.ShapeDtypeStruct(\n leaf_template.shape, leaf_template.dtype, sharding=sharding_spec\n )\n return leaf_template\n\n return jax.tree_util.tree_map(map_fn, pytree_template)\n",python,tab
+11408,24195730,"genie.py",0,0,"",python,tab
+11409,24195730,"/fast/home/franz.srambical/jafar/genie.py",0,0,"",python,tab
+11410,24195732,"/fast/home/franz.srambical/jafar/genie.py",13227,0,"",python,selection_command
+11411,24201162,"/fast/home/franz.srambical/jafar/genie.py",13227,91," model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),",python,content
+11412,24204292,"/fast/home/franz.srambical/jafar/genie.py",14830,89," model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),",python,content
+11413,24205262,"genie.py",0,0,"",python,tab
+11414,24210596,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+11415,24214262,"/fast/home/franz.srambical/jafar/sample.py",4652,0,"",python,selection_command
+11416,24214442,"/fast/home/franz.srambical/jafar/sample.py",4666,0,"",python,selection_command
+11417,24214612,"/fast/home/franz.srambical/jafar/sample.py",4668,0,"",python,selection_command
+11418,24214740,"/fast/home/franz.srambical/jafar/sample.py",4673,0,"",python,selection_command
+11419,24214904,"/fast/home/franz.srambical/jafar/sample.py",4674,0,"",python,selection_command
+11420,24215070,"/fast/home/franz.srambical/jafar/sample.py",4680,0,"",python,selection_command
+11421,24215329,"/fast/home/franz.srambical/jafar/sample.py",4674,0,"",python,selection_command
+11422,24215584,"genie.py",0,0,"",python,tab
+11423,24215585,"genie.py",5064,0,"",python,selection_command
+11424,24216535,"genie.py",5056,15," def sample(",python,selection_command
+11425,24216695,"genie.py",5056,300," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n",python,selection_command
+11426,24216779,"genie.py",5056,470," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n",python,selection_command
+11427,24216910,"genie.py",5056,900," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n",python,selection_command
+11428,24217082,"genie.py",5056,1613," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n",python,selection_command
+11429,24217228,"genie.py",5056,1837," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n",python,selection_command
+11430,24217357,"genie.py",5056,1921," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n",python,selection_command
+11431,24217526,"genie.py",5056,2107," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n",python,selection_command
+11432,24217794,"genie.py",5056,2249," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n",python,selection_command
+11433,24217963,"genie.py",5056,2555," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n",python,selection_command
+11434,24218090,"genie.py",5056,3128," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n",python,selection_command
+11435,24218270,"genie.py",5056,3450," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n",python,selection_command
+11436,24218376,"genie.py",5056,3669," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n",python,selection_command
+11437,24218750,"genie.py",5056,3879," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n",python,selection_command
+11438,24218946,"genie.py",5056,4275," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n",python,selection_command
+11439,24219414,"genie.py",5056,3880," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n",python,selection_command
+11440,24219743,"genie.py",5056,3669," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n",python,selection_command
+11441,24220337,"genie.py",5056,3450," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n",python,selection_command
+11442,24220709,"genie.py",5056,3669," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n",python,selection_command
+11443,24220949,"genie.py",5056,3879," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_loop_fn(carry, module, x):\n return module(carry, x)\n\n scanned_maskgit_loop = nnx.scan(\n maskgit_loop_fn,\n in_axes=(nnx.Carry, None, 0),\n out_axes=(nnx.Carry, 0),\n length=steps,\n )\n\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)) # (B, S, N)\n mask = mask.astype(bool)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n # FIXME (f.srambical): test whether sampling works with this\n final_carry_maskgit, _ = scanned_maskgit_loop(\n init_carry_maskgit, maskgit_step, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n",python,selection_command
+11444,24312555,"genie.py",8935,0,"",python,selection_command
+11445,24313382,"genie.py",8936,0,"",python,selection_command
+11446,24313692,"genie.py",8937,0,"",python,selection_command
+11447,24316494,"genie.py",8472,0,"",python,selection_command
+11448,24316886,"genie.py",7827,0,"",python,selection_command
+11449,24317364,"genie.py",7223,0,"",python,selection_command
+11450,24318266,"genie.py",6829,0,"",python,selection_command
+11451,24319376,"genie.py",6792,0,"",python,selection_command
+11452,24319510,"genie.py",6754,0,"",python,selection_command
+11453,24319640,"genie.py",6718,0,"",python,selection_command
+11454,24320164,"genie.py",6682,0,"",python,selection_command
+11455,24320250,"genie.py",6670,35," maskgit_step = MaskGITStep(",python,selection_command
+11456,24320357,"genie.py",6670,71," maskgit_step = MaskGITStep(\n dynamics=self.dynamics,",python,selection_command
+11457,24320489,"genie.py",6670,109," maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,",python,selection_command
+11458,24320688,"genie.py",6670,146," maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,",python,selection_command
+11459,24320749,"genie.py",6670,187," maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,",python,selection_command
+11460,24320913,"genie.py",6670,212," maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,",python,selection_command
+11461,24321024,"genie.py",6670,222," maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )",python,selection_command
+11462,24321289,"genie.py",6670,222," MaskGITLoop = nn.scan(\n\n\n MaskGITStep,\n\n\n variable_broadcast=""params"",\n\n\n split_rngs={""params"": False},\n\n\n in_axes=0,\n\n\n out_axes=0,\n\n\n length=steps,\n\n\n )",python,content
+11463,24322356,"genie.py",6739,0,"",python,selection_command
+11464,24323382,"genie.py",6729,0,"",python,selection_command
+11465,24323617,"genie.py",6728,0,"",python,selection_command
+11466,24323641,"genie.py",6715,0,"",python,selection_command
+11467,24323670,"genie.py",6702,0,"",python,selection_command
+11468,24323703,"genie.py",6701,0,"",python,selection_command
+11469,24324213,"genie.py",6701,1,"",python,content
+11470,24324536,"genie.py",6701,1,"",python,content
+11471,24324549,"genie.py",6713,0,"",python,selection_command
+11472,24324797,"genie.py",6726,0,"",python,selection_command
+11473,24325126,"genie.py",6726,1,"",python,content
+11474,24325479,"genie.py",6726,1,"",python,content
+11475,24325483,"genie.py",6738,0,"",python,selection_command
+11476,24325661,"genie.py",6767,0,"",python,selection_command
+11477,24325982,"genie.py",6767,1,"",python,content
+11478,24326363,"genie.py",6767,1,"",python,content
+11479,24326366,"genie.py",6779,0,"",python,selection_command
+11480,24326646,"genie.py",6809,0,"",python,selection_command
+11481,24326981,"genie.py",6809,1,"",python,content
+11482,24327347,"genie.py",6809,1,"",python,content
+11483,24327351,"genie.py",6821,0,"",python,selection_command
+11484,24327549,"genie.py",6832,0,"",python,selection_command
+11485,24328204,"genie.py",6832,2,"",python,content
+11486,24328212,"genie.py",6844,0,"",python,selection_command
+11487,24328342,"genie.py",6856,0,"",python,selection_command
+11488,24329134,"genie.py",6856,2,"",python,content
+11489,24329148,"genie.py",6868,0,"",python,selection_command
+11490,24329435,"genie.py",6882,0,"",python,selection_command
+11491,24330053,"genie.py",6882,2,"",python,content
+11492,24330062,"genie.py",6890,0,"",python,selection_command
+11493,24330411,"genie.py",6864,0,"",python,selection_command
+11494,24330534,"genie.py",6840,0,"",python,selection_command
+11495,24330798,"genie.py",6817,0,"",python,selection_command
+11496,24330823,"genie.py",6775,0,"",python,selection_command
+11497,24330847,"genie.py",6734,0,"",python,selection_command
+11498,24331011,"genie.py",6709,0,"",python,selection_command
+11499,24331149,"genie.py",6678,0,"",python,selection_command
+11500,24331230,"genie.py",6690,0,"",python,selection_command
+11501,24331400,"genie.py",6692,0,"",python,selection_command
+11502,24332310,"genie.py",6693,0,"",python,selection_command
+11503,24332581,"genie.py",6694,0,"",python,selection_command
+11504,24332781,"genie.py",6694,0,"x",python,content
+11505,24332781,"genie.py",6695,0,"",python,selection_keyboard
+11506,24333028,"genie.py",6694,0,"",python,selection_command
+11507,24340627,"genie.py",6692,0,"",python,selection_command
+11508,24340763,"genie.py",6690,0,"",python,selection_command
+11509,24341097,"genie.py",6678,0,"",python,selection_command
+11510,24344021,"genie.py",6678,23,"",python,content
+11511,24344218,"genie.py",6678,0,"j",python,content
+11512,24344218,"genie.py",6679,0,"",python,selection_keyboard
+11513,24344810,"genie.py",6678,0,"",python,selection_command
+11514,24345896,"genie.py",6670,9," j",python,selection_command
+11515,24346108,"genie.py",6670,34," j\n MaskGITStep,",python,selection_command
+11516,24346375,"genie.py",6670,75," j\n MaskGITStep,\n variable_broadcast=""params"",",python,selection_command
+11517,24346411,"genie.py",6670,117," j\n MaskGITStep,\n variable_broadcast=""params"",\n split_rngs={""params"": False},",python,selection_command
+11518,24346501,"genie.py",6670,140," j\n MaskGITStep,\n variable_broadcast=""params"",\n split_rngs={""params"": False},\n in_axes=0,",python,selection_command
+11519,24346681,"genie.py",6670,164," j\n MaskGITStep,\n variable_broadcast=""params"",\n split_rngs={""params"": False},\n in_axes=0,\n out_axes=0,",python,selection_command
+11520,24346847,"genie.py",6670,190," j\n MaskGITStep,\n variable_broadcast=""params"",\n split_rngs={""params"": False},\n in_axes=0,\n out_axes=0,\n length=steps,",python,selection_command
+11521,24346964,"genie.py",6670,200," j\n MaskGITStep,\n variable_broadcast=""params"",\n split_rngs={""params"": False},\n in_axes=0,\n out_axes=0,\n length=steps,\n )",python,selection_command
+11522,24347330,"genie.py",6670,200," ",python,content
+11523,24347347,"genie.py",6678,0,"",python,selection_command
+11524,24348943,"genie.py",6677,0,"",python,selection_command
+11525,24349748,"genie.py",6678,0,"j\n MaskGITStep,\n variable_broadcast=""params"",\n split_rngs={""params"": False},\n in_axes=0,\n out_axes=0,\n length=steps,\n )",python,content
+11526,24349750,"genie.py",6678,0,"",python,selection_command
+11527,24350002,"genie.py",6678,1,"MaskGITLoop = nnx.scan(",python,content
+11528,24350296,"genie.py",6694,1,"",python,content
+11529,24350296,"genie.py",6694,0,"",python,selection_command
+11530,24350706,"genie.py",6882,0,"\n\n",python,content
+11531,24350708,"genie.py",6882,0,"",python,selection_command
+11532,24351133,"genie.py",6856,0,"\n\n",python,content
+11533,24351147,"genie.py",6856,0,"",python,selection_command
+11534,24351442,"genie.py",6832,0,"\n\n",python,content
+11535,24351445,"genie.py",6832,0,"",python,selection_command
+11536,24351775,"genie.py",6809,0,"\n",python,content
+11537,24351780,"genie.py",6809,0,"",python,selection_command
+11538,24352095,"genie.py",6810,0,"\n",python,content
+11539,24352355,"genie.py",6767,0,"\n",python,content
+11540,24352357,"genie.py",6767,0,"",python,selection_command
+11541,24352545,"genie.py",6768,0,"\n",python,content
+11542,24352707,"genie.py",6726,0,"\n",python,content
+11543,24352709,"genie.py",6726,0,"",python,selection_command
+11544,24352856,"genie.py",6727,0,"\n",python,content
+11545,24353011,"genie.py",6701,0,"\n",python,content
+11546,24353013,"genie.py",6701,0,"",python,selection_command
+11547,24353433,"genie.py",6702,0,"\n",python,content
+11548,24353434,"genie.py",6893,2,"",python,content
+11549,24353442,"genie.py",6880,6,"steps",python,content
+11550,24353443,"genie.py",6854,13,"sample_argmax=sample_argmax,",python,content
+11551,24353444,"genie.py",6829,12,"temperature=temperature,",python,content
+11552,24353445,"genie.py",6785,31,"tokenizer=self.tokenizer,",python,content
+11553,24353447,"genie.py",6770,2,"",python,content
+11554,24353448,"genie.py",6768,1,"",python,content
+11555,24353448,"genie.py",6767,0,"ic",python,content
+11556,24353448,"genie.py",6742,23,"dynamics=self.dyn",python,content
+11557,24353448,"genie.py",6726,3,"(",python,content
+11558,24353450,"genie.py",6692,23,"",python,content
+11559,24353461,"genie.py",6678,10,"maskgit_ste",python,content
+11560,24353462,"genie.py",14938,17,"",python,content
+11561,24353463,"genie.py",14881,21,"",python,content
+11562,24353464,"genie.py",13333,13,"",python,content
+11563,24353464,"genie.py",13274,17,"",python,content
+11564,24353466,"genie.py",5064,0,"",python,selection_command
+11565,24355305,"genie.py",5535,0,"",python,selection_command
+11566,24355818,"genie.py",6210,0,"",python,selection_command
+11567,24356693,"genie.py",5535,0,"",python,selection_command
+11568,24356825,"genie.py",5060,0,"",python,selection_command
+11569,24357203,"genie.py",5535,0,"",python,selection_command
+11570,24357357,"genie.py",6210,0,"",python,selection_command
+11571,24357494,"genie.py",6891,0,"",python,selection_command
+11572,24381240,"genie.py",6893,0,"",python,selection_command
+11573,24381482,"genie.py",6902,0,"",python,selection_command
+11574,24381487,"genie.py",6949,0,"",python,selection_command
+11575,24381522,"genie.py",6977,0,"",python,selection_command
+11576,24381553,"genie.py",6986,0,"",python,selection_command
+11577,24381698,"genie.py",7027,0,"",python,selection_command
+11578,24381984,"genie.py",6986,0,"",python,selection_command
+11579,24384713,"genie.py",7939,0,"",python,selection_command
+11580,24387229,"genie.py",6986,0,"",python,selection_command
+11581,24389043,"genie.py",7027,0,"",python,selection_command
+11582,24389326,"genie.py",7056,0,"",python,selection_command
+11583,24389327,"genie.py",7098,0,"",python,selection_command
+11584,24389342,"genie.py",7135,0,"",python,selection_command
+11585,24389375,"genie.py",7161,0,"",python,selection_command
+11586,24389408,"genie.py",7163,0,"",python,selection_command
+11587,24389517,"genie.py",7172,0,"",python,selection_command
+11588,24389518,"genie.py",7219,0,"",python,selection_command
+11589,24389519,"genie.py",7263,0,"",python,selection_command
+11590,24389547,"genie.py",7305,0,"",python,selection_command
+11591,24389577,"genie.py",7314,0,"",python,selection_command
+11592,24389611,"genie.py",7379,0,"",python,selection_command
+11593,24389644,"genie.py",7436,0,"",python,selection_command
+11594,24389678,"genie.py",7523,0,"",python,selection_command
+11595,24389713,"genie.py",7560,0,"",python,selection_command
+11596,24389746,"genie.py",7611,0,"",python,selection_command
+11597,24389851,"genie.py",7620,0,"",python,selection_command
+11598,24389851,"genie.py",7674,0,"",python,selection_command
+11599,24389851,"genie.py",7709,0,"",python,selection_command
+11600,24389882,"genie.py",7735,0,"",python,selection_command
+11601,24389914,"genie.py",7770,0,"",python,selection_command
+11602,24389948,"genie.py",7792,0,"",python,selection_command
+11603,24390041,"genie.py",7823,0,"",python,selection_command
+11604,24390042,"genie.py",7837,0,"",python,selection_command
+11605,24390064,"genie.py",7910,0,"",python,selection_command
+11606,24390119,"genie.py",7969,0,"",python,selection_command
+11607,24390119,"genie.py",8037,0,"",python,selection_command
+11608,24390149,"genie.py",8051,0,"",python,selection_command
+11609,24390189,"genie.py",8107,0,"",python,selection_command
+11610,24390224,"genie.py",8157,0,"",python,selection_command
+11611,24390377,"genie.py",8107,0,"",python,selection_command
+11612,24390582,"genie.py",8051,0,"",python,selection_command
+11613,24390900,"genie.py",8037,0,"",python,selection_command
+11614,24392138,"genie.py",7969,0,"",python,selection_command
+11615,24392332,"genie.py",7977,0,"",python,selection_command
+11616,24392472,"genie.py",8041,0,"",python,selection_command
+11617,24392996,"genie.py",8041,1,")",python,selection_command
+11618,24393231,"genie.py",7973,5," i",python,selection_command
+11619,24393712,"genie.py",7914,5,"final",python,selection_command
+11620,24394446,"genie.py",7914,1,"f",python,selection_command
+11621,24394890,"genie.py",7914,0,"",python,selection_command
+11622,24394964,"genie.py",8041,0,"#",python,content
+11623,24394964,"genie.py",7973,0,"#",python,content
+11624,24394964,"genie.py",7914,0,"#",python,content
+11625,24394965,"genie.py",7915,0,"",python,selection_keyboard
+11626,24395094,"genie.py",8044,0," ",python,content
+11627,24395094,"genie.py",7975,0," ",python,content
+11628,24395094,"genie.py",7915,0," ",python,content
+11629,24395094,"genie.py",7916,0,"",python,selection_keyboard
+11630,24395285,"genie.py",7915,0,"",python,selection_command
+11631,24397231,"genie.py",7976,0,"",python,selection_command
+11632,24397382,"genie.py",8046,0,"",python,selection_command
+11633,24397518,"genie.py",8062,0,"",python,selection_command
+11634,24397804,"genie.py",8061,0,"",python,selection_command
+11635,24400416,"genie.py",8044,2,"",python,content
+11636,24400418,"genie.py",7974,2,"",python,content
+11637,24400425,"genie.py",7914,2,"",python,content
+11638,24400430,"genie.py",7914,0,"",python,selection_command
+11639,24403482,"genie.py",7841,0,"",python,selection_command
+11640,24403542,"genie.py",7827,0,"",python,selection_command
+11641,24403673,"genie.py",7796,0,"",python,selection_command
+11642,24403894,"genie.py",7774,0,"",python,selection_command
+11643,24403924,"genie.py",7739,0,"",python,selection_command
+11644,24403955,"genie.py",7713,0,"",python,selection_command
+11645,24403989,"genie.py",7678,0,"",python,selection_command
+11646,24404024,"genie.py",7624,0,"",python,selection_command
+11647,24404202,"genie.py",7611,0,"",python,selection_command
+11648,24404284,"genie.py",7564,0,"",python,selection_command
+11649,24404443,"genie.py",7527,0,"",python,selection_command
+11650,24404568,"genie.py",7440,0,"",python,selection_command
+11651,24404811,"genie.py",7383,0,"",python,selection_command
+11652,24404916,"genie.py",7318,0,"",python,selection_command
+11653,24405630,"genie.py",14887,0,"\n ",python,content
+11654,24405632,"genie.py",14851,0,"\n ",python,content
+11655,24405633,"genie.py",13316,0,"\n ",python,content
+11656,24405635,"genie.py",13274,0,"\n ",python,content
+11657,24405635,"genie.py",8055,0,"final_carry_maskgit = carry\n ",python,content
+11658,24405645,"genie.py",4114,0,"",python,selection_command
+11659,24408395,"genie.py",4805,0,"",python,selection_command
+11660,24409003,"genie.py",5255,0,"",python,selection_command
+11661,24409243,"genie.py",5993,0,"",python,selection_command
+11662,24409634,"genie.py",6669,0,"",python,selection_command
+11663,24410684,"genie.py",6986,0,"",python,selection_command
+11664,24531469,"genie.py",6978,0," for step_t in range(T, seq_len):\n",python,content
+11665,24531469,"genie.py",6894,82," # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs",python,content
+11666,24531796,"genie.py",7704,0," # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n",python,content
+11667,24531796,"genie.py",7520,123," mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)",python,content
+11668,24531796,"genie.py",7070,277,"",python,content
+11669,24532009,"genie.py",8374,321," final_token_idxs = current_token_idxs\n ",python,content
+11670,24532009,"genie.py",7761,612,"",python,content
+11671,24606751,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11672,24607111,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+11673,24607353,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+11674,24612534,"genie.py",6970,0,"",python,selection_mouse
+11675,24615265,"genie.py",7003,0,"",python,selection_mouse
+11676,24617891,"genie.py",7084,0,"",python,selection_mouse
+11677,24619085,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+11678,24657816,"TERMINAL",0,0,"2025-07-25 17:59:07.912168: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11679,24659266,"TERMINAL",0,0,"2025-07-25 17:59:09.363175: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11680,24662791,"TERMINAL",0,0,"2025-07-25 17:59:12.838390: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11681,24663743,"TERMINAL",0,0,"2025-07-25 17:59:13.840142: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+11682,24664495,"TERMINAL",0,0,"Traceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 188, in \r\n ssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py"", line 221, in ssim\r\n chex.assert_type([a, b], float)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/chex/_src/asserts_internal.py"", line 279, in _chex_assert_fn\r\n host_assertion_fn(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/chex/_src/asserts_internal.py"", line 197, in _assert_on_host\r\n raise exception_type(error_msg)\r\nAssertionError: [Chex] Assertion assert_type failed: Error in type compatibility check: input 0 has type uint8 but expected .\r\n",,terminal_output
+11683,24665082,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+11684,24665244,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+11685,24665576,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+11686,24682649,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+11687,24682649,"/fast/home/franz.srambical/jafar/sample.py",5811,0,"",python,selection_command
+11688,24693798,"train_dynamics.py",0,0,"",python,tab
+11689,24695076,"train_dynamics.py",3246,0,"",python,selection_command
+11690,24697728,"train_dynamics.py",3192,0,"",python,selection_command
+11691,24697979,"train_dynamics.py",3197,0,"",python,selection_command
+11692,24698234,"train_dynamics.py",3199,0,"",python,selection_command
+11693,24698252,"train_dynamics.py",3202,0,"",python,selection_command
+11694,24698294,"train_dynamics.py",3203,0,"",python,selection_command
+11695,24698472,"train_dynamics.py",3207,0,"",python,selection_command
+11696,24698680,"train_dynamics.py",3208,0,"",python,selection_command
+11697,24700861,"train_dynamics.py",3210,0,"",python,selection_command
+11698,24701024,"train_dynamics.py",3212,0,"",python,selection_command
+11699,24704799,"train_dynamics.py",3131,0,"",python,selection_command
+11700,24705045,"train_dynamics.py",3053,0,"",python,selection_command
+11701,24705059,"train_dynamics.py",2994,0,"",python,selection_command
+11702,24705088,"train_dynamics.py",2952,0,"",python,selection_command
+11703,24705119,"train_dynamics.py",2880,0,"",python,selection_command
+11704,24705156,"train_dynamics.py",2830,0,"",python,selection_command
+11705,24705186,"train_dynamics.py",2804,0,"",python,selection_command
+11706,24705220,"train_dynamics.py",2767,0,"",python,selection_command
+11707,24705253,"train_dynamics.py",2704,0,"",python,selection_command
+11708,24705287,"train_dynamics.py",2630,0,"",python,selection_command
+11709,24705322,"train_dynamics.py",2603,0,"",python,selection_command
+11710,24705666,"train_dynamics.py",2630,0,"",python,selection_command
+11711,24707796,"train_dynamics.py",2619,0,"",python,selection_command
+11712,24707940,"train_dynamics.py",2617,0,"",python,selection_command
+11713,24708297,"train_dynamics.py",2610,0,"",python,selection_command
+11714,24711743,"train_dynamics.py",2684,0,"",python,selection_command
+11715,24711893,"train_dynamics.py",2747,0,"",python,selection_command
+11716,24712007,"train_dynamics.py",2804,0,"",python,selection_command
+11717,24712243,"train_dynamics.py",2810,0,"",python,selection_command
+11718,24712631,"train_dynamics.py",2860,0,"",python,selection_command
+11719,24712798,"train_dynamics.py",2932,0,"",python,selection_command
+11720,24714459,"train_dynamics.py",2974,0,"",python,selection_command
+11721,24715293,"train_dynamics.py",3033,0,"",python,selection_command
+11722,24715727,"train_dynamics.py",3036,0,"",python,selection_command
+11723,24715927,"train_dynamics.py",3038,0,"",python,selection_command
+11724,24717725,"train_dynamics.py",3116,0,"",python,selection_command
+11725,24717881,"train_dynamics.py",3117,0,"",python,selection_command
+11726,24718308,"train_dynamics.py",3119,0,"",python,selection_command
+11727,24719478,"train_dynamics.py",3126,0,"",python,selection_command
+11728,24719691,"train_dynamics.py",3128,0,"",python,selection_command
+11729,24720306,"train_dynamics.py",3126,0,"",python,selection_command
+11730,24720457,"train_dynamics.py",3048,0,"",python,selection_command
+11731,24720713,"train_dynamics.py",2989,0,"",python,selection_command
+11732,24720739,"train_dynamics.py",2947,0,"",python,selection_command
+11733,24720765,"train_dynamics.py",2875,0,"",python,selection_command
+11734,24720795,"train_dynamics.py",2825,0,"",python,selection_command
+11735,24720829,"train_dynamics.py",2804,0,"",python,selection_command
+11736,24720870,"train_dynamics.py",2762,0,"",python,selection_command
+11737,24720905,"train_dynamics.py",2699,0,"",python,selection_command
+11738,24721036,"train_dynamics.py",2625,0,"",python,selection_command
+11739,24721190,"train_dynamics.py",2598,0,"",python,selection_command
+11740,24721330,"train_dynamics.py",2555,0,"",python,selection_command
+11741,24721758,"train_dynamics.py",2550,0,"",python,selection_command
+11742,24721925,"train_dynamics.py",2396,0,"",python,selection_command
+11743,24724447,"genie.py",0,0,"",python,tab
+11744,24726253,"genie.py",0,0,"",python,selection_command
+11745,24726726,"genie.py",675,0,"",python,selection_command
+11746,24726913,"genie.py",1668,0,"",python,selection_command
+11747,24727237,"genie.py",2855,0,"",python,selection_command
+11748,24727580,"genie.py",3990,0,"",python,selection_command
+11749,24728594,"genie.py",4048,0,"",python,selection_command
+11750,24728760,"genie.py",4067,0,"",python,selection_command
+11751,24730091,"genie.py",4176,0,"",python,selection_command
+11752,24731262,"genie.py",4256,0,"",python,selection_command
+11753,24731559,"genie.py",4412,0,"",python,selection_command
+11754,24731739,"genie.py",4474,0,"",python,selection_command
+11755,24731909,"genie.py",4509,0,"",python,selection_command
+11756,24732089,"genie.py",4582,0,"",python,selection_command
+11757,24732264,"genie.py",4664,0,"",python,selection_command
+11758,24732496,"genie.py",4717,0,"",python,selection_command
+11759,24732674,"genie.py",4741,0,"",python,selection_command
+11760,24733041,"genie.py",4768,0,"",python,selection_command
+11761,24733240,"genie.py",4788,0,"",python,selection_command
+11762,24733524,"genie.py",4830,0,"",python,selection_command
+11763,24733692,"genie.py",4872,0,"",python,selection_command
+11764,24734279,"genie.py",4879,0,"",python,selection_command
+11765,24734526,"genie.py",4881,0,"",python,selection_command
+11766,24734556,"genie.py",4886,0,"",python,selection_command
+11767,24734580,"genie.py",4889,0,"",python,selection_command
+11768,24734723,"genie.py",4891,0,"",python,selection_command
+11769,24734912,"genie.py",4895,0,"",python,selection_command
+11770,24735199,"genie.py",4896,0,"",python,selection_command
+11771,24735200,"genie.py",4905,0,"",python,selection_command
+11772,24735206,"genie.py",4906,0,"",python,selection_command
+11773,24735239,"genie.py",4912,0,"",python,selection_command
+11774,24735273,"genie.py",4926,0,"",python,selection_command
+11775,24735532,"genie.py",4937,0,"",python,selection_command
+11776,24735723,"genie.py",4939,0,"",python,selection_command
+11777,24735739,"genie.py",4944,0,"",python,selection_command
+11778,24735771,"genie.py",4946,0,"",python,selection_command
+11779,24736133,"genie.py",4944,0,"",python,selection_command
+11780,24736390,"genie.py",4939,0,"",python,selection_command
+11781,24736412,"genie.py",4937,0,"",python,selection_command
+11782,24736442,"genie.py",4926,0,"",python,selection_command
+11783,24736474,"genie.py",4912,0,"",python,selection_command
+11784,24736581,"genie.py",4906,0,"",python,selection_command
+11785,24736582,"genie.py",4905,0,"",python,selection_command
+11786,24736582,"genie.py",4896,0,"",python,selection_command
+11787,24736611,"genie.py",4895,0,"",python,selection_command
+11788,24736644,"genie.py",4891,0,"",python,selection_command
+11789,24736677,"genie.py",4889,0,"",python,selection_command
+11790,24737105,"genie.py",4891,0,"",python,selection_command
+11791,24737190,"genie.py",4895,0,"",python,selection_command
+11792,24737440,"genie.py",4896,0,"",python,selection_command
+11793,24737528,"genie.py",4905,0,"",python,selection_command
+11794,24738042,"genie.py",4906,0,"",python,selection_command
+11795,24738229,"genie.py",4912,0,"",python,selection_command
+11796,24739066,"genie.py",4926,0,"",python,selection_command
+11797,24739067,"genie.py",4937,0,"",python,selection_command
+11798,24739203,"genie.py",4926,0,"",python,selection_command
+11799,24740251,"genie.py",4805,0,"",python,selection_command
+11800,24741823,"genie.py",4817,0,"",python,selection_command
+11801,24742041,"genie.py",4819,0,"",python,selection_command
+11802,24742072,"genie.py",4822,0,"",python,selection_command
+11803,24742104,"genie.py",4823,0,"",python,selection_command
+11804,24742138,"genie.py",4829,0,"",python,selection_command
+11805,24742172,"genie.py",4830,0,"",python,selection_command
+11806,24742205,"genie.py",4837,0,"",python,selection_command
+11807,24742660,"genie.py",4830,0,"",python,selection_command
+11808,24752621,"genie.py",4793,0,"",python,selection_command
+11809,24752833,"genie.py",4737,0,"",python,selection_command
+11810,24753029,"genie.py",3538,0,"",python,selection_command
+11811,24754407,"genie.py",3547,0,"",python,selection_command
+11812,24754533,"genie.py",3549,0,"",python,selection_command
+11813,24755099,"models/dynamics.py",0,0,"",python,tab
+11814,24755099,"models/dynamics.py",132,0,"",python,selection_command
+11815,24755675,"models/dynamics.py",981,0,"",python,selection_command
+11816,24755979,"models/dynamics.py",2030,0,"",python,selection_command
+11817,24759005,"models/dynamics.py",2119,0,"",python,selection_command
+11818,24759248,"models/dynamics.py",2163,0,"",python,selection_command
+11819,24759275,"models/dynamics.py",2234,0,"",python,selection_command
+11820,24759307,"models/dynamics.py",2248,0,"",python,selection_command
+11821,24759340,"models/dynamics.py",2301,0,"",python,selection_command
+11822,24759373,"models/dynamics.py",2330,0,"",python,selection_command
+11823,24759408,"models/dynamics.py",2415,0,"",python,selection_command
+11824,24759441,"models/dynamics.py",2447,0,"",python,selection_command
+11825,24759475,"models/dynamics.py",2497,0,"",python,selection_command
+11826,24759510,"models/dynamics.py",2541,0,"",python,selection_command
+11827,24759542,"models/dynamics.py",2576,0,"",python,selection_command
+11828,24759650,"models/dynamics.py",2652,0,"",python,selection_command
+11829,24759650,"models/dynamics.py",2666,0,"",python,selection_command
+11830,24759651,"models/dynamics.py",2680,0,"",python,selection_command
+11831,24759687,"models/dynamics.py",2692,0,"",python,selection_command
+11832,24759761,"models/dynamics.py",2705,0,"",python,selection_command
+11833,24759795,"models/dynamics.py",2742,0,"",python,selection_command
+11834,24759797,"models/dynamics.py",2802,0,"",python,selection_command
+11835,24759951,"models/dynamics.py",2876,0,"",python,selection_command
+11836,24760314,"models/dynamics.py",2918,0,"",python,selection_command
+11837,24760448,"models/dynamics.py",2921,0,"",python,selection_command
+11838,24760699,"models/dynamics.py",2925,0,"",python,selection_command
+11839,24760758,"models/dynamics.py",2926,0,"",python,selection_command
+11840,24761891,"models/dynamics.py",2938,0,"",python,selection_command
+11841,24762048,"models/dynamics.py",2939,0,"",python,selection_command
+11842,24762412,"models/dynamics.py",2872,0,"",python,selection_command
+11843,24762795,"models/dynamics.py",2879,0,"",python,selection_command
+11844,24762936,"models/dynamics.py",2881,0,"",python,selection_command
+11845,24763109,"models/dynamics.py",2885,0,"",python,selection_command
+11846,24763321,"models/dynamics.py",2886,0,"",python,selection_command
+11847,24765517,"models/dynamics.py",986,0,"",python,selection_command
+11848,24766465,"models/dynamics.py",995,0,"",python,selection_command
+11849,24766557,"models/dynamics.py",997,0,"",python,selection_command
+11850,24766842,"utils/nn.py",0,0,"",python,tab
+11851,24766842,"utils/nn.py",4209,0,"",python,selection_command
+11852,24767359,"utils/nn.py",5081,0,"",python,selection_command
+11853,24767514,"utils/nn.py",6026,0,"",python,selection_command
+11854,24773066,"models/dynamics.py",0,0,"",python,tab
+11855,24773066,"models/dynamics.py",997,0,"",python,selection_command
+11856,24773825,"models/dynamics.py",2886,0,"",python,selection_command
+11857,24797525,"models/dynamics.py",2939,0,"",python,selection_command
+11858,24798517,"genie.py",0,0,"",python,tab
+11859,24798517,"genie.py",3549,0,"",python,selection_command
+11860,24799515,"genie.py",4737,0,"",python,selection_command
+11861,24800994,"genie.py",4712,0,"",python,selection_command
+11862,24804179,"genie.py",4768,0,"",python,selection_command
+11863,24807194,"genie.py",4805,0,"",python,selection_command
+11864,24807673,"genie.py",4872,0,"",python,selection_command
+11865,24808366,"genie.py",4879,0,"",python,selection_command
+11866,24808573,"genie.py",4881,0,"",python,selection_command
+11867,24808822,"genie.py",4886,0,"",python,selection_command
+11868,24808843,"genie.py",4889,0,"",python,selection_command
+11869,24808874,"genie.py",4891,0,"",python,selection_command
+11870,24808907,"genie.py",4895,0,"",python,selection_command
+11871,24808942,"genie.py",4896,0,"",python,selection_command
+11872,24809156,"genie.py",4905,0,"",python,selection_command
+11873,24809327,"genie.py",4906,0,"",python,selection_command
+11874,24809702,"models/tokenizer.py",0,0,"",python,tab
+11875,24809703,"models/tokenizer.py",3164,0,"",python,selection_command
+11876,24813232,"models/tokenizer.py",3227,0,"",python,selection_command
+11877,24813394,"models/tokenizer.py",3265,0,"",python,selection_command
+11878,24813910,"models/tokenizer.py",3297,0,"",python,selection_command
+11879,24819246,"genie.py",0,0,"",python,tab
+11880,24820580,"genie.py",4956,0,"",python,selection_command
+11881,24820830,"genie.py",4974,0,"",python,selection_command
+11882,24820853,"genie.py",5018,0,"",python,selection_command
+11883,24820881,"genie.py",5053,0,"",python,selection_command
+11884,24820914,"genie.py",5055,0,"",python,selection_command
+11885,24820955,"genie.py",5070,0,"",python,selection_command
+11886,24820987,"genie.py",5084,0,"",python,selection_command
+11887,24821020,"genie.py",5115,0,"",python,selection_command
+11888,24821052,"genie.py",5137,0,"",python,selection_command
+11889,24821086,"genie.py",5162,0,"",python,selection_command
+11890,24821120,"genie.py",5194,0,"",python,selection_command
+11891,24821153,"genie.py",5231,0,"",python,selection_command
+11892,24821185,"genie.py",5245,0,"",python,selection_command
+11893,24821228,"genie.py",5257,0,"",python,selection_command
+11894,24821256,"genie.py",5301,0,"",python,selection_command
+11895,24821285,"genie.py",5356,0,"",python,selection_command
+11896,24821317,"genie.py",5398,0,"",python,selection_command
+11897,24821353,"genie.py",5442,0,"",python,selection_command
+11898,24821383,"genie.py",5513,0,"",python,selection_command
+11899,24821417,"genie.py",5526,0,"",python,selection_command
+11900,24821450,"genie.py",5539,0,"",python,selection_command
+11901,24821483,"genie.py",5583,0,"",python,selection_command
+11902,24821521,"genie.py",5679,0,"",python,selection_command
+11903,24821550,"genie.py",5801,0,"",python,selection_command
+11904,24821587,"genie.py",5853,0,"",python,selection_command
+11905,24821617,"genie.py",5915,0,"",python,selection_command
+11906,24821650,"genie.py",5956,0,"",python,selection_command
+11907,24821684,"genie.py",5979,0,"",python,selection_command
+11908,24821718,"genie.py",6005,0,"",python,selection_command
+11909,24821754,"genie.py",6049,0,"",python,selection_command
+11910,24821784,"genie.py",6091,0,"",python,selection_command
+11911,24821818,"genie.py",6122,0,"",python,selection_command
+11912,24821891,"genie.py",6150,0,"",python,selection_command
+11913,24821891,"genie.py",6188,0,"",python,selection_command
+11914,24821919,"genie.py",6200,0,"",python,selection_command
+11915,24821953,"genie.py",6244,0,"",python,selection_command
+11916,24821988,"genie.py",6288,0,"",python,selection_command
+11917,24822021,"genie.py",6370,0,"",python,selection_command
+11918,24822056,"genie.py",6420,0,"",python,selection_command
+11919,24822088,"genie.py",6460,0,"",python,selection_command
+11920,24822121,"genie.py",6504,0,"",python,selection_command
+11921,24822157,"genie.py",6563,0,"",python,selection_command
+11922,24822189,"genie.py",6640,0,"",python,selection_command
+11923,24822426,"genie.py",6563,0,"",python,selection_command
+11924,24822683,"genie.py",6504,0,"",python,selection_command
+11925,24822708,"genie.py",6460,0,"",python,selection_command
+11926,24822737,"genie.py",6420,0,"",python,selection_command
+11927,24822889,"genie.py",6460,0,"",python,selection_command
+11928,24823143,"genie.py",6504,0,"",python,selection_command
+11929,24823161,"genie.py",6563,0,"",python,selection_command
+11930,24823196,"genie.py",6640,0,"",python,selection_command
+11931,24823230,"genie.py",6669,0,"",python,selection_command
+11932,24823271,"genie.py",6704,0,"",python,selection_command
+11933,24823295,"genie.py",6740,0,"",python,selection_command
+11934,24823337,"genie.py",6778,0,"",python,selection_command
+11935,24823370,"genie.py",6815,0,"",python,selection_command
+11936,24823396,"genie.py",6856,0,"",python,selection_command
+11937,24823429,"genie.py",6881,0,"",python,selection_command
+11938,24823464,"genie.py",6891,0,"",python,selection_command
+11939,24823505,"genie.py",6893,0,"",python,selection_command
+11940,24823538,"genie.py",6936,0,"",python,selection_command
+11941,24823569,"genie.py",6986,0,"",python,selection_command
+11942,24823603,"genie.py",7026,0,"",python,selection_command
+11943,24823636,"genie.py",7028,0,"",python,selection_command
+11944,24823671,"genie.py",7068,0,"",python,selection_command
+11945,24823711,"genie.py",7112,0,"",python,selection_command
+11946,24824096,"genie.py",7068,0,"",python,selection_command
+11947,24824427,"genie.py",7028,0,"",python,selection_command
+11948,24824878,"genie.py",7068,0,"",python,selection_command
+11949,24825182,"genie.py",7112,0,"",python,selection_command
+11950,24825182,"genie.py",7120,0,"",python,selection_command
+11951,24825182,"genie.py",7163,0,"",python,selection_command
+11952,24825513,"genie.py",7228,0,"",python,selection_command
+11953,24825725,"genie.py",7285,0,"",python,selection_command
+11954,24825940,"genie.py",7385,0,"",python,selection_command
+11955,24826626,"genie.py",7285,0,"",python,selection_command
+11956,24826790,"genie.py",7228,0,"",python,selection_command
+11957,24827278,"genie.py",7163,0,"",python,selection_command
+11958,24827709,"genie.py",7120,0,"",python,selection_command
+11959,24828181,"genie.py",7163,0,"",python,selection_command
+11960,24828546,"genie.py",7228,0,"",python,selection_command
+11961,24828760,"genie.py",7285,0,"",python,selection_command
+11962,24828980,"genie.py",7385,0,"",python,selection_command
+11963,24829281,"genie.py",7402,0,"",python,selection_command
+11964,24829602,"genie.py",7445,0,"",python,selection_command
+11965,24833079,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+11966,24833079,"/fast/home/franz.srambical/jafar/sample.py",5811,0,"",python,selection_command
+11967,24834428,"genie.py",0,0,"",python,tab
+11968,24838859,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+11969,24845342,"genie.py",0,0,"",python,tab
+11970,24846747,"sample.py",0,0,"",python,tab
+11971,24850972,"genie.py",0,0,"",python,tab
+11972,24851723,"sample.py",0,0,"",python,tab
+11973,24852831,"sample.py",5815,0,"",python,selection_command
+11974,24853676,"sample.py",5820,0,"",python,selection_command
+11975,24853924,"sample.py",5822,0,"",python,selection_command
+11976,24853957,"sample.py",5825,0,"",python,selection_command
+11977,24853987,"sample.py",5826,0,"",python,selection_command
+11978,24854045,"sample.py",5830,0,"",python,selection_command
+11979,24854046,"sample.py",5831,0,"",python,selection_command
+11980,24854077,"sample.py",5833,0,"",python,selection_command
+11981,24854110,"sample.py",5837,0,"",python,selection_command
+11982,24854145,"sample.py",5841,0,"",python,selection_command
+11983,24854178,"sample.py",5842,0,"",python,selection_command
+11984,24854212,"sample.py",5854,0,"",python,selection_command
+11985,24854246,"sample.py",5856,0,"",python,selection_command
+11986,24854280,"sample.py",5858,0,"",python,selection_command
+11987,24854312,"sample.py",5862,0,"",python,selection_command
+11988,24854346,"sample.py",5867,0,"",python,selection_command
+11989,24854386,"sample.py",5871,0,"",python,selection_command
+11990,24854420,"sample.py",5875,0,"",python,selection_command
+11991,24854455,"sample.py",5876,0,"",python,selection_command
+11992,24854486,"sample.py",5888,0,"",python,selection_command
+11993,24854519,"sample.py",5890,0,"",python,selection_command
+11994,24854553,"sample.py",5892,0,"",python,selection_command
+11995,24854931,"sample.py",5890,0,"",python,selection_command
+11996,24855179,"sample.py",5888,0,"",python,selection_command
+11997,24855207,"sample.py",5876,0,"",python,selection_command
+11998,24855228,"sample.py",5875,0,"",python,selection_command
+11999,24855261,"sample.py",5871,0,"",python,selection_command
+12000,24855294,"sample.py",5867,0,"",python,selection_command
+12001,24855329,"sample.py",5862,0,"",python,selection_command
+12002,24855361,"sample.py",5858,0,"",python,selection_command
+12003,24855396,"sample.py",5856,0,"",python,selection_command
+12004,24855428,"sample.py",5854,0,"",python,selection_command
+12005,24855632,"sample.py",5842,0,"",python,selection_command
+12006,24855833,"sample.py",5854,0,"",python,selection_command
+12007,24856016,"sample.py",5856,0,"",python,selection_command
+12008,24856175,"sample.py",5858,0,"",python,selection_command
+12009,24856332,"sample.py",5862,0,"",python,selection_command
+12010,24857265,"sample.py",5760,0,"",python,selection_command
+12011,24860995,"sample.py",5766,0,"",python,selection_command
+12012,24861240,"sample.py",5768,0,"",python,selection_command
+12013,24861272,"sample.py",5771,0,"",python,selection_command
+12014,24861295,"sample.py",5772,0,"",python,selection_command
+12015,24861328,"sample.py",5776,0,"",python,selection_command
+12016,24861360,"sample.py",5777,0,"",python,selection_command
+12017,24861395,"sample.py",5778,0,"",python,selection_command
+12018,24861429,"sample.py",5780,0,"",python,selection_command
+12019,24861463,"sample.py",5781,0,"",python,selection_command
+12020,24861641,"sample.py",5783,0,"",python,selection_command
+12021,24861829,"sample.py",5790,0,"",python,selection_command
+12022,24861975,"sample.py",5792,0,"",python,selection_command
+12023,24862742,"sample.py",5790,0,"",python,selection_command
+12024,24862893,"sample.py",5783,0,"",python,selection_command
+12025,24863174,"sample.py",5781,0,"",python,selection_command
+12026,24863327,"sample.py",5780,0,"",python,selection_command
+12027,24863472,"sample.py",5778,0,"",python,selection_command
+12028,24863605,"sample.py",5777,0,"",python,selection_command
+12029,24863756,"sample.py",5776,0,"",python,selection_command
+12030,24863895,"sample.py",5772,0,"",python,selection_command
+12031,24864055,"sample.py",5771,0,"",python,selection_command
+12032,24864315,"sample.py",5684,0,"",python,selection_command
+12033,24864452,"sample.py",5626,0,"",python,selection_command
+12034,24864775,"sample.py",4428,0,"",python,selection_command
+12035,24866645,"sample.py",4485,0,"",python,selection_command
+12036,24866846,"sample.py",4538,0,"",python,selection_command
+12037,24867363,"sample.py",4580,0,"",python,selection_command
+12038,24867542,"sample.py",4652,0,"",python,selection_command
+12039,24867715,"sample.py",4768,0,"",python,selection_command
+12040,24868123,"sample.py",4652,0,"",python,selection_command
+12041,24868232,"sample.py",4666,0,"",python,selection_command
+12042,24868408,"sample.py",4668,0,"",python,selection_command
+12043,24868574,"sample.py",4673,0,"",python,selection_command
+12044,24868726,"sample.py",4674,0,"",python,selection_command
+12045,24872336,"genie.py",0,0,"",python,tab
+12046,24872336,"genie.py",5064,0,"",python,selection_command
+12047,24873253,"genie.py",5535,0,"",python,selection_command
+12048,24873662,"genie.py",6210,0,"",python,selection_command
+12049,24875892,"genie.py",6254,0,"",python,selection_command
+12050,24876125,"genie.py",6336,0,"",python,selection_command
+12051,24876157,"genie.py",6395,0,"",python,selection_command
+12052,24876194,"genie.py",6430,0,"",python,selection_command
+12053,24876225,"genie.py",6470,0,"",python,selection_command
+12054,24876257,"genie.py",6529,0,"",python,selection_command
+12055,24876296,"genie.py",6606,0,"",python,selection_command
+12056,24876332,"genie.py",6669,0,"",python,selection_command
+12057,24876362,"genie.py",6678,0,"",python,selection_command
+12058,24876395,"genie.py",6714,0,"",python,selection_command
+12059,24876430,"genie.py",6750,0,"",python,selection_command
+12060,24876458,"genie.py",6788,0,"",python,selection_command
+12061,24876492,"genie.py",6825,0,"",python,selection_command
+12062,24876526,"genie.py",6866,0,"",python,selection_command
+12063,24876560,"genie.py",6891,0,"",python,selection_command
+12064,24876603,"genie.py",6893,0,"",python,selection_command
+12065,24876644,"genie.py",6902,0,"",python,selection_command
+12066,24876684,"genie.py",6969,0,"",python,selection_command
+12067,24876717,"genie.py",6996,0,"",python,selection_command
+12068,24876737,"genie.py",7028,0,"",python,selection_command
+12069,24876763,"genie.py",7037,0,"",python,selection_command
+12070,24876797,"genie.py",7078,0,"",python,selection_command
+12071,24876836,"genie.py",7120,0,"",python,selection_command
+12072,24876869,"genie.py",7129,0,"",python,selection_command
+12073,24876897,"genie.py",7194,0,"",python,selection_command
+12074,24876937,"genie.py",7251,0,"",python,selection_command
+12075,24876970,"genie.py",7351,0,"",python,selection_command
+12076,24877795,"genie.py",7251,0,"",python,selection_command
+12077,24878014,"genie.py",7194,0,"",python,selection_command
+12078,24878029,"genie.py",7251,0,"",python,selection_command
+12079,24878277,"genie.py",7351,0,"",python,selection_command
+12080,24878307,"genie.py",7402,0,"",python,selection_command
+12081,24878338,"genie.py",7411,0,"",python,selection_command
+12082,24878362,"genie.py",7459,0,"",python,selection_command
+12083,24878402,"genie.py",7522,0,"",python,selection_command
+12084,24878437,"genie.py",7531,0,"",python,selection_command
+12085,24878472,"genie.py",7577,0,"",python,selection_command
+12086,24878658,"genie.py",7612,0,"",python,selection_command
+12087,24878992,"genie.py",7654,0,"",python,selection_command
+12088,24879174,"genie.py",7663,0,"",python,selection_command
+12089,24879428,"genie.py",7727,0,"",python,selection_command
+12090,24879475,"genie.py",7761,0,"",python,selection_command
+12091,24879480,"genie.py",7770,0,"",python,selection_command
+12092,24879625,"genie.py",7815,0,"",python,selection_command
+12093,24880311,"genie.py",7825,0,"",python,selection_command
+12094,24880649,"genie.py",7880,0,"",python,selection_command
+12095,24881376,"genie.py",7926,0,"",python,selection_command
+12096,24881614,"genie.py",7956,0,"",python,selection_command
+12097,24882836,"genie.py",7926,0,"",python,selection_command
+12098,24882974,"genie.py",7956,0,"",python,selection_command
+12099,24883183,"genie.py",7926,0,"",python,selection_command
+12100,24883394,"genie.py",7880,0,"",python,selection_command
+12101,24890945,"genie.py",7893,0,"",python,selection_command
+12102,24891194,"genie.py",7895,0,"",python,selection_command
+12103,24891221,"genie.py",7899,0,"",python,selection_command
+12104,24891474,"genie.py",7900,0,"",python,selection_command
+12105,24891639,"genie.py",7909,0,"",python,selection_command
+12106,24891812,"genie.py",7910,0,"",python,selection_command
+12107,24892502,"models/tokenizer.py",0,0,"",python,tab
+12108,24892502,"models/tokenizer.py",3164,0,"",python,selection_command
+12109,24899397,"genie.py",0,0,"",python,tab
+12110,24899397,"genie.py",7910,0,"",python,selection_command
+12111,24900217,"sample.py",0,0,"",python,tab
+12112,24900217,"sample.py",4674,0,"",python,selection_command
+12113,24905214,"sample.py",4602,0,"",python,selection_command
+12114,24905357,"sample.py",4560,0,"",python,selection_command
+12115,24905547,"sample.py",4507,0,"",python,selection_command
+12116,24905738,"sample.py",4450,0,"",python,selection_command
+12117,24906394,"sample.py",4424,0,"",python,selection_command
+12118,24906628,"sample.py",4428,0,"",python,selection_command
+12119,24907432,"sample.py",5621,0,"",python,selection_command
+12120,24910980,"sample.py",5679,0,"",python,selection_command
+12121,24912564,"sample.py",5766,0,"",python,selection_command
+12122,24913234,"sample.py",5810,0,"\n ",python,content
+12123,24913427,"sample.py",5815,0,"r",python,content
+12124,24913428,"sample.py",5816,0,"",python,selection_keyboard
+12125,24913496,"sample.py",5816,0,"e",python,content
+12126,24913496,"sample.py",5817,0,"",python,selection_keyboard
+12127,24913663,"sample.py",5817,0,"c",python,content
+12128,24913664,"sample.py",5818,0,"",python,selection_keyboard
+12129,24913746,"sample.py",5818,0,"o",python,content
+12130,24913746,"sample.py",5819,0,"",python,selection_keyboard
+12131,24913835,"sample.py",5819,0,"n",python,content
+12132,24913836,"sample.py",5820,0,"",python,selection_keyboard
+12133,24914127,"sample.py",5820,0," ",python,content
+12134,24914127,"sample.py",5821,0,"",python,selection_keyboard
+12135,24914227,"sample.py",5821,0,"=",python,content
+12136,24914228,"sample.py",5822,0,"",python,selection_keyboard
+12137,24914461,"sample.py",5822,0," ",python,content
+12138,24914461,"sample.py",5823,0,"",python,selection_keyboard
+12139,24915369,"sample.py",5823,0,"r",python,content
+12140,24915370,"sample.py",5824,0,"",python,selection_keyboard
+12141,24915409,"sample.py",5824,0,"e",python,content
+12142,24915409,"sample.py",5825,0,"",python,selection_keyboard
+12143,24915575,"sample.py",5825,0,"c",python,content
+12144,24915576,"sample.py",5826,0,"",python,selection_keyboard
+12145,24915700,"sample.py",5826,0,"o",python,content
+12146,24915700,"sample.py",5827,0,"",python,selection_keyboard
+12147,24915714,"sample.py",5827,0,"n",python,content
+12148,24915715,"sample.py",5828,0,"",python,selection_keyboard
+12149,24915898,"sample.py",5828,0,".",python,content
+12150,24915898,"sample.py",5829,0,"",python,selection_keyboard
+12151,24916557,"sample.py",5829,0,"astype(jnp.float32)",python,content
+12152,24916754,"sample.py",5847,0,"",python,selection_command
+12153,24918479,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12154,24918565,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+12155,24918817,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+12156,24924981,"sample.py",5810,0,"\n ",python,content
+12157,24925087,"sample.py",5815,0,"#",python,content
+12158,24925087,"sample.py",5816,0,"",python,selection_keyboard
+12159,24925108,"sample.py",5816,0," ",python,content
+12160,24925109,"sample.py",5817,0,"",python,selection_keyboard
+12161,24925388,"sample.py",5817,0,"F",python,content
+12162,24925388,"sample.py",5818,0,"",python,selection_keyboard
+12163,24925409,"sample.py",5818,0,"I",python,content
+12164,24925409,"sample.py",5819,0,"",python,selection_keyboard
+12165,24925672,"sample.py",5819,0,"X",python,content
+12166,24925673,"sample.py",5820,0,"",python,selection_keyboard
+12167,24925788,"sample.py",5820,0,"M",python,content
+12168,24925788,"sample.py",5821,0,"",python,selection_keyboard
+12169,24925982,"sample.py",5821,0,"E",python,content
+12170,24925982,"sample.py",5822,0,"",python,selection_keyboard
+12171,24925993,"sample.py",5822,0,":",python,content
+12172,24925993,"sample.py",5823,0,"",python,selection_keyboard
+12173,24926211,"sample.py",5823,0," ",python,content
+12174,24926212,"sample.py",5824,0,"",python,selection_keyboard
+12175,24926424,"sample.py",5823,1,"",python,content
+12176,24926524,"sample.py",5822,1,"",python,content
+12177,24926622,"sample.py",5822,0," ",python,content
+12178,24926622,"sample.py",5823,0,"",python,selection_keyboard
+12179,24926707,"sample.py",5823,0,"()",python,content
+12180,24926707,"sample.py",5824,0,"",python,selection_keyboard
+12181,24926991,"sample.py",5824,0,"f",python,content
+12182,24926991,"sample.py",5825,0,"",python,selection_keyboard
+12183,24927129,"sample.py",5825,0,".",python,content
+12184,24927129,"sample.py",5826,0,"",python,selection_keyboard
+12185,24927189,"sample.py",5826,0,"s",python,content
+12186,24927190,"sample.py",5827,0,"",python,selection_keyboard
+12187,24927276,"sample.py",5827,0,"r",python,content
+12188,24927276,"sample.py",5828,0,"",python,selection_keyboard
+12189,24927377,"sample.py",5828,0,"a",python,content
+12190,24927378,"sample.py",5829,0,"",python,selection_keyboard
+12191,24927585,"sample.py",5829,0,"b",python,content
+12192,24927586,"sample.py",5830,0,"",python,selection_keyboard
+12193,24927920,"sample.py",5829,1,"",python,content
+12194,24928462,"sample.py",5829,0,"m",python,content
+12195,24928462,"sample.py",5830,0,"",python,selection_keyboard
+12196,24928690,"sample.py",5830,0,"b",python,content
+12197,24928690,"sample.py",5831,0,"",python,selection_keyboard
+12198,24928785,"sample.py",5831,0,"c",python,content
+12199,24928785,"sample.py",5832,0,"",python,selection_keyboard
+12200,24929291,"sample.py",5831,1,"",python,content
+12201,24929423,"sample.py",5831,0,"i",python,content
+12202,24929423,"sample.py",5832,0,"",python,selection_keyboard
+12203,24929454,"sample.py",5832,0,"c",python,content
+12204,24929454,"sample.py",5833,0,"",python,selection_keyboard
+12205,24929493,"sample.py",5833,0,"a",python,content
+12206,24929493,"sample.py",5834,0,"",python,selection_keyboard
+12207,24929596,"sample.py",5834,0,"l",python,content
+12208,24929596,"sample.py",5835,0,"",python,selection_keyboard
+12209,24929810,"sample.py",5835,1,")",python,content
+12210,24929810,"sample.py",5836,0,"",python,selection_keyboard
+12211,24930013,"sample.py",5836,0,":",python,content
+12212,24930013,"sample.py",5837,0,"",python,selection_keyboard
+12213,24930154,"sample.py",5837,0," ",python,content
+12214,24930154,"sample.py",5838,0,"",python,selection_keyboard
+12215,24930396,"sample.py",5838,0,"i",python,content
+12216,24930397,"sample.py",5839,0,"",python,selection_keyboard
+12217,24930457,"sample.py",5839,0,"n",python,content
+12218,24930457,"sample.py",5840,0,"",python,selection_keyboard
+12219,24930457,"sample.py",5840,0,"v",python,content
+12220,24930457,"sample.py",5841,0,"",python,selection_keyboard
+12221,24930547,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+12222,24930604,"sample.py",5841,0,"e",python,content
+12223,24930604,"sample.py",5842,0,"",python,selection_keyboard
+12224,24930671,"sample.py",5842,0,"s",python,content
+12225,24930671,"sample.py",5843,0,"",python,selection_keyboard
+12226,24930755,"sample.py",5843,0,"t",python,content
+12227,24930756,"sample.py",5844,0,"",python,selection_keyboard
+12228,24930856,"sample.py",5844,0,"i",python,content
+12229,24930856,"sample.py",5845,0,"",python,selection_keyboard
+12230,24930927,"sample.py",5845,0,"g",python,content
+12231,24930927,"sample.py",5846,0,"",python,selection_keyboard
+12232,24931022,"sample.py",5846,0,"a",python,content
+12233,24931023,"sample.py",5847,0,"",python,selection_keyboard
+12234,24931126,"sample.py",5847,0,"t",python,content
+12235,24931126,"sample.py",5848,0,"",python,selection_keyboard
+12236,24931189,"sample.py",5848,0,"e",python,content
+12237,24931189,"sample.py",5849,0,"",python,selection_keyboard
+12238,24931290,"sample.py",5849,0," ",python,content
+12239,24931290,"sample.py",5850,0,"",python,selection_keyboard
+12240,24931376,"sample.py",5850,0,"w",python,content
+12241,24931376,"sample.py",5851,0,"",python,selection_keyboard
+12242,24931522,"sample.py",5851,0,"h",python,content
+12243,24931522,"sample.py",5852,0,"",python,selection_keyboard
+12244,24931659,"sample.py",5852,0,"y",python,content
+12245,24931659,"sample.py",5853,0,"",python,selection_keyboard
+12246,24931739,"sample.py",5853,0," ",python,content
+12247,24931739,"sample.py",5854,0,"",python,selection_keyboard
+12248,24932166,"sample.py",5854,0,"t",python,content
+12249,24932166,"sample.py",5855,0,"",python,selection_keyboard
+12250,24932240,"sample.py",5855,0,"h",python,content
+12251,24932240,"sample.py",5856,0,"",python,selection_keyboard
+12252,24932279,"sample.py",5856,0,"i",python,content
+12253,24932280,"sample.py",5857,0,"",python,selection_keyboard
+12254,24932336,"sample.py",5857,0,"s",python,content
+12255,24932336,"sample.py",5858,0,"",python,selection_keyboard
+12256,24932407,"sample.py",5858,0," ",python,content
+12257,24932407,"sample.py",5859,0,"",python,selection_keyboard
+12258,24932522,"sample.py",5859,0,"i",python,content
+12259,24932522,"sample.py",5860,0,"",python,selection_keyboard
+12260,24932541,"sample.py",5860,0,"s",python,content
+12261,24932541,"sample.py",5861,0,"",python,selection_keyboard
+12262,24932623,"sample.py",5861,0," ",python,content
+12263,24932623,"sample.py",5862,0,"",python,selection_keyboard
+12264,24932797,"sample.py",5862,0,"n",python,content
+12265,24932797,"sample.py",5863,0,"",python,selection_keyboard
+12266,24932841,"sample.py",5863,0,"e",python,content
+12267,24932841,"sample.py",5864,0,"",python,selection_keyboard
+12268,24932990,"sample.py",5864,0,"e",python,content
+12269,24932990,"sample.py",5865,0,"",python,selection_keyboard
+12270,24933047,"sample.py",5865,0,"d",python,content
+12271,24933048,"sample.py",5866,0,"",python,selection_keyboard
+12272,24933196,"sample.py",5866,0,"e",python,content
+12273,24933196,"sample.py",5867,0,"",python,selection_keyboard
+12274,24933245,"sample.py",5867,0,"d",python,content
+12275,24933245,"sample.py",5868,0,"",python,selection_keyboard
+12276,24933479,"sample.py",5867,0,"",python,selection_command
+12277,24967475,"sample.py",5905,0,"",python,selection_command
+12278,24967762,"sample.py",5869,37," recon = recon.astype(jnp.float32)",python,selection_command
+12279,24980870,"TERMINAL",0,0,"2025-07-25 18:04:30.879837: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12280,24982333,"TERMINAL",0,0,"2025-07-25 18:04:32.355606: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12281,24985824,"TERMINAL",0,0,"2025-07-25 18:04:35.921696: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12282,24986837,"TERMINAL",0,0,"2025-07-25 18:04:36.936043: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12283,24987692,"TERMINAL",0,0,"Traceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 189, in \r\n recon = recon.astype(jnp.float32)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py"", line 221, in ssim\r\n chex.assert_type([a, b], float)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/chex/_src/asserts_internal.py"", line 279, in _chex_assert_fn\r\n host_assertion_fn(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/chex/_src/asserts_internal.py"", line 197, in _assert_on_host\r\n raise exception_type(error_msg)\r\nAssertionError: [Chex] Assertion assert_type failed: Error in type compatibility check: input 0 has type uint8 but expected .\r\n",,terminal_output
+12284,24988280,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+12285,24988392,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+12286,24988801,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12287,25005032,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+12288,25005033,"/fast/home/franz.srambical/jafar/sample.py",5869,0,"",python,selection_command
+12289,25022578,"sample.py",0,0,"",python,tab
+12290,25023818,"sample.py",5793,0,"",python,selection_mouse
+12291,25025242,"sample.py",5848,0,"",python,selection_command
+12292,25025412,"sample.py",5905,0,"",python,selection_command
+12293,25029745,"/fast/home/franz.srambical/jafar/sample.py",0,0,"",python,tab
+12294,25029745,"/fast/home/franz.srambical/jafar/sample.py",5869,0,"",python,selection_command
+12295,25033780,"sample.py",0,0,"",python,tab
+12296,25035023,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12297,25035097,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+12298,25035397,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+12299,25046989,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+12300,25051741,"TERMINAL",0,0,"^Csrun: interrupt (one more within 1 sec to abort)\r\nsrun: StepId=13888.11 task 0: running\r\n",,terminal_output
+12301,25051897,"TERMINAL",0,0,"^Csrun: sending Ctrl-C to StepId=13888.11\r\nsrun: forcing job termination\r\nsrun: Job step aborted: Waiting up to 32 seconds for job step to finish.\r\n[2025-07-25T18:05:41.989] error: *** STEP 13888.11 ON hai003 CANCELLED AT 2025-07-25T18:05:41 DUE to SIGNAL Killed ***\r\n",,terminal_output
+12302,25052003,"TERMINAL",0,0,"^Csrun: sending Ctrl-C to StepId=13888.11\r\nsrun: job abort in progress\r\n",,terminal_output
+12303,25052248,"TERMINAL",0,0,"^C]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12304,25052962,"sample.py",5906,0,"\n ",python,content
+12305,25053142,"sample.py",5911,0,"b",python,content
+12306,25053142,"sample.py",5912,0,"",python,selection_keyboard
+12307,25053185,"sample.py",5912,0,"r",python,content
+12308,25053186,"sample.py",5913,0,"",python,selection_keyboard
+12309,25053239,"sample.py",5913,0,"e",python,content
+12310,25053239,"sample.py",5914,0,"",python,selection_keyboard
+12311,25053309,"sample.py",5914,0,"a",python,content
+12312,25053310,"sample.py",5915,0,"",python,selection_keyboard
+12313,25053322,"sample.py",5915,0,"k",python,content
+12314,25053322,"sample.py",5916,0,"",python,selection_keyboard
+12315,25053481,"sample.py",5916,0,"p",python,content
+12316,25053481,"sample.py",5917,0,"",python,selection_keyboard
+12317,25053552,"sample.py",5917,0,"o",python,content
+12318,25053552,"sample.py",5918,0,"",python,selection_keyboard
+12319,25053614,"sample.py",5918,0,"i",python,content
+12320,25053614,"sample.py",5919,0,"",python,selection_keyboard
+12321,25053684,"sample.py",5919,0,"n",python,content
+12322,25053684,"sample.py",5920,0,"",python,selection_keyboard
+12323,25053736,"sample.py",5920,0,"t",python,content
+12324,25053737,"sample.py",5921,0,"",python,selection_keyboard
+12325,25053961,"sample.py",5921,0,"()",python,content
+12326,25053961,"sample.py",5922,0,"",python,selection_keyboard
+12327,25053994,"sample.py",5922,1,")",python,content
+12328,25053995,"sample.py",5923,0,"",python,selection_keyboard
+12329,25054202,"sample.py",5922,0,"",python,selection_command
+12330,25055677,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ bash experiments/sample.sh ",,terminal_output
+12331,25055884,"TERMINAL",0,0,"]",,terminal_output
+12332,25056835,"TERMINAL",0,0,"[K",,terminal_output
+12333,25057388,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+12334,25058916,"TERMINAL",0,0,"^Csrun: interrupt (one more within 1 sec to abort)\r\nsrun: StepId=13888.12 task 0: running\r\n",,terminal_output
+12335,25059102,"TERMINAL",0,0,"^Csrun: sending Ctrl-C to StepId=13888.12\r\nsrun: forcing job termination\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 14, in \r\n import tyro\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/tyro/__init__.py"", line 7, in \r\nsrun: Job step aborted: Waiting up to 32 seconds for job step to finish.\r\n from . import constructors as constructors\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/tyro/constructors/__init__.py"", line 12, in \r\n[2025-07-25T18:05:49.170] error: *** STEP 13888.12 ON hai003 CANCELLED AT 2025-07-25T18:05:49 DUE to SIGNAL Killed ***\r\n from ._primitive_spec import PrimitiveConstructorSpec as PrimitiveConstructorSpec\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/tyro/constructors/_primitive_spec.py"", line 38, in \r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12336,25059256,"TERMINAL",0,0,"^C[?2004l\r[?2004h[?2004l\r\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12337,25059459,"TERMINAL",0,0,"^C[?2004l\r[?2004h[?2004l\r\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12338,25060178,"sample.py",5884,0,"",python,selection_command
+12339,25060543,"sample.py",5868,0,"\n ",python,content
+12340,25060930,"sample.py",5873,0,"b",python,content
+12341,25060930,"sample.py",5874,0,"",python,selection_keyboard
+12342,25060998,"sample.py",5874,0,"r",python,content
+12343,25060998,"sample.py",5875,0,"",python,selection_keyboard
+12344,25061055,"sample.py",5875,0,"e",python,content
+12345,25061055,"sample.py",5876,0,"",python,selection_keyboard
+12346,25061112,"sample.py",5876,0,"a",python,content
+12347,25061112,"sample.py",5877,0,"",python,selection_keyboard
+12348,25061136,"sample.py",5877,0,"k",python,content
+12349,25061136,"sample.py",5878,0,"",python,selection_keyboard
+12350,25061278,"sample.py",5878,0,"p",python,content
+12351,25061278,"sample.py",5879,0,"",python,selection_keyboard
+12352,25061341,"sample.py",5879,0,"o",python,content
+12353,25061342,"sample.py",5880,0,"",python,selection_keyboard
+12354,25061425,"sample.py",5880,0,"i",python,content
+12355,25061425,"sample.py",5881,0,"",python,selection_keyboard
+12356,25061487,"sample.py",5881,0,"n",python,content
+12357,25061488,"sample.py",5882,0,"",python,selection_keyboard
+12358,25061553,"sample.py",5882,0,"t",python,content
+12359,25061553,"sample.py",5883,0,"",python,selection_keyboard
+12360,25061787,"sample.py",5883,0,"()",python,content
+12361,25061788,"sample.py",5884,0,"",python,selection_keyboard
+12362,25061806,"sample.py",5884,1,")",python,content
+12363,25061806,"sample.py",5885,0,"",python,selection_keyboard
+12364,25061993,"sample.py",5884,0,"",python,selection_command
+12365,25063747,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12366,25063839,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+12367,25064093,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+12368,25075240,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+12369,25099055,"TERMINAL",0,0,"2025-07-25 18:06:29.143476: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12370,25100524,"TERMINAL",0,0,"2025-07-25 18:06:30.617910: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12371,25104063,"TERMINAL",0,0,"2025-07-25 18:06:34.155770: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12372,25105078,"TERMINAL",0,0,"2025-07-25 18:06:35.169729: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12373,25105692,"TERMINAL",0,0,"> /fast/home/franz.srambical/jafar/sample.py(190)()\r\n-> recon = recon.astype(jnp.float32)\r\n",,terminal_output
+12374,25109570,"TERMINAL",0,0,"l",,terminal_output
+12375,25109812,"TERMINAL",0,0,"\r\n(Pdb) 185 \t vid = _autoreg_sample(rng, video_batch, action_batch)\r\n186 \t gt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\r\n187 \t recon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\r\n188 \t # FIXME (f.srambical): investigate why this is needed\r\n189 \t breakpoint()\r\n190 ->\t recon = recon.astype(jnp.float32)\r\n191 \t breakpoint()\r\n192 \t ssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()\r\n193 \t print(f""SSIM: {ssim}"")\r\n194 \t\r\n195 \t # --- Construct video ---\r\n",,terminal_output
+12376,25112765,"TERMINAL",0,0,"r",,terminal_output
+12377,25112824,"TERMINAL",0,0,"e",,terminal_output
+12378,25113083,"TERMINAL",0,0,"co",,terminal_output
+12379,25113179,"TERMINAL",0,0,"n",,terminal_output
+12380,25113390,"TERMINAL",0,0,"\r\n(Pdb) Array([[[[0.527344, 0.894531, 0.640625],\r\n [0.632812, 0.746094, 1],\r\n [0.078125, 0.292969, 0.171875],\r\n ...,\r\n [0.632812, 0.714844, 1],\r\n [0.0888672, 0.296875, 0.183594],\r\n [0.21875, 0.570312, 0.609375]],\r\n\r\n [[0.324219, 0.746094, 0.890625],\r\n [0.523438, 0.980469, 0.498047],\r\n [0.558594, 0.652344, 0.964844],\r\n ...,\r\n [0.589844, 0.980469, 0.414062],\r\n [0.585938, 0.597656, 0.96875],\r\n [0.527344, 0.259766, 1]],\r\n\r\n [[0.675781, 0.147461, 0.75],\r\n [0.273438, 0.566406, 0.320312],\r\n [0.507812, 0.447266, 1],\r\n ...,\r\n [0.306641, 0.589844, 0.3125],\r\n [0.519531, 0.417969, 1],\r\n [1, 0.945312, 0.683594]],\r\n\r\n ...,\r\n\r\n [[0.519531, 0.625, 0.003479],\r\n [0.753906, 0.390625, 0.757812],\r\n [0.808594, 0.804688, 0.710938],\r\n ...,\r\n [0.800781, 0.363281, 0.902344],\r\n [0.613281, 0.835938, 0.601562],\r\n [0.363281, 0.671875, 0.279297]],\r\n\r\n [[0.582031, 0.210938, 0.111328],\r\n [0.53125, 0.804688, 1],\r\n [0.511719, 0.275391, 0.332031],\r\n ...,\r\n [0.742188, 0.847656, 1],\r\n [0.695312, 0.166992, 0.507812],\r\n [0.199219, 0.582031, 0.695312]],\r\n\r\n [[0.503906, 0.804688, 0.265625],\r\n [0.375, 0.988281, 0.527344],\r\n [0.554688, 0.359375, 0.46875],\r\n ...,\r\n [0.458984, 0.984375, 0.597656],\r\n [0.675781, 0.507812, 0.992188],\r\n [0.394531, 0.206055, 1]]],\r\n\r\n\r\n [[[0.582031, 0.847656, 0.558594],\r\n [0.652344, 0.765625, 1],\r\n [0.081543, 0.285156, 0.194336],\r\n ...,\r\n [0.667969, 0.761719, 1],\r\n [0.0888672, 0.269531, 0.212891],\r\n [0.226562, 0.503906, 0.539062]],\r\n\r\n [[0.267578, 0.808594, 0.894531],\r\n [0.5, 0.984375, 0.523438],\r\n [0.613281, 0.589844, 0.960938],\r\n ...,\r\n [0.558594, 0.984375, 0.460938],\r\n [0.621094, 0.519531, 0.964844],\r\n [0.5, 0.277344, 1]],\r\n\r\n [[0.621094, 0.175781, 0.730469],\r\n [0.217773, 0.589844, 0.289062],\r\n [0.523438, 0.488281, 1],\r\n ...,\r\n [0.226562, 0.609375, 0.28125],\r\n [0.546875, 0.472656, 1],\r\n [1, 0.949219, 0.636719]],\r\n\r\n ...,\r\n\r\n [[0.539062, 0.605469, 0.00328064],\r\n [0.800781, 0.402344, 0.742188],\r\n [0.792969, 0.761719, 0.5625],\r\n ...,\r\n [0.496094, 0.496094, 0.835938],\r\n [0.388672, 0.808594, 0.65625],\r\n [0.269531, 0.648438, 0.832031]],\r\n\r\n [[0.574219, 0.0289307, 0.0319824],\r\n [0.683594, 0.714844, 1],\r\n [0.410156, 0.197266, 0.199219],\r\n ...,\r\n [0.660156, 0.910156, 1],\r\n [0.550781, 0.211914, 0.515625],\r\n [0.223633, 0.347656, 0.519531]],\r\n\r\n [[0.5625, 0.972656, 0.675781],\r\n [0.40625, 0.984375, 0.660156],\r\n [0.84375, 0.400391, 0.976562],\r\n ...,\r\n [0.365234, 0.992188, 0.519531],\r\n [0.451172, 0.296875, 0.570312],\r\n [0.310547, 0.570312, 1]]]], dtype=bfloat16)\r\n",,terminal_output
+12381,25123234,"TERMINAL",0,0,"r",,terminal_output
+12382,25123295,"TERMINAL",0,0,"e",,terminal_output
+12383,25123450,"TERMINAL",0,0,"c",,terminal_output
+12384,25123534,"TERMINAL",0,0,"o",,terminal_output
+12385,25123605,"TERMINAL",0,0,"n",,terminal_output
+12386,25123836,"TERMINAL",0,0,".",,terminal_output
+12387,25124835,"TERMINAL",0,0,"as",,terminal_output
+12388,25125735,"TERMINAL",0,0," ",,terminal_output
+12389,25126047,"TERMINAL",0,0," ",,terminal_output
+12390,25126234,"TERMINAL",0,0," ",,terminal_output
+12391,25126406,"TERMINAL",0,0," ",,terminal_output
+12392,25126557,"TERMINAL",0,0," ",,terminal_output
+12393,25127173,"TERMINAL",0,0,"e",,terminal_output
+12394,25127260,"TERMINAL",0,0,"c",,terminal_output
+12395,25127343,"TERMINAL",0,0,"o",,terminal_output
+12396,25127427,"TERMINAL",0,0,"n",,terminal_output
+12397,25127586,"TERMINAL",0,0,".",,terminal_output
+12398,25127789,"TERMINAL",0,0,"d",,terminal_output
+12399,25128032,"TERMINAL",0,0,"t",,terminal_output
+12400,25128119,"TERMINAL",0,0,"y",,terminal_output
+12401,25128184,"TERMINAL",0,0,"p",,terminal_output
+12402,25128313,"TERMINAL",0,0,"e",,terminal_output
+12403,25128502,"TERMINAL",0,0,"\r\n(Pdb) dtype(bfloat16)\r\n",,terminal_output
+12404,25131247,"TERMINAL",0,0,"re",,terminal_output
+12405,25131444,"TERMINAL",0,0,"c",,terminal_output
+12406,25131503,"TERMINAL",0,0,"o",,terminal_output
+12407,25131567,"TERMINAL",0,0,"n",,terminal_output
+12408,25131725,"TERMINAL",0,0,".",,terminal_output
+12409,25131882,"TERMINAL",0,0,"as",,terminal_output
+12410,25132035,"TERMINAL",0,0,"t",,terminal_output
+12411,25132213,"TERMINAL",0,0,"y",,terminal_output
+12412,25132272,"TERMINAL",0,0,"p",,terminal_output
+12413,25132371,"TERMINAL",0,0,"e",,terminal_output
+12414,25133008,"TERMINAL",0,0,"(",,terminal_output
+12415,25133632,"TERMINAL",0,0,"j",,terminal_output
+12416,25133792,"TERMINAL",0,0,"n",,terminal_output
+12417,25133854,"TERMINAL",0,0,"p",,terminal_output
+12418,25134092,"TERMINAL",0,0,".",,terminal_output
+12419,25134958,"TERMINAL",0,0,"b",,terminal_output
+12420,25135172,"TERMINAL",0,0,"l",,terminal_output
+12421,25135585,"TERMINAL",0,0," ",,terminal_output
+12422,25135741,"TERMINAL",0,0," ",,terminal_output
+12423,25135915,"TERMINAL",0,0,"f",,terminal_output
+12424,25135988,"TERMINAL",0,0,"l",,terminal_output
+12425,25136128,"TERMINAL",0,0,"o",,terminal_output
+12426,25136180,"TERMINAL",0,0,"a",,terminal_output
+12427,25136309,"TERMINAL",0,0,"t",,terminal_output
+12428,25136588,"TERMINAL",0,0,"3",,terminal_output
+12429,25136684,"TERMINAL",0,0,"2",,terminal_output
+12430,25136998,"TERMINAL",0,0,")",,terminal_output
+12431,25137310,"TERMINAL",0,0,"\r\n(Pdb) Array([[[[0.52734375, 0.89453125, 0.640625 ],\r\n [0.6328125 , 0.74609375, 1. ],\r\n [0.078125 , 0.29296875, 0.171875 ],\r\n ...,\r\n [0.6328125 , 0.71484375, 1. ],\r\n [0.08886719, 0.296875 , 0.18359375],\r\n [0.21875 , 0.5703125 , 0.609375 ]],\r\n\r\n [[0.32421875, 0.74609375, 0.890625 ],\r\n [0.5234375 , 0.98046875, 0.49804688],\r\n [0.55859375, 0.65234375, 0.96484375],\r\n ...,\r\n [0.58984375, 0.98046875, 0.4140625 ],\r\n [0.5859375 , 0.59765625, 0.96875 ],\r\n [0.52734375, 0.25976562, 1. ]],\r\n\r\n [[0.67578125, 0.14746094, 0.75 ],\r\n [0.2734375 , 0.56640625, 0.3203125 ],\r\n [0.5078125 , 0.44726562, 1. ],\r\n ...,\r\n [0.30664062, 0.58984375, 0.3125 ],\r\n [0.51953125, 0.41796875, 1. ],\r\n [1. , 0.9453125 , 0.68359375]],\r\n\r\n ...,\r\n\r\n [[0.51953125, 0.625 , 0.003479 ],\r\n [0.75390625, 0.390625 , 0.7578125 ],\r\n [0.80859375, 0.8046875 , 0.7109375 ],\r\n ...,\r\n [0.80078125, 0.36328125, 0.90234375],\r\n [0.61328125, 0.8359375 , 0.6015625 ],\r\n [0.36328125, 0.671875 , 0.27929688]],\r\n\r\n [[0.58203125, 0.2109375 , 0.11132812],\r\n [0.53125 , 0.8046875 , 1. ],\r\n [0.51171875, 0.27539062, 0.33203125],\r\n ...,\r\n [0.7421875 , 0.84765625, 1. ],\r\n [0.6953125 , 0.16699219, 0.5078125 ],\r\n [0.19921875, 0.58203125, 0.6953125 ]],\r\n\r\n [[0.50390625, 0.8046875 , 0.265625 ],\r\n [0.375 , 0.98828125, 0.52734375],\r\n [0.5546875 , 0.359375 , 0.46875 ],\r\n ...,\r\n [0.45898438, 0.984375 , 0.59765625],\r\n [0.67578125, 0.5078125 , 0.9921875 ],\r\n [0.39453125, 0.20605469, 1. ]]],\r\n\r\n\r\n [[[0.58203125, 0.84765625, 0.55859375],\r\n [0.65234375, 0.765625 , 1. ],\r\n [0.08154297, 0.28515625, 0.19433594],\r\n ...,\r\n [0.66796875, 0.76171875, 1. ],\r\n [0.08886719, 0.26953125, 0.21289062],\r\n [0.2265625 , 0.50390625, 0.5390625 ]],\r\n\r\n [[0.26757812, 0.80859375, 0.89453125],\r\n [0.5 , 0.984375 , 0.5234375 ],\r\n [0.61328125, 0.58984375, 0.9609375 ],\r\n ...,\r\n [0.55859375, 0.984375 , 0.4609375 ],\r\n [0.62109375, 0.51953125, 0.96484375],\r\n [0.5 , 0.27734375, 1. ]],\r\n\r\n [[0.62109375, 0.17578125, 0.73046875],\r\n [0.21777344, 0.58984375, 0.2890625 ],\r\n [0.5234375 , 0.48828125, 1. ],\r\n ...,\r\n [0.2265625 , 0.609375 , 0.28125 ],\r\n [0.546875 , 0.47265625, 1. ],\r\n [1. , 0.94921875, 0.63671875]],\r\n\r\n ...,\r\n\r\n [[0.5390625 , 0.60546875, 0.00328064],\r\n [0.80078125, 0.40234375, 0.7421875 ],\r\n [0.79296875, 0.76171875, 0.5625 ],\r\n ...,\r\n [0.49609375, 0.49609375, 0.8359375 ],\r\n [0.38867188, 0.80859375, 0.65625 ],\r\n [0.26953125, 0.6484375 , 0.83203125]],\r\n\r\n [[0.57421875, 0.02893066, 0.03198242],\r\n [0.68359375, 0.71484375, 1. ],\r\n [0.41015625, 0.19726562, 0.19921875],\r\n ...,\r\n [0.66015625, 0.91015625, 1. ],\r\n [0.55078125, 0.21191406, 0.515625 ],\r\n [0.22363281, 0.34765625, 0.51953125]],\r\n\r\n [[0.5625 , 0.97265625, 0.67578125],\r\n [0.40625 , 0.984375 , 0.66015625],\r\n [0.84375 , 0.40039062, 0.9765625 ],\r\n ...,\r\n [0.36523438, 0.9921875 , 0.51953125],\r\n [0.45117188, 0.296875 , 0.5703125 ],\r\n [0.31054688, 0.5703125 , 1. ]]]], dtype=float32)\r\n",,terminal_output
+12432,25150664,"TERMINAL",0,0,"p",,terminal_output
+12433,25150734,"TERMINAL",0,0,"i",,terminal_output
+12434,25150819,"TERMINAL",0,0,"x",,terminal_output
+12435,25151105,"TERMINAL",0,0,".",,terminal_output
+12436,25151190,"TERMINAL",0,0,"s",,terminal_output
+12437,25151440,"TERMINAL",0,0,"s",,terminal_output
+12438,25151523,"TERMINAL",0,0,"i",,terminal_output
+12439,25151629,"TERMINAL",0,0,"m",,terminal_output
+12440,25152308,"TERMINAL",0,0,"(",,terminal_output
+12441,25153965,"TERMINAL",0,0,"g",,terminal_output
+12442,25154145,"TERMINAL",0,0,"t",,terminal_output
+12443,25154336,"TERMINAL",0,0,"[",,terminal_output
+12444,25155299,"TERMINAL",0,0,":",,terminal_output
+12445,25155463,"TERMINAL",0,0,",",,terminal_output
+12446,25155717,"TERMINAL",0,0," ",,terminal_output
+12447,25161674,"TERMINAL",0,0,"0",,terminal_output
+12448,25161854,"TERMINAL",0,0,"]",,terminal_output
+12449,25164002,"TERMINAL",0,0,",",,terminal_output
+12450,25164331,"TERMINAL",0,0," r",,terminal_output
+12451,25164478,"TERMINAL",0,0,"e",,terminal_output
+12452,25164566,"TERMINAL",0,0,"c",,terminal_output
+12453,25164620,"TERMINAL",0,0,"o",,terminal_output
+12454,25164748,"TERMINAL",0,0,"n",,terminal_output
+12455,25164839,"TERMINAL",0,0,"[",,terminal_output
+12456,25165643,"TERMINAL",0,0,":",,terminal_output
+12457,25165887,"TERMINAL",0,0,",",,terminal_output
+12458,25166115,"TERMINAL",0,0,"0",,terminal_output
+12459,25166409,"TERMINAL",0,0,"]",,terminal_output
+12460,25167139,"TERMINAL",0,0,")",,terminal_output
+12461,25169535,"TERMINAL",0,0,"\r\n(Pdb) *** AssertionError: [Chex] Assertion assert_type failed: Error in type compatibility check: input 0 has type uint8 but expected .\r\n",,terminal_output
+12462,25182299,"sample.py",5901,0,"",python,selection_command
+12463,25182416,"sample.py",5939,0,"",python,selection_command
+12464,25182555,"sample.py",5956,0,"",python,selection_command
+12465,25182832,"sample.py",5941,91," ssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()",python,selection_command
+12466,25197020,"sample.py",5956,0,"",python,selection_command
+12467,25198128,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",0,0,"# Copyright 2020 DeepMind Technologies Limited. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n""""""PIX public APIs.""""""\n\nfrom dm_pix._src import augment\nfrom dm_pix._src import color_conversion\nfrom dm_pix._src import depth_and_space\nfrom dm_pix._src import interpolation\nfrom dm_pix._src import metrics\nfrom dm_pix._src import patch\n\n__version__ = ""0.4.4""\n\n# Augmentations.\nadjust_brightness = augment.adjust_brightness\nadjust_contrast = augment.adjust_contrast\nadjust_gamma = augment.adjust_gamma\nadjust_hue = augment.adjust_hue\nadjust_saturation = augment.adjust_saturation\naffine_transform = augment.affine_transform\ncenter_crop = augment.center_crop\nelastic_deformation = augment.elastic_deformation\nflip_left_right = augment.flip_left_right\nflip_up_down = augment.flip_up_down\ngaussian_blur = augment.gaussian_blur\npad_to_size = augment.pad_to_size\nrandom_brightness = augment.random_brightness\nrandom_contrast = augment.random_contrast\nrandom_crop = augment.random_crop\nrandom_flip_left_right = augment.random_flip_left_right\nrandom_flip_up_down = augment.random_flip_up_down\nrandom_gamma = augment.random_gamma\nrandom_hue = augment.random_hue\nrandom_saturation = augment.random_saturation\nresize_with_crop_or_pad = augment.resize_with_crop_or_pad\nrotate = augment.rotate\nrot90 = augment.rot90\nsolarize = augment.solarize\n\n# Color conversions.\nhsl_to_rgb = color_conversion.hsl_to_rgb\nhsv_to_rgb = color_conversion.hsv_to_rgb\nrgb_to_hsl = color_conversion.rgb_to_hsl\nrgb_to_hsv = color_conversion.rgb_to_hsv\nrgb_to_grayscale = color_conversion.rgb_to_grayscale\n\n# Depth and space transformations.\ndepth_to_space = depth_and_space.depth_to_space\nspace_to_depth = depth_and_space.space_to_depth\n\n# Interpolation functions.\nflat_nd_linear_interpolate = interpolation.flat_nd_linear_interpolate\nflat_nd_linear_interpolate_constant = (\n interpolation.flat_nd_linear_interpolate_constant)\n\n# Metrics.\nmae = metrics.mae\nmse = metrics.mse\npsnr = metrics.psnr\nrmse = metrics.rmse\nsimse = metrics.simse\nssim = metrics.ssim\n\n# Patch extraction functions.\nextract_patches = patch.extract_patches\n\ndel augment, color_conversion, depth_and_space, interpolation, metrics, patch\n\n__all__ = (\n ""adjust_brightness"",\n ""adjust_contrast"",\n ""adjust_gamma"",\n ""adjust_hue"",\n ""adjust_saturation"",\n ""affine_transform"",\n ""center_crop"",\n ""depth_to_space"",\n ""elastic_deformation"",\n ""extract_patches"",\n ""flat_nd_linear_interpolate"",\n ""flat_nd_linear_interpolate_constant"",\n ""flip_left_right"",\n ""flip_up_down"",\n ""gaussian_blur"",\n ""hsl_to_rgb"",\n ""hsv_to_rgb"",\n ""mae"",\n ""mse"",\n ""pad_to_size"",\n ""psnr"",\n ""random_brightness"",\n ""random_contrast"",\n ""random_crop"",\n ""random_flip_left_right"",\n ""random_flip_up_down"",\n ""random_gamma"",\n ""random_hue"",\n ""random_saturation"",\n ""resize_with_crop_or_pad"",\n ""rotate"",\n ""rgb_to_hsl"",\n ""rgb_to_hsv"",\n ""rgb_to_grayscale"",\n ""rmse"",\n ""rot90"",\n ""simse"",\n ""ssim"",\n ""solarize"",\n ""space_to_depth"",\n)\n\n# _________________________________________\n# / Please don't use symbols in `_src` they \\n# \ are not part of the PIX public API. /\n# -----------------------------------------\n# \ ^__^\n# \ (oo)\_______\n# (__)\ )\/\\n# ||----w |\n# || ||\n#\ntry:\n del _src # pylint: disable=undefined-variable\nexcept NameError:\n pass\n",python,tab
+12468,25198128,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",2521,0,"",python,selection_command
+12469,25199153,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",2526,0,"",python,selection_command
+12470,25199470,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",2528,0,"",python,selection_command
+12471,25199641,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",2535,0,"",python,selection_command
+12472,25199805,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",2536,0,"",python,selection_command
+12473,25200208,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",0,0,"# Copyright 2021 DeepMind Technologies Limited. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n""""""Functions to compare image pairs.\n\nAll functions expect float-encoded images, with values in [0, 1], with NHWC\nshapes. Each image metric function returns a scalar for each image pair.\n""""""\n\nfrom typing import Callable, Optional\n\nimport chex\nimport jax\nimport jax.numpy as jnp\n\n# DO NOT REMOVE - Logging lib.\n\n\ndef mae(\n a: chex.Array,\n b: chex.Array,\n *,\n ignore_nans: bool = False,\n) -> chex.Numeric:\n """"""Returns the Mean Absolute Error between `a` and `b`.\n\n Args:\n a: First image (or set of images).\n b: Second image (or set of images).\n ignore_nans: If True, will ignore NaNs in the inputs.\n\n Returns:\n MAE between `a` and `b`.\n """"""\n # DO NOT REMOVE - Logging usage.\n\n chex.assert_rank([a, b], {3, 4})\n chex.assert_type([a, b], float)\n chex.assert_equal_shape([a, b])\n mean_fn = jnp.nanmean if ignore_nans else jnp.mean\n return mean_fn(jnp.abs(a - b), axis=(-3, -2, -1))\n\n\ndef mse(\n a: chex.Array,\n b: chex.Array,\n *,\n ignore_nans: bool = False,\n) -> chex.Numeric:\n """"""Returns the Mean Squared Error between `a` and `b`.\n\n Args:\n a: First image (or set of images).\n b: Second image (or set of images).\n ignore_nans: If True, will ignore NaNs in the inputs.\n\n Returns:\n MSE between `a` and `b`.\n """"""\n # DO NOT REMOVE - Logging usage.\n\n chex.assert_rank([a, b], {3, 4})\n chex.assert_type([a, b], float)\n chex.assert_equal_shape([a, b])\n mean_fn = jnp.nanmean if ignore_nans else jnp.mean\n return mean_fn(jnp.square(a - b), axis=(-3, -2, -1))\n\n\ndef psnr(\n a: chex.Array,\n b: chex.Array,\n *,\n ignore_nans: bool = False,\n) -> chex.Numeric:\n """"""Returns the Peak Signal-to-Noise Ratio between `a` and `b`.\n\n Assumes that the dynamic range of the images (the difference between the\n maximum and the minimum allowed values) is 1.0.\n\n Args:\n a: First image (or set of images).\n b: Second image (or set of images).\n ignore_nans: If True, will ignore NaNs in the inputs.\n\n Returns:\n PSNR in decibels between `a` and `b`.\n """"""\n # DO NOT REMOVE - Logging usage.\n\n chex.assert_rank([a, b], {3, 4})\n chex.assert_type([a, b], float)\n chex.assert_equal_shape([a, b])\n return -10.0 * jnp.log(mse(a, b, ignore_nans=ignore_nans)) / jnp.log(10.0)\n\n\ndef rmse(\n a: chex.Array,\n b: chex.Array,\n *,\n ignore_nans: bool = False,\n) -> chex.Array:\n """"""Returns the Root Mean Squared Error between `a` and `b`.\n\n Args:\n a: First image (or set of images).\n b: Second image (or set of images).\n ignore_nans: If True, will ignore NaNs in the inputs.\n\n Returns:\n RMSE between `a` and `b`.\n """"""\n # DO NOT REMOVE - Logging usage.\n\n chex.assert_rank([a, b], {3, 4})\n chex.assert_type([a, b], float)\n chex.assert_equal_shape([a, b])\n return jnp.sqrt(mse(a, b, ignore_nans=ignore_nans))\n\n\ndef simse(\n a: chex.Array,\n b: chex.Array,\n *,\n ignore_nans: bool = False,\n) -> chex.Numeric:\n """"""Returns the Scale-Invariant Mean Squared Error between `a` and `b`.\n\n For each image pair, a scaling factor for `b` is computed as the solution to\n the following problem:\n\n min_alpha || vec(a) - alpha * vec(b) ||_2^2\n\n where `a` and `b` are flattened, i.e., vec(x) = np.flatten(x). The MSE between\n the optimally scaled `b` and `a` is returned: mse(a, alpha*b).\n\n This is a scale-invariant metric, so for example: simse(x, y) == sims(x, y*5).\n\n This metric was used in ""Shape, Illumination, and Reflectance from Shading"" by\n Barron and Malik, TPAMI, '15.\n\n Args:\n a: First image (or set of images).\n b: Second image (or set of images).\n ignore_nans: If True, will ignore NaNs in the inputs.\n\n Returns:\n SIMSE between `a` and `b`.\n """"""\n # DO NOT REMOVE - Logging usage.\n\n chex.assert_rank([a, b], {3, 4})\n chex.assert_type([a, b], float)\n chex.assert_equal_shape([a, b])\n\n sum_fn = jnp.nansum if ignore_nans else jnp.sum\n a_dot_b = sum_fn((a * b), axis=(-3, -2, -1), keepdims=True)\n b_dot_b = sum_fn((b * b), axis=(-3, -2, -1), keepdims=True)\n alpha = a_dot_b / b_dot_b\n return mse(a, alpha * b, ignore_nans=ignore_nans)\n\n\ndef ssim(\n a: chex.Array,\n b: chex.Array,\n *,\n max_val: float = 1.0,\n filter_size: int = 11,\n filter_sigma: float = 1.5,\n k1: float = 0.01,\n k2: float = 0.03,\n return_map: bool = False,\n precision=jax.lax.Precision.HIGHEST,\n filter_fn: Optional[Callable[[chex.Array], chex.Array]] = None,\n ignore_nans: bool = False,\n) -> chex.Numeric:\n """"""Computes the structural similarity index (SSIM) between image pairs.\n\n This function is based on the standard SSIM implementation from:\n Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli,\n ""Image quality assessment: from error visibility to structural similarity"",\n in IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600-612, 2004.\n\n This function was modeled after tf.image.ssim, and should produce comparable\n output.\n\n Note: the true SSIM is only defined on grayscale. This function does not\n perform any colorspace transform. If the input is in a color space, then it\n will compute the average SSIM.\n\n Args:\n a: First image (or set of images).\n b: Second image (or set of images).\n max_val: The maximum magnitude that `a` or `b` can have.\n filter_size: Window size (>= 1). Image dims must be at least this small.\n filter_sigma: The bandwidth of the Gaussian used for filtering (> 0.).\n k1: One of the SSIM dampening parameters (> 0.).\n k2: One of the SSIM dampening parameters (> 0.).\n return_map: If True, will cause the per-pixel SSIM ""map"" to be returned.\n precision: The numerical precision to use when performing convolution.\n filter_fn: An optional argument for overriding the filter function used by\n SSIM, which would otherwise be a 2D Gaussian blur specified by filter_size\n and filter_sigma.\n ignore_nans: If True, will ignore NaNs in the inputs.\n\n Returns:\n Each image's mean SSIM, or a tensor of individual values if `return_map`.\n """"""\n # DO NOT REMOVE - Logging usage.\n\n chex.assert_rank([a, b], {3, 4})\n chex.assert_type([a, b], float)\n chex.assert_equal_shape([a, b])\n\n if filter_fn is None:\n # Construct a 1D Gaussian blur filter.\n hw = filter_size // 2\n shift = (2 * hw - filter_size + 1) / 2\n f_i = ((jnp.arange(filter_size) - hw + shift) / filter_sigma) ** 2\n filt = jnp.exp(-0.5 * f_i)\n filt /= jnp.sum(filt)\n\n # Construct a 1D convolution.\n def filter_fn_1(z):\n return jnp.convolve(z, filt, mode=""valid"", precision=precision)\n\n filter_fn_vmap = jax.vmap(filter_fn_1)\n\n # Apply the vectorized filter along the y axis.\n def filter_fn_y(z):\n z_flat = jnp.moveaxis(z, -3, -1).reshape((-1, z.shape[-3]))\n z_filtered_shape = ((z.shape[-4],) if z.ndim == 4 else ()) + (\n z.shape[-2],\n z.shape[-1],\n -1,\n )\n z_filtered = jnp.moveaxis(\n filter_fn_vmap(z_flat).reshape(z_filtered_shape), -1, -3\n )\n return z_filtered\n\n # Apply the vectorized filter along the x axis.\n def filter_fn_x(z):\n z_flat = jnp.moveaxis(z, -2, -1).reshape((-1, z.shape[-2]))\n z_filtered_shape = ((z.shape[-4],) if z.ndim == 4 else ()) + (\n z.shape[-3],\n z.shape[-1],\n -1,\n )\n z_filtered = jnp.moveaxis(\n filter_fn_vmap(z_flat).reshape(z_filtered_shape), -1, -2\n )\n return z_filtered\n\n # Apply the blur in both x and y.\n filter_fn = lambda z: filter_fn_y(filter_fn_x(z))\n\n mu0 = filter_fn(a)\n mu1 = filter_fn(b)\n mu00 = mu0 * mu0\n mu11 = mu1 * mu1\n mu01 = mu0 * mu1\n sigma00 = filter_fn(a**2) - mu00\n sigma11 = filter_fn(b**2) - mu11\n sigma01 = filter_fn(a * b) - mu01\n\n # Clip the variances and covariances to valid values.\n # Variance must be non-negative:\n epsilon = jnp.finfo(jnp.float32).eps ** 2\n sigma00 = jnp.maximum(epsilon, sigma00)\n sigma11 = jnp.maximum(epsilon, sigma11)\n sigma01 = jnp.sign(sigma01) * jnp.minimum(\n jnp.sqrt(sigma00 * sigma11), jnp.abs(sigma01)\n )\n\n c1 = (k1 * max_val) ** 2\n c2 = (k2 * max_val) ** 2\n numer = (2 * mu01 + c1) * (2 * sigma01 + c2)\n denom = (mu00 + mu11 + c1) * (sigma00 + sigma11 + c2)\n ssim_map = numer / denom\n mean_fn = jnp.nanmean if ignore_nans else jnp.mean\n ssim_value = mean_fn(ssim_map, axis=tuple(range(-3, 0)))\n return ssim_map if return_map else ssim_value\n",python,tab
+12474,25200208,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",4676,0,"",python,selection_command
+12475,25201470,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",4686,0,"",python,selection_command
+12476,25208388,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",6619,0,"",python,selection_command
+12477,25209862,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",6654,0,"",python,selection_command
+12478,25244892,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",6647,33," chex.assert_type([a, b], float)",python,selection_command
+12479,25246600,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",6654,0,"",python,selection_command
+12480,25247650,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",0,0,"",python,tab
+12481,25249555,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",0,0,"",python,tab
+12482,25249555,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",6654,0,"",python,selection_command
+12483,25250270,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",0,0,"",python,tab
+12484,25250271,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",2536,0,"",python,selection_command
+12485,25251901,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",0,0,"",python,tab
+12486,25251901,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",4676,0,"",python,selection_command
+12487,25255361,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",0,0,"",python,tab
+12488,25255361,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",2536,0,"",python,selection_command
+12489,25255513,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",0,0,"",python,tab
+12490,25255513,".venv/lib/python3.10/site-packages/dm_pix/_src/metrics.py",6654,0,"",python,selection_command
+12491,25259318,"TERMINAL",0,0,"g",,terminal_output
+12492,25259610,"TERMINAL",0,0,"t[",,terminal_output
+12493,25260040,"TERMINAL",0,0,":",,terminal_output
+12494,25260290,"TERMINAL",0,0,",",,terminal_output
+12495,25260755,"TERMINAL",0,0," ",,terminal_output
+12496,25260840,"TERMINAL",0,0,"0",,terminal_output
+12497,25261366,"TERMINAL",0,0,"]",,terminal_output
+12498,25261931,"TERMINAL",0,0,"\r\n(Pdb) array([[[1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 0, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1]],\r\n\r\n [[1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 0],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1],\r\n [1, 1, 1]]], dtype=uint8)\r\n",,terminal_output
+12499,25272453,".venv/lib/python3.10/site-packages/dm_pix/__init__.py",0,0,"",python,tab
+12500,25273682,"sample.py",0,0,"",python,tab
+12501,25280925,"sample.py",5933,0,"",python,selection_command
+12502,25281069,"sample.py",5901,0,"",python,selection_command
+12503,25281540,"sample.py",5898,0,"",python,selection_command
+12504,25281718,"sample.py",5897,0,"",python,selection_command
+12505,25281858,"sample.py",5895,0,"",python,selection_command
+12506,25282228,"sample.py",5893,0,"",python,selection_command
+12507,25286802,"sample.py",5945,0,"",python,selection_mouse
+12508,25287443,"sample.py",5918,38,"",python,content
+12509,25287478,"sample.py",5922,0,"",python,selection_command
+12510,25288078,"sample.py",5918,17,"",python,content
+12511,25288092,"sample.py",5922,0,"",python,selection_command
+12512,25288655,"sample.py",5885,0,"",python,selection_mouse
+12513,25288659,"sample.py",5884,0,"",python,selection_command
+12514,25289052,"sample.py",5869,17,"",python,content
+12515,25289065,"sample.py",5873,0,"",python,selection_command
+12516,25291223,"TERMINAL",0,0,"^L^P",,terminal_output
+12517,25291528,"TERMINAL",0,0,"q",,terminal_output
+12518,25291993,"TERMINAL",0,0,"^Csrun: interrupt (one more within 1 sec to abort)\r\nsrun: StepId=13888.13 task 0: running\r\n",,terminal_output
+12519,25292145,"TERMINAL",0,0,"^Csrun: sending Ctrl-C to StepId=13888.13\r\nsrun: forcing job termination\r\nsrun: Job step aborted: Waiting up to 32 seconds for job step to finish.\r\n[2025-07-25T18:09:42.243] error: *** STEP 13888.13 ON hai003 CANCELLED AT 2025-07-25T18:09:42 DUE to SIGNAL Killed ***\r\n",,terminal_output
+12520,25292269,"TERMINAL",0,0,"(Pdb) ",,terminal_output
+12521,25292517,"TERMINAL",0,0,"]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ [H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12522,25292572,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+12523,25292885,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+12524,25299855,"sample.py",5684,0,"",python,selection_mouse
+12525,25304382,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+12526,25326199,"TERMINAL",0,0,"2025-07-25 18:10:16.295536: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12527,25327680,"TERMINAL",0,0,"2025-07-25 18:10:17.776037: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12528,25331255,"TERMINAL",0,0,"2025-07-25 18:10:21.351592: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12529,25332270,"TERMINAL",0,0,"2025-07-25 18:10:22.365658: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12530,25335536,"TERMINAL",0,0,"SSIM: 0.012790102511644363\r\n",,terminal_output
+12531,25335661,"experiments/sample.sh",0,0,"",shellscript,tab
+12532,25336132,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+12533,25336350,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+12534,25336814,"TERMINAL",0,0,"]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12535,25350083,"experiments/sample.sh",315,0,"",shellscript,selection_mouse
+12536,25350086,"experiments/sample.sh",314,0,"",shellscript,selection_command
+12537,25351811,"sample.py",0,0,"",python,tab
+12538,25352860,"sample.py",5771,0,"",python,selection_command
+12539,25353102,"sample.py",5826,0,"",python,selection_command
+12540,25353273,"sample.py",5884,0,"",python,selection_command
+12541,25353402,"sample.py",5916,0,"",python,selection_command
+12542,25353594,"sample.py",6008,0,"",python,selection_command
+12543,25354218,"sample.py",6020,0,"",python,selection_command
+12544,25354388,"sample.py",6036,0,"",python,selection_command
+12545,25354538,"sample.py",6066,0,"",python,selection_command
+12546,25354724,"sample.py",6036,0,"",python,selection_command
+12547,25357823,"sample.py",6066,0,"",python,selection_command
+12548,25358141,"sample.py",6055,0,"",python,selection_command
+12549,25359053,"sample.py",6055,1,"t",python,selection_command
+12550,25359247,"sample.py",6055,1,"t",python,selection_command
+12551,25359497,"sample.py",6055,1,"t",python,selection_command
+12552,25359520,"sample.py",6055,1,"t",python,selection_command
+12553,25359550,"sample.py",6055,1,"t",python,selection_command
+12554,25359583,"sample.py",6055,1,"t",python,selection_command
+12555,25359617,"sample.py",6051,5," t",python,selection_command
+12556,25359660,"sample.py",6055,1,"t",python,selection_command
+12557,25359707,"sample.py",6055,1,"t",python,selection_command
+12558,25359717,"sample.py",6055,1,"t",python,selection_command
+12559,25359751,"sample.py",6055,1,"t",python,selection_command
+12560,25359784,"sample.py",6055,1,"t",python,selection_command
+12561,25359885,"sample.py",6055,1,"t",python,selection_command
+12562,25359885,"sample.py",6055,1,"t",python,selection_command
+12563,25359885,"sample.py",6055,1,"t",python,selection_command
+12564,25359918,"sample.py",6055,1,"t",python,selection_command
+12565,25359949,"sample.py",6055,1,"t",python,selection_command
+12566,25359983,"sample.py",6055,1,"t",python,selection_command
+12567,25360017,"sample.py",6055,1,"t",python,selection_command
+12568,25360050,"sample.py",6055,1,"t",python,selection_command
+12569,25360084,"sample.py",6055,1,"t",python,selection_command
+12570,25360117,"sample.py",6055,1,"t",python,selection_command
+12571,25360151,"sample.py",6055,1,"t",python,selection_command
+12572,25360184,"sample.py",6051,5," t",python,selection_command
+12573,25361093,"sample.py",6055,1,"t",python,selection_command
+12574,25361515,"sample.py",6055,0,"",python,selection_command
+12575,25361594,"sample.py",7003,0,"#",python,content
+12576,25361594,"sample.py",6987,0,"#",python,content
+12577,25361594,"sample.py",6965,0,"#",python,content
+12578,25361594,"sample.py",6933,0,"#",python,content
+12579,25361594,"sample.py",6910,0,"#",python,content
+12580,25361594,"sample.py",6869,0,"#",python,content
+12581,25361594,"sample.py",6851,0,"#",python,content
+12582,25361594,"sample.py",6794,0,"#",python,content
+12583,25361594,"sample.py",6740,0,"#",python,content
+12584,25361594,"sample.py",6695,0,"#",python,content
+12585,25361594,"sample.py",6646,0,"#",python,content
+12586,25361594,"sample.py",6614,0,"#",python,content
+12587,25361594,"sample.py",6575,0,"#",python,content
+12588,25361594,"sample.py",6477,0,"#",python,content
+12589,25361594,"sample.py",6425,0,"#",python,content
+12590,25361594,"sample.py",6400,0,"#",python,content
+12591,25361594,"sample.py",6317,0,"#",python,content
+12592,25361594,"sample.py",6279,0,"#",python,content
+12593,25361594,"sample.py",6222,0,"#",python,content
+12594,25361594,"sample.py",6157,0,"#",python,content
+12595,25361594,"sample.py",6110,0,"#",python,content
+12596,25361594,"sample.py",6055,0,"#",python,content
+12597,25361595,"sample.py",6056,0,"",python,selection_keyboard
+12598,25361670,"sample.py",7025,0," ",python,content
+12599,25361671,"sample.py",7008,0," ",python,content
+12600,25361671,"sample.py",6985,0," ",python,content
+12601,25361671,"sample.py",6952,0," ",python,content
+12602,25361671,"sample.py",6928,0," ",python,content
+12603,25361671,"sample.py",6886,0," ",python,content
+12604,25361671,"sample.py",6867,0," ",python,content
+12605,25361671,"sample.py",6809,0," ",python,content
+12606,25361671,"sample.py",6754,0," ",python,content
+12607,25361671,"sample.py",6708,0," ",python,content
+12608,25361671,"sample.py",6658,0," ",python,content
+12609,25361671,"sample.py",6625,0," ",python,content
+12610,25361671,"sample.py",6585,0," ",python,content
+12611,25361671,"sample.py",6486,0," ",python,content
+12612,25361671,"sample.py",6433,0," ",python,content
+12613,25361671,"sample.py",6407,0," ",python,content
+12614,25361671,"sample.py",6323,0," ",python,content
+12615,25361671,"sample.py",6284,0," ",python,content
+12616,25361671,"sample.py",6226,0," ",python,content
+12617,25361671,"sample.py",6160,0," ",python,content
+12618,25361671,"sample.py",6112,0," ",python,content
+12619,25361671,"sample.py",6056,0," ",python,content
+12620,25361671,"sample.py",6057,0,"",python,selection_keyboard
+12621,25361983,"sample.py",6056,0,"",python,selection_command
+12622,25367457,"experiments/sample.sh",0,0,"",shellscript,tab
+12623,25380730,"sample.py",0,0,"",python,tab
+12624,25390886,"sample.py",5434,0,"",python,selection_mouse
+12625,25394383,"genie.py",0,0,"",python,tab
+12626,25395762,"genie.py",8416,0,"",python,selection_command
+12627,25397358,"genie.py",8388,0,"",python,selection_command
+12628,25397438,"genie.py",8353,0,"",python,selection_command
+12629,25397692,"genie.py",8318,0,"",python,selection_command
+12630,25397861,"genie.py",8304,0,"",python,selection_command
+12631,25398006,"genie.py",8286,0,"",python,selection_command
+12632,25398124,"genie.py",8255,0,"",python,selection_command
+12633,25399442,"genie.py",8646,0,"",python,selection_command
+12634,25401336,"genie.py",8247,0,"",python,selection_command
+12635,25402004,"genie.py",8646,0,"",python,selection_command
+12636,25402295,"genie.py",9341,0,"",python,selection_command
+12637,25404194,"genie.py",10056,0,"",python,selection_command
+12638,25410024,"genie.py",9341,0,"",python,selection_command
+12639,25410217,"genie.py",8646,0,"",python,selection_command
+12640,25410511,"genie.py",8247,0,"",python,selection_command
+12641,25411043,"genie.py",7770,0,"",python,selection_command
+12642,25411456,"genie.py",7133,0,"",python,selection_command
+12643,25411789,"genie.py",6678,0,"",python,selection_command
+12644,25412071,"genie.py",6019,0,"",python,selection_command
+12645,25412504,"genie.py",5267,0,"",python,selection_command
+12646,25413888,"genie.py",5255,0,"",python,selection_command
+12647,25414108,"genie.py",5241,0,"",python,selection_command
+12648,25414119,"genie.py",5204,0,"",python,selection_command
+12649,25414151,"genie.py",5172,0,"",python,selection_command
+12650,25414184,"genie.py",5147,0,"",python,selection_command
+12651,25414217,"genie.py",5125,0,"",python,selection_command
+12652,25414252,"genie.py",5094,0,"",python,selection_command
+12653,25414412,"genie.py",5080,0,"",python,selection_command
+12654,25414602,"genie.py",5064,0,"",python,selection_command
+12655,25414985,"genie.py",5056,15," def sample(",python,selection_command
+12656,25415532,"genie.py",5064,0,"",python,selection_command
+12657,25416254,"genie.py",0,15120,"from typing import Dict, Any\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nfrom flax.training.train_state import TrainState\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\nimport grain\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n tokenizer_outputs = self.tokenizer.vq_encode(batch[""videos""], training=False)\n lam_outputs = self.lam.vq_encode(batch[""videos""], training=False)\n latent_actions = jax.lax.cond(\n self.lam_co_train,\n lambda: lam_outputs[""z_q""],\n lambda: jax.lax.stop_gradient(lam_outputs[""z_q""]),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(tokenizer_outputs[""indices""]),\n latent_actions=latent_actions,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_outputs = self.dynamics(outputs, training)\n outputs.update(dyna_outputs)\n mle_indices = jnp.argmax(outputs[""token_logits""], axis=-1)\n outputs[""recon""] = self.tokenizer.decode(\n mle_indices, batch[""videos""].shape[2:4]\n )\n outputs[""lam_indices""] = lam_outputs[""indices""]\n return outputs\n\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None\n\n\n# FIXME (f.srambical): add conversion script for old checkpoints\ndef restore_genie_components(\n optimizer: nnx.Optimizer,\n sharding: jax.sharding.NamedSharding,\n rng: jax.Array,\n args,\n):\n """"""Restore pre-trained Genie components""""""\n rngs = nnx.Rngs(rng)\n\n # dummy values since we only use tx to initialize the dummy train states\n dummy_tx = optax.adamw(\n learning_rate=optax.constant_schedule(args.max_lr),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n )\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n tokenizer_checkpoint_manager = ocp.CheckpointManager(\n directory=args.tokenizer_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.tokenizer_dim,\n ffn_dim=args.tokenizer_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n num_blocks=args.tokenizer_num_blocks,\n num_heads=args.tokenizer_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_tokenizer_optimizer = nnx.Optimizer(dummy_tokenizer, dummy_tx)\n dummy_tokenizer_optimizer_state = nnx.state(dummy_tokenizer_optimizer)\n abstract_sharded_tokenizer_optimizer_state = _create_abstract_sharded_pytree(\n dummy_tokenizer_optimizer_state, sharding\n )\n restored_tokenizer = tokenizer_checkpoint_manager.restore(\n step=tokenizer_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_tokenizer_optimizer.model, restored_tokenizer.model)\n optimizer.model.tokenizer = dummy_tokenizer_optimizer.model\n tokenizer_checkpoint_manager.close()\n\n if args.lam_checkpoint:\n lam_checkpoint_manager = ocp.CheckpointManager(\n directory=args.lam_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.lam_dim,\n ffn_dim=args.lam_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_latent_actions,\n patch_size=args.lam_patch_size,\n num_blocks=args.lam_num_blocks,\n num_heads=args.lam_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_lam_optimizer = nnx.Optimizer(dummy_lam, dummy_tx)\n dummy_lam_optimizer_state = nnx.state(dummy_lam_optimizer)\n abstract_sharded_lam_optimizer_state = _create_abstract_sharded_pytree(\n dummy_lam_optimizer_state, sharding\n )\n restored_lam_optimizer = lam_checkpoint_manager.restore(\n step=lam_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_lam_optimizer.model, restored_lam_optimizer.model)\n optimizer.model.lam = dummy_lam_optimizer.model\n # Remove the LAM decoder to save memory and avoid unnecessary computation.\n del optimizer.model.lam.decoder\n lam_checkpoint_manager.close()\n\n return optimizer\n\n\ndef _create_abstract_sharded_pytree(pytree_template, sharding_spec):\n """"""Replaces arrays in a pytree with ShapeDtypeStructs having the given sharding.""""""\n\n def map_fn(leaf_template):\n if hasattr(leaf_template, ""shape"") and hasattr(leaf_template, ""dtype""):\n return jax.ShapeDtypeStruct(\n leaf_template.shape, leaf_template.dtype, sharding=sharding_spec\n )\n return leaf_template\n\n return jax.tree_util.tree_map(map_fn, pytree_template)\n",python,selection_command
+12658,25416508,"genie.py",15120,0,"",python,selection_command
+12659,25519033,"genie.py",0,15120,"from typing import Dict, Any\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nfrom flax.training.train_state import TrainState\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\nimport grain\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n tokenizer_outputs = self.tokenizer.vq_encode(batch[""videos""], training=False)\n lam_outputs = self.lam.vq_encode(batch[""videos""], training=False)\n latent_actions = jax.lax.cond(\n self.lam_co_train,\n lambda: lam_outputs[""z_q""],\n lambda: jax.lax.stop_gradient(lam_outputs[""z_q""]),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(tokenizer_outputs[""indices""]),\n latent_actions=latent_actions,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_outputs = self.dynamics(outputs, training)\n outputs.update(dyna_outputs)\n mle_indices = jnp.argmax(outputs[""token_logits""], axis=-1)\n outputs[""recon""] = self.tokenizer.decode(\n mle_indices, batch[""videos""].shape[2:4]\n )\n outputs[""lam_indices""] = lam_outputs[""indices""]\n return outputs\n\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None\n\n\n# FIXME (f.srambical): add conversion script for old checkpoints\ndef restore_genie_components(\n optimizer: nnx.Optimizer,\n sharding: jax.sharding.NamedSharding,\n rng: jax.Array,\n args,\n):\n """"""Restore pre-trained Genie components""""""\n rngs = nnx.Rngs(rng)\n\n # dummy values since we only use tx to initialize the dummy train states\n dummy_tx = optax.adamw(\n learning_rate=optax.constant_schedule(args.max_lr),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n )\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n tokenizer_checkpoint_manager = ocp.CheckpointManager(\n directory=args.tokenizer_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.tokenizer_dim,\n ffn_dim=args.tokenizer_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n num_blocks=args.tokenizer_num_blocks,\n num_heads=args.tokenizer_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_tokenizer_optimizer = nnx.Optimizer(dummy_tokenizer, dummy_tx)\n dummy_tokenizer_optimizer_state = nnx.state(dummy_tokenizer_optimizer)\n abstract_sharded_tokenizer_optimizer_state = _create_abstract_sharded_pytree(\n dummy_tokenizer_optimizer_state, sharding\n )\n restored_tokenizer = tokenizer_checkpoint_manager.restore(\n step=tokenizer_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_tokenizer_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_tokenizer_optimizer.model, restored_tokenizer.model)\n optimizer.model.tokenizer = dummy_tokenizer_optimizer.model\n tokenizer_checkpoint_manager.close()\n\n if args.lam_checkpoint:\n lam_checkpoint_manager = ocp.CheckpointManager(\n directory=args.lam_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.lam_dim,\n ffn_dim=args.lam_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_latent_actions,\n patch_size=args.lam_patch_size,\n num_blocks=args.lam_num_blocks,\n num_heads=args.lam_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_lam_optimizer = nnx.Optimizer(dummy_lam, dummy_tx)\n dummy_lam_optimizer_state = nnx.state(dummy_lam_optimizer)\n abstract_sharded_lam_optimizer_state = _create_abstract_sharded_pytree(\n dummy_lam_optimizer_state, sharding\n )\n restored_lam_optimizer = lam_checkpoint_manager.restore(\n step=lam_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(\n abstract_sharded_lam_optimizer_state\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_lam_optimizer.model, restored_lam_optimizer.model)\n optimizer.model.lam = dummy_lam_optimizer.model\n # Remove the LAM decoder to save memory and avoid unnecessary computation.\n del optimizer.model.lam.decoder\n lam_checkpoint_manager.close()\n\n return optimizer\n\n\ndef _create_abstract_sharded_pytree(pytree_template, sharding_spec):\n """"""Replaces arrays in a pytree with ShapeDtypeStructs having the given sharding.""""""\n\n def map_fn(leaf_template):\n if hasattr(leaf_template, ""shape"") and hasattr(leaf_template, ""dtype""):\n return jax.ShapeDtypeStruct(\n leaf_template.shape, leaf_template.dtype, sharding=sharding_spec\n )\n return leaf_template\n\n return jax.tree_util.tree_map(map_fn, pytree_template)\n",python,selection_command
+12660,25519096,"genie.py",15120,0,"",python,selection_command
+12661,25528361,"sample.py",0,0,"",python,tab
+12662,25528476,"sample.py",0,7049,"from dataclasses import dataclass\nimport time\nimport os\nimport optax\n\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nimport orbax.checkpoint as ocp\nfrom PIL import Image, ImageDraw\nimport tyro\nfrom flax import nnx\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Load Genie checkpoint ---\n rngs = nnx.Rngs(rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n checkpoint_manager = ocp.CheckpointManager(\n args.checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n dummy_tx = optax.adamw(\n learning_rate=optax.linear_schedule(0.0001, 0.0001, 10000),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n dummy_optimizer = nnx.Optimizer(genie, dummy_tx)\n\n abstract_optimizer = nnx.eval_shape(lambda: dummy_optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(dummy_optimizer, restored_optimizer_state)\n\n # --- Define sampling function ---\n # @nnx.jit\n # @jax.jit\n def _sampling_fn(model, batch):\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n\n\n # --- Define autoregressive sampling loop ---\n def _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = genie.sample(batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax)\n return generated_vid\n\n\n # --- Get video + latent actions ---\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n video_batch = next(iter(dataloader))\n # Get latent actions for all videos in the batch\n batch = dict(videos=video_batch)\n action_batch = genie.vq_encode(batch, training=False) # type: ignore[arg-type]\n action_batch = jnp.asarray(action_batch).reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n # --- Sample + evaluate video ---\n vid = _autoreg_sample(rng, video_batch, action_batch)\n gt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\n recon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\n # FIXME (f.srambical): investigate why this is needed\n gt = gt.astype(jnp.float32)\n ssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()\n print(f""SSIM: {ssim}"")\n\n # --- Construct video ---\n # true_videos = (video_batch * 255).astype(np.uint8)\n # pred_videos = (vid * 255).astype(np.uint8)\n # video_comparison = np.zeros((2, *vid.shape), dtype=np.uint8)\n # video_comparison[0] = true_videos[:, : args.seq_len]\n # video_comparison[1] = pred_videos\n # frames = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n # # --- Save video ---\n # imgs = [Image.fromarray(img) for img in frames]\n # # Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\n # for t, img in enumerate(imgs[1:]):\n # d = ImageDraw.Draw(img)\n # for row in range(action_batch.shape[0]):\n # action = action_batch[row, t, 0]\n # y_offset = row * video_batch.shape[2] + 2\n # d.text((2, y_offset), f""{action}"", fill=255)\n # imgs[0].save(\n # f""generation_{time.time()}.gif"",\n # save_all=True,\n # append_images=imgs[1:],\n # duration=250,\n # loop=0,\n # )\n",python,selection_command
+12663,25528581,"sample.py",7049,0,"",python,selection_command
+12664,25534993,"sample.py",7044,2,"",python,content
+12665,25535010,"sample.py",7026,2,"",python,content
+12666,25535016,"sample.py",7008,1,"",python,content
+12667,25535016,"sample.py",7003,1,"",python,content
+12668,25535016,"sample.py",6969,2,"",python,content
+12669,25535017,"sample.py",6943,2,"",python,content
+12670,25535017,"sample.py",6906,1,"",python,content
+12671,25535025,"sample.py",6901,1,"",python,content
+12672,25535025,"sample.py",6881,2,"",python,content
+12673,25535025,"sample.py",6822,2,"",python,content
+12674,25535025,"sample.py",6765,2,"",python,content
+12675,25535025,"sample.py",6728,1,"",python,content
+12676,25535025,"sample.py",6719,1,"",python,content
+12677,25535028,"sample.py",6668,2,"",python,content
+12678,25535029,"sample.py",6633,2,"",python,content
+12679,25535029,"sample.py",6593,2,"",python,content
+12680,25535029,"sample.py",6495,2,"",python,content
+12681,25535029,"sample.py",6438,2,"",python,content
+12682,25535031,"sample.py",6414,2,"",python,content
+12683,25535033,"sample.py",6327,2,"",python,content
+12684,25535039,"sample.py",6287,2,"",python,content
+12685,25535039,"sample.py",6228,2,"",python,content
+12686,25535039,"sample.py",6160,2,"",python,content
+12687,25535040,"sample.py",6112,2,"",python,content
+12688,25535040,"sample.py",6055,2,"",python,content
+12689,25535042,"sample.py",6055,0,"",python,selection_command
+12690,25535853,"sample.py",6055,0,"# ",python,content
+12691,25535862,"sample.py",6112,0,"# ",python,content
+12692,25535869,"sample.py",6160,0," #",python,content
+12693,25535870,"sample.py",6228,0,"# ",python,content
+12694,25535871,"sample.py",6287,0,"# ",python,content
+12695,25535872,"sample.py",6327,0,"# ",python,content
+12696,25535873,"sample.py",6414,0,"# ",python,content
+12697,25535875,"sample.py",6438,0," #",python,content
+12698,25535875,"sample.py",6495,0,"# ",python,content
+12699,25535876,"sample.py",6593,0,"# ",python,content
+12700,25535876,"sample.py",6633,0," #",python,content
+12701,25535876,"sample.py",6668,0,"# ",python,content
+12702,25535876,"sample.py",6719,0,"#",python,content
+12703,25535878,"sample.py",6728,0," ",python,content
+12704,25535878,"sample.py",6765,0," #",python,content
+12705,25535884,"sample.py",6822,0,"# ",python,content
+12706,25535887,"sample.py",6881,0,"# ",python,content
+12707,25535887,"sample.py",6901,0,"#",python,content
+12708,25535888,"sample.py",6906,0," ",python,content
+12709,25535890,"sample.py",6943,0," #",python,content
+12710,25535890,"sample.py",6969,0,"# ",python,content
+12711,25535893,"sample.py",7003,0,"#",python,content
+12712,25535893,"sample.py",7008,0," ",python,content
+12713,25535893,"sample.py",7026,0," #",python,content
+12714,25535895,"sample.py",7044,0," #",python,content
+12715,25535895,"sample.py",6055,0,"",python,selection_command
+12716,25536267,"sample.py",6112,0,"",python,selection_command
+12717,25536669,"sample.py",6055,0,"",python,selection_command
+12718,25536878,"sample.py",6055,1,"#",python,selection_command
+12719,25537079,"sample.py",6055,1,"#",python,selection_command
+12720,25537270,"sample.py",6055,1,"#",python,selection_command
+12721,25537290,"sample.py",6055,1,"#",python,selection_command
+12722,25537320,"sample.py",6055,2,"# ",python,selection_command
+12723,25537434,"sample.py",6055,2,"# ",python,selection_command
+12724,25537702,"sample.py",6055,2,"# ",python,selection_command
+12725,25537717,"sample.py",6051,5," #",python,selection_command
+12726,25537750,"sample.py",6055,2,"# ",python,selection_command
+12727,25537783,"sample.py",6055,2,"# ",python,selection_command
+12728,25537817,"sample.py",6055,2,"# ",python,selection_command
+12729,25537850,"sample.py",6055,2,"# ",python,selection_command
+12730,25537883,"sample.py",6055,2,"# ",python,selection_command
+12731,25538127,"sample.py",6055,2,"# ",python,selection_command
+12732,25538342,"sample.py",6055,2,"# ",python,selection_command
+12733,25538367,"sample.py",6055,2,"# ",python,selection_command
+12734,25538400,"sample.py",6055,2,"# ",python,selection_command
+12735,25538433,"sample.py",6055,2,"# ",python,selection_command
+12736,25538466,"sample.py",6055,2,"# ",python,selection_command
+12737,25538502,"sample.py",6055,2,"# ",python,selection_command
+12738,25538534,"sample.py",6055,2,"# ",python,selection_command
+12739,25538653,"sample.py",6055,2,"# ",python,selection_command
+12740,25538720,"sample.py",6055,2,"# ",python,selection_command
+12741,25538912,"sample.py",6055,2,"# ",python,selection_command
+12742,25539176,"sample.py",7045,2,"",python,content
+12743,25539176,"sample.py",7027,2,"",python,content
+12744,25539176,"sample.py",7003,2,"",python,content
+12745,25539176,"sample.py",6969,2,"",python,content
+12746,25539176,"sample.py",6944,2,"",python,content
+12747,25539176,"sample.py",6901,2,"",python,content
+12748,25539176,"sample.py",6881,2,"",python,content
+12749,25539176,"sample.py",6822,2,"",python,content
+12750,25539176,"sample.py",6766,2,"",python,content
+12751,25539176,"sample.py",6719,2,"",python,content
+12752,25539176,"sample.py",6668,2,"",python,content
+12753,25539176,"sample.py",6634,2,"",python,content
+12754,25539176,"sample.py",6593,2,"",python,content
+12755,25539176,"sample.py",6493,2,"",python,content
+12756,25539176,"sample.py",6439,2,"",python,content
+12757,25539176,"sample.py",6412,2,"",python,content
+12758,25539176,"sample.py",6327,2,"",python,content
+12759,25539176,"sample.py",6287,2,"",python,content
+12760,25539176,"sample.py",6228,2,"",python,content
+12761,25539176,"sample.py",6161,2,"",python,content
+12762,25539176,"sample.py",6112,2,"",python,content
+12763,25539176,"sample.py",6055,2,"",python,content
+12764,25539179,"sample.py",6055,0,"",python,selection_command
+12765,25541323,"sample.py",0,7005,"from dataclasses import dataclass\nimport time\nimport os\nimport optax\n\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nimport orbax.checkpoint as ocp\nfrom PIL import Image, ImageDraw\nimport tyro\nfrom flax import nnx\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\n\nif __name__ == ""__main__"":\n jax.distributed.initialize()\n\n rng = jax.random.PRNGKey(args.seed)\n\n # --- Load Genie checkpoint ---\n rngs = nnx.Rngs(rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n checkpoint_manager = ocp.CheckpointManager(\n args.checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n dummy_tx = optax.adamw(\n learning_rate=optax.linear_schedule(0.0001, 0.0001, 10000),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n dummy_optimizer = nnx.Optimizer(genie, dummy_tx)\n\n abstract_optimizer = nnx.eval_shape(lambda: dummy_optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state),\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(dummy_optimizer, restored_optimizer_state)\n\n # --- Define sampling function ---\n # @nnx.jit\n # @jax.jit\n def _sampling_fn(model, batch):\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n\n\n # --- Define autoregressive sampling loop ---\n def _autoreg_sample(rng, video_batch, action_batch):\n vid = video_batch[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=vid, latent_actions=action_batch, rng=_rng)\n generated_vid = genie.sample(batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax)\n return generated_vid\n\n\n # --- Get video + latent actions ---\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n num_workers=8,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n video_batch = next(iter(dataloader))\n # Get latent actions for all videos in the batch\n batch = dict(videos=video_batch)\n action_batch = genie.vq_encode(batch, training=False) # type: ignore[arg-type]\n action_batch = jnp.asarray(action_batch).reshape(video_batch.shape[0], args.seq_len - 1, 1)\n\n # --- Sample + evaluate video ---\n vid = _autoreg_sample(rng, video_batch, action_batch)\n gt = video_batch[:, : vid.shape[1]].clip(0, 1).reshape(-1, *video_batch.shape[2:])\n recon = vid.clip(0, 1).reshape(-1, *vid.shape[2:])\n # FIXME (f.srambical): investigate why this is needed\n gt = gt.astype(jnp.float32)\n ssim = pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :]).mean()\n print(f""SSIM: {ssim}"")\n\n # --- Construct video ---\n true_videos = (video_batch * 255).astype(np.uint8)\n pred_videos = (vid * 255).astype(np.uint8)\n video_comparison = np.zeros((2, *vid.shape), dtype=np.uint8)\n video_comparison[0] = true_videos[:, : args.seq_len]\n video_comparison[1] = pred_videos\n frames = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n # --- Save video ---\n imgs = [Image.fromarray(img) for img in frames]\n # Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\n for t, img in enumerate(imgs[1:]):\n d = ImageDraw.Draw(img)\n for row in range(action_batch.shape[0]):\n action = action_batch[row, t, 0]\n y_offset = row * video_batch.shape[2] + 2\n d.text((2, y_offset), f""{action}"", fill=255)\n imgs[0].save(\n f""generation_{time.time()}.gif"",\n save_all=True,\n append_images=imgs[1:],\n duration=250,\n loop=0,\n )\n",python,selection_command
+12766,25541586,"sample.py",7005,0,"",python,selection_command
+12767,25544119,"sample.py",7002,0," #",python,content
+12768,25544126,"sample.py",6986,0," #",python,content
+12769,25544127,"sample.py",6969,0," ",python,content
+12770,25544127,"sample.py",6965,0,"#",python,content
+12771,25544129,"sample.py",6933,0,"# ",python,content
+12772,25544130,"sample.py",6909,0," #",python,content
+12773,25544136,"sample.py",6873,0," ",python,content
+12774,25544141,"sample.py",6869,0,"#",python,content
+12775,25544142,"sample.py",6851,0,"# ",python,content
+12776,25544142,"sample.py",6794,0,"# ",python,content
+12777,25544142,"sample.py",6739,0," #",python,content
+12778,25544145,"sample.py",6703,0," ",python,content
+12779,25544145,"sample.py",6695,0,"#",python,content
+12780,25544154,"sample.py",6646,0,"# ",python,content
+12781,25544156,"sample.py",6613,0," #",python,content
+12782,25544158,"sample.py",6575,0,"# ",python,content
+12783,25544159,"sample.py",6479,0,"# ",python,content
+12784,25544159,"sample.py",6424,0," #",python,content
+12785,25544167,"sample.py",6402,0,"# ",python,content
+12786,25544170,"sample.py",6317,0,"# ",python,content
+12787,25544170,"sample.py",6279,0,"# ",python,content
+12788,25544171,"sample.py",6222,0,"# ",python,content
+12789,25544171,"sample.py",6156,0," #",python,content
+12790,25544174,"sample.py",6110,0,"# ",python,content
+12791,25544174,"sample.py",6055,0,"# ",python,content
+12792,25544176,"sample.py",6055,0,"",python,selection_command
+12793,25643965,"sample.py",7049,0,"",python,selection_mouse
+12794,25651952,"TERMINAL",0,0,"\r[K[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12795,25652962,"TERMINAL",0,0,"\r[K[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12796,25793477,"genie.py",0,0,"",python,tab
+12797,25795086,"genie.py",5064,0,"",python,selection_command
+12798,25795625,"genie.py",5055,0,"",python,selection_command
+12799,25796191,"genie.py",5056,0,"",python,selection_command
+12800,25796433,"genie.py",5056,15," def sample(",python,selection_command
+12801,25796643,"genie.py",5056,300," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n",python,selection_command
+12802,25796812,"genie.py",5056,470," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n",python,selection_command
+12803,25797059,"genie.py",5056,900," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n",python,selection_command
+12804,25797189,"genie.py",5056,1613," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n",python,selection_command
+12805,25797309,"genie.py",5056,1837," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n",python,selection_command
+12806,25797481,"genie.py",5056,1972," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n",python,selection_command
+12807,25797549,"genie.py",5056,2064," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n",python,selection_command
+12808,25797692,"genie.py",5056,2346," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n",python,selection_command
+12809,25798011,"genie.py",5056,2466," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n",python,selection_command
+12810,25798043,"genie.py",5056,2598," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n",python,selection_command
+12811,25798196,"genie.py",5056,2705," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n",python,selection_command
+12812,25798530,"genie.py",5056,2979," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n",python,selection_command
+12813,25798721,"genie.py",5056,3189," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n",python,selection_command
+12814,25799861,"genie.py",5056,3585," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n",python,selection_command
+12815,25800103,"genie.py",5056,3722," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n",python,selection_command
+12816,25800879,"genie.py",5056,4033," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n",python,selection_command
+12817,25800880,"genie.py",5056,4408," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n",python,selection_command
+12818,25801174,"genie.py",5056,4991," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n",python,selection_command
+12819,25801470,"genie.py",5056,5393," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n",python,selection_command
+12820,25802394,"genie.py",5056,5456," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)",python,selection_command
+12821,25802561,"genie.py",5056,5487," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12822,25803614,"genie.py",5056,5487,"Thinking Thoughts (experimental)\nAuto\n\nExpand to view model thoughts\nchevron_right\n\nOf course! I can help you with that. Using jax.lax.scan for loops is crucial for performance when JIT-compiling your code. The migration from flax.linen.scan to the flax.nnx world involves using either jax.lax.scan for pure functions or flax.nnx.scan for functions that operate on nnx.Module objects.\n\nHere is the updated NEW GENIE.PY with the sample method reimplemented to use scans, just like in the old flax.linen version. The outer autoregressive loop uses jax.lax.scan, and the inner MaskGIT refinement loop uses flax.nnx.scan to correctly handle the MaskGITStep module.\nUpdated NEW GENIE.PY\n\nI have replaced the sample method in your NEW GENIE.PY file with the version below, which restores the scan-based implementation. The rest of your file remains unchanged.\nGenerated python\n\n \nfrom typing import Dict, Any\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nfrom flax.training.train_state import TrainState\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\nimport grain\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n\n def __call__(self, batch: Dict[str, Any], training: bool = True) -> Dict[str, Any]:\n tokenizer_outputs = self.tokenizer.vq_encode(batch[""videos""], training=False)\n lam_outputs = self.lam.vq_encode(batch[""videos""], training=False)\n latent_actions = jax.lax.cond(\n self.lam_co_train,\n lambda: lam_outputs[""z_q""],\n lambda: jax.lax.stop_gradient(lam_outputs[""z_q""]),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(tokenizer_outputs[""indices""]),\n latent_actions=latent_actions,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_outputs = self.dynamics(outputs, training)\n outputs.update(dyna_outputs)\n mle_indices = jnp.argmax(outputs[""token_logits""], axis=-1)\n outputs[""recon""] = self.tokenizer.decode(\n mle_indices, batch[""videos""].shape[2:4]\n )\n outputs[""lam_indices""] = lam_outputs[""indices""]\n return outputs\n\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n # Define the inner MaskGIT loop using nnx.scan\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_scan_fn(module, carry, x):\n new_carry, _ = module(carry, x)\n return new_carry, None\n\n MaskGITLoop = nnx.scan(\n maskgit_scan_fn,\n in_axes=(None, nnx.Carry, 0), # (module, carry, x)\n out_axes=(nnx.Carry, None), # (new_carry, None)\n )\n\n # Define the outer autoregressive loop's body function\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n final_carry_maskgit, _ = MaskGITLoop(\n maskgit_step, init_carry_maskgit, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using jax.lax.scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,content
+12823,25804301,"genie.py",9994,0,"",python,selection_command
+12824,25806921,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ bash experiments/sample.sh ",,terminal_output
+12825,25807112,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+12826,25810069,"TERMINAL",0,0,"Traceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 17, in \r\n from genie import Genie\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 147\r\n Thinking Thoughts (experimental)\r\n ^^^^^^^^\r\nSyntaxError: invalid syntax\r\n",,terminal_output
+12827,25810261,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12828,25810595,"genie.py",0,0,"",python,tab
+12829,25810595,"genie.py",5056,0,"",python,selection_command
+12830,25826741,"genie.py",9701,0,"",python,selection_mouse
+12831,25828146,"genie.py",14473,44,"",python,content
+12832,25828154,"genie.py",14461,3,"",python,content
+12833,25828157,"genie.py",14460,0,"idx",python,content
+12834,25828158,"genie.py",14459,0,"ken",python,content
+12835,25828158,"genie.py",14423,33,"idxs = current",python,content
+12836,25828158,"genie.py",14421,0,"ke",python,content
+12837,25828158,"genie.py",14419,1,"",python,content
+12838,25828159,"genie.py",14375,43,"",python,content
+12839,25828160,"genie.py",14308,52," = carry[1]\n",python,content
+12840,25828167,"genie.py",14267,31," current_",python,content
+12841,25828169,"genie.py",14210,49,"output from MaskGIT\n ",python,content
+12842,25828169,"genie.py",14164,41,"# Update token indices with",python,content
+12843,25828170,"genie.py",14151,0,"\n",python,content
+12844,25828171,"genie.py",14147,3,"",python,content
+12845,25828175,"genie.py",14132,14,"",python,content
+12846,25828175,"genie.py",14123,7,"",python,content
+12847,25828175,"genie.py",14098,20,"_step(",python,content
+12848,25828176,"genie.py",14091,0," = ",python,content
+12849,25828176,"genie.py",14090,0,", ",python,content
+12850,25828176,"genie.py",14050,35,"",python,content
+12851,25828176,"genie.py",14044,2,"",python,content
+12852,25828181,"genie.py",14031,0,":",python,content
+12853,25828182,"genie.py",14014,5,"",python,content
+12854,25828183,"genie.py",13996,17,"",python,content
+12855,25828184,"genie.py",13977,16,"for i",python,content
+12856,25828185,"genie.py",13964,1,"",python,content
+12857,25828186,"genie.py",13962,1,"",python,content
+12858,25828187,"genie.py",13958,1," refinement l",python,content
+12859,25828188,"genie.py",13926,24,"# Run the",python,content
+12860,25828188,"genie.py",13898,15,")\n",python,content
+12861,25828188,"genie.py",13868,16,"",python,content
+12862,25828189,"genie.py",13846,16,"",python,content
+12863,25828190,"genie.py",13811,16,"",python,content
+12864,25828191,"genie.py",13785,17,"",python,content
+12865,25828196,"genie.py",13773,8,"",python,content
+12866,25828208,"genie.py",13763,5,"",python,content
+12867,25828208,"genie.py",13746,4,"",python,content
+12868,25828208,"genie.py",13726,7,"carry for",python,content
+12869,25828208,"genie.py",13711,4,"",python,content
+12870,25828226,"genie.py",13337,26,"seq_len):",python,content
+12871,25828228,"genie.py",13335,0,"e(T",python,content
+12872,25828229,"genie.py",13333,0,"a",python,content
+12873,25828229,"genie.py",13317,14," in",python,content
+12874,25828235,"genie.py",13308,2,"",python,content
+12875,25828238,"genie.py",13294,13,"",python,content
+12876,25828238,"genie.py",13284,9,"",python,content
+12877,25828238,"genie.py",13281,2,"",python,content
+12878,25828238,"genie.py",13218,54,"current_token_idxs = token_idxs\n",python,content
+12879,25828238,"genie.py",13144,65,"rng = batch[""rng""]",python,content
+12880,25828240,"genie.py",12892,243,"# --- Autoregressive generation using Python for-loops ---",python,content
+12881,25828242,"genie.py",12605,55,"",python,content
+12882,25828242,"genie.py",0,5935,"",python,content
+12883,25828295,"genie.py",5056,0,"",python,selection_command
+12884,25829580,"genie.py",0,0,"",python,tab
+12885,25831619,"genie.py",10513,30," return new_carry, None",python,selection_command
+12886,25831753,"genie.py",10449,94,"\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12887,25832125,"genie.py",10047,496,"\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12888,25832377,"genie.py",9464,1079,"\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12889,25832401,"genie.py",9089,1454,"\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12890,25832434,"genie.py",8778,1765,"\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12891,25832466,"genie.py",8641,1902,"\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12892,25832499,"genie.py",8246,2297,"\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12893,25832704,"genie.py",8035,2508,"\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12894,25833043,"genie.py",7761,2782,"\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12895,25833222,"genie.py",7654,2889,"\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12896,25833548,"genie.py",7522,3021,"\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12897,25833703,"genie.py",7402,3141,"\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12898,25833790,"genie.py",7120,3423,"\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12899,25833998,"genie.py",7028,3515,"\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12900,25834088,"genie.py",6893,3650,"\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12901,25834273,"genie.py",6669,3874,"\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12902,25834399,"genie.py",5956,4587,"\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12903,25834536,"genie.py",5526,5017,"\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12904,25834687,"genie.py",5356,5187,"\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12905,25834824,"genie.py",5055,5488,"\n def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12906,25835610,"genie.py",5056,5487," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n # --- Autoregressive generation using Python for-loops ---\n rng = batch[""rng""]\n current_token_idxs = token_idxs\n\n for step_t in range(T, seq_len):\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # Initialize carry for MaskGIT loop\n carry = (step_rng, masked_token_idxs, mask, action_tokens)\n\n # Run the MaskGIT refinement loop\n for i in range(steps):\n carry, _ = maskgit_step(carry, i)\n\n # Update token indices with the output from MaskGIT\n current_token_idxs = carry[1]\n\n final_token_idxs = current_token_idxs\n \n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,selection_command
+12907,25835917,"genie.py",5056,5487," ",python,content
+12908,25835936,"genie.py",5060,0,"",python,selection_command
+12909,25837621,"genie.py",5056,4,"",python,content
+12910,25856864,"genie.py",5056,0," def sample(\n self,\n batch: Dict[str, Any],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> Any:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: patches per frame\n S: sequence length\n A: action space\n D: model latent dimension\n """"""\n # --- Encode videos and actions ---\n tokenizer_out = self.tokenizer.vq_encode(batch[""videos""], training=False)\n token_idxs = tokenizer_out[""indices""] # (B, T, N)\n B, T, N = token_idxs.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs.dtype)\n token_idxs = jnp.concatenate([token_idxs, pad], axis=1) # (B, S, N)\n action_tokens = self.lam.vq.get_codes(batch[""latent_actions""])\n\n # Define the inner MaskGIT loop using nnx.scan\n maskgit_step = MaskGITStep(\n dynamics=self.dynamics,\n tokenizer=self.tokenizer,\n temperature=temperature,\n sample_argmax=sample_argmax,\n steps=steps,\n )\n\n def maskgit_scan_fn(module, carry, x):\n new_carry, _ = module(carry, x)\n return new_carry, None\n\n MaskGITLoop = nnx.scan(\n maskgit_scan_fn,\n in_axes=(None, nnx.Carry, 0), # (module, carry, x)\n out_axes=(nnx.Carry, None), # (new_carry, None)\n )\n\n # Define the outer autoregressive loop's body function\n def generation_step_fn(carry, step_t):\n rng, current_token_idxs = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask = jnp.arange(seq_len) >= step_t # (S,)\n mask = jnp.broadcast_to(mask[None, :, None], (B, seq_len, N)).astype(bool) # (B, S, N)\n masked_token_idxs = current_token_idxs * ~mask\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs,\n mask,\n action_tokens,\n )\n final_carry_maskgit, _ = MaskGITLoop(\n maskgit_step, init_carry_maskgit, jnp.arange(steps)\n )\n updated_token_idxs = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs)\n return new_carry, None\n\n # --- Run the autoregressive generation using jax.lax.scan ---\n initial_carry = (batch[""rng""], token_idxs)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n final_frames = self.tokenizer.decode(\n final_token_idxs,\n video_hw=batch[""videos""].shape[2:4],\n )\n return final_frames\n\n def vq_encode(self, batch, training) -> Dict[str, Any]:\n # --- Preprocess videos ---\n lam_output = self.lam.vq_encode(batch[""videos""], training=training)\n return lam_output[""indices""]\n\n\nclass MaskGITStep(nnx.Module):\n def __init__(\n self,\n dynamics: DynamicsMaskGIT,\n tokenizer: TokenizerVQVAE,\n temperature: float,\n sample_argmax: bool,\n steps: int,\n ):\n self.dynamics = dynamics\n self.tokenizer = tokenizer\n self.temperature = temperature\n self.sample_argmax = sample_argmax\n self.steps = steps\n\n def __call__(self, carry, x):\n rng, token_idxs, mask, action_tokens = carry\n step = x\n N = token_idxs.shape[2]\n\n # --- Construct + encode video ---\n vid_embed = self.dynamics.patch_embed(token_idxs) # (B, S, N, D)\n mask_token = self.dynamics.mask_token.value # (1, 1, 1, D,)\n mask_expanded = mask[..., None] # (B, S, N, 1)\n vid_embed = jnp.where(mask_expanded, mask_token, vid_embed)\n\n # --- Predict transition ---\n act_embed = self.dynamics.action_up(action_tokens)\n vid_embed += jnp.pad(act_embed, ((0, 0), (1, 0), (0, 0), (0, 0)))\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (self.steps * 2))\n step_temp = self.temperature * (1.0 - unmasked_ratio)\n final_logits = self.dynamics.dynamics(vid_embed) / step_temp\n\n # --- Sample new tokens for final frame ---\n if self.sample_argmax:\n sampled_token_idxs = jnp.argmax(final_logits, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs = jax.random.categorical(_rng, final_logits)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs = gather_fn(jax.nn.softmax(final_logits), sampled_token_idxs)\n final_token_probs += ~mask\n # Update masked tokens only\n token_idxs = jnp.where(mask, sampled_token_idxs, token_idxs)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask = jnp.arange(final_token_probs.shape[-1]) > num_unmasked_tokens\n sorted_idxs = jnp.argsort(final_token_probs, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask))\n new_mask = mask_update_fn(mask, sorted_idxs)\n\n new_carry = (rng, token_idxs, new_mask, action_tokens)\n return new_carry, None",python,content
+12911,25857290,"genie.py",11308,0,"",python,selection_command
+12912,25859754,"TERMINAL",0,0,"[H[2J[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
+12913,25859807,"TERMINAL",0,0,"bash experiments/sample.sh ",,terminal_output
+12914,25860020,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+12915,25861738,"genie.py",10453,0,"",python,selection_command
+12916,25861919,"genie.py",9739,0,"",python,selection_command
+12917,25862287,"genie.py",9227,0,"",python,selection_command
+12918,25864241,"genie.py",0,0,"",python,tab
+12919,25864241,"genie.py",6670,0,"",python,selection_command
+12920,25871617,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+12921,25900751,"TERMINAL",0,0,"2025-07-25 18:19:50.839525: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12922,25902205,"TERMINAL",0,0,"2025-07-25 18:19:52.299593: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12923,25905805,"TERMINAL",0,0,"2025-07-25 18:19:55.816572: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+12924,25906395,"TERMINAL",0,0,"Traceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 185, in \r\n vid = _autoreg_sample(rng, video_batch, action_batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 157, in _autoreg_sample\r\n generated_vid = genie.sample(batch, args.seq_len, args.maskgit_steps, args.temperature, args.sample_argmax)\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 199, in sample\r\n MaskGITLoop = nnx.scan(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/iteration.py"", line 1177, in scan\r\n _check_out_axes(out_axes)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/iteration.py"", line 625, in _check_out_axes\r\n raise ValueError(\r\nValueError: Cannot broadcast output state. Got out_axes=None at: out_axes[1]\r\n",,terminal_output
+12925,25906915,"TERMINAL",0,0,"Exception ignored in: \r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/grain/_src/python/shared_memory_array.py"", line 167, in __del__\r\nAttributeError: 'NoneType' object has no attribute 'mmap'\r\n",,terminal_output
+12926,25907040,"TERMINAL",0,0,"/home/franz.srambical/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked shared_memory objects to clean up at shutdown\r\n warnings.warn('resource_tracker: There appear to be %d '\r\n",,terminal_output
+12927,25907439,"TERMINAL",0,0,"srun: error: hai003: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login1:~/jafar[?2004h[franz.srambical@hai003.haicore.berlin:~/jafar] $ ",,terminal_output
diff --git a/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-08d1caae-8fb5-40b9-88ed-5072c2f48ca81754110755341-2025_08_02-06.59.28.742/source.csv b/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-08d1caae-8fb5-40b9-88ed-5072c2f48ca81754110755341-2025_08_02-06.59.28.742/source.csv
new file mode 100644
index 0000000000000000000000000000000000000000..02685051e202e92db4840d6c918855822e32104e
--- /dev/null
+++ b/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-08d1caae-8fb5-40b9-88ed-5072c2f48ca81754110755341-2025_08_02-06.59.28.742/source.csv
@@ -0,0 +1,10 @@
+Sequence,Time,File,RangeOffset,RangeLength,Text,Language,Type
+1,9,".venv/lib/python3.10/site-packages/jax/_src/cudnn/fused_attention_stablehlo.py",0,0,"# Copyright 2024 The JAX Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport enum\nimport functools\nimport json\nimport math\nfrom typing import TypedDict\n\nimport jax\nfrom jax import dtypes\nfrom jax._src import core\nfrom jax._src import dispatch\nfrom jax._src.custom_partitioning import custom_partitioning\nfrom jax._src.interpreters import batching\nfrom jax._src.interpreters import mlir\nfrom jax._src.lib import cuda_versions\nfrom jax._src import xla_bridge\nfrom jax._src.lib.mlir import ir\nfrom jax._src.lib.mlir.dialects import hlo\nimport jax.numpy as jnp\nfrom jax.sharding import NamedSharding, PartitionSpec\n\nArray = jnp.ndarray\n\nclass FP8Params(TypedDict):\n amax_dQ: float # Amax of gradient of query\n amax_dK: float # Amax of gradient of key\n amax_dV: float # Amax of gradient of value\n amax_dP: float # Amax of gradient of state\n descale_q: float # Descaling factor of query\n descale_k: float # Descaling factor of key\n descale_v: float # Descaling factor of value\n descale_s: float # Descaling factor of attention score\n scale_s: float # Scale factor for S tensor\n scale_o: float # Scale factor for output\n descale_o: float # Descale factor for output (bwd)\n descale_dO: float # Descale factor for output gradient (bwd)\n descale_dP: float # Descale factor for P gradient tensor (bwd)\n scale_dQ: float # Scale factor for query gradient (bwd)\n scale_dK: float # Scale factor for key gradient (bwd)\n scale_dV: float # Scale factor for value gradient (bwd)\n scale_dP: float # Scale factor for state gradient (bwd)\n\n\nclass AttentionLayout(enum.Enum):\n BTNH = 0\n BNTH = 1\n\n\nclass MaskType(enum.Enum):\n NO_MASK = 0\n PADDING = 1\n CAUSAL = 2\n PADDING_CAUSAL = 3\n ALIBI = 4\n\n\ndef convert_mask_type_to_string(mask_type: MaskType) -> str:\n if mask_type == MaskType.NO_MASK:\n return ""NO_MASK""\n elif mask_type == MaskType.PADDING:\n return ""PADDING""\n elif mask_type == MaskType.CAUSAL:\n return ""CAUSAL""\n elif mask_type == MaskType.PADDING_CAUSAL:\n return ""PADDING_CAUSAL""\n elif mask_type == MaskType.ALIBI:\n return ""ALIBI""\n else:\n raise ValueError(f""Unexpected mask type: {mask_type}"")\n\ndef has_padding(mask_type: MaskType) -> bool:\n return mask_type == MaskType.PADDING or mask_type == MaskType.PADDING_CAUSAL\n\ndef should_export_dbias(bias_shape, query_shape, layout) -> bool:\n b_B, b_N, _, _ = bias_shape\n if layout == AttentionLayout.BNTH.value:\n _, q_N, _, _ = query_shape\n else:\n _, _, q_N, _ = query_shape\n return b_B == 1 and b_N == q_N\n\ndef get_large_negative_number(dtype):\n # temp WAR as cuDNN has a bug for subtraction between two large negative value\n if dtype == jnp.bfloat16:\n return jnp.asarray(-2 << 40, dtype=dtype)\n elif dtype == jnp.float16:\n return jnp.asarray(-2 << 14, dtype=dtype)\n else:\n raise ValueError(""Unsupported dtype for inputs."")\n\ndef _normalize_layout(layout: str) -> AttentionLayout:\n layout_upper = layout.upper()\n if layout_upper in [""BSNH"", ""BNSH"", ""BTNH"", ""BNTH""]:\n return AttentionLayout[layout_upper.replace(""S"", ""T"")]\n else:\n raise ValueError(f""Unsupported qkv_layout: {layout}"")\n\ndef element_type_to_backend_config_type_mapping(dtype):\n _element_type_to_backend_config_type_mapping = {\n ir.BF16Type.get(): ""BF16"",\n ir.F16Type.get(): ""F16"",\n }\n return _element_type_to_backend_config_type_mapping[dtype]\n\ndef default_layouts(*shapes):\n return [range(len(shape) - 1, -1, -1) for shape in shapes]\n\ndef get_max_seg_per_batch(q_offsets):\n return q_offsets.shape[1] - 1 if len(q_offsets.shape) == 2 else 1\n\ndef check_is_paged_attention(page_table_k):\n return len(page_table_k.shape) == 4\n\ndef create_dot_product_attention_backend_config_base(\n batch, num_heads, seq_q, seq_kv, dtype, fmha_scale, mask_type, layout, is_bwd\n):\n # Q, K, V: query, key, value in shape of BT(S)NH or BNT(S)H\n # P: BMM1 output in shape of BNTS\n # O: BMM2 output in the same shape with Q\n # BMM1: Q @ K -> P\n # BMM2: P @ V -> O\n # BMM1Grad1: dP @ Q -> dK\n # BMM1Grad2: dP @ K -> dQ\n # BMM2Grad1: P @ dO -> dV\n # BMM2Grad2: dO @ V -> dP\n cudnn_fmha_backend_config = {\n ""algorithm"": {\n ""algo_id"": ""0"",\n ""math_type"": ""TENSOR_OP_MATH"",\n ""tuning_knobs"": {""17"": ""1"", ""24"": ""0""},\n ""is_cudnn_frontend"": True,\n ""workspace_size"": ""0"",\n },\n ""fmha_scale"": fmha_scale,\n ""intermediate_tensor_shape"": {\n ""element_type"": element_type_to_backend_config_type_mapping(dtype),\n ""dimensions"": [str(batch), str(num_heads), str(seq_q), str(seq_kv)],\n ""tuple_shapes"": [],\n ""layout"": {\n ""dim_level_types"": [],\n ""dim_unique"": [],\n ""dim_ordered"": [],\n ""minor_to_major"": [""3"", ""2"", ""1"", ""0""],\n ""tiles"": [],\n ""element_size_in_bits"": ""0"",\n ""memory_space"": ""0"",\n ""index_primitive_type"": ""PRIMITIVE_TYPE_INVALID"",\n ""pointer_primitive_type"": ""PRIMITIVE_TYPE_INVALID"",\n ""dynamic_shape_metadata_prefix_bytes"": ""0"",\n },\n ""is_dynamic_dimension"": [False, False, False, False],\n },\n ""is_flash_attention"": True,\n ""mask_type"": convert_mask_type_to_string(mask_type),\n }\n\n # We define the contracting and batch dims in the format of\n # ((lhs_contracting_dims, rhs_contracting_dims), (lhs_batch_dims,\n # rhs_batch_dims)).\n if layout == AttentionLayout.BNTH.value:\n dims = [\n ((3, 3), ((0, 1), (0, 1))), # BMM1: BNTH,BNSH->BNTS\n ((3, 2), ((0, 1), (0, 1))), # BMM2: BNTS,BNSH->BNTH\n ((2, 2), ((0, 1), (0, 1))), # BMM1_grad_1: BNTS,BNTH->BNSH\n ((3, 2), ((0, 1), (0, 1))), # BMM1_grad_2: BNTS,BNSH->BNTH\n ((2, 2), ((0, 1), (0, 1))), # BMM2_grad_1: BNTS,BNTH->BNSH\n ((3, 3), ((0, 1), (0, 1))), # BMM2_grad_2: BNTH,BNSH->BNTS\n ]\n else:\n dims = [\n ((3, 3), ((0, 2), (0, 2))), # BMM1: BTNH,BSNH->BNTS\n ((3, 1), ((0, 1), (0, 2))), # BMM2: BNTS,BSNH->BTNH\n ((2, 1), ((0, 1), (0, 2))), # BMM1_grad_1: BNTS,BTNH->BSNH\n ((3, 1), ((0, 1), (0, 2))), # BMM1_grad_2: BNTS,BSNH->BTNH\n ((2, 1), ((0, 1), (0, 2))), # BMM2_grad_1: BNTS,BTNH->BSNH\n ((3, 3), ((0, 2), (0, 2))), # BMM2_grad_2: BTNH,BSNH->BNTS\n ]\n keys = [\n ""bmm1_dot_dimension_numbers"",\n ""bmm2_dot_dimension_numbers"",\n ""bmm1_grad_gemm1_dot_dimension_numbers"",\n ""bmm1_grad_gemm2_dot_dimension_numbers"",\n ""bmm2_grad_gemm1_dot_dimension_numbers"",\n ""bmm2_grad_gemm2_dot_dimension_numbers"",\n ]\n fwd_dot_number = {}\n bwd_dot_number = {}\n for idx, (key, ((lc, rc), (lb, rb))) in enumerate(zip(keys, dims)):\n dims_to_write = fwd_dot_number if idx < 2 else bwd_dot_number\n dims_to_write[key] = {\n ""lhs_contracting_dimensions"": [str(lc)],\n ""rhs_contracting_dimensions"": [str(rc)],\n ""lhs_batch_dimensions"": [str(i) for i in lb],\n ""rhs_batch_dimensions"": [str(i) for i in rb],\n }\n\n if is_bwd:\n cudnn_fmha_backend_config = {**cudnn_fmha_backend_config, **bwd_dot_number}\n else:\n cudnn_fmha_backend_config = {**cudnn_fmha_backend_config, **fwd_dot_number}\n backend_config = {\n ""operation_queue_id"":""0"",\n ""wait_on_operation_queues"":[],\n ""cudnn_fmha_backend_config"": cudnn_fmha_backend_config\n }\n return backend_config\n\ndef create_dot_product_attention_backend_config(\n batch,\n num_heads,\n seq_q,\n seq_kv,\n dtype,\n fmha_scale,\n seed,\n dropout_rate,\n mask_type,\n layout,\n sliding_window_length,\n max_seg_per_batch,\n is_paged_attention,\n is_bwd\n):\n backend_config = create_dot_product_attention_backend_config_base(\n batch, num_heads, seq_q, seq_kv, dtype,\n fmha_scale, mask_type, layout, is_bwd\n )\n if sliding_window_length is None:\n sliding_window_length = 0\n backend_config['cudnn_fmha_backend_config'][""dropout_rate""] = dropout_rate\n backend_config['cudnn_fmha_backend_config'][""seed""] = seed\n backend_config['cudnn_fmha_backend_config'][""sliding_window_length""] = sliding_window_length\n backend_config['cudnn_fmha_backend_config'][""max_seg_per_batch""] = max_seg_per_batch\n backend_config['cudnn_fmha_backend_config'][""is_paged_attention""] = is_paged_attention\n return json.dumps(backend_config)\n\ndef create_dot_product_attention_fp8_backend_config(\n batch, num_heads, seq_q, seq_kv, dtype, fmha_scale, mask_type, layout, is_bwd):\n backend_config = create_dot_product_attention_backend_config_base(\n batch, num_heads, seq_q, seq_kv, dtype, fmha_scale, mask_type, layout, is_bwd)\n return json.dumps(backend_config)\n\n# mapping from (is_bwd, has_dropout, has_bias) to custom call name\n_custom_name_maps = {\n # fMHA forward call targets.\n (False, False, False, False): ""__cudnn$fmhaSoftmax"",\n (False, False, True, False): ""__cudnn$fmhaScaleBiasSoftmax"",\n (False, True, False, False): ""__cudnn$fmhaSoftmaxDropout"",\n (False, True, True, False): ""__cudnn$fmhaScaleBiasSoftmaxDropout"",\n (False, False, False, True): ""__cudnn$fmhaSoftmaxF8"",\n # fMHA backward call targets.\n (True, False, False, False): ""__cudnn$fmhaSoftmaxBackward"",\n (True, False, True, False): ""__cudnn$fmhaScaleBiasSoftmaxBackward"",\n (True, True, False, False): ""__cudnn$fmhaSoftmaxDropoutBackward"",\n (True, True, True, False): ""__cudnn$fmhaScaleBiasSoftmaxDropoutBackward"",\n (True, False, False, True): ""__cudnn$fmhaSoftmaxBackwardF8"",\n}\n\ndef get_custom_call_name(has_bias, has_dropout, is_bwd, is_fp8=False):\n return _custom_name_maps[(is_bwd, has_dropout, has_bias, is_fp8)]\n\nget_fp8_custom_call_name = functools.partial(\n get_custom_call_name, has_bias=False, has_dropout=False, is_fp8=True\n)\n\ndef check_layout(query, key, value, bias, q_seqlen, kv_seqlen,\n q_offsets, kv_offsets, page_table_k, page_table_v, layout):\n def check_eq(a, b, c, msg):\n if not (a == b == c):\n raise ValueError(f""{msg} must be same, got {a}, {b}, {b}"")\n\n q_rank, k_rank, v_rank = len(query.shape), len(key.shape), len(value.shape)\n if q_rank != 4:\n raise ValueError(f""Q must have a rank of 4, got {q_rank}"")\n check_eq(q_rank, k_rank, v_rank, ""QKV rank"")\n\n q_dtype, k_dtype, v_dtype = query.dtype, key.dtype, value.dtype\n if q_dtype not in [jnp.bfloat16, jnp.float16, jnp.float8_e4m3fn, jnp.float8_e5m2]:\n raise NotImplementedError(f""Q must be fp16/bf16/fp8_e4m3fn/fp8_e5m2, got {q_dtype}"")\n check_eq(q_dtype, k_dtype, v_dtype, ""QKV dtype"")\n\n if layout == AttentionLayout.BNTH:\n qB, qN, qT, qH = query.shape\n kB, kN, kS, kH = key.shape\n vB, vN, vS, vH = value.shape\n else:\n assert layout == AttentionLayout.BTNH\n qB, qT, qN, qH = query.shape\n kB, kS, kN, kH = key.shape\n vB, vS, vN, vH = value.shape\n\n if page_table_k is not None and page_table_v is not None:\n k_blocks, k_block_size = kB, kS\n v_blocks, v_block_size = vB, vS\n kB, _, k_blocks_per_batch, _ = page_table_k.shape\n vB, _, v_blocks_per_batch, _ = page_table_v.shape\n kS = k_blocks_per_batch * k_block_size\n vS = v_blocks_per_batch * v_block_size\n if kB * k_blocks_per_batch != k_blocks:\n raise ValueError(\n f""Key and page_table_k must have same number of blocks, ""\n f""got {k_blocks} vs {kB * k_blocks_per_batch}"")\n if vB * v_blocks_per_batch != v_blocks:\n raise ValueError(\n f""Value and page_table_v must have same number of blocks, ""\n f""got {v_blocks} vs {vB * v_blocks_per_batch}"")\n\n check_eq(qB, kB, vB, ""QKV batch"")\n check_eq(qH, kH, vH, ""QKV dim_per_head"")\n if kN != vN:\n raise ValueError(f""KV must have same number of heads, got {kN} vs {vN}"")\n if kS != vS:\n raise ValueError(f""KV must have same seq length, got {kS} vs {vS}"")\n\n # check bias\n if bias is not None:\n _, _, bT, bS = bias.shape\n if bT != qT or bS != vS:\n breakpoint()\n raise ValueError(\n f""Bias must have same seq length as QKV, got {bT} and {bS}"")\n\n # check q_seqlen/kv_seqlen/q_offsets/kv_offsets\n expected_rank = 2 if q_offsets is not None else 1\n def check_seqlen_offsets(tensor, name):\n if tensor is not None:\n dtype = tensor.dtype\n rank = len(tensor.shape)\n if dtype != jnp.int32:\n raise ValueError(f""{name} must have int32 datatype, got {dtype}"")\n if rank != expected_rank:\n raise ValueError(f""{name} must have a rank of {expected_rank}, got {rank}"")\n b = tensor.shape[0]\n if b != qB:\n raise ValueError(f""{name} must have same batch as Q, got {b}"")\n\n check_seqlen_offsets(q_seqlen, ""q_seqlen"")\n check_seqlen_offsets(kv_seqlen, ""kv_seqlen"")\n check_seqlen_offsets(q_offsets, ""q_offsets"")\n check_seqlen_offsets(kv_offsets, ""kv_offsets"")\n\n\ndef check_is_flash_attention(\n query, key, layout: int, cudnn_version, has_bias, is_training, is_packed=False,\n is_paged_attention=False, is_fp8=False):\n # Extract sequence length (T) and head dim (H) based on layout\n if layout == AttentionLayout.BNTH.value:\n _, _, T, H = query.shape\n _, _, S, _ = key.shape\n else:\n _, T, _, H = query.shape\n _, S, _, _ = key.shape\n\n # Flash attention conditions\n if is_fp8:\n # FP8 specific conditions\n if not ((is_training and H == 128 and T % 128 == 0 and S % 128 == 0) or\n (not is_training and H <= 256 and H % 16 == 0)):\n raise NotImplementedError(\n f""Unsupported sequence length Q {T}, KV {S} and head dim {H} for FP8.""\n )\n else:\n # bf16/fp16 attention conditions\n # Check the head dim.\n is_on_hopper = is_cuda_compute_capability_equal(""9.0"")\n H_max = 256 if cudnn_version >= 90500 and is_on_hopper else 128\n if not (H <= H_max and H % 8 == 0):\n raise NotImplementedError(\n f""The head dim must be <= {H_max} and a multiple of 8, ""\n f""but got {H}.""\n )\n\n # Check patterns with bias, seqlen should be divisible by 2\n if (is_training and has_bias and (T % 2 != 0 or S % 2 != 0)):\n raise NotImplementedError(\n f""Unsupported sequence length Q {T}, KV {S}.""\n )\n\n if is_packed and (cudnn_version < 90600 or not check_compute_capability(""9.0"")):\n raise NotImplementedError(\n ""Packed layout requires cudnn version >= 9.6 and at least hopper arch."")\n if is_paged_attention and cudnn_version < 90500:\n raise NotImplementedError(""Page attention requires cudnn version >= 9.5."")\n\ndef check_cudnn_version():\n # check if cuDNN is installed\n if cuda_versions is None:\n raise RuntimeError(""cuDNN is not detected."")\n return cuda_versions.cudnn_get_version()\n\ndef check_compute_capability(capability):\n if not 'cuda' in xla_bridge.get_backend().platform_version:\n return False\n d, *_ = jax.local_devices(backend=""gpu"")\n target = tuple(int(x) for x in capability.split("".""))\n current = tuple(int(x) for x in d.compute_capability.split("".""))\n return current >= target\n\ndef is_cuda_compute_capability_equal(capability):\n if not 'cuda' in xla_bridge.get_backend().platform_version:\n return False\n d, *_ = jax.local_devices(backend=""gpu"")\n target = tuple(int(x) for x in capability.split("".""))\n current = tuple(int(x) for x in d.compute_capability.split("".""))\n return current == target\n\ndef _dot_product_attention_fwd(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v,\n scale, seed, dropout_rate, variadic_args, mask_type, layout,\n sliding_window_length, cudnn_version, return_residual):\n # check if flash attention is supported for this attention pattern\n check_is_flash_attention(\n query, key, layout, cudnn_version, bias is not None, False,\n get_max_seg_per_batch(q_offsets) > 1, check_is_paged_attention(page_table_k))\n outputs = _dot_product_attention_fwd_p_wrapper.bind(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, scale=scale, seed=seed, dropout_rate=dropout_rate,\n variadic_args=variadic_args, mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length, is_training=False or return_residual)\n if return_residual:\n return tuple(outputs)\n else:\n return outputs[0]\n\ndef _dot_product_attention_fwd_rule(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, scale, seed, dropout_rate, variadic_args,\n mask_type, layout, sliding_window_length, cudnn_version,\n return_residual):\n # check if flash attention is supported for this attention pattern\n check_is_flash_attention(\n query, key, layout, cudnn_version, bias is not None, True,\n get_max_seg_per_batch(q_offsets) > 1)\n outputs = _dot_product_attention_fwd_p_wrapper.bind(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, scale=scale, seed=seed, dropout_rate=dropout_rate,\n variadic_args=variadic_args, mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length, is_training=True)\n res = (query, key, value, bias, q_seqlen, kv_seqlen, q_offsets,\n kv_offsets, page_table_k, page_table_v, outputs[1], outputs[0])\n if return_residual:\n return tuple(outputs), res\n else:\n return outputs[0], res\n\ndef _dot_product_attention_bwd_rule(\n scale, seed, dropout_rate, variadic_args, mask_type, layout,\n sliding_window_length, is_training, return_residual, res, grad_output):\n (query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, activation, fwd_output) = res\n if return_residual:\n grad_output = grad_output[0]\n grads = _dot_product_attention_bwd_p_wrapper.bind(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, activation, fwd_output, grad_output,\n scale=scale, seed=seed, dropout_rate=dropout_rate, variadic_args=variadic_args,\n mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length\n )\n grads = (*grads,) + (None,) * (10 - len(grads))\n return grads\n\ndef _fix_seqlen_offsets(q_seqlen, kv_seqlen, q_offsets, kv_offsets, query, key):\n # fix seqlen and offsets to what cuDNN expects in sequence packing.\n # cuDNN expects seqlen to have shape [S] where S is the total number of segments\n # while the SDPA API accetps seqlen with shape [B, M] where B is the batch and M\n # is the maximum number of segments of one batch. B x M is larger than S and seqlen\n # is filled with -1 for padded regions. Therefore, we need to shift all non negative\n # values to left side to form a correct seqlen. Similar layout is required for\n # offsets tensors.\n # cuDNN expects offsets to have offset for each segment starting from first segment\n # while SDPA API accetps offsets to have offset for each segment starting from\n # current batch, therefore we need to calculate accumulative offset of each segment\n # starting from first segment.\n def _shift_to_left(x, fill_value):\n # shift any non-negative value to left\n # [[1, 3, -1, -1], [2, 3, 4, -1]]\n # -> [[1, 3, 2, 3], [4, -1, -1, -1]]\n x_shape = x.shape\n x = x.flatten()\n size = x.size\n indices = jnp.nonzero(x >= 0, size=size, fill_value=size)[0]\n y = jnp.take(x, indices, fill_value=fill_value)\n return jnp.reshape(y, x_shape)\n\n def _cu_offset(offsets, max_seq):\n # calculate accumulative offset by batch\n # [[1, 3, 5, 7], [4, 5, -1, -1]], max_seq = 8\n # -> [[1, 3, 5, 7], [12, 13, -1, -1]]\n batch = offsets.shape[0]\n offsets = jnp.where(\n offsets >= 0,\n offsets + (jnp.arange(batch, dtype=offsets.dtype) * max_seq)[..., jnp.newaxis],\n offsets,\n )\n return offsets\n\n if get_max_seg_per_batch(q_offsets) > 1:\n B, T, N, H = query.shape\n _, S, _, _ = key.shape\n\n q_seqlen = _shift_to_left(q_seqlen, -1)\n kv_seqlen = _shift_to_left(kv_seqlen, -1)\n\n q_offsets = _cu_offset(q_offsets, T)\n kv_offsets = _cu_offset(kv_offsets, S)\n q_offsets = _shift_to_left(q_offsets, -1)\n kv_offsets = _shift_to_left(kv_offsets, -1)\n\n # mark any invalid entries as maximum offset\n q_offsets = jnp.where(q_offsets < 0, B * T, q_offsets)\n kv_offsets = jnp.where(kv_offsets < 0, B * S, kv_offsets)\n\n # multiply by stride_per_token to get correct offsets\n # do it here because real stride changes after sharding\n q_offsets = q_offsets * N * H\n kv_offsets = kv_offsets * N * H\n\n return q_seqlen, kv_seqlen, q_offsets, kv_offsets\n\ndef _dot_product_attention_fwd_impl(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, scale, seed, dropout_rate, variadic_args,\n mask_type, layout, sliding_window_length, is_training):\n # args: {Q, K, V, mask*, bias*}\n q_seqlen, kv_seqlen, q_offsets, kv_offsets = \\n _fix_seqlen_offsets(q_seqlen, kv_seqlen, q_offsets, kv_offsets, query, key)\n outputs = _dot_product_attention_fwd_p.bind(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, scale=scale, seed=seed, dropout_rate=dropout_rate,\n variadic_args=variadic_args, mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length, is_training=is_training)\n return outputs\n\ndef _dot_product_attention_bwd_impl(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, activation, fwd_output, grad_output, scale,\n seed, dropout_rate, variadic_args, mask_type, layout, sliding_window_length):\n q_seqlen, kv_seqlen, q_offsets, kv_offsets = \\n _fix_seqlen_offsets(q_seqlen, kv_seqlen, q_offsets, kv_offsets, query, key)\n grads = _dot_product_attention_bwd_p.bind(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, activation, fwd_output, grad_output,\n scale=scale, seed=seed,\n dropout_rate=dropout_rate, variadic_args=variadic_args,\n mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length)\n return grads\n\ndef _dot_product_attention_fwd_abstract(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, *, scale, seed, dropout_rate, variadic_args,\n mask_type, layout, sliding_window_length, is_training):\n query_dtype = dtypes.canonicalize_dtype(query.dtype)\n if layout == AttentionLayout.BNTH.value:\n B, N, T, _ = query.shape\n _, _, S, _ = key.shape\n else:\n B, T, N, _ = query.shape\n _, S, _, _ = key.shape\n output_shape = query.shape\n\n max_seg_per_batch = get_max_seg_per_batch(q_offsets)\n softmax_stat_shape = (B * max_seg_per_batch, N, T)\n\n if is_training:\n return (\n core.ShapedArray(output_shape, query_dtype), # output\n core.ShapedArray(softmax_stat_shape, jnp.float32), # softmax_stat\n )\n else:\n return (\n core.ShapedArray(output_shape, query_dtype), # output\n )\n\ndef _dot_product_attention_bwd_abstract(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, activation, fwd_output, grad_output, *,\n scale, seed, dropout_rate, variadic_args, mask_type, layout, sliding_window_length):\n query_dtype = dtypes.canonicalize_dtype(query.dtype)\n key_dtype = dtypes.canonicalize_dtype(key.dtype)\n value_dtype = dtypes.canonicalize_dtype(value.dtype)\n\n _, has_dbias = variadic_args\n if has_dbias:\n # cuDNN supports bias for this case\n bias_dtype = dtypes.canonicalize_dtype(bias.dtype)\n return (\n core.ShapedArray(\n query.shape, query_dtype\n ), # grad query\n core.ShapedArray(\n key.shape, key_dtype\n ), # grad key\n core.ShapedArray(\n value.shape, value_dtype\n ), # grad value\n core.ShapedArray(\n bias.shape, bias_dtype\n ), # grad bias\n )\n else:\n return (\n core.ShapedArray(\n query.shape, query_dtype\n ), # grad query\n core.ShapedArray(\n key.shape, key_dtype\n ), # grad key\n core.ShapedArray(\n value.shape, value_dtype\n ), # grad value\n )\n\ndef _dot_product_attention_fwd_cuda_lowering(\n ctx, query, key, value, bias, q_seqlen, kv_seqlen, q_offsets,\n kv_offsets, page_table_k, page_table_v, scale, seed, dropout_rate,\n variadic_args, mask_type, layout, sliding_window_length, is_training):\n query_type = ir.RankedTensorType(query.type)\n query_shape = query_type.shape\n key_type = ir.RankedTensorType(key.type)\n key_shape = key_type.shape\n\n if layout == AttentionLayout.BNTH.value:\n B, N, T, H = query_shape\n _, _, S, _ = key_shape\n output_layout = (3, 2, 1, 0)\n output_transpose_perm = mlir.dense_int_array((0, 1, 2, 3))\n else:\n B, T, N, H = query_shape\n _, S, _, _ = key_shape\n output_layout = (3, 1, 2, 0)\n output_transpose_perm = mlir.dense_int_array((0, 2, 1, 3))\n\n max_seg_per_batch = get_max_seg_per_batch(ir.RankedTensorType(q_offsets.type))\n is_paged_attention = check_is_paged_attention(ir.RankedTensorType(page_table_k.type))\n\n output_shape = (B, N, T, H)\n softmax_stat_shape = (B * max_seg_per_batch, N, T)\n workspace_shape = (0,)\n workspace_type = ir.IntegerType.get_unsigned(8)\n\n has_bias, _ = variadic_args\n backend_config = create_dot_product_attention_backend_config(\n B, N, T, S, query_type.element_type, scale, seed, dropout_rate,\n mask_type, layout, sliding_window_length, max_seg_per_batch,\n is_paged_attention, is_bwd=False)\n # {Q, K, V, bias*, q_seqlen*, kv_seqlen*, q_offsets*, kv_offsets*}}\n # {output, activation*, workspace}\n has_dropout = dropout_rate > 0\n operands = [query, key, value]\n if has_bias:\n operands.append(bias)\n if has_padding(mask_type) or max_seg_per_batch > 1 or is_paged_attention:\n operands.append(q_seqlen)\n operands.append(kv_seqlen)\n if max_seg_per_batch > 1:\n operands.append(q_offsets)\n operands.append(kv_offsets)\n if is_paged_attention:\n operands.append(page_table_k)\n operands.append(page_table_v)\n\n custom_call_name = get_custom_call_name(has_bias, has_dropout, False)\n\n if is_training:\n result_types = [\n ir.RankedTensorType.get(output_shape, query_type.element_type),\n ir.RankedTensorType.get(softmax_stat_shape, ir.F32Type.get()),\n ir.RankedTensorType.get(workspace_shape, workspace_type),\n ]\n result_layouts = [output_layout] + default_layouts(softmax_stat_shape, workspace_shape)\n else:\n result_types = [\n ir.RankedTensorType.get(output_shape, query_type.element_type),\n ir.RankedTensorType.get(workspace_shape, workspace_type)\n ]\n result_layouts = [output_layout] + default_layouts(workspace_shape)\n # create custom call here\n out = mlir.custom_call(\n custom_call_name,\n result_types=result_types,\n operands=operands,\n backend_config=backend_config,\n operand_layouts=default_layouts(\n *[ir.RankedTensorType(operand.type).shape for operand in operands]),\n result_layouts=result_layouts,\n )\n # drop workspace memory\n # output should be (B, T, N, H) instead of (B, N, T, H)\n if is_training:\n return [hlo.transpose(out.results[0], output_transpose_perm), out.results[1]]\n else:\n return [hlo.transpose(out.results[0], output_transpose_perm)]\n\ndef _dot_product_attention_bwd_cuda_lowering(\n ctx, query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, activation, fwd_output, grad_output,\n scale, seed, dropout_rate, variadic_args, mask_type, layout, sliding_window_length):\n query_type = ir.RankedTensorType(query.type)\n query_shape = query_type.shape\n key_type = ir.RankedTensorType(key.type)\n key_shape = key_type.shape\n value_type = ir.RankedTensorType(value.type)\n\n if layout == AttentionLayout.BNTH.value:\n B, q_N, T, H = query_shape\n _, k_N, S, _ = key_shape\n grad_layout = (3, 2, 1, 0)\n grad_transpose_perm = mlir.dense_int_array((0, 1, 2, 3))\n else:\n B, T, q_N, H = query_shape\n _, S, k_N, _ = key_shape\n grad_layout = (3, 1, 2, 0)\n grad_transpose_perm = mlir.dense_int_array((0, 2, 1, 3))\n\n workspace_shape = (0,)\n workspace_type = ir.IntegerType.get_unsigned(8)\n\n grad_query_shape = (B, q_N, T, H)\n grad_key_shape = (B, k_N, S, H)\n grad_value_shape = (B, k_N, S, H)\n\n has_bias, has_dbias = variadic_args\n max_seg_per_batch = get_max_seg_per_batch(ir.RankedTensorType(q_offsets.type))\n backend_config = create_dot_product_attention_backend_config(\n B, q_N, T, S, query_type.element_type, scale, seed, dropout_rate,\n mask_type, layout, sliding_window_length, max_seg_per_batch,\n False, is_bwd=True)\n # {Q, K, V, activation, dO, bias*, O, q_seqlen*, kv_seqlen*,\n # q_offsets*, kv_offsets*}\n # {dQ, dK, dV, dbias*, workspace}\n has_dropout = dropout_rate > 0\n # create operands\n operands = [query, key, value, activation, grad_output]\n if has_bias:\n # flash attention requires bias in the bwd for remat\n operands.append(bias)\n operands.append(fwd_output)\n if has_padding(mask_type) or max_seg_per_batch > 1:\n operands.append(q_seqlen)\n operands.append(kv_seqlen)\n if max_seg_per_batch > 1:\n operands.append(q_offsets)\n operands.append(kv_offsets)\n # get custom call name\n custom_call_name = get_custom_call_name(has_bias, has_dropout, True)\n\n # create output types and layouts\n # grad_query, grad_key, grad_value\n result_types = [\n ir.RankedTensorType.get(grad_query_shape, query_type.element_type),\n ir.RankedTensorType.get(grad_key_shape, key_type.element_type),\n ir.RankedTensorType.get(grad_value_shape, value_type.element_type),\n ]\n result_layouts = [grad_layout, grad_layout, grad_layout]\n bias_type = ir.RankedTensorType(bias.type)\n bias_shape = bias_type.shape\n if has_dbias:\n # cuDNN supports bias for this case\n result_types.append(\n ir.RankedTensorType.get(bias_shape, bias_type.element_type))\n result_layouts = result_layouts + default_layouts(bias_shape)\n # workspace\n result_types.append(ir.RankedTensorType.get(workspace_shape, workspace_type))\n result_layouts = result_layouts + default_layouts(workspace_shape)\n out = mlir.custom_call(\n custom_call_name,\n result_types=result_types,\n operands=operands,\n backend_config=backend_config,\n operand_layouts=default_layouts(\n *[ir.RankedTensorType(operand.type).shape for operand in operands]),\n result_layouts=result_layouts,\n )\n dqkv = (hlo.transpose(out.results[0], grad_transpose_perm),\n hlo.transpose(out.results[1], grad_transpose_perm),\n hlo.transpose(out.results[2], grad_transpose_perm))\n # Only keep dQ, dK, dV and dBias here\n if has_dbias:\n return dqkv + (out.results[3],)\n else:\n return dqkv\n\n# batcher\ndef _check_valid_batch_dims(bdims):\n for dim in bdims:\n if dim not in [0, None]:\n raise NotImplementedError(\n f""Currently only support batch_dim in [0, None], but got {dim=}"")\n\ndef _dot_product_attention_fwd_batcher(\n batched_args, batch_dims, *, scale, seed, dropout_rate, variadic_args,\n mask_type, layout, sliding_window_length, is_training):\n _check_valid_batch_dims(batch_dims)\n query, key, value, bias, q_seqlen, kv_seqlen, \\n q_offsets, kv_offsets, page_table_k, page_table_v = batched_args\n query_bdim = batch_dims[0]\n if is_training:\n out_bdims = query_bdim, query_bdim\n else:\n out_bdims = (query_bdim,)\n\n if layout == AttentionLayout.BNTH.value:\n *Bs, N, T, _ = query.shape\n *_, _, S, _ = key.shape\n else:\n *Bs, T, N, _ = query.shape\n *_, S, _, _ = key.shape\n B = math.prod(Bs)\n has_bias, _ = variadic_args\n original_shape = query.shape\n # reshape to 4D shape\n query = jnp.reshape(query, (B,) + query.shape[-3:])\n key = jnp.reshape(key, (B,) + key.shape[-3:])\n value = jnp.reshape(value, (B,) + key.shape[-3:])\n if has_bias and batch_dims[3] is not None:\n bias = jnp.reshape(bias, (B, N, T, S))\n if has_padding(mask_type):\n q_seqlen = jnp.reshape(q_seqlen, (B, ))\n kv_seqlen = jnp.reshape(kv_seqlen, (B, ))\n\n outputs = _dot_product_attention_fwd_p_wrapper.bind(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, scale=scale, seed=seed, dropout_rate=dropout_rate,\n variadic_args=variadic_args, mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length, is_training=is_training)\n\n # reshape to original shape\n output = outputs[0]\n output = jnp.reshape(output, original_shape)\n if is_training:\n activation = outputs[1]\n activation = jnp.reshape(activation, (*Bs, N, T))\n return (output, activation), out_bdims\n else:\n return (output,), out_bdims\n\ndef _dot_product_attention_bwd_batcher(\n batched_args, batch_dims, *, scale, seed, dropout_rate, variadic_args,\n mask_type, layout, sliding_window_length):\n _check_valid_batch_dims(batch_dims)\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets, \\n page_table_k, page_table_v, activation, fwd_output, grad_output = batched_args\n query_bdim = batch_dims[0]\n out_bdims = query_bdim, query_bdim, query_bdim\n\n if layout == AttentionLayout.BNTH.value:\n *Bs, N, T, _ = query.shape\n *_, _, S, _ = key.shape\n else:\n *Bs, T, N, _ = query.shape\n *_, S, _, _ = key.shape\n B = math.prod(Bs)\n has_bias, has_dbias = variadic_args\n # Reset the has_dbias if the combined batch size is not 1, because cuDNN only\n # supports dbias with a single batch. In this case, an all-zero dbias will be\n # appended instead.\n if B > 1:\n variadic_args = (has_bias, False)\n original_query_shape = query.shape\n original_key_shape = key.shape\n original_value_shape = value.shape\n original_bias_shape = bias.shape if has_bias else None\n # reshape to 4D shape\n query = jnp.reshape(query, (B,) + query.shape[-3:])\n key = jnp.reshape(key, (B,) + key.shape[-3:])\n value = jnp.reshape(value, (B,) + key.shape[-3:])\n if has_bias and batch_dims[3] is not None:\n bias = jnp.reshape(bias, (B, N, T, S))\n if has_padding(mask_type):\n q_seqlen = jnp.reshape(q_seqlen, (B, ))\n kv_seqlen = jnp.reshape(kv_seqlen, (B, ))\n\n activation = jnp.reshape(activation, (B, N, T))\n fwd_output = jnp.reshape(fwd_output, (B,) + query.shape[-3:])\n grad_output = jnp.reshape(grad_output, (B,) + query.shape[-3:])\n\n grads = _dot_product_attention_bwd_p_wrapper.bind(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, activation, fwd_output, grad_output,\n scale=scale, seed=seed, dropout_rate=dropout_rate, variadic_args=variadic_args,\n mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length,\n )\n\n # reshape to original shape\n grads[0] = jnp.reshape(grads[0], original_query_shape)\n grads[1] = jnp.reshape(grads[1], original_key_shape)\n grads[2] = jnp.reshape(grads[2], original_value_shape)\n if has_dbias:\n assert has_bias\n if variadic_args[1]:\n grads[3] = jnp.reshape(grads[3], original_bias_shape)\n else:\n grads.append(jnp.zeros(original_bias_shape, bias.dtype))\n out_bdims += (batch_dims[3],)\n return grads, out_bdims\n\n# custom partitioning\ndef _get_padded_spec(arg_info):\n spec = None if arg_info.sharding is None else arg_info.sharding.spec\n ndim = arg_info.ndim\n if spec is None:\n return (None,) * ndim\n assert len(spec) <= ndim\n return spec + (None,) * (ndim - len(spec))\n\ndef _check_qkv_bias_mask_spec(\n query_spec, key_spec, value_spec, bias_spec, layout):\n # check qkv spec\n if not query_spec == key_spec == value_spec:\n raise ValueError(""Query, key and value should have same sharding."")\n if layout == AttentionLayout.BNTH.value:\n *batch_spec, num_head_spec, q_seq_spec, head_spec = query_spec\n else:\n *batch_spec, q_seq_spec, num_head_spec, head_spec = query_spec\n if q_seq_spec is not None:\n raise ValueError(""Sharding on sequence dim is not allowed."")\n if head_spec is not None:\n raise ValueError(""Sharding on head dim is not allowed."")\n # check bias spec\n if bias_spec:\n *bias_batch_spec, bias_num_head_spec, bias_q_seq_spec, bias_kv_seq_spec = bias_spec\n if any(bias_batch_spec) and bias_batch_spec != batch_spec or \\n bias_num_head_spec is not None and bias_num_head_spec != num_head_spec:\n raise ValueError(\n ""Query and bias should have same sharding on batch and num_head dim."")\n if bias_q_seq_spec is not None or bias_kv_seq_spec is not None:\n raise ValueError(""Sharding on bias sequence dim is not allowed."")\n\n\n# fwd custom partition\ndef _infer_fwd_output_sharding(mesh, arg_shapes, variadic_args,is_training, layout):\n # only sharding on batch and num_head dim is allowed\n # (*batch, q_seq, num_head, head)\n query_spec = _get_padded_spec(arg_shapes[0])\n # (*batch, kv_seq, num_head, head)\n key_spec = _get_padded_spec(arg_shapes[1])\n value_spec = _get_padded_spec(arg_shapes[2])\n has_bias, _ = variadic_args\n bias_spec = _get_padded_spec(arg_shapes[3]) if has_bias else None\n\n _check_qkv_bias_mask_spec(\n query_spec, key_spec, value_spec, bias_spec, layout)\n # keep out sharding same as query sharding since they have same shape\n out_sharding = NamedSharding(mesh, PartitionSpec(*query_spec))\n if is_training:\n # activation sharding\n *batch_spec, q_seq_spec, num_head_spec, _ = query_spec\n activation_sharding = NamedSharding(\n mesh, PartitionSpec(*batch_spec, num_head_spec, q_seq_spec, None))\n return [out_sharding, activation_sharding]\n return [out_sharding]\n\n_dot_product_attention_fwd_lower = custom_partitioning(\n _dot_product_attention_fwd_impl, static_argnums=(10, 11, 12, 13, 14, 15, 16, 17))\n\ndef _dot_product_attention_fwd_infer_sharding_from_operands(\n scale, seed, dropout_rate, variadic_args, mask_type, layout, sliding_window_length,\n is_training, mesh, arg_shapes, result_shape):\n return _infer_fwd_output_sharding(mesh, arg_shapes, variadic_args, is_training, layout)\n\ndef _dot_product_attention_fwd_partition(\n scale, seed, dropout_rate, variadic_args, mask_type, layout, sliding_window_length,\n is_training, mesh, arg_shapes, result_shape):\n # args sharding\n arg_shardings = tuple(arg_i.sharding for arg_i in arg_shapes)\n out_shardings = _infer_fwd_output_sharding(\n mesh, arg_shapes, variadic_args, is_training, layout)\n impl = functools.partial(\n _dot_product_attention_fwd_impl,\n scale=scale,\n seed=seed,\n dropout_rate=dropout_rate,\n variadic_args=variadic_args,\n mask_type=mask_type,\n layout=layout,\n sliding_window_length=sliding_window_length,\n is_training=is_training,\n )\n return mesh, impl, out_shardings, arg_shardings\n\n# bwd custom partition\ndef _infer_bwd_output_sharding(mesh, arg_shapes, layout, variadic_args):\n # (*batch, q_seq, num_head, head)\n query_spec = _get_padded_spec(arg_shapes[0])\n # (*batch, kv_seq, num_head, head)\n key_spec = _get_padded_spec(arg_shapes[1])\n value_spec = _get_padded_spec(arg_shapes[2])\n has_bias, has_dbias = variadic_args\n bias_spec = _get_padded_spec(arg_shapes[3]) if has_bias else None\n _check_qkv_bias_mask_spec(\n query_spec, key_spec, value_spec, bias_spec, layout)\n # keep grad query sharding same as query sharding\n grad_query_sharding = NamedSharding(mesh, PartitionSpec(*query_spec))\n grad_key_sharding = NamedSharding(mesh, PartitionSpec(*key_spec))\n grad_value_sharding = NamedSharding(mesh, PartitionSpec(*key_spec))\n out_shardings = [grad_query_sharding, grad_key_sharding, grad_value_sharding]\n if has_dbias:\n grad_bias_sharding = NamedSharding(mesh, PartitionSpec(*bias_spec))\n out_shardings = out_shardings + [grad_bias_sharding]\n return out_shardings\n\n_dot_product_attention_bwd_lower = custom_partitioning(\n _dot_product_attention_bwd_impl, static_argnums=(13, 14, 15, 16, 17, 18, 19)\n)\n\ndef _dot_product_attention_bwd_infer_sharding_from_operands(\n scale, seed, dropout_rate, variadic_args, mask_type, layout,\n sliding_window_length, mesh, arg_shapes, result_shape):\n return _infer_bwd_output_sharding(mesh, arg_shapes, layout, variadic_args)\n\ndef _dot_product_attention_bwd_partition(\n scale, seed, dropout_rate, variadic_args, mask_type, layout,\n sliding_window_length, mesh, arg_shapes, result_shape):\n out_shardings = _infer_bwd_output_sharding(mesh, arg_shapes, layout, variadic_args)\n # args sharding\n arg_shardings = tuple(arg_i.sharding for arg_i in arg_shapes)\n def sharded_impl(*args):\n impl = functools.partial(\n _dot_product_attention_bwd_impl,\n scale=scale,\n seed=seed,\n dropout_rate=dropout_rate,\n variadic_args=variadic_args,\n mask_type=mask_type,\n layout=layout,\n sliding_window_length=sliding_window_length,\n )\n grads = impl(*args)\n _, has_dbias = variadic_args\n if has_dbias:\n query_spec = arg_shardings[0].spec\n batch_spec = query_spec[0]\n local_dbias = grads[3]\n global_dbias = jax.lax.psum(local_dbias, batch_spec)\n grads = grads[:3] + [global_dbias]\n return grads\n return mesh, sharded_impl, out_shardings, arg_shardings\n\n# Create dot_product_attention_fwd_p for forward operation.\n_dot_product_attention_fwd_p = core.Primitive(""dot_product_attention_fwd"")\n_dot_product_attention_fwd_p.multiple_results = True\n_dot_product_attention_fwd_p.def_impl(\n functools.partial(dispatch.apply_primitive, _dot_product_attention_fwd_p)\n)\n_dot_product_attention_fwd_p.def_abstract_eval(\n _dot_product_attention_fwd_abstract\n)\n\nmlir.register_lowering(\n _dot_product_attention_fwd_p,\n _dot_product_attention_fwd_cuda_lowering,\n platform=""cuda"",\n)\n\n_dot_product_attention_fwd_p_wrapper = core.Primitive(\n ""dot_product_attention_fwd_wrapper""\n)\n_dot_product_attention_fwd_p_wrapper.multiple_results = True\n_dot_product_attention_fwd_p_wrapper.def_impl(_dot_product_attention_fwd_impl)\n_dot_product_attention_fwd_p_wrapper.def_abstract_eval(\n _dot_product_attention_fwd_abstract\n)\n\n# Create dot_product_attention_bwd_p for backward operation.\n_dot_product_attention_bwd_p = core.Primitive(""dot_product_attention_bwd"")\n_dot_product_attention_bwd_p.multiple_results = True\n_dot_product_attention_bwd_p.def_impl(\n functools.partial(dispatch.apply_primitive, _dot_product_attention_bwd_p)\n)\n_dot_product_attention_bwd_p.def_abstract_eval(\n _dot_product_attention_bwd_abstract\n)\n\nmlir.register_lowering(\n _dot_product_attention_bwd_p,\n _dot_product_attention_bwd_cuda_lowering,\n platform=""cuda"",\n)\n\n_dot_product_attention_bwd_p_wrapper = core.Primitive(\n ""dot_product_attention_bwd_wrapper""\n)\n_dot_product_attention_bwd_p_wrapper.multiple_results = True\n_dot_product_attention_bwd_p_wrapper.def_impl(_dot_product_attention_bwd_impl)\n_dot_product_attention_bwd_p_wrapper.def_abstract_eval(\n _dot_product_attention_bwd_abstract\n)\n\nbatching.primitive_batchers[\n _dot_product_attention_fwd_p_wrapper\n] = _dot_product_attention_fwd_batcher\nbatching.primitive_batchers[\n _dot_product_attention_bwd_p_wrapper\n] = _dot_product_attention_bwd_batcher\n\ndef not_implemented_sharding_rule(*args, **kwargs):\n return NotImplementedError(""Sharding rule not implemented."")\n\n_dot_product_attention_fwd_lower.def_partition(\n infer_sharding_from_operands=_dot_product_attention_fwd_infer_sharding_from_operands,\n partition=_dot_product_attention_fwd_partition,\n sharding_rule=not_implemented_sharding_rule)\n\nmlir.register_lowering(_dot_product_attention_fwd_p_wrapper,\n mlir.lower_fun(_dot_product_attention_fwd_lower, multiple_results=True))\n\n_dot_product_attention_bwd_lower.def_partition(\n infer_sharding_from_operands=_dot_product_attention_bwd_infer_sharding_from_operands,\n partition=_dot_product_attention_bwd_partition,\n sharding_rule=not_implemented_sharding_rule)\n\nmlir.register_lowering(_dot_product_attention_bwd_p_wrapper,\n mlir.lower_fun(_dot_product_attention_bwd_lower, multiple_results=True))\n\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_fwd_p\n)\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_fwd_p_wrapper\n)\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_bwd_p\n)\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_bwd_p_wrapper\n)\n\n@functools.partial(jax.custom_vjp, nondiff_argnums=(10, 11, 12, 13, 14, 15, 16, 17, 18))\ndef _dot_product_attention(query: Array,\n key: Array,\n value: Array,\n bias: Array,\n q_seqlen: Array,\n kv_seqlen: Array,\n q_offsets: Array,\n kv_offsets: Array,\n page_table_k: Array,\n page_table_v: Array,\n scale: float,\n seed: int,\n dropout_rate: float,\n variadic_args: tuple[bool, ...],\n mask_type: bool,\n layout: int,\n sliding_window_length: int | None,\n cudnn_version: int,\n return_residual: bool):\n output = _dot_product_attention_fwd(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n page_table_k, page_table_v, scale=scale, seed=seed, dropout_rate=dropout_rate,\n variadic_args=variadic_args, mask_type=mask_type, layout=layout,\n sliding_window_length=sliding_window_length,\n cudnn_version=cudnn_version, return_residual=return_residual)\n return output\n\n_dot_product_attention.defvjp(\n _dot_product_attention_fwd_rule, _dot_product_attention_bwd_rule\n)\n\nfp8_params_keys = [\n 'amax_dQ', 'amax_dK', 'amax_dV', 'amax_dP', # place holder for bwd output\n 'descale_q', 'descale_k', 'descale_v', 'descale_s',\n 'scale_s', 'scale_o', 'descale_o', 'descale_dO',\n 'descale_dP', 'scale_dQ', 'scale_dK', 'scale_dV',\n 'scale_dP'\n]\n\nfp8_params_keys_fwd = [\n 'descale_q', 'descale_k', 'descale_v', 'descale_s', 'scale_s', 'scale_o'\n]\nfp8_params_keys_bwd = [\n 'descale_q', 'descale_k', 'descale_v', 'descale_o', 'descale_dO', 'descale_s',\n 'descale_dP', 'scale_s', 'scale_dQ', 'scale_dK', 'scale_dV', 'scale_dP',\n]\nparams_from_keys = lambda params, keys: [params[key] for key in keys]\n\ndef check_fp8_params(params):\n # Check if all required keys are present\n missing_keys = set(fp8_params_keys) - set(params)\n if missing_keys:\n raise ValueError(f""The following keys are missing from fp8_params: {', '.join(missing_keys)}"")\n\ncheck_is_flash_attention_fp8 = functools.partial(\n check_is_flash_attention,\n has_bias=False,\n is_fp8=True\n)\n\ndef _dot_product_attention_fp8_fwd(\n query, key, value,\n fp8_params_fwd,\n scale, use_causal_mask, layout, cudnn_version):\n check_is_flash_attention_fp8(\n query, key, layout, cudnn_version, is_training=False)\n descale_q, descale_k, descale_v, descale_s, scale_s, scale_o = fp8_params_fwd\n outputs = _dot_product_attention_fp8_fwd_p_wrapper.bind(\n query, key, value,\n descale_q, descale_k, descale_v, descale_s,\n scale_s, scale_o,\n scale=scale, use_causal_mask=use_causal_mask, layout=layout, is_training=False)\n return outputs\n\ndef _dot_product_attention_fp8_fwd_rule(\n query, key, value,\n fp8_params,\n scale, use_causal_mask, layout, cudnn_version):\n check_is_flash_attention_fp8(\n query, key, layout, cudnn_version, is_training=True)\n\n outputs = _dot_product_attention_fp8_fwd_p_wrapper.bind(\n query, key, value, *params_from_keys(fp8_params, fp8_params_keys_fwd),\n scale=scale, use_causal_mask=use_causal_mask, layout=layout, is_training=True)\n res = (query, key, value, outputs[3], outputs[0], params_from_keys(fp8_params, fp8_params_keys_bwd))\n return (outputs[0], outputs[1], outputs[2]), res\n\ndef _dot_product_attention_fp8_bwd_rule(\n scale, use_causal_mask, layout, cudnn_version, res, g):\n (query, key, value, activation, fwd_output, aux_params) = res\n grad_output = g[0]\n grads = _dot_product_attention_fp8_bwd_p_wrapper.bind(\n query,\n key,\n value,\n fwd_output,\n grad_output,\n activation,\n *aux_params,\n scale=scale,\n use_causal_mask=use_causal_mask,\n layout=layout,\n )\n\n fp8_params_grads = dict.fromkeys(fp8_params_keys)\n keys_to_grad_indices = ['amax_dQ', 'amax_dK', 'amax_dV', 'amax_dP']\n # grads structure: (dQ, dK, dV, amax_dq, amax_dk, amax_dv, amax_dp)\n for i, key in enumerate(keys_to_grad_indices, start=3):\n fp8_params_grads[key] = grads[i]\n\n return (grads[0], grads[1], grads[2], fp8_params_grads)\n\ndef _dot_product_attention_fp8_fwd_impl(\n query, key, value,\n descale_q, descale_k, descale_v, descale_s, scale_s, scale_o,\n scale, use_causal_mask, layout, is_training):\n outputs = _dot_product_attention_fp8_fwd_p.bind(\n query,\n key,\n value,\n descale_q,\n descale_k,\n descale_v,\n descale_s,\n scale_s,\n scale_o,\n scale=scale,\n use_causal_mask=use_causal_mask,\n layout=layout,\n is_training=is_training,\n )\n return outputs\n\ndef _dot_product_attention_fp8_bwd_impl(\n query, key, value, fwd_output, grad_output, activation,\n descale_q, descale_k, descale_v, descale_o, descale_dO, descale_s,\n descale_dP, scale_s, scale_dQ, scale_dK, scale_dV, scale_dP,\n scale, use_causal_mask, layout):\n grads = _dot_product_attention_fp8_bwd_p.bind(\n query, key, value, fwd_output, grad_output, activation,\n descale_q, descale_k, descale_v, descale_o, descale_dO, descale_s,\n descale_dP, scale_s, scale_dQ, scale_dK, scale_dV, scale_dP,\n scale=scale, use_causal_mask=use_causal_mask, layout=layout)\n return grads\n\n\ndef _dot_product_attention_fp8_fwd_abstract(\n query, key, value,\n descale_q, descale_k, descale_v, descale_s, scale_s, scale_o,\n scale, use_causal_mask, layout, is_training):\n query_dtype = dtypes.canonicalize_dtype(query.dtype)\n if layout == AttentionLayout.BNTH.value:\n B, N, T, _ = query.shape\n _, _, S, _ = key.shape\n else:\n B, T, N, _ = query.shape\n _, S, _, _ = key.shape\n output_shape = query.shape\n softmax_stat_shape = (B, N, T)\n\n # output, amax_s, amax_o[, softmax_stat]\n if is_training:\n return (\n core.ShapedArray(output_shape, query_dtype),\n core.ShapedArray((1,1,1,1), jnp.float32),\n core.ShapedArray((1,1,1,1), jnp.float32),\n core.ShapedArray(softmax_stat_shape, jnp.float32),\n )\n else:\n return (\n core.ShapedArray(output_shape, query_dtype),\n core.ShapedArray((1,1,1,1), jnp.float32),\n core.ShapedArray((1,1,1,1), jnp.float32),\n )\n\ndef _dot_product_attention_fp8_bwd_abstract(\n query, key, value, fwd_output, grad_output, activation,\n descale_q, descale_k, descale_v, descale_o, descale_dO, descale_s,\n descale_dP, scale_s, scale_dQ, scale_dK, scale_dV, scale_dP,\n scale, use_causal_mask, layout):\n query_dtype = dtypes.canonicalize_dtype(query.dtype)\n key_dtype = dtypes.canonicalize_dtype(key.dtype)\n value_dtype = dtypes.canonicalize_dtype(value.dtype)\n\n amax_shape = (1,1,1,1)\n\n return (\n core.ShapedArray(query.shape, query_dtype),\n core.ShapedArray(key.shape, key_dtype),\n core.ShapedArray(value.shape, value_dtype),\n core.ShapedArray(amax_shape, jnp.float32),\n core.ShapedArray(amax_shape, jnp.float32),\n core.ShapedArray(amax_shape, jnp.float32),\n core.ShapedArray(amax_shape, jnp.float32),\n )\n\ndef _dot_product_attention_fp8_fwd_cuda_lowering(\n ctx, query, key, value,\n descale_q, descale_k, descale_v, descale_s, scale_s, scale_o,\n scale, use_causal_mask, layout, is_training):\n query_type = ir.RankedTensorType(query.type)\n query_shape = query_type.shape\n key_type = ir.RankedTensorType(key.type)\n key_shape = key_type.shape\n\n if layout == AttentionLayout.BNTH.value:\n B, N, T, H = query_shape\n _, _, S, _ = key_shape\n output_layout = (3, 2, 1, 0)\n output_transpose_perm = mlir.dense_int_array((0, 1, 2, 3))\n else:\n B, T, N, H = query_shape\n _, S, _, _ = key_shape\n output_layout = (3, 1, 2, 0)\n output_transpose_perm = mlir.dense_int_array((0, 2, 1, 3))\n\n output_shape = (B, N, T, H)\n softmax_stat_shape = (B, N, T)\n workspace_shape = (0,)\n amax_shape = (1,1,1,1)\n workspace_type = ir.IntegerType.get_unsigned(8)\n mask_type = MaskType.CAUSAL if use_causal_mask else MaskType.NO_MASK\n backend_config = create_dot_product_attention_fp8_backend_config(\n B, N, T, S, ir.BF16Type.get(), # query_type.element_type,\n scale, mask_type, layout, is_bwd=False,\n )\n\n operands = [query, key, value, descale_q, descale_k, descale_v, descale_s, scale_s, scale_o]\n custom_call_name = get_fp8_custom_call_name(is_bwd=False)\n\n if is_training:\n result_types = [\n ir.RankedTensorType.get(output_shape, query_type.element_type),\n ir.RankedTensorType.get((1,1,1,1), ir.F32Type.get()),\n ir.RankedTensorType.get((1,1,1,1), ir.F32Type.get()),\n ir.RankedTensorType.get(softmax_stat_shape, ir.F32Type.get()),\n ir.RankedTensorType.get(workspace_shape, workspace_type),\n ]\n result_layouts = [output_layout] + default_layouts(amax_shape, amax_shape, softmax_stat_shape, workspace_shape)\n else:\n result_types = [\n ir.RankedTensorType.get(output_shape, query_type.element_type),\n ir.RankedTensorType.get((1,1,1,1), ir.F32Type.get()),\n ir.RankedTensorType.get((1,1,1,1), ir.F32Type.get()),\n ir.RankedTensorType.get(workspace_shape, workspace_type)\n ]\n result_layouts = [output_layout] + default_layouts(amax_shape, amax_shape, workspace_shape)\n\n operand_shapes = [ir.RankedTensorType(operand.type).shape for operand in operands[:3]]\n operand_shapes += [[1, 1, 1, 1]] * 6\n operand_layouts = default_layouts(*operand_shapes)\n out = mlir.custom_call(\n custom_call_name,\n result_types=result_types,\n operands=operands,\n backend_config=backend_config,\n operand_layouts=operand_layouts,\n result_layouts=result_layouts,\n )\n\n if is_training:\n return [hlo.transpose(out.results[0], output_transpose_perm), out.results[1], out.results[2], out.results[3]]\n else:\n return [hlo.transpose(out.results[0], output_transpose_perm), out.results[1], out.results[2]]\n\n\n\ndef _dot_product_attention_fp8_bwd_cuda_lowering(\n ctx, query, key, value, fwd_output, grad_output, activation,\n descale_q, descale_k, descale_v, descale_o, descale_dO, descale_s,\n descale_dP, scale_s, scale_dQ, scale_dK, scale_dV, scale_dP, scale,\n use_causal_mask, layout):\n query_type = ir.RankedTensorType(query.type)\n query_shape = query_type.shape\n key_type = ir.RankedTensorType(key.type)\n key_shape = key_type.shape\n value_type = ir.RankedTensorType(value.type)\n\n if layout == AttentionLayout.BNTH.value:\n B, q_N, T, H = query_shape\n _, k_N, S, _ = key_shape\n grad_layout = (3, 2, 1, 0)\n grad_transpose_perm = mlir.dense_int_array((0, 1, 2, 3))\n else:\n B, T, q_N, H = query_shape\n _, S, k_N, _ = key_shape\n grad_layout = (3, 1, 2, 0)\n grad_transpose_perm = mlir.dense_int_array((0, 2, 1, 3))\n\n workspace_shape = (0,)\n workspace_type = ir.IntegerType.get_unsigned(8)\n amax_shape = (1,1,1,1)\n\n grad_query_shape = (B, q_N, T, H)\n grad_key_shape = (B, k_N, S, H)\n grad_value_shape = (B, k_N, S, H)\n mask_type = MaskType.CAUSAL if use_causal_mask else MaskType.NO_MASK\n\n backend_config = create_dot_product_attention_fp8_backend_config(\n B, q_N, T, S, ir.BF16Type.get(),\n scale, mask_type, layout, is_bwd=True,\n )\n\n operands = [\n query,\n key,\n value,\n fwd_output,\n grad_output,\n activation,\n descale_q,\n descale_k,\n descale_v,\n descale_o,\n descale_dO,\n descale_s,\n descale_dP,\n scale_s,\n scale_dQ,\n scale_dK,\n scale_dV,\n scale_dP,\n ]\n\n custom_call_name = get_fp8_custom_call_name(is_bwd=True)\n\n result_types = [\n ir.RankedTensorType.get(grad_query_shape, query_type.element_type),\n ir.RankedTensorType.get(grad_key_shape, key_type.element_type),\n ir.RankedTensorType.get(grad_value_shape, value_type.element_type),\n ir.RankedTensorType.get(amax_shape, ir.F32Type.get()),\n ir.RankedTensorType.get(amax_shape, ir.F32Type.get()),\n ir.RankedTensorType.get(amax_shape, ir.F32Type.get()),\n ir.RankedTensorType.get(amax_shape, ir.F32Type.get()),\n ]\n result_layouts = [grad_layout, grad_layout, grad_layout] + default_layouts(amax_shape, amax_shape, amax_shape, amax_shape)\n\n result_types.append(ir.RankedTensorType.get(workspace_shape, workspace_type))\n result_layouts = result_layouts + default_layouts(workspace_shape)\n out = mlir.custom_call(\n custom_call_name,\n result_types=result_types,\n operands=operands,\n backend_config=backend_config,\n operand_layouts=default_layouts(\n *[ir.RankedTensorType(operand.type).shape for operand in operands]),\n result_layouts=result_layouts,\n )\n dqkv_amaxs = (hlo.transpose(out.results[0], grad_transpose_perm),\n hlo.transpose(out.results[1], grad_transpose_perm),\n hlo.transpose(out.results[2], grad_transpose_perm),\n out.results[3], out.results[4], out.results[5], out.results[6])\n # Only keep dQ, dK, dV, amax_dQ, amax_dK, amax_dV, amax_dP here\n return dqkv_amaxs\n\ndef _dot_product_attention_fp8_fwd_batcher(\n batched_args, batch_dims, *, scale, use_causal_mask, layout, is_training):\n _check_valid_batch_dims(batch_dims)\n query, key, value,\\n descale_q, descale_k, descale_v, descale_s, scale_s, scale_o, = batched_args\n query_bdim = batch_dims[0]\n if is_training:\n out_bdims = query_bdim, query_bdim\n else:\n out_bdims = (query_bdim,)\n\n if layout == AttentionLayout.BNTH.value:\n *Bs, N, T, _ = query.shape\n *_, _, S, _ = key.shape\n else:\n *Bs, T, N, _ = query.shape\n *_, S, _, _ = key.shape\n B = math.prod(Bs)\n\n # reshape to 4D shape\n query = jnp.reshape(query, (B,) + query.shape[-3:])\n key = jnp.reshape(key, (B,) + key.shape[-3:])\n value = jnp.reshape(value, (B,) + key.shape[-3:])\n\n outputs = _dot_product_attention_fp8_fwd_p_wrapper.bind(\n query, key, value, descale_q, descale_k, descale_v, descale_s, scale_s, scale_o,\n scale=scale, use_causal_mask=use_causal_mask, layout=layout, is_training=is_training)\n\n # reshape to original shape\n output, amax_s, amax_o = outputs[0], outputs[1], outputs[2]\n output = jnp.reshape(output, query.shape)\n if is_training:\n activation = outputs[3]\n activation = jnp.reshape(activation, (*Bs, N, T))\n return (output, amax_s, amax_o, activation), out_bdims\n else:\n return (output, amax_s, amax_o), out_bdims\n\ndef _dot_product_attention_fp8_bwd_batcher(\n batched_args, batch_dims, *, scale, use_causal_mask, layout):\n _check_valid_batch_dims(batch_dims)\n query, key, value, fwd_output, grad_output, activation,\\n descale_q, descale_k, descale_v, descale_o, descale_dO, descale_s, descale_dP,\\n scale_s, scale_dQ, scale_dK, scale_dV, scale_dP = batched_args\n query_bdim = batch_dims[0]\n out_bdims = query_bdim, query_bdim, query_bdim\n\n if layout == AttentionLayout.BNTH.value:\n *Bs, N, T, _ = query.shape\n *_, _, S, _ = key.shape\n else:\n *Bs, T, N, _ = query.shape\n *_, S, _, _ = key.shape\n B = math.prod(Bs)\n\n # reshape to 4D shape\n query = jnp.reshape(query, (B,) + query.shape[-3:])\n key = jnp.reshape(key, (B,) + key.shape[-3:])\n value = jnp.reshape(value, (B,) + key.shape[-3:])\n\n activation = jnp.reshape(activation, (B, N, T))\n fwd_output = jnp.reshape(fwd_output, (B,) + query.shape[-3:])\n grad_output = jnp.reshape(grad_output, (B,) + query.shape[-3:])\n\n grads = _dot_product_attention_fp8_bwd_p_wrapper.bind(\n query, key, value, fwd_output, grad_output, activation,\n descale_q, descale_k, descale_v, descale_o, descale_dO, descale_s, descale_dP, scale_s, scale_dQ, scale_dK, scale_dV, scale_dP,\n scale=scale, use_causal_mask=use_causal_mask, layout=layout,\n )\n\n grad_query, grad_key, grad_value = grads[:3]\n # reshape to original shape\n grad_query = jnp.reshape(grad_query, query.shape)\n grad_key = jnp.reshape(grad_key, key.shape)\n grad_value = jnp.reshape(grad_value, value.shape)\n\n return grads, out_bdims\n\ndef _infer_fp8_fwd_output_sharding(mesh, arg_shapes, is_training, layout):\n # Prepare variadic_args for the original function\n has_bias = False # Adjust as needed\n variadic_args = (has_bias, None) # Dummy value, adjust as necessary\n\n # Call the original function with the required parameters\n output_sharding = _infer_fwd_output_sharding(mesh, arg_shapes, variadic_args, is_training, layout)\n amax_sharding = NamedSharding(mesh, PartitionSpec())\n if is_training:\n out_sharding, activation_sharding = output_sharding[0], output_sharding[1]\n return [out_sharding, amax_sharding, amax_sharding, activation_sharding]\n return output_sharding + [amax_sharding, amax_sharding]\n\n_dot_product_attention_fp8_fwd_lower = custom_partitioning(\n _dot_product_attention_fp8_fwd_impl, static_argnums=(9, 10, 11, 12))\n\ndef _dot_product_attention_fp8_fwd_infer_sharding_from_operands(\n scale, use_causal_mask, layout, is_training,\n mesh, arg_shapes, result_shape):\n return _infer_fp8_fwd_output_sharding(mesh, arg_shapes, is_training, layout)\n\ndef _dot_product_attention_fp8_fwd_partition(\n scale, use_causal_mask, layout, is_training,\n mesh, arg_shapes, result_shape):\n # args sharding\n arg_shardings = tuple(arg_i.sharding for arg_i in arg_shapes)\n out_shardings = _infer_fp8_fwd_output_sharding(\n mesh, arg_shapes, is_training, layout)\n impl = functools.partial(\n _dot_product_attention_fp8_fwd_impl, scale=scale, use_causal_mask=use_causal_mask,\n layout=layout, is_training=is_training)\n return mesh, impl, out_shardings, arg_shardings\n\ndef _infer_fp8_bwd_output_sharding(mesh, arg_shapes, layout):\n # Prepare variadic_args for the original function\n has_bias = False # Adjust as needed\n has_dbias = False # Adjust as needed\n variadic_args = (has_bias, has_dbias) # Dummy value, adjust as necessary\n\n # Call the original function with the required parameters\n output_shardings = _infer_bwd_output_sharding(mesh, arg_shapes, layout, variadic_args)\n\n # Prepare amax_sharding\n amax_sharding = NamedSharding(mesh, PartitionSpec()) # Use a default spec or adjust as needed\n\n # Append amax_sharding for each output sharding\n out_shardings_with_amax = output_shardings + [amax_sharding] * 4\n\n return out_shardings_with_amax\n\n_dot_product_attention_fp8_bwd_lower = custom_partitioning(\n _dot_product_attention_fp8_bwd_impl, static_argnums=(18,19,20)\n)\n\ndef _dot_product_attention_fp8_bwd_infer_sharding_from_operands(\n scale, use_causal_mask, layout, mesh,\n arg_shapes, result_shape):\n return _infer_fp8_bwd_output_sharding(mesh, arg_shapes, layout)\n\ndef _dot_product_attention_fp8_bwd_partition(\n scale, use_causal_mask, layout, mesh,\n arg_shapes, result_shape):\n out_shardings = _infer_fp8_bwd_output_sharding(mesh, arg_shapes, layout)\n # args sharding\n arg_shardings = tuple(arg_i.sharding for arg_i in arg_shapes)\n impl = functools.partial(\n _dot_product_attention_fp8_bwd_impl, scale=scale,\n use_causal_mask=use_causal_mask, layout=layout\n )\n return mesh, impl, out_shardings, arg_shardings\n\n# Create dot_product_attention_fp8_fwd_p for forward operation.\n_dot_product_attention_fp8_fwd_p = core.Primitive(""dot_product_attention_fp8_fwd"")\n_dot_product_attention_fp8_fwd_p.multiple_results = True\n_dot_product_attention_fp8_fwd_p.def_impl(\n functools.partial(dispatch.apply_primitive, _dot_product_attention_fp8_fwd_p)\n)\n_dot_product_attention_fp8_fwd_p.def_abstract_eval(\n _dot_product_attention_fp8_fwd_abstract\n)\n\nmlir.register_lowering(\n _dot_product_attention_fp8_fwd_p,\n _dot_product_attention_fp8_fwd_cuda_lowering,\n platform=""cuda"",\n)\n\n_dot_product_attention_fp8_fwd_p_wrapper = core.Primitive(\n ""dot_product_attention_fp8_fwd_wrapper""\n)\n_dot_product_attention_fp8_fwd_p_wrapper.multiple_results = True\n_dot_product_attention_fp8_fwd_p_wrapper.def_impl(_dot_product_attention_fp8_fwd_impl)\n_dot_product_attention_fp8_fwd_p_wrapper.def_abstract_eval(\n _dot_product_attention_fp8_fwd_abstract\n)\n\n# Create dot_product_attention_bwd_p for backward operation.\n_dot_product_attention_fp8_bwd_p = core.Primitive(""dot_product_attention_fp8_bwd"")\n_dot_product_attention_fp8_bwd_p.multiple_results = True\n_dot_product_attention_fp8_bwd_p.def_impl(\n functools.partial(dispatch.apply_primitive, _dot_product_attention_fp8_bwd_p)\n)\n_dot_product_attention_fp8_bwd_p.def_abstract_eval(\n _dot_product_attention_fp8_bwd_abstract\n)\n\nmlir.register_lowering(\n _dot_product_attention_fp8_bwd_p,\n _dot_product_attention_fp8_bwd_cuda_lowering,\n platform=""cuda"",\n)\n\n_dot_product_attention_fp8_bwd_p_wrapper = core.Primitive(\n ""dot_product_attention_fp8_bwd_wrapper""\n)\n_dot_product_attention_fp8_bwd_p_wrapper.multiple_results = True\n_dot_product_attention_fp8_bwd_p_wrapper.def_impl(_dot_product_attention_fp8_bwd_impl)\n_dot_product_attention_fp8_bwd_p_wrapper.def_abstract_eval(\n _dot_product_attention_fp8_bwd_abstract\n)\n\nbatching.primitive_batchers[\n _dot_product_attention_fp8_fwd_p_wrapper\n] = _dot_product_attention_fp8_fwd_batcher\nbatching.primitive_batchers[\n _dot_product_attention_fp8_bwd_p_wrapper\n] = _dot_product_attention_fp8_bwd_batcher\n\n_dot_product_attention_fp8_fwd_lower.def_partition(\n infer_sharding_from_operands=_dot_product_attention_fp8_fwd_infer_sharding_from_operands,\n partition=_dot_product_attention_fp8_fwd_partition)\n\nmlir.register_lowering(_dot_product_attention_fp8_fwd_p_wrapper,\n mlir.lower_fun(_dot_product_attention_fp8_fwd_lower, multiple_results=True))\n\n_dot_product_attention_fp8_bwd_lower.def_partition(\n infer_sharding_from_operands=_dot_product_attention_fp8_bwd_infer_sharding_from_operands,\n partition=_dot_product_attention_fp8_bwd_partition)\n\nmlir.register_lowering(_dot_product_attention_fp8_bwd_p_wrapper,\n mlir.lower_fun(_dot_product_attention_fp8_bwd_lower, multiple_results=True))\n\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_fp8_fwd_p\n)\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_fp8_fwd_p_wrapper\n)\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_fp8_bwd_p\n)\ndispatch.prim_requires_devices_during_lowering.add(\n _dot_product_attention_fp8_bwd_p_wrapper\n)\n\n@functools.partial(jax.custom_vjp, nondiff_argnums=(4, 5, 6, 7))\ndef _dot_product_attention_fp8(query: Array,\n key: Array,\n value: Array,\n fp8_params: dict[str, Array],\n scale: float,\n use_causal_mask: bool,\n layout: int,\n cudnn_version: int):\n output, amax_s, amax_o = _dot_product_attention_fp8_fwd(\n query, key, value, params_from_keys(fp8_params, fp8_params_keys_fwd),\n scale, use_causal_mask, layout, cudnn_version\n )\n return output, amax_s, amax_o\n\n_dot_product_attention_fp8.defvjp(_dot_product_attention_fp8_fwd_rule, _dot_product_attention_fp8_bwd_rule)\n\ndef combine_bias_and_mask(bias, mask, dtype):\n if bias is not None:\n # reshape bias to have 4D shape\n bias = bias.reshape((1,) * (4 - len(bias.shape)) + bias.shape)\n\n if mask is not None:\n if mask.dtype == jnp.bool:\n large_negative_number = get_large_negative_number(dtype)\n mask = jnp.where(mask, jnp.asarray(0, dtype), large_negative_number)\n # reshape mask to have 4D shape\n mask = mask.reshape((1,) * (4 - len(mask.shape)) + mask.shape) # type: ignore[union-attr]\n\n # combine bias and mask\n if bias is None:\n bias = mask\n else:\n if mask is not None:\n # should be broadcast to same shape\n bias = bias + mask\n return bias\n\n# User interface\ndef paged_attention(\n query: Array,\n key: Array,\n value: Array,\n q_seqlen: Array,\n kv_seqlen: Array,\n page_table_k: Array,\n page_table_v: Array,\n bias: Array | None = None,\n mask: Array | None = None,\n fp8_params: FP8Params | None = None,\n *,\n scale: float = 1.0,\n mask_type: MaskType = MaskType.NO_MASK,\n seed: int = 42,\n dropout_rate: float = 0.,\n qkv_layout: str = ""BTNH"",\n sliding_window_length: int | None = None,\n use_fp8: bool = False,\n return_residual: bool = False\n):\n """"""Computes paged attention described in https://arxiv.org/pdf/2309.06180.\n\n B = batch size\n S = length of the key/value (source)\n T = length of the query (target)\n N = number of attention heads\n H = dimensions of each attention head.\n\n Args:\n query: Queries for attention calculation with a shape of BTNH or BNTH.\n key: Keys for attention calculation with a shape of\n [num_blocks, block_size, N, H] or [num_blocks, N, block_size, H] where\n num_blocks = B * Ceil(S / block_size).\n value: Values to be used in attention with a shape of\n [num_blocks, block_size, N, H] or [num_blocks, N, block_size, H] where\n num_blocks = B * Ceil(S / block_size).\n q_seqlen: Non padded sequence length of query with a shape of B.\n kv_seqlen: Non padded sequence length of key and value with a shape of B.\n page_table_k: page table for key of shape [B, 1, num_blocks_per_batch, 1]\n where num_blocks_per_batch = Ceil(S / block_size).\n page_table_v: page table for value of shape [B, 1, num_blocks_per_batch, 1]\n where num_blocks_per_batch = Ceil(S / block_size).\n bias: Bias to be added to logits with a shape of BNTS.\n mask: Mask used to filter out logits with a shape of BNTS.\n scale: Scale for the query.\n qkv_layout: Layout string, with supported formats being BTNH, BNTH, BSNH,\n BNSH.\n sliding_window_length: Window size to make attention only attend to each\n token's left local window (pos - sliding_window_length, pos] where `pos`\n is the index of each token. E.g., if sliding_window_length == 3 and the\n sequence is [0, 1, 2, 3, c, 4, 5], token `c` can attend to [4, 5, c].\n use_fp8: Whether to use FP8 attention mechanism.\n return_residual: Whether to return the logsumexp tensor of shape BTN\n or BNT to users. See section 3.1.1 in the FlashAttention-2 paper:\n https://arxiv.org/pdf/2307.08691 to find the definition of logsumexp.\n Returns:\n output: the same shape as the query.\n residual: the logsumexp tensor if return_residual=True. (non fp8)\n """"""\n cudnn_version = check_cudnn_version()\n layout = _normalize_layout(qkv_layout)\n if use_fp8:\n raise ValueError(""Paged attention doesn't support fp8 for now."")\n if has_padding(mask_type) and (q_seqlen is None or kv_seqlen is None):\n raise ValueError(""Require q_seqlen and kv_seqlen to generate padding mask."")\n if sliding_window_length is not None and sliding_window_length <= 0:\n raise ValueError(\n f""Require sliding_window_length > 0, got {sliding_window_length}."")\n\n bias = combine_bias_and_mask(bias, mask, query.dtype)\n # check if input shape and data type is compatiable\n check_layout(query, key, value, bias, q_seqlen, kv_seqlen, None, None,\n page_table_k, page_table_v, layout)\n has_bias = bias is not None\n has_dbias = has_bias and \\n should_export_dbias(bias.shape, query.shape, layout) # type: ignore[union-attr]\n variadic_args = (has_bias, has_dbias)\n\n _not_used = jnp.zeros(0, dtype=query.dtype)\n if bias is None:\n bias = _not_used\n\n output = _dot_product_attention(\n query, key, value, bias, q_seqlen, kv_seqlen, _not_used, _not_used,\n page_table_k, page_table_v, scale, seed, dropout_rate, variadic_args,\n mask_type, layout.value, sliding_window_length, cudnn_version,\n return_residual)\n return output\n\n\ndef dot_product_attention(\n query: Array,\n key: Array,\n value: Array,\n bias: Array | None = None,\n mask: Array | None = None,\n q_seqlen: Array | None = None,\n kv_seqlen: Array | None = None,\n q_offsets: Array | None = None,\n kv_offsets: Array | None = None,\n fp8_params: FP8Params | None = None,\n *,\n scale: float = 1.0,\n mask_type: MaskType = MaskType.NO_MASK,\n seed: int = 42,\n dropout_rate: float = 0.,\n qkv_layout: str = ""BTNH"",\n sliding_window_length: int | None = None,\n use_fp8: bool = False,\n return_residual: bool = False\n):\n """"""Computes dot-product attention given query (Q), key (K), and value (V).\n\n This function serves as the core operation for applying attention\n mechanisms as described in the paper [https://arxiv.org/abs/1706.03762].\n Initially, it determines the attention weights by processing Q and K,\n subsequently combining the outcomes using K. Throughout this function, we\n utilize the following uppercase letters to represent specific parameters of\n array:\n\n B = batch size\n S = length of the key/value (source)\n T = length of the query (target)\n N = number of attention heads\n H = dimensions of each attention head.\n\n The supported layouts for Q, K, V are either BT(S)NH or BNT(S)H, and they must\n adhere to the same layout. The output layout remains consistent with Q,\n defaulting to BT(S)NH.\n\n Args:\n query: Queries for attention calculation with a shape of BTNH or BNTH.\n key: Keys for attention calculation with a shape of BSNH or BNSH.\n value: Values to be used in attention with a shape of BSNH or BNSH.\n bias: Bias to be added to logits with a shape of BNTS.\n mask: Mask used to filter out logits with a shape of BNTS.\n q_seqlen: Non padded sequence length of query with a shape of B.\n If q_offsets is set, q_seqlen should have shape [B,M] where M is the\n maximum number of segments per batch. For batch that has less segments\n than maximum segments, fill the padded entries with -1.\n kv_seqlen: Non padded sequence length of key and value with a shape of B.\n If kv_offsets is set, kv_seqlen should have shape [B,M] where M is the\n maximum number of segments per batch. For batch that has less segments\n than maximum segments, fill the padded entries with -1.\n q_offsets: offset of each segment packed in query with a shape of [B,M+1]\n where M is the maximum number of segments per batch. For batch that has\n less segments than maximum segments, fill the padded entries with -1.\n E.g, if 2 batches has 3 and 2 segments respectively, each segment has\n size 1, q_offsets = [[0,1,2,-1], [0,1,-1,-1]]. q_seqlen should be set\n to indicate the size of each segment.\n kv_offsets: offset of each segment packed in key with a shape of [B,M+1]\n where M is the maximum number of segments per batch. For batch that has\n less segments than maximum segments, fill the padded entries with -1.\n E.g, if 2 batches has 3 and 2 segments respectively, each segment has\n size 1, kv_offsets = [[0,1,2,-1], [0,1,-1,-1]]. kv_seqlen should be set\n to indicate the size of each segment.\n scale: Scale for the query.\n dropout_rate: Dropout rate.\n qkv_layout: Layout string, with supported formats being BTNH, BNTH, BSNH,\n BNSH.\n sliding_window_length: Window size to make attention only attend to each\n token's left local window (pos - sliding_window_length, pos] where `pos`\n is the index of each token. E.g., if sliding_window_length == 3 and the\n sequence is [0, 1, 2, 3, c, 4, 5], token `c` can attend to [4, 5, c].\n use_fp8: Whether to use FP8 attention mechanism.\n return_residual: Whether to return the logsumexp tensor of shape BTN\n or BNT to users. See section 3.1.1 in the FlashAttention-2 paper:\n https://arxiv.org/pdf/2307.08691 to find the definition of logsumexp.\n Returns:\n output: the same shape as the query.\n residual: the logsumexp tensor if return_residual=True. (non fp8)\n amax_s: amax of state. (fp8 only)\n amax_o: amax of output. (fp8 only)\n """"""\n # TODO(b/380898464): Check the compute capability, e.g., require GPU device,\n # in the kernel implementation (c++) code.\n cudnn_version = check_cudnn_version()\n layout = _normalize_layout(qkv_layout)\n\n if use_fp8:\n if fp8_params is None:\n raise ValueError(""fp8_params should not be None."")\n if mask_type not in (MaskType.NO_MASK, MaskType.CAUSAL):\n raise ValueError(""Only NO_MASK or CAUSAL masks are supported for fp8."")\n if not all(x is None for x in [bias, mask, q_seqlen, kv_seqlen]):\n raise ValueError(\n f""Expected 'None' for bias, mask, q_seqlen, and kv_seqlen, ""\n f""but got: bias={bias}, mask={mask}, q_seqlen={q_seqlen}, kv_seqlen={kv_seqlen}""\n )\n check_fp8_params(fp8_params)\n check_layout(query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n None, None, layout)\n output, amax_s, amax_o = _dot_product_attention_fp8(\n query, key, value, fp8_params,\n scale, mask_type == MaskType.CAUSAL, layout.value, cudnn_version\n )\n return output, amax_s, amax_o\n else:\n if has_padding(mask_type) and (q_seqlen is None or kv_seqlen is None):\n raise ValueError(""Require q_seqlen and kv_seqlen to generate padding mask"")\n if sliding_window_length is not None and sliding_window_length <= 0:\n raise ValueError(\n f""Require sliding_window_length > 0, got {sliding_window_length}"")\n if q_offsets is not None and (q_seqlen is None or kv_seqlen is None):\n raise ValueError(""Require q_seqlen and kv_seqlen to use packed layout"")\n\n bias = combine_bias_and_mask(bias, mask, query.dtype)\n # check if input shape and data type is compatiable\n check_layout(query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n None, None, layout)\n has_bias = bias is not None\n has_dbias = has_bias and \\n should_export_dbias(bias.shape, query.shape, layout) # type: ignore[union-attr]\n variadic_args = (has_bias, has_dbias)\n\n _not_used = jnp.zeros(0, dtype=query.dtype)\n if bias is None:\n bias = _not_used\n if q_seqlen is None:\n q_seqlen = _not_used\n if kv_seqlen is None:\n kv_seqlen = _not_used\n if q_offsets is None:\n q_offsets = _not_used\n if kv_offsets is None:\n kv_offsets = _not_used\n\n output = _dot_product_attention(\n query, key, value, bias, q_seqlen, kv_seqlen, q_offsets, kv_offsets,\n _not_used, _not_used, scale, seed, dropout_rate, variadic_args,\n mask_type, layout.value, sliding_window_length, cudnn_version,\n return_residual)\n return output\n",python,tab
+2,337,"extension-output-pdoom-org.crowd-code-#1-crowd-code",0,0,"6:59:28 AM [info] Activating crowd-code\n6:59:28 AM [info] Recording started\n6:59:28 AM [info] Initializing git provider using file system watchers...\n",Log,tab
+3,637,"extension-output-pdoom-org.crowd-code-#1-crowd-code",150,0,"6:59:28 AM [info] Git repository found\n6:59:28 AM [info] Git provider initialized successfully\n6:59:29 AM [info] Initial git state: [object Object]\n",Log,content
+4,175136,".venv/lib/python3.10/site-packages/jax/_src/cudnn/fused_attention_stablehlo.py",0,0,"",python,tab
+5,237672,".venv/lib/python3.10/site-packages/jax/_src/cudnn/fused_attention_stablehlo.py",12124,0,"",python,selection_command
+6,238004,".venv/lib/python3.10/site-packages/jax/_src/cudnn/fused_attention_stablehlo.py",12107,19,"",python,content
+7,238080,".venv/lib/python3.10/site-packages/jax/_src/cudnn/fused_attention_stablehlo.py",12113,0,"",python,selection_command
+8,239005,".venv/lib/python3.10/site-packages/jax/_src/cudnn/fused_attention_stablehlo.py",12084,0,"",python,selection_command
+9,239210,".venv/lib/python3.10/site-packages/jax/_src/cudnn/fused_attention_stablehlo.py",12054,0,"",python,selection_command
diff --git a/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-14c33a6c-d06d-421b-aaef-66e0673e81a31753986093740-2025_07_31-20.21.52.136/source.csv b/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-14c33a6c-d06d-421b-aaef-66e0673e81a31753986093740-2025_07_31-20.21.52.136/source.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e24a4a40ecb7fa6d42ca6f6abddb3063e1506d42
--- /dev/null
+++ b/1f15334ab7e6820c9fda17c961659882ef9853cc80f7356b9a9b22f286fd7389/crowd-code-14c33a6c-d06d-421b-aaef-66e0673e81a31753986093740-2025_07_31-20.21.52.136/source.csv
@@ -0,0 +1,11258 @@
+Sequence,Time,File,RangeOffset,RangeLength,Text,Language,Type
+1,2,"utils/nn.py",0,0,"import math\nfrom typing import Tuple, Callable\n\nfrom flax import nnx\nimport jax\nimport jax.numpy as jnp\nimport einops\n\n\nclass PositionalEncoding(nnx.Module):\n """"""https://uvadlc-notebooks.readthedocs.io/en/latest/tutorial_notebooks/JAX/tutorial6/Transformers_and_MHAttention.html""""""\n\n def __init__(self, d_model: int, max_len: int = 5000):\n self.d_model = d_model\n self.max_len = max_len\n\n pe = jnp.zeros((self.max_len, self.d_model))\n position = jnp.arange(0, self.max_len, dtype=jnp.float32)[:, None]\n div_term = jnp.exp(\n jnp.arange(0, self.d_model, 2) * (-math.log(10000.0) / self.d_model)\n )\n pe = pe.at[:, 0::2].set(jnp.sin(position * div_term))\n pe = pe.at[:, 1::2].set(jnp.cos(position * div_term))\n self.pe = nnx.Variable(pe)\n\n def __call__(self, x: jax.Array) -> jax.Array:\n x = x + self.pe[: x.shape[2]]\n return x\n\n\nclass STBlock(nnx.Module):\n def __init__(\n self,\n dim: int,\n ffn_dim: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.dim = dim\n self.ffn_dim = ffn_dim\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.spatial_pos_enc = PositionalEncoding(self.dim)\n self.spatial_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.spatial_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.dim,\n qkv_features=self.dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=False\n ),\n rngs=rngs,\n decode=False,\n )\n\n self.temporal_pos_enc = PositionalEncoding(self.dim)\n self.temporal_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.temporal_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.dim,\n qkv_features=self.dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=True\n ),\n rngs=rngs,\n decode=False,\n )\n\n self.ffn_norm = nnx.LayerNorm(\n num_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_dense1 = nnx.Linear(\n in_features=self.dim,\n out_features=self.ffn_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_dense2 = nnx.Linear(\n in_features=self.ffn_dim,\n out_features=self.dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n @nnx.remat\n def __call__(self, x_BTNM: jax.Array) -> jax.Array:\n # --- Spatial attention ---\n z_BTNM = self.spatial_pos_enc(x_BTNM)\n z_BTNM = self.spatial_norm(z_BTNM)\n z_BTNM = self.spatial_attention(z_BTNM)\n x_BTNM = x_BTNM + z_BTNM\n\n # --- Temporal attention ---\n x_BNTM = x_BTNM.swapaxes(1, 2)\n z_BNTM = self.temporal_pos_enc(x_BNTM)\n z_BNTM = self.temporal_norm(z_BNTM)\n z_BNTM = self.temporal_attention(z_BNTM)\n x_BNTM = x_BNTM + z_BNTM\n x_BTNM = x_BNTM.swapaxes(1, 2)\n\n # --- Feedforward ---\n z_BTNM = self.ffn_norm(x_BTNM)\n z_BTND = self.ffn_dense1(z_BTNM)\n z_BTND = jax.nn.gelu(z_BTND)\n z_BTNM = self.ffn_dense2(z_BTND)\n x_BTNM = x_BTNM + z_BTNM\n\n return x_BTNM\n\n\nclass STTransformer(nnx.Module):\n """"""\n Dimension keys:\n B: batch size\n T: number of frames\n N: number of patches per frame\n I: number of input features\n M: model dimension\n D: FFN dimension\n O: number of output features\n """"""\n def __init__(\n self,\n input_dim: int,\n model_dim: int,\n ffn_dim: int,\n out_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.input_dim = input_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.out_dim = out_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.input_norm1 = nnx.LayerNorm(\n num_features=self.input_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_dense = nnx.Linear(\n in_features=self.input_dim,\n out_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_norm2 = nnx.LayerNorm(\n num_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n self.blocks = []\n for _ in range(self.num_blocks):\n self.blocks.append(\n STBlock(\n dim=self.model_dim,\n ffn_dim=self.ffn_dim,\n num_heads=self.num_heads,\n dropout=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n )\n\n self.output_dense = nnx.Linear(\n in_features=self.model_dim,\n out_features=self.out_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(self, x_BTNI: jax.Array) -> jax.Array:\n x_BTNI = self.input_norm1(x_BTNI)\n x_BTNM = self.input_dense(x_BTNI)\n x_BTNM = self.input_norm2(x_BTNM)\n\n for block in self.blocks:\n x_BTNM = block(x_BTNM)\n\n x_BTNO = self.output_dense(x_BTNM)\n return x_BTNO\n\nclass TransformerBlock(nnx.Module):\n def __init__(\n self,\n model_dim: int,\n ffn_dim: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n decode: bool,\n rngs: nnx.Rngs,\n ):\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.temporal_pos_enc = PositionalEncoding(self.model_dim)\n self.spatial_pos_enc = PositionalEncoding(self.model_dim)\n self.temporal_norm = nnx.LayerNorm(\n num_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.spatial_norm = nnx.LayerNorm(\n num_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_norm = nnx.LayerNorm(\n num_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.temporal_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.model_dim,\n qkv_features=self.model_dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=True\n ),\n rngs=rngs,\n decode=decode,\n )\n self.spatial_attention = nnx.MultiHeadAttention(\n num_heads=self.num_heads,\n in_features=self.model_dim,\n qkv_features=self.model_dim,\n dropout_rate=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n attention_fn=_create_flash_attention_fn(\n self.use_flash_attention, is_causal=True\n ),\n rngs=rngs,\n decode=decode,\n )\n self.ffn_dense1 = nnx.Linear(\n in_features=self.model_dim,\n out_features=self.ffn_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.ffn_dense2 = nnx.Linear(\n in_features=self.ffn_dim,\n out_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n @nnx.remat\n def __call__(self, x_BTNM: jax.Array) -> jax.Array:\n # FIXME (f.srambical): this is exactly the same as STBlock (except for the positional encoding)\n # --- Spatial attention ---\n _, T, N, _ = x_BTNM.shape\n z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)\n z_BTNM = einops.rearrange(z_FNM, ""(b t) n m -> b t n m"", t=T)\n x_BTNM = x_BTNM + z_BTNM\n # --- Temporal attention ---\n z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)\n z_BTNM = einops.rearrange(z_PTM, ""(b n) t m -> b t n m"", n=N)\n x_BTNM = x_BTNM + z_BTNM\n # --- Feedforward ---\n z_BTNM = self.ffn_norm(x_BTNM)\n z_BTND = self.ffn_dense1(z_BTNM)\n z_BTND = jax.nn.gelu(z_BTND)\n z_BTNM = self.ffn_dense2(z_BTND)\n x_BTNM = x_BTNM + z_BTNM\n\n return x_BTNM\n\nclass Transformer(nnx.Module):\n """"""\n Dimension keys:\n B: batch size\n T: number of frames\n N: number of patches per frame\n I: number of input features\n M: model dimension\n D: FFN dimension\n O: number of output features\n F: number of frames in batch\n P: number of patch positions in batch\n """"""\n def __init__(\n self,\n input_dim: int,\n model_dim: int,\n ffn_dim: int,\n out_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n decode: bool,\n rngs: nnx.Rngs,\n ):\n self.input_dim = input_dim\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.out_dim = out_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.pos_enc = PositionalEncoding(self.model_dim)\n self.input_norm1 = nnx.LayerNorm(\n num_features=self.input_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_dense = nnx.Linear(\n in_features=self.input_dim,\n out_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n self.input_norm2 = nnx.LayerNorm(\n num_features=self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n self.blocks = []\n for _ in range(self.num_blocks):\n self.blocks.append(\n TransformerBlock(\n model_dim=self.model_dim,\n ffn_dim=self.ffn_dim,\n num_heads=self.num_heads,\n dropout=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n decode=decode,\n rngs=rngs,\n )\n )\n self.output_dense = nnx.Linear(\n in_features=self.model_dim,\n out_features=self.out_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(self, x_BTNI: jax.Array) -> jax.Array:\n x_BTNI = self.input_norm1(x_BTNI)\n x_BTNM = self.input_dense(x_BTNI)\n x_BTNM = self.input_norm2(x_BTNM)\n x_BTNM = self.pos_enc(x_BTNM)\n\n for block in self.blocks:\n x_BTNM = block(x_BTNM)\n\n x_BTNV = self.output_dense(x_BTNM)\n return x_BTNV\n\ndef normalize(x: jax.Array) -> jax.Array:\n return x / (jnp.linalg.norm(x, ord=2, axis=-1, keepdims=True) + 1e-8)\n\n\nclass VectorQuantizer(nnx.Module):\n """"""\n Dimension keys:\n D: B * T * N\n K: number of latents\n L: latent dimension\n """"""\n def __init__(\n self, latent_dim: int, num_latents: int, dropout: float, rngs: nnx.Rngs\n ):\n self.latent_dim = latent_dim\n self.num_latents = num_latents\n self.dropout = dropout\n\n self.codebook = nnx.Param(\n normalize(\n nnx.initializers.lecun_uniform()(\n rngs.params(), (self.num_latents, self.latent_dim)\n )\n )\n )\n self.drop = nnx.Dropout(self.dropout, rngs=rngs)\n\n def __call__(\n self, x_DL: jax.Array, training: bool\n ) -> Tuple[jax.Array, jax.Array, jax.Array, jax.Array]:\n # --- Compute distances ---\n x_DL = normalize(x_DL)\n normalized_codebook_KL = normalize(self.codebook.value)\n distance_DK = -jnp.matmul(x_DL, normalized_codebook_KL.T)\n if training:\n distance_DK = self.drop(distance_DK)\n\n # --- Get indices and embeddings ---\n indices_D = jnp.argmin(distance_DK, axis=-1)\n z_DL = self.codebook[indices_D]\n\n # --- Straight through estimator ---\n z_q_DL = x_DL + jax.lax.stop_gradient(z_DL - x_DL)\n return z_q_DL, z_DL, x_DL, indices_D\n\n def get_codes(self, indices_E: jax.Array) -> jax.Array:\n return self.codebook[indices_E]\n\n\ndef _create_flash_attention_fn(use_flash_attention: bool, is_causal: bool) -> Callable:\n """"""\n Create an attention function that uses flash attention if enabled.\n\n Flax MultiHeadAttention provides tensors with shape (batch..., length, num_heads, head_dim)\n jax.nn.dot_product_attention expects (batch, length, num_heads, head_dim).\n\n We need to reshape to ensure compatibility. cuDNN's flash attention additionally\n requires a sequence length that is a multiple of 4. We pad the sequence length to the nearest\n multiple of 4 and mask accordingly.\n """"""\n\n def attention_fn(query, key, value, bias=None, mask=None, **kwargs):\n implementation = ""cudnn"" if use_flash_attention else None\n\n def _rearrange(x):\n return einops.rearrange(x, ""... l h d -> (...) l h d"")\n\n def _pad(x):\n return jnp.pad(x, ((0, 0), (0, pad_size), (0, 0), (0, 0)))\n\n def _fuse_masks(mask: jax.Array, attention_mask: jax.Array) -> jax.Array:\n mask_bool = mask.astype(jnp.bool_)\n expanded_mask = jnp.pad(\n mask_bool, ((0, pad_size), (0, pad_size)), constant_values=False\n )\n return jnp.logical_and(attention_mask, expanded_mask)\n\n original_shape = query.shape\n original_seq_len = query.shape[-3]\n\n # Pad to nearest multiple of 4\n target_seq_len = ((original_seq_len + 3) // 4) * 4\n pad_size = target_seq_len - original_seq_len\n\n query_4d = _pad(_rearrange(query))\n key_4d = _pad(_rearrange(key))\n value_4d = _pad(_rearrange(value))\n\n attention_mask = jnp.ones((target_seq_len, target_seq_len), dtype=jnp.bool_)\n attention_mask = attention_mask.at[original_seq_len:, :].set(False)\n attention_mask = attention_mask.at[:, original_seq_len:].set(False)\n\n mask_4d = (\n _fuse_masks(mask, attention_mask) if mask is not None else attention_mask\n )\n mask_4d = mask_4d[jnp.newaxis, jnp.newaxis, :, :] # (1, 1, seq_len, seq_len)\n\n bias_4d = _pad(_rearrange(bias)) if bias is not None else None\n\n # NOTE: jax.nn.dot_product_attention does not support dropout\n output_4d = jax.nn.dot_product_attention(\n query=query_4d,\n key=key_4d,\n value=value_4d,\n bias=bias_4d,\n mask=mask_4d,\n implementation=implementation,\n is_causal=is_causal,\n )\n return output_4d[..., :original_seq_len, :, :].reshape(original_shape)\n\n return attention_fn\n",python,tab
+2,283,"extension-output-pdoom-org.crowd-code-#1-crowd-code",0,0,"8:21:52 PM [info] Activating crowd-code\n8:21:52 PM [info] Recording started\n8:21:52 PM [info] Initializing git provider using file system watchers...\n",Log,tab
+3,407,"extension-output-pdoom-org.crowd-code-#1-crowd-code",150,0,"8:21:52 PM [info] Git repository found\n8:21:52 PM [info] Git provider initialized successfully\n8:21:52 PM [info] Initial git state: [object Object]\n",Log,content
+4,451,"utils/nn.py",0,0,"",python,tab
+5,508,"TERMINAL",0,0,"source /home/franz.srambical/jafar/.venv/bin/activate",,terminal_command
+6,4026,"TERMINAL",0,0,"salloc --gpus=1 --ntasks-per-node=1 --cpus-per-task=1 --mem=100G --time=10:00:00",,terminal_command
+7,4096,"TERMINAL",0,0,"]633;Csalloc: Granted job allocation 14565\r\n",,terminal_output
+8,4195,"TERMINAL",0,0,"salloc: Nodes hai004 are ready for job\r\n",,terminal_output
+9,4602,"TERMINAL",0,0,"Running inside SLURM, Job ID 14565.\r\n",,terminal_output
+10,4685,"TERMINAL",0,0,"]0;franz.srambical@hai-login2:~/jafar[?2004h[franz.srambical@hai004.haicore.berlin:~/jafar] $ ",,terminal_output
+11,8951,"utils/nn.py",9952,0,"",python,selection_command
+12,9124,"utils/nn.py",9899,0,"",python,selection_command
+13,98194,"utils/nn.py",8146,0,"",python,selection_command
+14,98318,"utils/nn.py",6676,0,"",python,selection_command
+15,99306,"utils/nn.py",6718,0,"",python,selection_command
+16,99551,"utils/nn.py",6752,0,"",python,selection_command
+17,99585,"utils/nn.py",6761,0,"",python,selection_command
+18,99614,"utils/nn.py",6795,0,"",python,selection_command
+19,99649,"utils/nn.py",6822,0,"",python,selection_command
+20,99680,"utils/nn.py",6831,0,"",python,selection_command
+21,99715,"utils/nn.py",6874,0,"",python,selection_command
+22,99853,"utils/nn.py",6888,0,"",python,selection_command
+23,100006,"utils/nn.py",6897,0,"",python,selection_command
+24,100704,"utils/nn.py",12521,0,"",python,selection_command
+25,102944,"utils/nn.py",11073,0,"",python,selection_command
+26,104561,"utils/nn.py",12521,0,"",python,selection_command
+27,105408,"utils/nn.py",12555,0,"",python,selection_command
+28,105576,"utils/nn.py",12601,0,"",python,selection_command
+29,105725,"utils/nn.py",12643,0,"",python,selection_command
+30,105866,"utils/nn.py",12689,0,"",python,selection_command
+31,106001,"utils/nn.py",12731,0,"",python,selection_command
+32,106130,"utils/nn.py",12781,0,"",python,selection_command
+33,106704,"utils/nn.py",11204,0,"",python,selection_command
+34,108673,"utils/nn.py",11228,0,"",python,selection_command
+35,137033,"utils/nn.py",12823,0,"",python,selection_command
+36,137844,"utils/nn.py",12785,0,"",python,selection_command
+37,138094,"utils/nn.py",12735,0,"",python,selection_command
+38,138118,"utils/nn.py",12693,0,"",python,selection_command
+39,138152,"utils/nn.py",12647,0,"",python,selection_command
+40,138189,"utils/nn.py",12605,0,"",python,selection_command
+41,138218,"utils/nn.py",12559,0,"",python,selection_command
+42,138351,"utils/nn.py",12525,0,"",python,selection_command
+43,138594,"utils/nn.py",12559,0,"",python,selection_command
+44,138844,"utils/nn.py",12605,0,"",python,selection_command
+45,138865,"utils/nn.py",12647,0,"",python,selection_command
+46,138897,"utils/nn.py",12693,0,"",python,selection_command
+47,138926,"utils/nn.py",12735,0,"",python,selection_command
+48,138956,"utils/nn.py",12785,0,"",python,selection_command
+49,138991,"utils/nn.py",12823,0,"",python,selection_command
+50,139031,"utils/nn.py",12889,0,"",python,selection_command
+51,139066,"utils/nn.py",12924,0,"",python,selection_command
+52,139096,"utils/nn.py",12951,0,"",python,selection_command
+53,139128,"utils/nn.py",12965,0,"",python,selection_command
+54,139163,"utils/nn.py",12987,0,"",python,selection_command
+55,139196,"utils/nn.py",13027,0,"",python,selection_command
+56,139229,"utils/nn.py",13067,0,"",python,selection_command
+57,139264,"utils/nn.py",13106,0,"",python,selection_command
+58,139297,"utils/nn.py",13148,0,"",python,selection_command
+59,139331,"utils/nn.py",13178,0,"",python,selection_command
+60,139365,"utils/nn.py",13189,0,"",python,selection_command
+61,139397,"utils/nn.py",13191,0,"",python,selection_command
+62,139430,"utils/nn.py",13212,0,"",python,selection_command
+63,139462,"utils/nn.py",13268,0,"",python,selection_command
+64,139496,"utils/nn.py",13310,0,"",python,selection_command
+65,139528,"utils/nn.py",13352,0,"",python,selection_command
+66,139562,"utils/nn.py",13394,0,"",python,selection_command
+67,139596,"utils/nn.py",13412,0,"",python,selection_command
+68,139630,"utils/nn.py",13433,0,"",python,selection_command
+69,139699,"utils/nn.py",13412,0,"",python,selection_command
+70,139959,"utils/nn.py",13394,0,"",python,selection_command
+71,139984,"utils/nn.py",13352,0,"",python,selection_command
+72,140017,"utils/nn.py",13310,0,"",python,selection_command
+73,140056,"utils/nn.py",13268,0,"",python,selection_command
+74,140082,"utils/nn.py",13212,0,"",python,selection_command
+75,140591,"utils/nn.py",13213,0,"",python,selection_command
+76,140747,"utils/nn.py",13220,0,"",python,selection_command
+77,140894,"utils/nn.py",13221,0,"",python,selection_command
+78,141061,"utils/nn.py",13225,0,"",python,selection_command
+79,141270,"utils/nn.py",13226,0,"",python,selection_command
+80,141790,"utils/nn.py",13231,0,"",python,selection_command
+81,142139,"utils/nn.py",13232,0,"",python,selection_command
+82,142161,"utils/nn.py",13232,0,",",python,content
+83,142161,"utils/nn.py",13233,0,"",python,selection_keyboard
+84,142402,"utils/nn.py",13233,0," ",python,content
+85,142403,"utils/nn.py",13234,0,"",python,selection_keyboard
+86,142570,"utils/nn.py",13234,0,"p",python,content
+87,142570,"utils/nn.py",13235,0,"",python,selection_keyboard
+88,142636,"utils/nn.py",13235,0,"o",python,content
+89,142636,"utils/nn.py",13236,0,"",python,selection_keyboard
+90,142836,"utils/nn.py",13236,0,"s",python,content
+91,142836,"utils/nn.py",13237,0,"",python,selection_keyboard
+92,145619,"utils/nn.py",13237,0,":",python,content
+93,145619,"utils/nn.py",13238,0,"",python,selection_keyboard
+94,145810,"utils/nn.py",13238,0," ",python,content
+95,145810,"utils/nn.py",13239,0,"",python,selection_keyboard
+96,147275,"utils/nn.py",13239,0,"j",python,content
+97,147276,"utils/nn.py",13240,0,"",python,selection_keyboard
+98,147345,"utils/nn.py",13240,0,"j",python,content
+99,147345,"utils/nn.py",13241,0,"",python,selection_keyboard
+100,147610,"utils/nn.py",13241,0,"j",python,content
+101,147610,"utils/nn.py",13242,0,"",python,selection_keyboard
+102,148008,"utils/nn.py",13241,1,"",python,content
+103,148151,"utils/nn.py",13240,1,"",python,content
+104,148306,"utils/nn.py",13239,1,"",python,content
+105,148443,"utils/nn.py",13238,1,"",python,content
+106,148626,"utils/nn.py",13237,1,"",python,content
+107,149927,"utils/nn.py",13236,1,"",python,content
+108,154334,"utils/nn.py",13236,0,"i",python,content
+109,154334,"utils/nn.py",13237,0,"",python,selection_keyboard
+110,154519,"utils/nn.py",13237,0,"t",python,content
+111,154520,"utils/nn.py",13238,0,"",python,selection_keyboard
+112,154616,"utils/nn.py",13238,0,"i",python,content
+113,154616,"utils/nn.py",13239,0,"",python,selection_keyboard
+114,154702,"utils/nn.py",13239,0,"o",python,content
+115,154702,"utils/nn.py",13240,0,"",python,selection_keyboard
+116,154809,"utils/nn.py",13240,0,"n",python,content
+117,154810,"utils/nn.py",13241,0,"",python,selection_keyboard
+118,156189,"utils/nn.py",13240,1,"",python,content
+119,156384,"utils/nn.py",13239,1,"",python,content
+120,156464,"utils/nn.py",13238,1,"",python,content
+121,156617,"utils/nn.py",13237,1,"",python,content
+122,156752,"utils/nn.py",13236,1,"",python,content
+123,156915,"utils/nn.py",13235,1,"",python,content
+124,157071,"utils/nn.py",13234,1,"",python,content
+125,158041,"utils/nn.py",13234,0,"p",python,content
+126,158042,"utils/nn.py",13235,0,"",python,selection_keyboard
+127,158059,"utils/nn.py",13235,0,"p",python,content
+128,158059,"utils/nn.py",13236,0,"",python,selection_keyboard
+129,158133,"utils/nn.py",13236,0,"o",python,content
+130,158133,"utils/nn.py",13237,0,"",python,selection_keyboard
+131,158316,"utils/nn.py",13237,0,"s",python,content
+132,158316,"utils/nn.py",13238,0,"",python,selection_keyboard
+133,158364,"utils/nn.py",13238,0,"i",python,content
+134,158365,"utils/nn.py",13239,0,"",python,selection_keyboard
+135,158482,"utils/nn.py",13239,0,"t",python,content
+136,158482,"utils/nn.py",13240,0,"",python,selection_keyboard
+137,158554,"utils/nn.py",13240,0,"i",python,content
+138,158555,"utils/nn.py",13241,0,"",python,selection_keyboard
+139,158588,"utils/nn.py",13241,0,"o",python,content
+140,158589,"utils/nn.py",13242,0,"",python,selection_keyboard
+141,159019,"utils/nn.py",13234,8,"",python,content
+142,159219,"utils/nn.py",13234,0,"p",python,content
+143,159219,"utils/nn.py",13235,0,"",python,selection_keyboard
+144,159334,"utils/nn.py",13235,0,"o",python,content
+145,159334,"utils/nn.py",13236,0,"",python,selection_keyboard
+146,159532,"utils/nn.py",13236,0,"s",python,content
+147,159532,"utils/nn.py",13237,0,"",python,selection_keyboard
+148,159533,"utils/nn.py",13237,0,"i",python,content
+149,159534,"utils/nn.py",13238,0,"",python,selection_keyboard
+150,159616,"utils/nn.py",13238,0,"t",python,content
+151,159616,"utils/nn.py",13239,0,"",python,selection_keyboard
+152,159684,"utils/nn.py",13239,0,"i",python,content
+153,159684,"utils/nn.py",13240,0,"",python,selection_keyboard
+154,159749,"utils/nn.py",13240,0,"o",python,content
+155,159749,"utils/nn.py",13241,0,"",python,selection_keyboard
+156,159858,"utils/nn.py",13241,0,"n",python,content
+157,159858,"utils/nn.py",13242,0,"",python,selection_keyboard
+158,196989,"utils/nn.py",13242,0,":",python,content
+159,196990,"utils/nn.py",13243,0,"",python,selection_keyboard
+160,197347,"utils/nn.py",13243,0," ",python,content
+161,197347,"utils/nn.py",13244,0,"",python,selection_keyboard
+162,204279,"utils/nn.py",13242,2,"",python,content
+163,204994,"utils/nn.py",13234,8,"",python,content
+164,205373,"utils/nn.py",13234,0,"p",python,content
+165,205373,"utils/nn.py",13235,0,"",python,selection_keyboard
+166,205398,"utils/nn.py",13235,0,"o",python,content
+167,205398,"utils/nn.py",13236,0,"",python,selection_keyboard
+168,205831,"utils/nn.py",13236,0,"_",python,content
+169,205831,"utils/nn.py",13237,0,"",python,selection_keyboard
+170,206184,"utils/nn.py",13237,0,"e",python,content
+171,206185,"utils/nn.py",13238,0,"",python,selection_keyboard
+172,206516,"utils/nn.py",13237,1,"",python,content
+173,206591,"utils/nn.py",13237,0,"i",python,content
+174,206591,"utils/nn.py",13238,0,"",python,selection_keyboard
+175,206858,"utils/nn.py",13237,1,"",python,content
+176,206980,"utils/nn.py",13236,1,"",python,content
+177,207229,"utils/nn.py",13236,0,"s",python,content
+178,207229,"utils/nn.py",13237,0,"",python,selection_keyboard
+179,210088,"utils/nn.py",13237,0,"_",python,content
+180,210088,"utils/nn.py",13238,0,"",python,selection_keyboard
+181,211095,"utils/nn.py",13237,1,"",python,content
+182,211482,"utils/nn.py",13237,0,"-",python,content
+183,211482,"utils/nn.py",13238,0,"",python,selection_keyboard
+184,212160,"utils/nn.py",13237,1,"",python,content
+185,213028,"utils/nn.py",13237,0,"_",python,content
+186,213028,"utils/nn.py",13238,0,"",python,selection_keyboard
+187,213623,"utils/nn.py",13238,0,"i",python,content
+188,213623,"utils/nn.py",13239,0,"",python,selection_keyboard
+189,213774,"utils/nn.py",13239,0,"n",python,content
+190,213775,"utils/nn.py",13240,0,"",python,selection_keyboard
+191,213876,"utils/nn.py",13240,0,"d",python,content
+192,213876,"utils/nn.py",13241,0,"",python,selection_keyboard
+193,213983,"utils/nn.py",13241,0,"e",python,content
+194,213983,"utils/nn.py",13242,0,"",python,selection_keyboard
+195,214120,"utils/nn.py",13242,0,"x",python,content
+196,214120,"utils/nn.py",13243,0,"",python,selection_keyboard
+197,214431,"utils/nn.py",13243,0,":",python,content
+198,214431,"utils/nn.py",13244,0,"",python,selection_keyboard
+199,214668,"utils/nn.py",13244,0," ",python,content
+200,214668,"utils/nn.py",13245,0,"",python,selection_keyboard
+201,222644,"utils/nn.py",13245,0,"T",python,content
+202,222645,"utils/nn.py",13246,0,"",python,selection_keyboard
+203,222783,"utils/nn.py",13246,0,"u",python,content
+204,222783,"utils/nn.py",13247,0,"",python,selection_keyboard
+205,222823,"utils/nn.py",13247,0,"p",python,content
+206,222823,"utils/nn.py",13248,0,"",python,selection_keyboard
+207,222916,"utils/nn.py",13248,0,"e",python,content
+208,222916,"utils/nn.py",13249,0,"",python,selection_keyboard
+209,223286,"utils/nn.py",13248,1,"",python,content
+210,223437,"utils/nn.py",13248,0,"l",python,content
+211,223438,"utils/nn.py",13249,0,"",python,selection_keyboard
+212,223455,"utils/nn.py",13249,0,"e",python,content
+213,223455,"utils/nn.py",13250,0,"",python,selection_keyboard
+214,223821,"utils/nn.py",13250,0,"()",python,content
+215,223821,"utils/nn.py",13251,0,"",python,selection_keyboard
+216,223932,"utils/nn.py",13251,1,")",python,content
+217,223933,"utils/nn.py",13252,0,"",python,selection_keyboard
+218,224647,"utils/nn.py",13251,1,"",python,content
+219,224793,"utils/nn.py",13250,1,"",python,content
+220,225547,"utils/nn.py",13250,0,".",python,content
+221,225547,"utils/nn.py",13251,0,"",python,selection_keyboard
+222,226294,"utils/nn.py",13250,1,"",python,content
+223,228297,"utils/nn.py",13250,0,"{}",python,content
+224,228297,"utils/nn.py",13251,0,"",python,selection_keyboard
+225,228408,"utils/nn.py",13251,1,"}",python,content
+226,228409,"utils/nn.py",13252,0,"",python,selection_keyboard
+227,229058,"utils/nn.py",13251,1,"",python,content
+228,229201,"utils/nn.py",13250,1,"",python,content
+229,229475,"utils/nn.py",13250,0,"[]",python,content
+230,229475,"utils/nn.py",13251,0,"",python,selection_keyboard
+231,229478,"utils/nn.py",13251,1,"]",python,content
+232,229478,"utils/nn.py",13252,0,"",python,selection_keyboard
+233,229944,"utils/nn.py",13251,0,"",python,selection_command
+234,230151,"utils/nn.py",13251,0,"i",python,content
+235,230151,"utils/nn.py",13252,0,"",python,selection_keyboard
+236,230306,"utils/nn.py",13252,0,"n",python,content
+237,230307,"utils/nn.py",13253,0,"",python,selection_keyboard
+238,230327,"utils/nn.py",13253,0,"h",python,content
+239,230327,"utils/nn.py",13254,0,"",python,selection_keyboard
+240,230695,"utils/nn.py",13253,1,"",python,content
+241,230891,"utils/nn.py",13253,0,"t",python,content
+242,230892,"utils/nn.py",13254,0,"",python,selection_keyboard
+243,231008,"utils/nn.py",13254,0,",",python,content
+244,231008,"utils/nn.py",13255,0,"",python,selection_keyboard
+245,231232,"utils/nn.py",13255,0," ",python,content
+246,231233,"utils/nn.py",13256,0,"",python,selection_keyboard
+247,231297,"utils/nn.py",13256,0,"i",python,content
+248,231297,"utils/nn.py",13257,0,"",python,selection_keyboard
+249,231439,"utils/nn.py",13257,0,"n",python,content
+250,231439,"utils/nn.py",13258,0,"",python,selection_keyboard
+251,231492,"utils/nn.py",13258,0,"t",python,content
+252,231492,"utils/nn.py",13259,0,"",python,selection_keyboard
+253,231749,"utils/nn.py",13258,0,"",python,selection_command
+254,233443,"utils/nn.py",13316,0,"",python,selection_command
+255,233610,"utils/nn.py",13258,0,"",python,selection_command
+256,237001,"utils/nn.py",13316,0,"",python,selection_command
+257,237085,"utils/nn.py",13358,0,"",python,selection_command
+258,237171,"utils/nn.py",13400,0,"",python,selection_command
+259,237256,"utils/nn.py",13438,0,"",python,selection_command
+260,237419,"utils/nn.py",13440,0,"",python,selection_command
+261,237579,"utils/nn.py",13473,0,"",python,selection_command
+262,237752,"utils/nn.py",13508,0,"",python,selection_command
+263,238274,"utils/nn.py",13508,0,",",python,content
+264,238275,"utils/nn.py",13509,0,"",python,selection_keyboard
+265,238453,"utils/nn.py",13509,0," ",python,content
+266,238453,"utils/nn.py",13510,0,"",python,selection_keyboard
+267,238551,"utils/nn.py",13510,0,"p",python,content
+268,238551,"utils/nn.py",13511,0,"",python,selection_keyboard
+269,238584,"utils/nn.py",13511,0,"o",python,content
+270,238584,"utils/nn.py",13512,0,"",python,selection_keyboard
+271,238821,"utils/nn.py",13512,0,"s",python,content
+272,238821,"utils/nn.py",13513,0,"",python,selection_keyboard
+273,239226,"utils/nn.py",13513,0,"-",python,content
+274,239226,"utils/nn.py",13514,0,"",python,selection_keyboard
+275,239925,"utils/nn.py",13513,1,"",python,content
+276,240719,"utils/nn.py",13513,0,"_",python,content
+277,240720,"utils/nn.py",13514,0,"",python,selection_keyboard
+278,240937,"utils/nn.py",13514,0,"i",python,content
+279,240937,"utils/nn.py",13515,0,"",python,selection_keyboard
+280,241108,"utils/nn.py",13515,0,"n",python,content
+281,241108,"utils/nn.py",13516,0,"",python,selection_keyboard
+282,241222,"utils/nn.py",13516,0,"d",python,content
+283,241222,"utils/nn.py",13517,0,"",python,selection_keyboard
+284,241318,"utils/nn.py",13517,0,"e",python,content
+285,241318,"utils/nn.py",13518,0,"",python,selection_keyboard
+286,241642,"utils/nn.py",13518,0,"x",python,content
+287,241643,"utils/nn.py",13519,0,"",python,selection_keyboard
+288,241941,"utils/nn.py",13518,0,"",python,selection_command
+289,242459,"utils/nn.py",13473,0,"",python,selection_command
+290,242717,"utils/nn.py",13440,0,"",python,selection_command
+291,242752,"utils/nn.py",13438,0,"",python,selection_command
+292,242778,"utils/nn.py",13400,0,"",python,selection_command
+293,242889,"utils/nn.py",13358,0,"",python,selection_command
+294,243045,"utils/nn.py",13316,0,"",python,selection_command
+295,243190,"utils/nn.py",13235,0,"",python,selection_command
+296,243405,"utils/nn.py",13316,0,"",python,selection_command
+297,243691,"utils/nn.py",13235,0,"",python,selection_command
+298,243976,"utils/nn.py",13242,0,"",python,selection_command
+299,244140,"utils/nn.py",13243,0,"",python,selection_command
+300,244337,"utils/nn.py",13249,0,"",python,selection_command
+301,244429,"utils/nn.py",13250,0,"",python,selection_command
+302,244664,"utils/nn.py",13253,0,"",python,selection_command
+303,244758,"utils/nn.py",13254,0,"",python,selection_command
+304,245023,"utils/nn.py",13258,0,"",python,selection_command
+305,245372,"utils/nn.py",13260,0,"",python,selection_command
+306,245891,"utils/nn.py",13261,0,"",python,selection_command
+307,246251,"utils/nn.py",13260,0,"",python,selection_command
+308,247300,"utils/nn.py",13260,0," ",python,content
+309,247300,"utils/nn.py",13261,0,"",python,selection_keyboard
+310,247594,"utils/nn.py",13261,0,"+",python,content
+311,247594,"utils/nn.py",13262,0,"",python,selection_keyboard
+312,247811,"utils/nn.py",13262,0,")",python,content
+313,247811,"utils/nn.py",13263,0,"",python,selection_keyboard
+314,248182,"utils/nn.py",13262,1,"",python,content
+315,248336,"utils/nn.py",13261,1,"",python,content
+316,248691,"utils/nn.py",13261,0,"=",python,content
+317,248691,"utils/nn.py",13262,0,"",python,selection_keyboard
+318,249038,"utils/nn.py",13262,0," ",python,content
+319,249038,"utils/nn.py",13263,0,"",python,selection_keyboard
+320,249385,"utils/nn.py",13263,0,"N",python,content
+321,249385,"utils/nn.py",13264,0,"",python,selection_keyboard
+322,249645,"utils/nn.py",13264,0,"o",python,content
+323,249645,"utils/nn.py",13265,0,"",python,selection_keyboard
+324,249764,"utils/nn.py",13265,0,"n",python,content
+325,249764,"utils/nn.py",13266,0,"",python,selection_keyboard
+326,249909,"utils/nn.py",13266,0,"e",python,content
+327,249909,"utils/nn.py",13267,0,"",python,selection_keyboard
+328,250107,"utils/nn.py",13266,0,"",python,selection_command
+329,254828,"utils/nn.py",13265,0,"",python,selection_command
+330,254893,"utils/nn.py",13264,0,"",python,selection_command
+331,255047,"utils/nn.py",13263,0,"",python,selection_command
+332,255180,"utils/nn.py",13262,0,"",python,selection_command
+333,255351,"utils/nn.py",13261,0,"",python,selection_command
+334,255449,"utils/nn.py",13260,0,"",python,selection_command
+335,255678,"utils/nn.py",13259,0,"",python,selection_command
+336,255932,"utils/nn.py",13260,0,"",python,selection_command
+337,259064,"utils/nn.py",13260,0,":",python,content
+338,259064,"utils/nn.py",13261,0,"",python,selection_keyboard
+339,259877,"utils/nn.py",13260,1,"",python,content
+340,260641,"utils/nn.py",13260,0,"~",python,content
+341,260641,"utils/nn.py",13261,0,"",python,selection_keyboard
+342,261226,"utils/nn.py",13260,1,"",python,content
+343,261521,"utils/nn.py",13260,0,"``",python,content
+344,261522,"utils/nn.py",13261,0,"",python,selection_keyboard
+345,262053,"utils/nn.py",13260,2,"",python,content
+346,263175,"utils/nn.py",13260,0,"""""",python,content
+347,263175,"utils/nn.py",13261,0,"",python,selection_keyboard
+348,263806,"utils/nn.py",13260,2,"",python,content
+349,265175,"utils/nn.py",13260,0,"()",python,content
+350,265175,"utils/nn.py",13261,0,"",python,selection_keyboard
+351,265911,"utils/nn.py",13260,2,"",python,content
+352,266217,"utils/nn.py",13260,0,"9",python,content
+353,266217,"utils/nn.py",13261,0,"",python,selection_keyboard
+354,266832,"utils/nn.py",13260,1,"",python,content
+355,269411,"utils/nn.py",13260,0,"}",python,content
+356,269412,"utils/nn.py",13261,0,"",python,selection_keyboard
+357,269834,"utils/nn.py",13261,0,"+",python,content
+358,269834,"utils/nn.py",13262,0,"",python,selection_keyboard
+359,270165,"utils/nn.py",13262,0,"|",python,content
+360,270166,"utils/nn.py",13263,0,"",python,selection_keyboard
+361,270897,"utils/nn.py",13262,1,"",python,content
+362,271048,"utils/nn.py",13261,1,"",python,content
+363,271221,"utils/nn.py",13260,1,"",python,content
+364,271554,"utils/nn.py",13260,0,"|",python,content
+365,271554,"utils/nn.py",13261,0,"",python,selection_keyboard
+366,272212,"utils/nn.py",13261,0,"N",python,content
+367,272212,"utils/nn.py",13262,0,"",python,selection_keyboard
+368,272309,"utils/nn.py",13262,0,"o",python,content
+369,272309,"utils/nn.py",13263,0,"",python,selection_keyboard
+370,272456,"utils/nn.py",13263,0,"n",python,content
+371,272457,"utils/nn.py",13264,0,"",python,selection_keyboard
+372,272511,"utils/nn.py",13264,0,"e",python,content
+373,272511,"utils/nn.py",13265,0,"",python,selection_keyboard
+374,272822,"utils/nn.py",13264,0,"",python,selection_command
+375,274352,"utils/nn.py",13263,0,"",python,selection_command
+376,274417,"utils/nn.py",13262,0,"",python,selection_command
+377,274570,"utils/nn.py",13261,0,"",python,selection_command
+378,275665,"utils/nn.py",13260,0,"",python,selection_command
+379,276011,"utils/nn.py",13260,0," ",python,content
+380,276012,"utils/nn.py",13261,0,"",python,selection_keyboard
+381,276532,"utils/nn.py",13262,0,"",python,selection_command
+382,276793,"utils/nn.py",13262,0," ",python,content
+383,276793,"utils/nn.py",13263,0,"",python,selection_keyboard
+384,276999,"utils/nn.py",13262,0,"",python,selection_command
+385,277586,"utils/nn.py",13263,0,"",python,selection_command
+386,281537,"utils/nn.py",13330,0,"",python,selection_command
+387,281666,"utils/nn.py",13372,0,"",python,selection_command
+388,281815,"utils/nn.py",13414,0,"",python,selection_command
+389,281968,"utils/nn.py",13452,0,"",python,selection_command
+390,282108,"utils/nn.py",13454,0,"",python,selection_command
+391,282595,"utils/nn.py",13452,0,"",python,selection_command
+392,283876,"utils/nn.py",13452,0,",",python,content
+393,283876,"utils/nn.py",13453,0,"",python,selection_keyboard
+394,284079,"utils/nn.py",13453,0," ",python,content
+395,284079,"utils/nn.py",13454,0,"",python,selection_keyboard
+396,284866,"utils/nn.py",13454,0,"pos_index",python,content
+397,285079,"utils/nn.py",13462,0,"",python,selection_command
+398,285753,"utils/nn.py",13463,0,"",python,selection_command
+399,287312,"utils/nn.py",13452,11,"",python,content
+400,287979,"utils/nn.py",13454,0,"",python,selection_command
+401,288026,"utils/nn.py",13487,0,"",python,selection_command
+402,288177,"utils/nn.py",13525,0,"",python,selection_command
+403,289696,"utils/nn.py",13524,0,"",python,selection_command
+404,289814,"utils/nn.py",13522,0,"",python,selection_command
+405,289959,"utils/nn.py",13516,0,"",python,selection_command
+406,290075,"utils/nn.py",13515,0,"",python,selection_command
+407,290262,"utils/nn.py",13510,0,"",python,selection_command
+408,290861,"utils/nn.py",13467,0,"",python,selection_command
+409,291177,"utils/nn.py",13473,0,"",python,selection_command
+410,291329,"utils/nn.py",13476,0,"",python,selection_command
+411,291497,"utils/nn.py",13480,0,"",python,selection_command
+412,291665,"utils/nn.py",13481,0,"",python,selection_command
+413,292085,"utils/nn.py",12420,0,"",python,selection_command
+414,292576,"utils/nn.py",12445,0,"",python,selection_command
+415,292640,"utils/nn.py",12486,0,"",python,selection_command
+416,292782,"utils/nn.py",12518,0,"",python,selection_command
+417,293038,"utils/nn.py",12521,0,"",python,selection_command
+418,293431,"utils/nn.py",6895,0,"",python,selection_command
+419,295464,"utils/nn.py",12521,0,"",python,selection_command
+420,299305,"utils/nn.py",12489,0,"",python,selection_command
+421,299352,"utils/nn.py",12448,0,"",python,selection_command
+422,299600,"utils/nn.py",12423,0,"",python,selection_command
+423,299600,"utils/nn.py",12425,0,"",python,selection_command
+424,299803,"utils/nn.py",12426,0,"",python,selection_command
+425,300123,"utils/nn.py",12426,0,":",python,content
+426,300123,"utils/nn.py",12427,0,"",python,selection_keyboard
+427,300469,"utils/nn.py",12427,0," ",python,content
+428,300469,"utils/nn.py",12428,0,"",python,selection_keyboard
+429,301711,"utils/nn.py",12428,0,"List[TransformerBlock]",python,content
+430,302134,"utils/nn.py",12449,0,"",python,selection_command
+431,303343,"utils/nn.py",12433,0,"",python,selection_command
+432,303469,"utils/nn.py",12432,0,"",python,selection_command
+433,303626,"utils/nn.py",12428,0,"",python,selection_command
+434,306441,"utils/nn.py",0,0,"",python,selection_command
+435,307933,"utils/nn.py",46,0,", List",python,content
+436,307933,"utils/nn.py",52,0,"",python,selection_command
+437,308563,"utils/nn.py",51,0,"",python,selection_command
+438,309252,"utils/nn.py",12434,0,"",python,selection_command
+439,310868,"utils/nn.py",12483,0,"",python,selection_command
+440,311122,"utils/nn.py",12524,0,"",python,selection_command
+441,311139,"utils/nn.py",12556,0,"",python,selection_command
+442,311173,"utils/nn.py",12590,0,"",python,selection_command
+443,311204,"utils/nn.py",12636,0,"",python,selection_command
+444,311238,"utils/nn.py",12678,0,"",python,selection_command
+445,311271,"utils/nn.py",12724,0,"",python,selection_command
+446,311304,"utils/nn.py",12766,0,"",python,selection_command
+447,311337,"utils/nn.py",12816,0,"",python,selection_command
+448,311371,"utils/nn.py",12854,0,"",python,selection_command
+449,311404,"utils/nn.py",12920,0,"",python,selection_command
+450,311438,"utils/nn.py",12955,0,"",python,selection_command
+451,311472,"utils/nn.py",12981,0,"",python,selection_command
+452,311505,"utils/nn.py",12995,0,"",python,selection_command
+453,311540,"utils/nn.py",13018,0,"",python,selection_command
+454,311574,"utils/nn.py",13058,0,"",python,selection_command
+455,311604,"utils/nn.py",13098,0,"",python,selection_command
+456,311638,"utils/nn.py",13137,0,"",python,selection_command
+457,311674,"utils/nn.py",13179,0,"",python,selection_command
+458,311715,"utils/nn.py",13209,0,"",python,selection_command
+459,311737,"utils/nn.py",13219,0,"",python,selection_command
+460,311771,"utils/nn.py",13221,0,"",python,selection_command
+461,311805,"utils/nn.py",13243,0,"",python,selection_command
+462,311838,"utils/nn.py",13341,0,"",python,selection_command
+463,311871,"utils/nn.py",13383,0,"",python,selection_command
+464,311903,"utils/nn.py",13425,0,"",python,selection_command
+465,312007,"utils/nn.py",13383,0,"",python,selection_command
+466,312258,"utils/nn.py",13341,0,"",python,selection_command
+467,312291,"utils/nn.py",13243,0,"",python,selection_command
+468,312323,"utils/nn.py",13221,0,"",python,selection_command
+469,312325,"utils/nn.py",13243,0,"",python,selection_command
+470,312580,"utils/nn.py",13341,0,"",python,selection_command
+471,312610,"utils/nn.py",13383,0,"",python,selection_command
+472,312640,"utils/nn.py",13425,0,"",python,selection_command
+473,312671,"utils/nn.py",13467,0,"",python,selection_command
+474,312704,"utils/nn.py",13484,0,"",python,selection_command
+475,312741,"utils/nn.py",13506,0,"",python,selection_command
+476,312777,"utils/nn.py",13540,0,"",python,selection_command
+477,312818,"utils/nn.py",13565,0,"",python,selection_command
+478,313162,"utils/nn.py",13540,0,"",python,selection_command
+479,313323,"utils/nn.py",13506,0,"",python,selection_command
+480,313448,"utils/nn.py",13540,0,"",python,selection_command
+481,315039,"utils/nn.py",13497,0,"",python,selection_command
+482,317361,"utils/nn.py",13531,0,"",python,selection_command
+483,317601,"utils/nn.py",13538,0,"",python,selection_command
+484,318267,"utils/nn.py",13504,0,"",python,selection_command
+485,318451,"utils/nn.py",13506,0,"",python,selection_command
+486,318618,"utils/nn.py",13510,0,"",python,selection_command
+487,318965,"utils/nn.py",13511,0,"",python,selection_command
+488,319391,"utils/nn.py",12426,0,"",python,selection_command
+489,319921,"utils/nn.py",12475,0,"",python,selection_command
+490,320053,"utils/nn.py",12516,0,"",python,selection_command
+491,320257,"utils/nn.py",12519,0,"",python,selection_command
+492,321563,"utils/nn.py",12520,0,"",python,selection_command
+493,322002,"utils/nn.py",12426,0,"",python,selection_command
+494,326129,"utils/nn.py",12432,0,"",python,selection_command
+495,326469,"utils/nn.py",12432,1,":",python,selection_command
+496,326538,"utils/nn.py",12432,6,": List",python,selection_command
+497,326742,"utils/nn.py",12432,7,": List[",python,selection_command
+498,326896,"utils/nn.py",12432,23,": List[TransformerBlock",python,selection_command
+499,327058,"utils/nn.py",12432,24,": List[TransformerBlock]",python,selection_command
+500,327516,"utils/nn.py",12432,24,"",python,content
+501,328574,"utils/nn.py",12457,0,"",python,selection_command
+502,328691,"utils/nn.py",12498,0,"",python,selection_command
+503,328887,"utils/nn.py",12530,0,"",python,selection_command
+504,329495,"utils/nn.py",6901,0,"",python,selection_command
+505,336418,"utils/nn.py",8511,0,"",python,selection_command
+506,337796,"utils/nn.py",9329,0,"",python,selection_keyboard
+507,338219,"utils/nn.py",9367,0,"",python,selection_command
+508,338515,"utils/nn.py",9405,0,"",python,selection_command
+509,338515,"utils/nn.py",9446,0,"",python,selection_command
+510,338535,"utils/nn.py",9488,0,"",python,selection_command
+511,338568,"utils/nn.py",9518,0,"",python,selection_command
+512,338600,"utils/nn.py",9541,0,"",python,selection_command
+513,338735,"utils/nn.py",9543,0,"",python,selection_command
+514,338883,"utils/nn.py",9552,0,"",python,selection_command
+515,339116,"utils/nn.py",9567,0,"",python,selection_command
+516,339356,"utils/nn.py",9574,0,"",python,selection_command
+517,339564,"utils/nn.py",9575,0,"",python,selection_command
+518,339762,"utils/nn.py",9579,0,"",python,selection_command
+519,339835,"utils/nn.py",9580,0,"",python,selection_command
+520,339982,"utils/nn.py",9587,0,"",python,selection_command
+521,340383,"utils/nn.py",9599,0,", pos_index: Tuple[int, int] | None = None",python,content
+522,340383,"utils/nn.py",9641,0,"",python,selection_command
+523,342385,"utils/nn.py",9739,0,"",python,selection_command
+524,342576,"utils/nn.py",9795,0,"",python,selection_command
+525,342593,"utils/nn.py",9829,0,"",python,selection_command
+526,342712,"utils/nn.py",9894,0,"",python,selection_command
+527,342713,"utils/nn.py",9935,0,"",python,selection_command
+528,342713,"utils/nn.py",9988,0,"",python,selection_command
+529,342911,"utils/nn.py",10034,0,"",python,selection_command
+530,343072,"utils/nn.py",9988,0,"",python,selection_command
+531,382675,"utils/nn.py",8152,0,"",python,selection_command
+532,383751,"utils/nn.py",8129,0,"",python,selection_command
+533,383998,"utils/nn.py",8099,0,"",python,selection_command
+534,384023,"utils/nn.py",8057,0,"",python,selection_command
+535,384055,"utils/nn.py",8016,0,"",python,selection_command
+536,384101,"utils/nn.py",7977,0,"",python,selection_command
+537,384130,"utils/nn.py",7967,0,"",python,selection_command
+538,384166,"utils/nn.py",7944,0,"",python,selection_command
+539,384200,"utils/nn.py",7914,0,"",python,selection_command
+540,384229,"utils/nn.py",7872,0,"",python,selection_command
+541,384261,"utils/nn.py",7831,0,"",python,selection_command
+542,384295,"utils/nn.py",7788,0,"",python,selection_command
+543,384329,"utils/nn.py",7778,0,"",python,selection_command
+544,384365,"utils/nn.py",7755,0,"",python,selection_command
+545,384396,"utils/nn.py",7725,0,"",python,selection_command
+546,384429,"utils/nn.py",7683,0,"",python,selection_command
+547,384462,"utils/nn.py",7642,0,"",python,selection_command
+548,384502,"utils/nn.py",7598,0,"",python,selection_command
+549,384540,"utils/nn.py",7532,0,"",python,selection_command
+550,384571,"utils/nn.py",7465,0,"",python,selection_command
+551,384595,"utils/nn.py",7456,0,"",python,selection_command
+552,384931,"utils/nn.py",7409,0,"",python,selection_command
+553,385298,"utils/nn.py",7455,0,"\n ",python,content
+554,385626,"utils/nn.py",7464,0,"s",python,content
+555,385626,"utils/nn.py",7465,0,"",python,selection_keyboard
+556,385633,"utils/nn.py",7465,0,"e",python,content
+557,385633,"utils/nn.py",7466,0,"",python,selection_keyboard
+558,385736,"utils/nn.py",7466,0,"l",python,content
+559,385736,"utils/nn.py",7467,0,"",python,selection_keyboard
+560,385819,"utils/nn.py",7467,0,"f",python,content
+561,385819,"utils/nn.py",7468,0,"",python,selection_keyboard
+562,385822,"utils/nn.py",7468,0,".",python,content
+563,385823,"utils/nn.py",7469,0,"",python,selection_keyboard
+564,386026,"utils/nn.py",7469,0,"d",python,content
+565,386026,"utils/nn.py",7470,0,"",python,selection_keyboard
+566,386535,"utils/nn.py",7470,0,"ecode = decode",python,content
+567,386704,"utils/nn.py",7483,0,"",python,selection_command
+568,387695,"utils/nn.py",7485,0,"",python,selection_command
+569,387947,"utils/nn.py",7513,0,"",python,selection_command
+570,387979,"utils/nn.py",7580,0,"",python,selection_command
+571,388009,"utils/nn.py",7646,0,"",python,selection_command
+572,388041,"utils/nn.py",7690,0,"",python,selection_command
+573,388073,"utils/nn.py",7731,0,"",python,selection_command
+574,388107,"utils/nn.py",7773,0,"",python,selection_command
+575,388146,"utils/nn.py",7797,0,"",python,selection_command
+576,388177,"utils/nn.py",7807,0,"",python,selection_command
+577,388206,"utils/nn.py",7836,0,"",python,selection_command
+578,388239,"utils/nn.py",7879,0,"",python,selection_command
+579,388273,"utils/nn.py",7920,0,"",python,selection_command
+580,388307,"utils/nn.py",7962,0,"",python,selection_command
+581,388346,"utils/nn.py",7986,0,"",python,selection_command
+582,388381,"utils/nn.py",7996,0,"",python,selection_command
+583,388414,"utils/nn.py",8025,0,"",python,selection_command
+584,388447,"utils/nn.py",8064,0,"",python,selection_command
+585,388485,"utils/nn.py",8105,0,"",python,selection_command
+586,388520,"utils/nn.py",8147,0,"",python,selection_command
+587,388552,"utils/nn.py",8171,0,"",python,selection_command
+588,388587,"utils/nn.py",8181,0,"",python,selection_command
+589,388620,"utils/nn.py",8210,0,"",python,selection_command
+590,388652,"utils/nn.py",8268,0,"",python,selection_command
+591,388685,"utils/nn.py",8306,0,"",python,selection_command
+592,388714,"utils/nn.py",8346,0,"",python,selection_command
+593,388753,"utils/nn.py",8387,0,"",python,selection_command
+594,388785,"utils/nn.py",8426,0,"",python,selection_command
+595,388819,"utils/nn.py",8468,0,"",python,selection_command
+596,388854,"utils/nn.py",8498,0,"",python,selection_command
+597,388885,"utils/nn.py",8551,0,"",python,selection_command
+598,388919,"utils/nn.py",8594,0,"",python,selection_command
+599,388948,"utils/nn.py",8617,0,"",python,selection_command
+600,389118,"utils/nn.py",8644,0,"",python,selection_command
+601,389840,"utils/nn.py",8638,0,"self.",python,content
+602,389842,"utils/nn.py",8643,0,"",python,selection_command
+603,390682,"utils/nn.py",8659,0,"",python,selection_command
+604,390933,"utils/nn.py",8685,0,"",python,selection_command
+605,390960,"utils/nn.py",8742,0,"",python,selection_command
+606,390992,"utils/nn.py",8780,0,"",python,selection_command
+607,391028,"utils/nn.py",8820,0,"",python,selection_command
+608,391056,"utils/nn.py",8861,0,"",python,selection_command
+609,391086,"utils/nn.py",8900,0,"",python,selection_command
+610,391116,"utils/nn.py",8942,0,"",python,selection_command
+611,391149,"utils/nn.py",8972,0,"",python,selection_command
+612,391187,"utils/nn.py",9025,0,"",python,selection_command
+613,391221,"utils/nn.py",9071,0,"",python,selection_command
+614,391254,"utils/nn.py",9094,0,"",python,selection_command
+615,391392,"utils/nn.py",9120,0,"",python,selection_command
+616,391997,"utils/nn.py",9115,0,"self.",python,content
+617,392000,"utils/nn.py",9120,0,"",python,selection_command
+618,393107,"utils/nn.py",10887,0,"",python,selection_command
+619,393965,"utils/nn.py",10859,0,"",python,selection_command
+620,394214,"utils/nn.py",10837,0,"",python,selection_command
+621,394241,"utils/nn.py",10817,0,"",python,selection_command
+622,394275,"utils/nn.py",10807,0,"",python,selection_command
+623,394306,"utils/nn.py",10778,0,"",python,selection_command
+624,394340,"utils/nn.py",10769,0,"",python,selection_command
+625,394373,"utils/nn.py",10755,0,"",python,selection_command
+626,394406,"utils/nn.py",10746,0,"",python,selection_command
+627,394441,"utils/nn.py",10721,0,"",python,selection_command
+628,394474,"utils/nn.py",10680,0,"",python,selection_command
+629,394508,"utils/nn.py",10643,0,"",python,selection_command
+630,394541,"utils/nn.py",10602,0,"",python,selection_command
+631,394576,"utils/nn.py",10563,0,"",python,selection_command
+632,394609,"utils/nn.py",10533,0,"",python,selection_command
+633,394644,"utils/nn.py",10500,0,"",python,selection_command
+634,394677,"utils/nn.py",10430,0,"",python,selection_command
+635,394713,"utils/nn.py",10383,0,"",python,selection_command
+636,394743,"utils/nn.py",10330,0,"",python,selection_command
+637,394776,"utils/nn.py",10288,0,"",python,selection_command
+638,394810,"utils/nn.py",10223,0,"",python,selection_command
+639,394843,"utils/nn.py",10186,0,"",python,selection_command
+640,394877,"utils/nn.py",10153,0,"",python,selection_command
+641,394909,"utils/nn.py",10083,0,"",python,selection_command
+642,394940,"utils/nn.py",10037,0,"",python,selection_command
+643,395129,"utils/nn.py",10083,0,"",python,selection_command
+644,395388,"utils/nn.py",10153,0,"",python,selection_command
+645,395434,"utils/nn.py",10083,0,"",python,selection_command
+646,395688,"utils/nn.py",10037,0,"",python,selection_command
+647,395719,"utils/nn.py",9984,0,"",python,selection_command
+648,395747,"utils/nn.py",9943,0,"",python,selection_command
+649,395792,"utils/nn.py",9878,0,"",python,selection_command
+650,395819,"utils/nn.py",9844,0,"",python,selection_command
+651,395928,"utils/nn.py",9878,0,"",python,selection_command
+652,396217,"utils/nn.py",9943,0,"",python,selection_command
+653,396451,"utils/nn.py",9878,0,"",python,selection_command
+654,396698,"utils/nn.py",9844,0,"",python,selection_command
+655,398628,"utils/nn.py",9869,0,"\n ",python,content
+656,399151,"utils/nn.py",9878,0,"i",python,content
+657,399151,"utils/nn.py",9879,0,"",python,selection_keyboard
+658,399351,"utils/nn.py",9879,0,"f",python,content
+659,399351,"utils/nn.py",9880,0,"",python,selection_keyboard
+660,399401,"utils/nn.py",9880,0," ",python,content
+661,399401,"utils/nn.py",9881,0,"",python,selection_keyboard
+662,399916,"utils/nn.py",9881,0,"s",python,content
+663,399916,"utils/nn.py",9882,0,"",python,selection_keyboard
+664,399917,"utils/nn.py",9882,0,"e",python,content
+665,399917,"utils/nn.py",9883,0,"",python,selection_keyboard
+666,400120,"utils/nn.py",9883,0,"f",python,content
+667,400120,"utils/nn.py",9884,0,"",python,selection_keyboard
+668,400189,"utils/nn.py",9884,0,"l",python,content
+669,400189,"utils/nn.py",9885,0,"",python,selection_keyboard
+670,400658,"utils/nn.py",9884,1,"",python,content
+671,400802,"utils/nn.py",9883,1,"",python,content
+672,400933,"utils/nn.py",9883,0,"f",python,content
+673,400933,"utils/nn.py",9884,0,"",python,selection_keyboard
+674,400997,"utils/nn.py",9884,0,"l",python,content
+675,400998,"utils/nn.py",9885,0,"",python,selection_keyboard
+676,401805,"utils/nn.py",9884,1,"",python,content
+677,401929,"utils/nn.py",9883,1,"",python,content
+678,402063,"utils/nn.py",9883,0,"l",python,content
+679,402064,"utils/nn.py",9884,0,"",python,selection_keyboard
+680,402206,"utils/nn.py",9884,0,"f",python,content
+681,402206,"utils/nn.py",9885,0,"",python,selection_keyboard
+682,402219,"utils/nn.py",9885,0,".",python,content
+683,402219,"utils/nn.py",9886,0,"",python,selection_keyboard
+684,402606,"utils/nn.py",9886,0,"d",python,content
+685,402606,"utils/nn.py",9887,0,"",python,selection_keyboard
+686,402720,"utils/nn.py",9887,0,"e",python,content
+687,402721,"utils/nn.py",9888,0,"",python,selection_keyboard
+688,403013,"utils/nn.py",9888,0,"code:",python,content
+689,403526,"utils/nn.py",9892,0,"",python,selection_command
+690,403950,"utils/nn.py",9894,0,"",python,selection_command
+691,406121,"utils/nn.py",9893,0,"\n ",python,content
+692,406683,"utils/nn.py",9902,4,"",python,content
+693,407090,"utils/nn.py",9902,0,"e",python,content
+694,407090,"utils/nn.py",9903,0,"",python,selection_keyboard
+695,407271,"utils/nn.py",9903,0,"l",python,content
+696,407271,"utils/nn.py",9904,0,"",python,selection_keyboard
+697,407368,"utils/nn.py",9904,0,"s",python,content
+698,407369,"utils/nn.py",9905,0,"",python,selection_keyboard
+699,407370,"utils/nn.py",9905,0,"e",python,content
+700,407370,"utils/nn.py",9906,0,"",python,selection_keyboard
+701,407671,"utils/nn.py",9906,0,":",python,content
+702,407671,"utils/nn.py",9907,0,"",python,selection_keyboard
+703,408504,"utils/nn.py",9906,0,"",python,selection_command
+704,409313,"utils/nn.py",9920,0,"",python,selection_command
+705,409776,"utils/nn.py",9908,64," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")",python,selection_command
+706,410150,"utils/nn.py",9908,105," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)",python,selection_command
+707,410214,"utils/nn.py",9908,158," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token",python,selection_command
+708,410364,"utils/nn.py",9908,204," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)",python,selection_command
+709,410562,"utils/nn.py",9908,274," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)\n z_BTNM = einops.rearrange(z_FNM, ""(b t) n m -> b t n m"", t=T)",python,selection_command
+710,411028,"utils/nn.py",9908,307," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)\n z_BTNM = einops.rearrange(z_FNM, ""(b t) n m -> b t n m"", t=T)\n x_BTNM = x_BTNM + z_BTNM",python,selection_command
+711,411472,"utils/nn.py",10183,8," ",python,content
+712,411472,"utils/nn.py",10113,8," ",python,content
+713,411472,"utils/nn.py",10067,8," ",python,content
+714,411472,"utils/nn.py",10014,8," ",python,content
+715,411472,"utils/nn.py",9973,8," ",python,content
+716,411472,"utils/nn.py",9908,8," ",python,content
+717,411482,"utils/nn.py",9920,0,"",python,selection_command
+718,414677,"utils/nn.py",9989,0,"",python,selection_command
+719,414743,"utils/nn.py",10034,0,"",python,selection_command
+720,414880,"utils/nn.py",10091,0,"",python,selection_command
+721,415013,"utils/nn.py",10141,0,"",python,selection_command
+722,415166,"utils/nn.py",10215,0,"",python,selection_command
+723,415313,"utils/nn.py",10252,0,"",python,selection_command
+724,415999,"utils/nn.py",10276,0,"\n ",python,content
+725,416217,"utils/nn.py",10285,0,"i",python,content
+726,416217,"utils/nn.py",10286,0,"",python,selection_keyboard
+727,416379,"utils/nn.py",10286,0,"f",python,content
+728,416379,"utils/nn.py",10287,0,"",python,selection_keyboard
+729,416495,"utils/nn.py",10287,0," ",python,content
+730,416495,"utils/nn.py",10288,0,"",python,selection_keyboard
+731,416720,"utils/nn.py",10288,0,"s",python,content
+732,416720,"utils/nn.py",10289,0,"",python,selection_keyboard
+733,416730,"utils/nn.py",10289,0,"e",python,content
+734,416730,"utils/nn.py",10290,0,"",python,selection_keyboard
+735,416827,"utils/nn.py",10290,0,"l",python,content
+736,416827,"utils/nn.py",10291,0,"",python,selection_keyboard
+737,416927,"utils/nn.py",10291,0,"f",python,content
+738,416928,"utils/nn.py",10292,0,"",python,selection_keyboard
+739,417649,"utils/nn.py",10292,0,".decode:",python,content
+740,417936,"utils/nn.py",10299,0,"",python,selection_command
+741,418583,"utils/nn.py",10323,0,"",python,selection_command
+742,419065,"utils/nn.py",10301,64," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")",python,selection_command
+743,420281,"utils/nn.py",10323,0,"",python,selection_command
+744,420760,"utils/nn.py",10300,0,"\n ",python,content
+745,420763,"utils/nn.py",10309,4,"",python,content
+746,421368,"utils/nn.py",10309,0,"e",python,content
+747,421368,"utils/nn.py",10310,0,"",python,selection_keyboard
+748,421525,"utils/nn.py",10310,0,"l",python,content
+749,421526,"utils/nn.py",10311,0,"",python,selection_keyboard
+750,421656,"utils/nn.py",10311,0,"s",python,content
+751,421656,"utils/nn.py",10312,0,"",python,selection_keyboard
+752,421661,"utils/nn.py",10312,0,"e",python,content
+753,421662,"utils/nn.py",10313,0,"",python,selection_keyboard
+754,421940,"utils/nn.py",10313,0,":",python,content
+755,421940,"utils/nn.py",10314,0,"",python,selection_keyboard
+756,422538,"utils/nn.py",10313,0,"",python,selection_command
+757,424233,"utils/nn.py",10327,0,"",python,selection_command
+758,424641,"utils/nn.py",10315,64," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")",python,selection_command
+759,424949,"utils/nn.py",10315,106," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)",python,selection_command
+760,425018,"utils/nn.py",10315,159," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token",python,selection_command
+761,425158,"utils/nn.py",10315,206," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)",python,selection_command
+762,425293,"utils/nn.py",10315,276," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)\n z_BTNM = einops.rearrange(z_PTM, ""(b n) t m -> b t n m"", n=N)",python,selection_command
+763,425525,"utils/nn.py",10315,309," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)\n z_BTNM = einops.rearrange(z_PTM, ""(b n) t m -> b t n m"", n=N)\n x_BTNM = x_BTNM + z_BTNM",python,selection_command
+764,428182,"utils/nn.py",10592,8," ",python,content
+765,428182,"utils/nn.py",10522,8," ",python,content
+766,428182,"utils/nn.py",10475,8," ",python,content
+767,428182,"utils/nn.py",10422,8," ",python,content
+768,428182,"utils/nn.py",10380,8," ",python,content
+769,428182,"utils/nn.py",10315,8," ",python,content
+770,428192,"utils/nn.py",10327,0,"",python,selection_command
+771,430306,"utils/nn.py",10313,0,"",python,selection_command
+772,430454,"utils/nn.py",10289,0,"",python,selection_command
+773,430647,"utils/nn.py",10252,0,"",python,selection_command
+774,430995,"utils/nn.py",10215,0,"",python,selection_command
+775,438434,"utils/nn.py",10211,4,"",python,content
+776,438697,"utils/nn.py",10210,0,"",python,selection_command
+777,439154,"utils/nn.py",10243,0,"",python,selection_command
+778,439336,"utils/nn.py",10280,0,"",python,selection_command
+779,439370,"utils/nn.py",10304,0,"",python,selection_command
+780,439481,"utils/nn.py",10318,0,"",python,selection_command
+781,439481,"utils/nn.py",10387,0,"",python,selection_command
+782,439482,"utils/nn.py",10433,0,"",python,selection_command
+783,439550,"utils/nn.py",10490,0,"",python,selection_command
+784,439701,"utils/nn.py",10541,0,"",python,selection_command
+785,439857,"utils/nn.py",10615,0,"",python,selection_command
+786,440217,"utils/nn.py",10615,0,"f",python,content
+787,440217,"utils/nn.py",10616,0,"",python,selection_keyboard
+788,440894,"utils/nn.py",10615,0,"",python,selection_command
+789,441332,"utils/nn.py",10615,1,"",python,content
+790,441903,"utils/nn.py",10620,0,"",python,selection_command
+791,442145,"utils/nn.py",10616,4,"",python,content
+792,442678,"utils/nn.py",10615,0,"",python,selection_command
+793,443698,"utils/nn.py",10541,0,"",python,selection_command
+794,443947,"utils/nn.py",10490,0,"",python,selection_command
+795,443970,"utils/nn.py",10433,0,"",python,selection_command
+796,444005,"utils/nn.py",10387,0,"",python,selection_command
+797,444037,"utils/nn.py",10318,0,"",python,selection_command
+798,444077,"utils/nn.py",10304,0,"",python,selection_command
+799,444109,"utils/nn.py",10280,0,"",python,selection_command
+800,444202,"utils/nn.py",10243,0,"",python,selection_command
+801,444271,"utils/nn.py",10210,0,"",python,selection_command
+802,520077,"utils/nn.py",10136,0,"",python,selection_command
+803,520216,"utils/nn.py",10086,0,"",python,selection_command
+804,520350,"utils/nn.py",10029,0,"",python,selection_command
+805,520507,"utils/nn.py",9984,0,"",python,selection_command
+806,521173,"utils/nn.py",9915,0,"",python,selection_command
+807,521573,"utils/nn.py",9908,68," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")",python,selection_command
+808,522189,"utils/nn.py",9908,113," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)",python,selection_command
+809,523283,"utils/nn.py",9908,170," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token",python,selection_command
+810,523742,"utils/nn.py",9908,113," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)",python,selection_command
+811,524331,"utils/nn.py",9908,114,"",python,content
+812,524352,"utils/nn.py",9920,0,"",python,selection_command
+813,524775,"utils/nn.py",9906,0,"",python,selection_command
+814,524783,"utils/nn.py",9882,0,"",python,selection_command
+815,524984,"utils/nn.py",9848,0,"",python,selection_command
+816,525945,"utils/nn.py",9869,0,"\n z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)",python,content
+817,525946,"utils/nn.py",9882,0,"",python,selection_command
+818,527999,"utils/nn.py",9882,1,"z",python,selection_command
+819,528354,"utils/nn.py",9882,70,"z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z",python,selection_command
+820,529707,"utils/nn.py",9939,12," ",python,content
+821,529707,"utils/nn.py",9870,12," ",python,content
+822,529710,"utils/nn.py",9878,0,"",python,selection_command
+823,533744,"utils/nn.py",9943,0,"",python,selection_command
+824,533901,"utils/nn.py",9984,0,"",python,selection_command
+825,534098,"utils/nn.py",10008,0,"",python,selection_command
+826,534158,"utils/nn.py",10022,0,"",python,selection_command
+827,534305,"utils/nn.py",10079,0,"",python,selection_command
+828,534484,"utils/nn.py",10129,0,"",python,selection_command
+829,534623,"utils/nn.py",10203,0,"",python,selection_command
+830,535026,"utils/nn.py",10236,0,"",python,selection_command
+831,535191,"utils/nn.py",10273,0,"",python,selection_command
+832,535367,"utils/nn.py",10297,0,"",python,selection_command
+833,535556,"utils/nn.py",10311,0,"",python,selection_command
+834,535761,"utils/nn.py",10380,0,"",python,selection_command
+835,535999,"utils/nn.py",10311,0,"",python,selection_command
+836,536195,"utils/nn.py",10297,0,"",python,selection_command
+837,536260,"utils/nn.py",10273,0,"",python,selection_command
+838,536428,"utils/nn.py",10297,0,"",python,selection_command
+839,536570,"utils/nn.py",10311,0,"",python,selection_command
+840,537046,"utils/nn.py",10303,68," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")",python,selection_command
+841,537571,"utils/nn.py",10303,114," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)",python,selection_command
+842,538096,"utils/nn.py",10303,115,"",python,content
+843,538099,"utils/nn.py",10315,0,"",python,selection_command
+844,538463,"utils/nn.py",10301,0,"",python,selection_command
+845,538480,"utils/nn.py",10277,0,"",python,selection_command
+846,538619,"utils/nn.py",10240,0,"",python,selection_command
+847,538921,"utils/nn.py",10264,0,"\n z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)",python,content
+848,538933,"utils/nn.py",10277,0,"",python,selection_command
+849,539698,"utils/nn.py",10265,68," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")",python,selection_command
+850,540068,"utils/nn.py",10265,114," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)",python,selection_command
+851,540470,"utils/nn.py",10334,12," ",python,content
+852,540470,"utils/nn.py",10265,12," ",python,content
+853,540472,"utils/nn.py",10273,0,"",python,selection_command
+854,542914,"utils/nn.py",10236,0,"",python,selection_command
+855,543010,"utils/nn.py",10203,0,"",python,selection_command
+856,543153,"utils/nn.py",10129,0,"",python,selection_command
+857,543338,"utils/nn.py",10079,0,"",python,selection_command
+858,543432,"utils/nn.py",10022,0,"",python,selection_command
+859,543575,"utils/nn.py",10008,0,"",python,selection_command
+860,543722,"utils/nn.py",9984,0,"",python,selection_command
+861,543885,"utils/nn.py",9943,0,"",python,selection_command
+862,544061,"utils/nn.py",9984,0,"",python,selection_command
+863,544225,"utils/nn.py",10008,0,"",python,selection_command
+864,544387,"utils/nn.py",10022,0,"",python,selection_command
+865,544510,"utils/nn.py",10079,0,"",python,selection_command
+866,544994,"utils/nn.py",10022,0,"",python,selection_command
+867,545172,"utils/nn.py",10008,0,"",python,selection_command
+868,545434,"utils/nn.py",9984,0,"",python,selection_command
+869,558100,"utils/nn.py",10008,0,"",python,selection_command
+870,558338,"utils/nn.py",10000,14,"",python,content
+871,558351,"utils/nn.py",10012,0,"",python,selection_command
+872,558852,"utils/nn.py",10000,56," # FIXME (f.srambical): only input last token",python,selection_command
+873,559356,"utils/nn.py",10000,106," # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)",python,selection_command
+874,559418,"utils/nn.py",10000,180," # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)\n z_BTNM = einops.rearrange(z_FNM, ""(b t) n m -> b t n m"", t=T)",python,selection_command
+875,559869,"utils/nn.py",10107,12," ",python,content
+876,559869,"utils/nn.py",10057,12," ",python,content
+877,559869,"utils/nn.py",10000,12," ",python,content
+878,559871,"utils/nn.py",10008,0,"",python,selection_command
+879,561637,"utils/nn.py",10061,0,"",python,selection_command
+880,561792,"utils/nn.py",10107,0,"",python,selection_command
+881,561937,"utils/nn.py",10177,0,"",python,selection_command
+882,562075,"utils/nn.py",10210,0,"",python,selection_command
+883,562217,"utils/nn.py",10247,0,"",python,selection_command
+884,562352,"utils/nn.py",10312,0,"",python,selection_command
+885,562503,"utils/nn.py",10354,0,"",python,selection_command
+886,562686,"utils/nn.py",10378,0,"",python,selection_command
+887,564029,"utils/nn.py",10370,14,"",python,content
+888,564036,"utils/nn.py",10382,0,"",python,selection_command
+889,565644,"utils/nn.py",10370,56," # FIXME (f.srambical): only input last token",python,selection_command
+890,566194,"utils/nn.py",10370,107," # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)",python,selection_command
+891,566311,"utils/nn.py",10370,181," # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)\n z_BTNM = einops.rearrange(z_PTM, ""(b n) t m -> b t n m"", n=N)",python,selection_command
+892,566776,"utils/nn.py",10478,12," ",python,content
+893,566776,"utils/nn.py",10427,12," ",python,content
+894,566776,"utils/nn.py",10370,12," ",python,content
+895,566778,"utils/nn.py",10378,0,"",python,selection_command
+896,569678,"utils/nn.py",10354,0,"",python,selection_command
+897,569920,"utils/nn.py",10312,0,"",python,selection_command
+898,569946,"utils/nn.py",10247,0,"",python,selection_command
+899,569982,"utils/nn.py",10210,0,"",python,selection_command
+900,570020,"utils/nn.py",10177,0,"",python,selection_command
+901,570046,"utils/nn.py",10107,0,"",python,selection_command
+902,570083,"utils/nn.py",10061,0,"",python,selection_command
+903,570121,"utils/nn.py",10008,0,"",python,selection_command
+904,570242,"utils/nn.py",9984,0,"",python,selection_command
+905,574642,"utils/nn.py",10008,0,"",python,selection_command
+906,575367,"utils/nn.py",9984,0,"",python,selection_command
+907,575432,"utils/nn.py",9999,0,"\n ",python,content
+908,584060,"utils/nn.py",10012,0,"z",python,content
+909,584061,"utils/nn.py",10013,0,"",python,selection_keyboard
+910,584470,"utils/nn.py",10013,0,"_",python,content
+911,584470,"utils/nn.py",10014,0,"",python,selection_keyboard
+912,595554,"utils/nn.py",10014,0,"F",python,content
+913,595555,"utils/nn.py",10015,0,"",python,selection_keyboard
+914,596641,"utils/nn.py",10015,0,"1",python,content
+915,596641,"utils/nn.py",10016,0,"",python,selection_keyboard
+916,597244,"utils/nn.py",10016,0,"M",python,content
+917,597244,"utils/nn.py",10017,0,"",python,selection_keyboard
+918,597617,"utils/nn.py",10017,0," ",python,content
+919,597617,"utils/nn.py",10018,0,"",python,selection_keyboard
+920,598265,"utils/nn.py",10018,0,"+",python,content
+921,598266,"utils/nn.py",10019,0,"",python,selection_keyboard
+922,598767,"utils/nn.py",10018,1,"",python,content
+923,599068,"utils/nn.py",10018,0,"=",python,content
+924,599068,"utils/nn.py",10019,0,"",python,selection_keyboard
+925,599250,"utils/nn.py",10019,0," ",python,content
+926,599250,"utils/nn.py",10020,0,"",python,selection_keyboard
+927,601263,"utils/nn.py",10020,0,"z_FNM.at[pos_index[0], pos_index[1], :].set(0)",python,content
+928,601758,"utils/nn.py",10065,0,"",python,selection_command
+929,602205,"utils/nn.py",10064,0,"",python,selection_command
+930,602349,"utils/nn.py",10063,0,"",python,selection_command
+931,602524,"utils/nn.py",10060,0,"",python,selection_command
+932,602689,"utils/nn.py",10057,0,"",python,selection_command
+933,602833,"utils/nn.py",10054,0,"",python,selection_command
+934,602972,"utils/nn.py",10053,0,"",python,selection_command
+935,603137,"utils/nn.py",10052,0,"",python,selection_command
+936,603300,"utils/nn.py",10043,0,"",python,selection_command
+937,603469,"utils/nn.py",10040,0,"",python,selection_command
+938,603656,"utils/nn.py",10039,0,"",python,selection_command
+939,603850,"utils/nn.py",10038,0,"",python,selection_command
+940,604169,"utils/nn.py",10029,0,"",python,selection_command
+941,620670,"utils/nn.py",10008,67,"",python,content
+942,620673,"utils/nn.py",9984,0,"",python,selection_command
+943,620702,"utils/nn.py",10470,0," ",python,content
+944,620702,"utils/nn.py",10431,0," ",python,content
+945,620703,"utils/nn.py",10378,0," ",python,content
+946,620703,"utils/nn.py",10382,0,"",python,selection_command
+947,620849,"utils/nn.py",10378,0,"else:\n ",python,content
+948,620851,"utils/nn.py",10378,0,"",python,selection_command
+949,621029,"utils/nn.py",10099,0," ",python,content
+950,621029,"utils/nn.py",10061,0," ",python,content
+951,621030,"utils/nn.py",10008,0," ",python,content
+952,621030,"utils/nn.py",10012,0,"",python,selection_command
+953,621195,"utils/nn.py",10008,0,"else:\n ",python,content
+954,621197,"utils/nn.py",10008,0,"",python,selection_command
+955,621282,"utils/nn.py",10330,0," ",python,content
+956,621283,"utils/nn.py",10273,0," ",python,content
+957,621283,"utils/nn.py",10277,0,"",python,selection_command
+958,621720,"utils/nn.py",10273,115,"",python,content
+959,621723,"utils/nn.py",10240,0,"",python,selection_command
+960,622119,"utils/nn.py",10315,0,"z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n ",python,content
+961,622122,"utils/nn.py",10311,0,"",python,selection_command
+962,622440,"utils/nn.py",9935,0," ",python,content
+963,622441,"utils/nn.py",9878,0," ",python,content
+964,622441,"utils/nn.py",9882,0,"",python,selection_command
+965,622500,"utils/nn.py",9878,114,"",python,content
+966,622502,"utils/nn.py",9848,0,"",python,selection_command
+967,623558,"utils/nn.py",9920,0,"z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n ",python,content
+968,623558,"utils/nn.py",9915,0,"",python,selection_command
+969,625694,"utils/nn.py",9901,0,"",python,selection_command
+970,625751,"utils/nn.py",9877,0,"",python,selection_command
+971,668696,"utils/nn.py",9893,0,"\n ",python,content
+972,675687,"utils/nn.py",9906,0,"z",python,content
+973,675687,"utils/nn.py",9907,0,"",python,selection_keyboard
+974,676062,"utils/nn.py",9907,0,"_",python,content
+975,676063,"utils/nn.py",9908,0,"",python,selection_keyboard
+976,677466,"utils/nn.py",9907,1,"",python,content
+977,678885,"utils/nn.py",9907,0,"_",python,content
+978,678885,"utils/nn.py",9908,0,"",python,selection_keyboard
+979,679655,"utils/nn.py",9908,0,"a",python,content
+980,679656,"utils/nn.py",9909,0,"",python,selection_keyboard
+981,680232,"utils/nn.py",9908,1,"",python,content
+982,680328,"utils/nn.py",9907,0,"",python,selection_command
+983,693756,"utils/nn.py",9908,0,"",python,selection_command
+984,693942,"utils/nn.py",9908,0,"B",python,content
+985,693942,"utils/nn.py",9909,0,"",python,selection_keyboard
+986,694316,"utils/nn.py",9909,0,"M",python,content
+987,694316,"utils/nn.py",9910,0,"",python,selection_keyboard
+988,694806,"utils/nn.py",9910,0," ",python,content
+989,694806,"utils/nn.py",9911,0,"",python,selection_keyboard
+990,695197,"utils/nn.py",9911,0,"=",python,content
+991,695197,"utils/nn.py",9912,0,"",python,selection_keyboard
+992,695664,"utils/nn.py",9911,1,"",python,content
+993,696182,"utils/nn.py",9911,0,"=",python,content
+994,696182,"utils/nn.py",9912,0,"",python,selection_keyboard
+995,696380,"utils/nn.py",9912,0," ",python,content
+996,696380,"utils/nn.py",9913,0,"",python,selection_keyboard
+997,698080,"utils/nn.py",9913,0,"x_BTNM.at[pos_index[0], pos_index[1], :].set(0)",python,content
+998,698487,"utils/nn.py",9959,0,"",python,selection_command
+999,699331,"utils/nn.py",9958,0,"",python,selection_command
+1000,699525,"utils/nn.py",9957,0,"",python,selection_command
+1001,699748,"utils/nn.py",9954,0,"",python,selection_command
+1002,699926,"utils/nn.py",9951,0,"",python,selection_command
+1003,702769,"utils/nn.py",9952,0,"",python,selection_command
+1004,703521,"utils/nn.py",9953,0,"",python,selection_command
+1005,713832,"utils/nn.py",9951,0,"",python,selection_command
+1006,714378,"utils/nn.py",9948,0,"",python,selection_command
+1007,714707,"utils/nn.py",9951,0,"",python,selection_command
+1008,714845,"utils/nn.py",9954,0,"",python,selection_command
+1009,715811,"utils/nn.py",9951,0,"",python,selection_command
+1010,716449,"utils/nn.py",9952,0,"",python,selection_command
+1011,716875,"utils/nn.py",9953,0,"",python,selection_command
+1012,717206,"utils/nn.py",9953,7,"",python,content
+1013,717209,"utils/nn.py",9952,0,"",python,selection_command
+1014,717378,"utils/nn.py",9951,0,"",python,selection_command
+1015,717542,"utils/nn.py",9948,0,"",python,selection_command
+1016,717741,"utils/nn.py",9947,0,"",python,selection_command
+1017,717913,"utils/nn.py",9946,0,"",python,selection_command
+1018,718060,"utils/nn.py",9937,0,"",python,selection_command
+1019,718265,"utils/nn.py",9934,0,"",python,selection_command
+1020,718433,"utils/nn.py",9933,0,"",python,selection_command
+1021,718582,"utils/nn.py",9932,0,"",python,selection_command
+1022,718732,"utils/nn.py",9923,0,"",python,selection_command
+1023,718866,"utils/nn.py",9922,0,"",python,selection_command
+1024,719013,"utils/nn.py",9920,0,"",python,selection_command
+1025,719548,"utils/nn.py",9919,0,"",python,selection_command
+1026,719863,"utils/nn.py",9919,1,".",python,selection_command
+1027,720047,"utils/nn.py",9919,2,".a",python,selection_command
+1028,720303,"utils/nn.py",9919,3,".at",python,selection_command
+1029,720304,"utils/nn.py",9919,4,".at[",python,selection_command
+1030,720399,"utils/nn.py",9919,4,"",python,content
+1031,722261,"utils/nn.py",9919,0,"[",python,content
+1032,722262,"utils/nn.py",9920,0,"",python,selection_keyboard
+1033,722674,"utils/nn.py",9919,0,"",python,selection_command
+1034,724070,"utils/nn.py",9920,0,"",python,selection_command
+1035,724807,"utils/nn.py",9920,0,":",python,content
+1036,724807,"utils/nn.py",9921,0,"",python,selection_keyboard
+1037,725051,"utils/nn.py",9921,0,",",python,content
+1038,725051,"utils/nn.py",9922,0,"",python,selection_keyboard
+1039,725217,"utils/nn.py",9922,0," ",python,content
+1040,725218,"utils/nn.py",9923,0,"",python,selection_keyboard
+1041,725450,"utils/nn.py",9922,0,"",python,selection_command
+1042,725719,"utils/nn.py",9923,0,"",python,selection_command
+1043,725969,"utils/nn.py",9932,0,"",python,selection_command
+1044,725999,"utils/nn.py",9933,0,"",python,selection_command
+1045,726031,"utils/nn.py",9934,0,"",python,selection_command
+1046,726063,"utils/nn.py",9937,0,"",python,selection_command
+1047,726099,"utils/nn.py",9946,0,"",python,selection_command
+1048,726276,"utils/nn.py",9947,0,"",python,selection_command
+1049,726592,"utils/nn.py",9948,0,"",python,selection_command
+1050,726787,"utils/nn.py",9951,0,"",python,selection_command
+1051,726995,"utils/nn.py",9962,0,"",python,selection_command
+1052,727304,"utils/nn.py",9951,0,"",python,selection_command
+1053,727562,"utils/nn.py",9948,0,"",python,selection_command
+1054,727590,"utils/nn.py",9947,0,"",python,selection_command
+1055,727620,"utils/nn.py",9946,0,"",python,selection_command
+1056,728107,"utils/nn.py",9937,0,"",python,selection_command
+1057,729149,"utils/nn.py",9934,0,"",python,selection_command
+1058,729329,"utils/nn.py",9933,0,"",python,selection_command
+1059,729529,"utils/nn.py",9932,0,"",python,selection_command
+1060,729789,"utils/nn.py",9923,0,"",python,selection_command
+1061,734628,"utils/nn.py",9892,0,"",python,selection_command
+1062,735100,"utils/nn.py",9893,0,"\n ",python,content
+1063,735340,"utils/nn.py",9906,0,"a",python,content
+1064,735340,"utils/nn.py",9907,0,"",python,selection_keyboard
+1065,735411,"utils/nn.py",9907,0,"s",python,content
+1066,735412,"utils/nn.py",9908,0,"",python,selection_keyboard
+1067,735611,"utils/nn.py",9908,0,"s",python,content
+1068,735611,"utils/nn.py",9909,0,"",python,selection_keyboard
+1069,735709,"utils/nn.py",9909,0,"e",python,content
+1070,735709,"utils/nn.py",9910,0,"",python,selection_keyboard
+1071,735757,"utils/nn.py",9910,0,"r",python,content
+1072,735757,"utils/nn.py",9911,0,"",python,selection_keyboard
+1073,735984,"utils/nn.py",9911,0,"t",python,content
+1074,735984,"utils/nn.py",9912,0,"",python,selection_keyboard
+1075,736588,"utils/nn.py",9912,0," pos_index is not None",python,content
+1076,736917,"utils/nn.py",9933,0,"",python,selection_command
+1077,742877,"utils/nn.py",9974,0,"",python,selection_command
+1078,747307,"utils/nn.py",9935,59," z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]",python,selection_command
+1079,790389,"utils/nn.py",9974,0,"",python,selection_command
+1080,790736,"utils/nn.py",9973,0,"",python,selection_command
+1081,790821,"utils/nn.py",9964,0,"",python,selection_command
+1082,791059,"utils/nn.py",9960,0,"",python,selection_command
+1083,791122,"utils/nn.py",9954,0,"",python,selection_command
+1084,791275,"utils/nn.py",9952,0,"",python,selection_command
+1085,857983,"utils/nn.py",9994,0,"\n ",python,content
+1086,858816,"utils/nn.py",10007,0,"z",python,content
+1087,858816,"utils/nn.py",10008,0,"",python,selection_keyboard
+1088,859245,"utils/nn.py",10008,0,"_",python,content
+1089,859246,"utils/nn.py",10009,0,"",python,selection_keyboard
+1090,859704,"utils/nn.py",10009,0,"j",python,content
+1091,859704,"utils/nn.py",10010,0,"",python,selection_keyboard
+1092,860215,"utils/nn.py",10009,1,"",python,content
+1093,860361,"utils/nn.py",10008,1,"",python,content
+1094,861391,"utils/nn.py",10008,0,"_",python,content
+1095,861391,"utils/nn.py",10009,0,"",python,selection_keyboard
+1096,862892,"utils/nn.py",10009,0,"B",python,content
+1097,862892,"utils/nn.py",10010,0,"",python,selection_keyboard
+1098,863747,"utils/nn.py",10010,0,"M",python,content
+1099,863748,"utils/nn.py",10011,0,"",python,selection_keyboard
+1100,864632,"utils/nn.py",10010,1,"",python,content
+1101,864914,"utils/nn.py",10010,0,"1",python,content
+1102,864914,"utils/nn.py",10011,0,"",python,selection_keyboard
+1103,865236,"utils/nn.py",10011,0,"m",python,content
+1104,865236,"utils/nn.py",10012,0,"",python,selection_keyboard
+1105,865656,"utils/nn.py",10011,1,"",python,content
+1106,865924,"utils/nn.py",10011,0,"M",python,content
+1107,865925,"utils/nn.py",10012,0,"",python,selection_keyboard
+1108,866259,"utils/nn.py",10012,0," ",python,content
+1109,866259,"utils/nn.py",10013,0,"",python,selection_keyboard
+1110,867768,"utils/nn.py",10013,0,"=",python,content
+1111,867768,"utils/nn.py",10014,0,"",python,selection_keyboard
+1112,868456,"utils/nn.py",10014,0," ",python,content
+1113,868457,"utils/nn.py",10015,0,"",python,selection_keyboard
+1114,871541,"utils/nn.py",10015,0,"s",python,content
+1115,871541,"utils/nn.py",10016,0,"",python,selection_keyboard
+1116,871545,"utils/nn.py",10016,0,"e",python,content
+1117,871545,"utils/nn.py",10017,0,"",python,selection_keyboard
+1118,871638,"utils/nn.py",10017,0,"l",python,content
+1119,871638,"utils/nn.py",10018,0,"",python,selection_keyboard
+1120,871736,"utils/nn.py",10018,0,"f",python,content
+1121,871737,"utils/nn.py",10019,0,"",python,selection_keyboard
+1122,871757,"utils/nn.py",10019,0,".",python,content
+1123,871757,"utils/nn.py",10020,0,"",python,selection_keyboard
+1124,871945,"utils/nn.py",10020,0,"r",python,content
+1125,871945,"utils/nn.py",10021,0,"",python,selection_keyboard
+1126,872157,"utils/nn.py",10021,0,"a",python,content
+1127,872157,"utils/nn.py",10022,0,"",python,selection_keyboard
+1128,872490,"utils/nn.py",10022,0,"e",python,content
+1129,872490,"utils/nn.py",10023,0,"",python,selection_keyboard
+1130,872674,"utils/nn.py",10023,0,"a",python,content
+1131,872674,"utils/nn.py",10024,0,"",python,selection_keyboard
+1132,872841,"utils/nn.py",10023,1,"",python,content
+1133,873173,"utils/nn.py",10020,3,"",python,content
+1134,873325,"utils/nn.py",10019,1,"",python,content
+1135,873674,"utils/nn.py",10019,0,"j",python,content
+1136,873674,"utils/nn.py",10020,0,"",python,selection_keyboard
+1137,874014,"utils/nn.py",10015,5,"",python,content
+1138,874424,"utils/nn.py",10015,0,"j",python,content
+1139,874424,"utils/nn.py",10016,0,"",python,selection_keyboard
+1140,874492,"utils/nn.py",10016,0,"n",python,content
+1141,874492,"utils/nn.py",10017,0,"",python,selection_keyboard
+1142,874622,"utils/nn.py",10017,0,"p",python,content
+1143,874622,"utils/nn.py",10018,0,"",python,selection_keyboard
+1144,874950,"utils/nn.py",10018,0,".",python,content
+1145,874950,"utils/nn.py",10019,0,"",python,selection_keyboard
+1146,875143,"utils/nn.py",10019,0,"r",python,content
+1147,875143,"utils/nn.py",10020,0,"",python,selection_keyboard
+1148,875183,"utils/nn.py",10020,0,"e",python,content
+1149,875184,"utils/nn.py",10021,0,"",python,selection_keyboard
+1150,875342,"utils/nn.py",10021,0,"a",python,content
+1151,875471,"utils/nn.py",10022,0,"r",python,content
+1152,875472,"utils/nn.py",10023,0,"",python,selection_keyboard
+1153,875664,"utils/nn.py",10023,0,"r",python,content
+1154,875665,"utils/nn.py",10024,0,"",python,selection_keyboard
+1155,875779,"utils/nn.py",10024,0,"a",python,content
+1156,875779,"utils/nn.py",10025,0,"",python,selection_keyboard
+1157,875794,"utils/nn.py",10025,0,"g",python,content
+1158,875795,"utils/nn.py",10026,0,"",python,selection_keyboard
+1159,875839,"utils/nn.py",10026,0,"e",python,content
+1160,875839,"utils/nn.py",10027,0,"",python,selection_keyboard
+1161,875892,"utils/nn.py",10027,0,"n",python,content
+1162,875893,"utils/nn.py",10028,0,"",python,selection_keyboard
+1163,876527,"utils/nn.py",10027,1,"",python,content
+1164,876710,"utils/nn.py",10026,1,"",python,content
+1165,876894,"utils/nn.py",10025,1,"",python,content
+1166,877041,"utils/nn.py",10025,0,"n",python,content
+1167,877041,"utils/nn.py",10026,0,"",python,selection_keyboard
+1168,877077,"utils/nn.py",10026,0,"e",python,content
+1169,877077,"utils/nn.py",10027,0,"",python,selection_keyboard
+1170,877464,"utils/nn.py",10027,0,"()",python,content
+1171,877465,"utils/nn.py",10028,0,"",python,selection_keyboard
+1172,877921,"utils/nn.py",10028,0," ",python,content
+1173,877921,"utils/nn.py",10029,0,"",python,selection_keyboard
+1174,878364,"utils/nn.py",10028,1,"",python,content
+1175,878917,"utils/nn.py",10027,0,"",python,selection_command
+1176,879020,"utils/nn.py",10026,0,"",python,selection_command
+1177,879330,"utils/nn.py",10026,0,"g",python,content
+1178,879330,"utils/nn.py",10027,0,"",python,selection_keyboard
+1179,880383,"utils/nn.py",10026,0,"",python,selection_command
+1180,881231,"utils/nn.py",10030,0,"",python,selection_command
+1181,881755,"utils/nn.py",10029,0,"",python,selection_command
+1182,883585,"utils/nn.py",10029,0,"z",python,content
+1183,883585,"utils/nn.py",10030,0,"",python,selection_keyboard
+1184,884051,"utils/nn.py",10030,0,"_",python,content
+1185,884052,"utils/nn.py",10031,0,"",python,selection_keyboard
+1186,884937,"utils/nn.py",10030,1,"",python,content
+1187,885485,"utils/nn.py",10030,0,"_",python,content
+1188,885485,"utils/nn.py",10031,0,"",python,selection_keyboard
+1189,886751,"utils/nn.py",10031,0,"B",python,content
+1190,886751,"utils/nn.py",10032,0,"",python,selection_keyboard
+1191,887158,"utils/nn.py",10032,0,"M",python,content
+1192,887158,"utils/nn.py",10033,0,"",python,selection_keyboard
+1193,887522,"utils/nn.py",10033,0,",",python,content
+1194,887522,"utils/nn.py",10034,0,"",python,selection_keyboard
+1195,887620,"utils/nn.py",10034,0," ",python,content
+1196,887620,"utils/nn.py",10035,0,"",python,selection_keyboard
+1197,895911,"utils/nn.py",10034,0,"",python,selection_command
+1198,896253,"utils/nn.py",10033,0,"",python,selection_command
+1199,896436,"utils/nn.py",10029,0,"",python,selection_command
+1200,896712,"utils/nn.py",10028,0,"",python,selection_command
+1201,897228,"utils/nn.py",10019,0,"",python,selection_command
+1202,897617,"utils/nn.py",10019,9,"",python,content
+1203,898153,"utils/nn.py",10019,0,"r",python,content
+1204,898153,"utils/nn.py",10020,0,"",python,selection_keyboard
+1205,898194,"utils/nn.py",10020,0,"e",python,content
+1206,898195,"utils/nn.py",10021,0,"",python,selection_keyboard
+1207,898539,"utils/nn.py",10021,0,"s",python,content
+1208,898541,"utils/nn.py",10022,0,"e",python,content
+1209,898542,"utils/nn.py",10023,0,"",python,selection_keyboard
+1210,898542,"utils/nn.py",10023,0,"h",python,content
+1211,898542,"utils/nn.py",10024,0,"",python,selection_keyboard
+1212,898631,"utils/nn.py",10024,0,"a",python,content
+1213,898631,"utils/nn.py",10025,0,"",python,selection_keyboard
+1214,898631,"utils/nn.py",10025,0,"p",python,content
+1215,898632,"utils/nn.py",10026,0,"",python,selection_keyboard
+1216,898709,"utils/nn.py",10026,0,"e",python,content
+1217,898709,"utils/nn.py",10027,0,"",python,selection_keyboard
+1218,898912,"utils/nn.py",10026,0,"",python,selection_command
+1219,899581,"utils/nn.py",10019,0,"",python,selection_command
+1220,899927,"utils/nn.py",10019,8,"",python,content
+1221,900233,"utils/nn.py",10019,0,"r",python,content
+1222,900233,"utils/nn.py",10020,0,"",python,selection_keyboard
+1223,900262,"utils/nn.py",10020,0,"e",python,content
+1224,900262,"utils/nn.py",10021,0,"",python,selection_keyboard
+1225,900632,"utils/nn.py",10021,0,"s",python,content
+1226,900632,"utils/nn.py",10022,0,"",python,selection_keyboard
+1227,900632,"utils/nn.py",10022,0,"h",python,content
+1228,900633,"utils/nn.py",10023,0,"",python,selection_keyboard
+1229,900717,"utils/nn.py",10023,0,"a",python,content
+1230,900718,"utils/nn.py",10024,0,"p",python,content
+1231,900719,"utils/nn.py",10025,0,"",python,selection_keyboard
+1232,900830,"utils/nn.py",10025,0,"e",python,content
+1233,900830,"utils/nn.py",10026,0,"",python,selection_keyboard
+1234,901410,"utils/nn.py",10025,0,"",python,selection_command
+1235,914757,"utils/nn.py",10026,0,"",python,selection_command
+1236,914908,"utils/nn.py",10030,0,"",python,selection_command
+1237,915049,"utils/nn.py",10031,0,"",python,selection_command
+1238,915650,"utils/nn.py",10032,0,"",python,selection_command
+1239,915709,"utils/nn.py",10033,0,"",python,selection_command
+1240,916262,"utils/nn.py",10033,0,"()",python,content
+1241,916262,"utils/nn.py",10034,0,"",python,selection_keyboard
+1242,916325,"utils/nn.py",10034,1,")",python,content
+1243,916325,"utils/nn.py",10035,0,"",python,selection_keyboard
+1244,916972,"utils/nn.py",10034,0,"",python,selection_command
+1245,918246,"utils/nn.py",10034,0,"B, 1, M",python,content
+1246,918427,"utils/nn.py",10040,0,"",python,selection_command
+1247,919877,"utils/nn.py",10038,0,"",python,selection_command
+1248,920015,"utils/nn.py",10037,0,"",python,selection_command
+1249,920175,"utils/nn.py",10035,0,"",python,selection_command
+1250,920928,"utils/nn.py",10034,0,"",python,selection_command
+1251,926912,"utils/nn.py",9994,0,"\n ",python,content
+1252,928378,"utils/nn.py",10007,0,"B",python,content
+1253,928378,"utils/nn.py",10008,0,"",python,selection_keyboard
+1254,928600,"utils/nn.py",10008,0," ",python,content
+1255,928601,"utils/nn.py",10009,0,"",python,selection_keyboard
+1256,929605,"utils/nn.py",10009,0,"=",python,content
+1257,929605,"utils/nn.py",10010,0,"",python,selection_keyboard
+1258,930118,"utils/nn.py",10010,0," ",python,content
+1259,931190,"utils/nn.py",10011,0,"z_BM.shape[0]",python,content
+1260,931474,"utils/nn.py",10023,0,"",python,selection_command
+1261,932599,"utils/nn.py",10053,0,"",python,selection_command
+1262,935297,"utils/nn.py",10008,0,",",python,content
+1263,935513,"utils/nn.py",10009,0," ",python,content
+1264,935513,"utils/nn.py",10010,0,"",python,selection_keyboard
+1265,935943,"utils/nn.py",10010,0,"M",python,content
+1266,935943,"utils/nn.py",10011,0,"",python,selection_keyboard
+1267,936208,"utils/nn.py",10010,0,"",python,selection_command
+1268,936292,"utils/nn.py",10012,0,"",python,selection_command
+1269,936460,"utils/nn.py",10014,0,"",python,selection_command
+1270,936791,"utils/nn.py",10018,0,"",python,selection_command
+1271,936959,"utils/nn.py",10019,0,"",python,selection_command
+1272,938018,"utils/nn.py",10076,0,"\n z_B1M = self.spatial_norm(z_B1M)\n z_B1M = self.spatial_attention(z_B1M)\n z_B1M = jnp.reshape(z_B1M, (B, M))\n z_BTNM = x_BTNM.at[:, pos_index[0], pos_index[1], :].set(z_B1M)",python,content
+1273,938018,"utils/nn.py",10024,3,"",python,content
+1274,939598,"utils/nn.py",10049,0,"",python,selection_command
+1275,939743,"utils/nn.py",10098,0,"",python,selection_command
+1276,940246,"utils/nn.py",10074,45,"",python,content
+1277,940254,"utils/nn.py",10086,0,"",python,selection_command
+1278,940647,"utils/nn.py",10074,50,"",python,content
+1279,940652,"utils/nn.py",10086,0,"",python,selection_command
+1280,940968,"utils/nn.py",10074,47,"",python,content
+1281,940979,"utils/nn.py",10086,0,"",python,selection_command
+1282,941652,"utils/nn.py",10074,76,"",python,content
+1283,941665,"utils/nn.py",10082,0,"",python,selection_command
+1284,942477,"utils/nn.py",10033,0,"",python,selection_command
+1285,943193,"utils/nn.py",10037,0,"",python,selection_command
+1286,947539,"utils/nn.py",10025,48," z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,selection_command
+1287,947954,"utils/nn.py",9995,78," B, M = z_BM.shape\n z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,selection_command
+1288,948048,"utils/nn.py",9935,138," z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n B, M = z_BM.shape\n z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,selection_command
+1289,948190,"utils/nn.py",9894,179," assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n B, M = z_BM.shape\n z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,selection_command
+1290,948330,"utils/nn.py",9870,203," if self.decode:\n assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n B, M = z_BM.shape\n z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,selection_command
+1291,948812,"utils/nn.py",9870,0,"",python,selection_command
+1292,950103,"utils/nn.py",9894,0,"",python,selection_command
+1293,950551,"utils/nn.py",9894,40," assert pos_index is not None",python,selection_command
+1294,950964,"utils/nn.py",9894,100," assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]",python,selection_command
+1295,951038,"utils/nn.py",9894,130," assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n B, M = z_BM.shape",python,selection_command
+1296,951198,"utils/nn.py",9894,179," assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n B, M = z_BM.shape\n z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,selection_command
+1297,951693,"utils/nn.py",9894,0,"",python,selection_command
+1298,952111,"utils/nn.py",9935,0,"",python,selection_command
+1299,952359,"utils/nn.py",9995,0,"",python,selection_command
+1300,952371,"utils/nn.py",10025,0,"",python,selection_command
+1301,952410,"utils/nn.py",10074,0,"",python,selection_command
+1302,952437,"utils/nn.py",10088,0,"",python,selection_command
+1303,952470,"utils/nn.py",10157,0,"",python,selection_command
+1304,952500,"utils/nn.py",10202,0,"",python,selection_command
+1305,952536,"utils/nn.py",10259,0,"",python,selection_command
+1306,952570,"utils/nn.py",10309,0,"",python,selection_command
+1307,952605,"utils/nn.py",10383,0,"",python,selection_command
+1308,952639,"utils/nn.py",10416,0,"",python,selection_command
+1309,952794,"utils/nn.py",10453,0,"",python,selection_command
+1310,953239,"utils/nn.py",10476,0,"\n assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n B, M = z_BM.shape\n z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,content
+1311,953257,"utils/nn.py",10489,0,"",python,selection_command
+1312,955062,"utils/nn.py",10530,0,"",python,selection_command
+1313,960751,"utils/nn.py",10535,0,"",python,selection_command
+1314,960882,"utils/nn.py",10537,0,"",python,selection_command
+1315,961240,"utils/nn.py",10543,0,"",python,selection_command
+1316,961421,"utils/nn.py",10547,0,"",python,selection_command
+1317,961555,"utils/nn.py",10556,0,"",python,selection_command
+1318,961816,"utils/nn.py",10557,0,"",python,selection_command
+1319,961835,"utils/nn.py",10558,0,"",python,selection_command
+1320,961864,"utils/nn.py",10561,0,"",python,selection_command
+1321,962020,"utils/nn.py",10570,0,"",python,selection_command
+1322,962670,"utils/nn.py",10606,0,"",python,selection_command
+1323,969257,"utils/nn.py",10570,0,"",python,selection_command
+1324,969478,"utils/nn.py",10516,0,"",python,selection_command
+1325,969492,"utils/nn.py",10475,0,"",python,selection_command
+1326,969520,"utils/nn.py",10451,0,"",python,selection_command
+1327,969568,"utils/nn.py",10414,0,"",python,selection_command
+1328,969594,"utils/nn.py",10361,0,"",python,selection_command
+1329,969625,"utils/nn.py",10307,0,"",python,selection_command
+1330,969659,"utils/nn.py",10254,0,"",python,selection_command
+1331,969782,"utils/nn.py",10200,0,"",python,selection_command
+1332,969783,"utils/nn.py",10140,0,"",python,selection_command
+1333,969784,"utils/nn.py",10086,0,"",python,selection_command
+1334,969798,"utils/nn.py",10072,0,"",python,selection_command
+1335,969980,"utils/nn.py",10023,0,"",python,selection_command
+1336,971094,"utils/nn.py",9995,30,"",python,content
+1337,971114,"utils/nn.py",10007,0,"",python,selection_command
+1338,972150,"utils/nn.py",10056,0,"",python,selection_command
+1339,972405,"utils/nn.py",10070,0,"",python,selection_command
+1340,972420,"utils/nn.py",10139,0,"",python,selection_command
+1341,972454,"utils/nn.py",10184,0,"",python,selection_command
+1342,972485,"utils/nn.py",10241,0,"",python,selection_command
+1343,972601,"utils/nn.py",10291,0,"",python,selection_command
+1344,972602,"utils/nn.py",10365,0,"",python,selection_command
+1345,972602,"utils/nn.py",10398,0,"",python,selection_command
+1346,972622,"utils/nn.py",10435,0,"",python,selection_command
+1347,972655,"utils/nn.py",10459,0,"",python,selection_command
+1348,972694,"utils/nn.py",10500,0,"",python,selection_command
+1349,972823,"utils/nn.py",10560,0,"",python,selection_command
+1350,973356,"utils/nn.py",10548,30,"",python,content
+1351,973363,"utils/nn.py",10560,0,"",python,selection_command
+1352,973650,"utils/nn.py",10500,0,"",python,selection_command
+1353,973977,"utils/nn.py",10459,0,"",python,selection_command
+1354,973977,"utils/nn.py",10435,0,"",python,selection_command
+1355,973977,"utils/nn.py",10398,0,"",python,selection_command
+1356,973987,"utils/nn.py",10365,0,"",python,selection_command
+1357,974014,"utils/nn.py",10291,0,"",python,selection_command
+1358,974050,"utils/nn.py",10241,0,"",python,selection_command
+1359,974083,"utils/nn.py",10184,0,"",python,selection_command
+1360,974174,"utils/nn.py",10139,0,"",python,selection_command
+1361,974174,"utils/nn.py",10070,0,"",python,selection_command
+1362,974182,"utils/nn.py",10056,0,"",python,selection_command
+1363,974218,"utils/nn.py",10007,0,"",python,selection_command
+1364,974250,"utils/nn.py",9947,0,"",python,selection_command
+1365,974283,"utils/nn.py",9906,0,"",python,selection_command
+1366,974502,"utils/nn.py",9882,0,"",python,selection_command
+1367,974580,"utils/nn.py",9848,0,"",python,selection_command
+1368,975078,"utils/nn.py",9847,0,"",python,selection_command
+1369,975223,"utils/nn.py",9845,0,"",python,selection_command
+1370,975425,"utils/nn.py",9844,0,"",python,selection_command
+1371,976176,"utils/nn.py",9844,1,"B",python,content
+1372,976492,"utils/nn.py",9845,0,"",python,selection_command
+1373,976692,"utils/nn.py",9847,0,"",python,selection_command
+1374,976825,"utils/nn.py",9848,0,"",python,selection_command
+1375,976959,"utils/nn.py",9850,0,"",python,selection_command
+1376,977144,"utils/nn.py",9851,0,"",python,selection_command
+1377,977323,"utils/nn.py",9853,0,"",python,selection_command
+1378,978171,"utils/nn.py",9853,1,"M",python,content
+1379,978720,"utils/nn.py",9887,0,"",python,selection_command
+1380,978966,"utils/nn.py",9911,0,"",python,selection_command
+1381,978988,"utils/nn.py",9952,0,"",python,selection_command
+1382,979024,"utils/nn.py",10012,0,"",python,selection_command
+1383,979055,"utils/nn.py",10056,0,"",python,selection_command
+1384,979221,"utils/nn.py",10075,0,"",python,selection_command
+1385,979515,"utils/nn.py",10056,0,"",python,selection_command
+1386,979745,"utils/nn.py",10012,0,"",python,selection_command
+1387,980563,"utils/nn.py",10056,0,"",python,selection_command
+1388,981110,"utils/nn.py",10075,0,"",python,selection_command
+1389,981317,"utils/nn.py",10144,0,"",python,selection_command
+1390,981422,"utils/nn.py",10189,0,"",python,selection_command
+1391,981579,"utils/nn.py",10246,0,"",python,selection_command
+1392,981722,"utils/nn.py",10296,0,"",python,selection_command
+1393,981882,"utils/nn.py",10370,0,"",python,selection_command
+1394,982045,"utils/nn.py",10403,0,"",python,selection_command
+1395,982209,"utils/nn.py",10440,0,"",python,selection_command
+1396,982367,"utils/nn.py",10464,0,"",python,selection_command
+1397,982564,"utils/nn.py",10505,0,"",python,selection_command
+1398,982673,"utils/nn.py",10565,0,"",python,selection_command
+1399,982938,"utils/nn.py",10505,0,"",python,selection_command
+1400,1052672,"utils/nn.py",10464,0,"",python,selection_command
+1401,1052934,"utils/nn.py",10440,0,"",python,selection_command
+1402,1052959,"utils/nn.py",10403,0,"",python,selection_command
+1403,1052990,"utils/nn.py",10370,0,"",python,selection_command
+1404,1053018,"utils/nn.py",10296,0,"",python,selection_command
+1405,1053050,"utils/nn.py",10246,0,"",python,selection_command
+1406,1053086,"utils/nn.py",10189,0,"",python,selection_command
+1407,1053227,"utils/nn.py",10144,0,"",python,selection_command
+1408,1053376,"utils/nn.py",10075,0,"",python,selection_command
+1409,1053500,"utils/nn.py",10056,0,"",python,selection_command
+1410,1053644,"utils/nn.py",10012,0,"",python,selection_command
+1411,1182237,"utils/nn.py",8711,0,"",python,selection_mouse
+1412,1183615,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",0,0,"# Copyright 2024 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the ""License"");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an ""AS IS"" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n""""""Attention core modules for Flax.""""""\n\nfrom __future__ import annotations\n\nimport functools\nfrom typing import Any\nfrom collections.abc import Callable\nimport math\n\nimport jax\nimport jax.numpy as jnp\nfrom jax import lax, random\n\nfrom flax import nnx\nfrom flax.nnx import rnglib\nfrom flax.nnx.module import Module, first_from\nfrom flax.nnx.nn import initializers\nfrom flax.nnx.nn import dtypes\nfrom flax.nnx.nn.linear import (\n LinearGeneral,\n default_kernel_init,\n)\nfrom flax.nnx.nn.normalization import LayerNorm\nfrom flax.typing import (\n Dtype,\n PromoteDtypeFn,\n Shape,\n Initializer,\n PrecisionLike,\n DotGeneralT,\n)\n\nArray = jax.Array\n\n\ndef dot_product_attention_weights(\n query: Array,\n key: Array,\n bias: Array | None = None,\n mask: Array | None = None,\n broadcast_dropout: bool = True,\n dropout_rng: Array | None = None,\n dropout_rate: float = 0.0,\n deterministic: bool = False,\n dtype: Dtype | None = None,\n precision: PrecisionLike = None,\n module: Module | None = None,\n promote_dtype: PromoteDtypeFn = dtypes.promote_dtype,\n):\n """"""Computes dot-product attention weights given query and key.\n\n Used by :func:`dot_product_attention`, which is what you'll most likely use.\n But if you want access to the attention weights for introspection, then\n you can directly call this function and call einsum yourself.\n\n Args:\n query: queries for calculating attention with shape of `[batch..., q_length,\n num_heads, qk_depth_per_head]`.\n key: keys for calculating attention with shape of `[batch..., kv_length,\n num_heads, qk_depth_per_head]`.\n bias: bias for the attention weights. This should be broadcastable to the\n shape `[batch..., num_heads, q_length, kv_length]`. This can be used for\n incorporating causal masks, padding masks, proximity bias, etc.\n mask: mask for the attention weights. This should be broadcastable to the\n shape `[batch..., num_heads, q_length, kv_length]`. This can be used for\n incorporating causal masks. Attention weights are masked out if their\n corresponding mask value is `False`.\n broadcast_dropout: bool: use a broadcasted dropout along batch dims.\n dropout_rng: JAX PRNGKey: to be used for dropout\n dropout_rate: dropout rate\n deterministic: bool, deterministic or not (to apply dropout)\n dtype: the dtype of the computation (default: infer from inputs and params)\n precision: numerical precision of the computation see `jax.lax.Precision`\n for details.\n module: the Module that will sow the attention weights into the\n ``nnx.Intermediate`` collection. If ``module`` is None, the attention\n weights will not be sowed.\n promote_dtype: function to promote the dtype of the arrays to the desired\n dtype. The function should accept a tuple of ``(query, key)`` and a ``dtype``\n keyword argument, and return a tuple of arrays with the promoted dtype.\n\n Returns:\n Output of shape `[batch..., num_heads, q_length, kv_length]`.\n """"""\n query, key = promote_dtype((query, key), dtype=dtype) # type: ignore[bad-unpacking]\n dtype = query.dtype\n\n assert query.ndim == key.ndim, 'q, k must have same rank.'\n assert query.shape[:-3] == key.shape[:-3], 'q, k batch dims must match.'\n assert query.shape[-2] == key.shape[-2], 'q, k num_heads must match.'\n assert query.shape[-1] == key.shape[-1], 'q, k depths must match.'\n\n # calculate attention matrix\n depth = query.shape[-1]\n query = query / jnp.sqrt(depth).astype(dtype)\n # attn weight shape is (batch..., num_heads, q_length, kv_length)\n attn_weights = jnp.einsum(\n '...qhd,...khd->...hqk', query, key, precision=precision\n )\n\n # apply attention bias: masking, dropout, proximity bias, etc.\n if bias is not None:\n attn_weights = attn_weights + bias\n # apply attention mask\n if mask is not None:\n big_neg = jnp.finfo(dtype).min\n attn_weights = jnp.where(mask, attn_weights, big_neg)\n\n # normalize the attention weights\n attn_weights = jax.nn.softmax(attn_weights).astype(dtype)\n\n if module:\n module.sow(nnx.Intermediate, 'attention_weights', attn_weights)\n\n # apply attention dropout\n if not deterministic and dropout_rate > 0.0:\n keep_prob = 1.0 - dropout_rate\n if broadcast_dropout:\n # dropout is broadcast across the batch + head dimensions\n dropout_shape = tuple([1] * (key.ndim - 2)) + attn_weights.shape[-2:]\n keep = random.bernoulli(dropout_rng, keep_prob, dropout_shape) # type: ignore\n else:\n keep = random.bernoulli(dropout_rng, keep_prob, attn_weights.shape) # type: ignore\n multiplier = keep.astype(dtype) / jnp.asarray(keep_prob, dtype=dtype)\n attn_weights = attn_weights * multiplier\n\n return attn_weights\n\n\ndef dot_product_attention(\n query: Array,\n key: Array,\n value: Array,\n bias: Array | None = None,\n mask: Array | None = None,\n broadcast_dropout: bool = True,\n dropout_rng: Array | None = None,\n dropout_rate: float = 0.0,\n deterministic: bool = False,\n dtype: Dtype | None = None,\n precision: PrecisionLike = None,\n module: Module | None = None,\n promote_dtype: PromoteDtypeFn = dtypes.promote_dtype,\n):\n """"""Computes dot-product attention given query, key, and value.\n\n This is the core function for applying attention based on\n https://arxiv.org/abs/1706.03762. It calculates the attention weights given\n query and key and combines the values using the attention weights.\n\n Will use the more optimized `jax.nn.dot_product_attention` if dropout is\n not activated and `module=None`.\n\n .. note::\n ``query``, ``key``, ``value`` needn't have any batch dimensions.\n\n Args:\n query: queries for calculating attention with shape of ``[batch..., q_length,\n num_heads, qk_depth_per_head]``.\n key: keys for calculating attention with shape of ``[batch..., kv_length,\n num_heads, qk_depth_per_head]``.\n value: values to be used in attention with shape of ``[batch..., kv_length,\n num_heads, v_depth_per_head]``.\n bias: bias for the attention weights. This should be broadcastable to the\n shape `[batch..., num_heads, q_length, kv_length]`. This can be used for\n incorporating causal masks, padding masks, proximity bias, etc.\n mask: mask for the attention weights. This should be broadcastable to the\n shape `[batch..., num_heads, q_length, kv_length]`. This can be used for\n incorporating causal masks. Attention weights are masked out if their\n corresponding mask value is `False`.\n broadcast_dropout: bool: use a broadcasted dropout along batch dims.\n dropout_rng: JAX PRNGKey: to be used for dropout\n dropout_rate: dropout rate\n deterministic: bool, deterministic or not (to apply dropout)\n dtype: the dtype of the computation (default: infer from inputs)\n precision: numerical precision of the computation see `jax.lax.Precision`\n for details.\n module: the Module that will sow the attention weights into the\n ``nnx.Intermediate`` collection. If ``module`` is None, the attention\n weights will not be sowed.\n promote_dtype: function to promote the dtype of the arrays to the desired\n dtype. The function should accept a tuple of ``(query, key, value)`` and a\n ``dtype`` keyword argument, and return a tuple of arrays with the promoted\n dtype.\n\n Returns:\n Output of shape `[batch..., q_length, num_heads, v_depth_per_head]`.\n """"""\n query, key, value = promote_dtype((query, key, value), dtype=dtype) # type: ignore[bad-unpacking]\n dtype = query.dtype\n assert key.ndim == query.ndim == value.ndim, 'q, k, v must have same rank.'\n assert (\n query.shape[:-3] == key.shape[:-3] == value.shape[:-3]\n ), 'q, k, v batch dims must match.'\n assert (\n query.shape[-2] == key.shape[-2] == value.shape[-2]\n ), 'q, k, v num_heads must match.'\n assert key.shape[-3] == value.shape[-3], 'k, v lengths must match.'\n\n # Criteria that invoke the more optimized dot product attention\n if dropout_rate == 0.0 and module == None:\n # make sure qkv batch are compressed to one dim\n query_shape = query.shape\n if len(query_shape) > 4:\n def reshape_4d(x):\n return jnp.reshape(x, (math.prod(x.shape[:-3]), *x.shape[-3:]))\n query, key, value, bias, mask = jax.tree.map(\n reshape_4d, (query, key, value, bias, mask))\n if mask is not None:\n mask = mask.astype(jnp.bool)\n out = jax.nn.dot_product_attention(query, key, value, bias, mask)\n if len(query_shape) > 4:\n out = jnp.reshape(out, query_shape)\n return out\n\n # compute attention weights\n attn_weights = dot_product_attention_weights(\n query,\n key,\n bias,\n mask,\n broadcast_dropout,\n dropout_rng,\n dropout_rate,\n deterministic,\n dtype,\n precision,\n module,\n )\n\n # return weighted sum over values for each query position\n return jnp.einsum(\n '...hqk,...khd->...qhd', attn_weights, value, precision=precision\n )\n\n\nclass MultiHeadAttention(Module):\n """"""Multi-head attention.\n\n Example usage::\n\n >>> from flax import nnx\n >>> import jax\n\n >>> layer = nnx.MultiHeadAttention(num_heads=8, in_features=5, qkv_features=16,\n ... decode=False, rngs=nnx.Rngs(0))\n >>> key1, key2, key3 = jax.random.split(jax.random.key(0), 3)\n >>> shape = (4, 3, 2, 5)\n >>> q, k, v = (\n ... jax.random.uniform(key1, shape),\n ... jax.random.uniform(key2, shape),\n ... jax.random.uniform(key3, shape),\n ... )\n\n >>> # different inputs for inputs_q, inputs_k and inputs_v\n >>> out = layer(q, k, v)\n >>> # equivalent output when inferring v\n >>> assert (layer(q, k) == layer(q, k, k)).all()\n >>> # equivalent output when inferring k and v\n >>> assert (layer(q) == layer(q, q)).all()\n >>> assert (layer(q) == layer(q, q, q)).all()\n\n Args:\n num_heads: number of attention heads. Features (i.e. inputs_q.shape[-1])\n should be divisible by the number of heads.\n in_features: int or tuple with number of input features.\n qkv_features: dimension of the key, query, and value.\n out_features: dimension of the last projection.\n in_kv_features: number of input features for computing key and value.\n dtype: the dtype of the computation (default: infer from inputs and params)\n param_dtype: the dtype passed to parameter initializers (default: float32)\n broadcast_dropout: bool: use a broadcasted dropout along batch dims.\n dropout_rate: dropout rate\n deterministic: if false, the attention weight is masked randomly using\n dropout, whereas if true, the attention weights are deterministic.\n precision: numerical precision of the computation see `jax.lax.Precision`\n for details.\n kernel_init: initializer for the kernel of the Dense layers.\n out_kernel_init: optional initializer for the kernel of the output Dense layer,\n if None, the kernel_init is used.\n bias_init: initializer for the bias of the Dense layers.\n out_bias_init: optional initializer for the bias of the output Dense layer,\n if None, the bias_init is used.\n use_bias: bool: whether pointwise QKVO dense transforms use bias.\n attention_fn: dot_product_attention or compatible function. Accepts query,\n key, value, and returns output of shape `[bs, dim1, dim2, ..., dimN,,\n num_heads, value_channels]``\n decode: whether to prepare and use an autoregressive cache.\n normalize_qk: should QK normalization be applied (arxiv.org/abs/2302.05442).\n rngs: rng key.\n keep_rngs: whether to store the input rngs as attribute (i.e. `self.rngs = rngs`)\n (default: True). If rngs is stored, we should split the module as\n `graphdef, params, nondiff = nnx.split(module, nnx.Param, ...)` where `nondiff`\n contains RNG object associated with stored `self.rngs`.\n """"""\n\n __data__ = (\n 'query',\n 'key',\n 'value',\n 'out',\n 'query_ln',\n 'key_ln',\n 'cached_key',\n 'cached_value',\n 'cache_index',\n 'rngs',\n )\n\n def __init__(\n self,\n num_heads: int,\n in_features: int,\n qkv_features: int | None = None,\n out_features: int | None = None,\n in_kv_features: int | None = None,\n *,\n dtype: Dtype | None = None,\n param_dtype: Dtype = jnp.float32,\n broadcast_dropout: bool = True,\n dropout_rate: float = 0.0,\n deterministic: bool | None = None,\n precision: PrecisionLike = None,\n kernel_init: Initializer = default_kernel_init,\n out_kernel_init: Initializer | None = None,\n bias_init: Initializer = initializers.zeros_init(),\n out_bias_init: Initializer | None = None,\n use_bias: bool = True,\n attention_fn: Callable[..., Array] = dot_product_attention,\n decode: bool | None = None,\n normalize_qk: bool = False,\n # Deprecated, will be removed.\n qkv_dot_general: DotGeneralT | None = None,\n out_dot_general: DotGeneralT | None = None,\n qkv_dot_general_cls: Any = None,\n out_dot_general_cls: Any = None,\n rngs: rnglib.Rngs,\n keep_rngs: bool = True,\n ):\n self.num_heads = num_heads\n self.in_features = in_features\n self.qkv_features = (\n qkv_features if qkv_features is not None else in_features\n )\n self.out_features = (\n out_features if out_features is not None else in_features\n )\n self.in_kv_features = (\n in_kv_features if in_kv_features is not None else in_features\n )\n self.dtype = dtype\n self.param_dtype = param_dtype\n self.broadcast_dropout = broadcast_dropout\n self.dropout_rate = dropout_rate\n self.deterministic = deterministic\n self.precision = precision\n self.kernel_init = kernel_init\n self.out_kernel_init = out_kernel_init\n self.bias_init = bias_init\n self.out_bias_init = out_bias_init\n self.use_bias = use_bias\n self.attention_fn = attention_fn\n self.decode = decode\n self.normalize_qk = normalize_qk\n self.qkv_dot_general = qkv_dot_general\n self.out_dot_general = out_dot_general\n self.qkv_dot_general_cls = qkv_dot_general_cls\n self.out_dot_general_cls = out_dot_general_cls\n\n if self.qkv_features % self.num_heads != 0:\n raise ValueError(\n f'Memory dimension ({self.qkv_features}) must be divisible by '\n f""'num_heads' heads ({self.num_heads}).""\n )\n\n self.head_dim = self.qkv_features // self.num_heads\n\n linear_general = functools.partial(\n LinearGeneral,\n out_features=(self.num_heads, self.head_dim),\n dtype=self.dtype,\n param_dtype=self.param_dtype,\n kernel_init=self.kernel_init,\n bias_init=self.bias_init,\n use_bias=self.use_bias,\n precision=self.precision,\n dot_general=self.qkv_dot_general,\n dot_general_cls=self.qkv_dot_general_cls,\n )\n # project inputs_q to multi-headed q/k/v\n # dimensions are then [batch..., length, n_heads, n_features_per_head]\n self.query = linear_general(self.in_features, rngs=rngs)\n self.key = linear_general(self.in_kv_features, rngs=rngs)\n self.value = linear_general(self.in_kv_features, rngs=rngs)\n\n self.query_ln: LayerNorm | None\n self.key_ln: LayerNorm | None\n if self.normalize_qk:\n # Normalizing query and key projections stabilizes training with higher\n # LR. See ViT-22B paper http://arxiv.org/abs/2302.05442 for analysis.\n self.query_ln = LayerNorm(\n self.head_dim,\n use_bias=False,\n dtype=self.dtype,\n param_dtype=self.param_dtype,\n rngs=rngs,\n )\n self.key_ln = LayerNorm(\n self.head_dim,\n use_bias=False,\n dtype=self.dtype,\n param_dtype=self.param_dtype,\n rngs=rngs,\n )\n else:\n self.query_ln = None\n self.key_ln = None\n\n self.out = LinearGeneral(\n in_features=(self.num_heads, self.head_dim),\n out_features=self.out_features,\n axis=(-2, -1),\n kernel_init=self.out_kernel_init or self.kernel_init,\n bias_init=self.out_bias_init or self.bias_init,\n use_bias=self.use_bias,\n dtype=self.dtype,\n param_dtype=self.param_dtype,\n precision=self.precision,\n dot_general=self.out_dot_general,\n dot_general_cls=self.out_dot_general_cls,\n rngs=rngs,\n )\n self.rngs = rngs if keep_rngs and dropout_rate > 0 else None\n\n self.cached_key: nnx.Cache[Array] | None = None\n self.cached_value: nnx.Cache[Array] | None = None\n self.cache_index: nnx.Cache[Array] | None = None\n\n def __call__(\n self,\n inputs_q: Array,\n inputs_k: Array | None = None,\n inputs_v: Array | None = None,\n *,\n mask: Array | None = None,\n deterministic: bool | None = None,\n rngs: rnglib.Rngs | None = None,\n sow_weights: bool = False,\n decode: bool | None = None,\n ):\n """"""Applies multi-head dot product attention on the input data.\n\n Projects the inputs into multi-headed query, key, and value vectors,\n applies dot-product attention and project the results to an output vector.\n\n If both inputs_k and inputs_v are None, they will both copy the value of\n inputs_q (self attention).\n If only inputs_v is None, it will copy the value of inputs_k.\n\n Args:\n inputs_q: input queries of shape `[batch_sizes..., length, features]`.\n inputs_k: key of shape `[batch_sizes..., length, features]`. If None,\n inputs_k will copy the value of inputs_q.\n inputs_v: values of shape `[batch_sizes..., length, features]`. If None,\n inputs_v will copy the value of inputs_k.\n mask: attention mask of shape `[batch_sizes..., num_heads, query_length,\n key/value_length]`. Attention weights are masked out if their\n corresponding mask value is `False`.\n deterministic: if false, the attention weight is masked randomly using\n dropout, whereas if true, the attention weights are deterministic. The\n ``deterministic`` flag passed into the call method will take precedence\n over the ``deterministic`` flag passed into the constructor.\n rngs: rng key. The rng key passed into the call method will take\n precedence over the rng key passed into the constructor.\n sow_weights: if ``True``, the attention weights are sowed into the\n 'intermediates' collection.\n decode: whether to prepare and use an autoregressive cache. The ``decode``\n flag passed into the call method will take precedence over the ``decode``\n flag passed into the constructor.\n\n Returns:\n output of shape `[batch_sizes..., length, features]`.\n """"""\n if rngs is None:\n rngs = self.rngs\n\n if inputs_k is None:\n if inputs_v is not None:\n raise ValueError(\n '`inputs_k` cannot be None if `inputs_v` is not None. '\n 'To have both `inputs_k` and `inputs_v` be the same value, pass in the '\n 'value to `inputs_k` and leave `inputs_v` as None.'\n )\n inputs_k = inputs_q\n if inputs_v is None:\n inputs_v = inputs_k\n\n if inputs_q.shape[-1] != self.in_features:\n raise ValueError(\n f'Incompatible input dimension, got {inputs_q.shape[-1]} '\n f'but module expects {self.in_features}.'\n )\n\n query = self.query(inputs_q)\n key = self.key(inputs_k)\n value = self.value(inputs_v)\n\n if self.normalize_qk:\n assert self.query_ln is not None and self.key_ln is not None\n # Normalizing query and key projections stabilizes training with higher\n # LR. See ViT-22B paper http://arxiv.org/abs/2302.05442 for analysis.\n query = self.query_ln(query)\n key = self.key_ln(key)\n\n # During fast autoregressive decoding, we feed one position at a time,\n # and cache the keys and values step by step.\n decode = first_from(\n decode,\n self.decode,\n error_msg=""""""No `decode` argument was provided to MultiHeadAttention\n as either a __call__ argument, class attribute, or nnx.flag."""""",\n )\n\n if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '\n 'expected query shape %s instead got %s.'\n % (expected_shape, query.shape)\n )\n # update key, value caches with our new 1d spatial slices\n cur_index = self.cache_index[...]\n zero = jnp.array(0, dtype=lax.dtype(cur_index.dtype))\n indices = (zero,) * len(batch_dims) + (cur_index, zero, zero)\n key = lax.dynamic_update_slice(self.cached_key[...], key, indices)\n value = lax.dynamic_update_slice(self.cached_value[...], value, indices)\n self.cached_key[...] = key\n self.cached_value[...] = value\n self.cache_index[...] += 1\n # causal mask for cached decoder self-attention:\n # our single query position should only attend to those key\n # positions that have already been generated and cached,\n # not the remaining zero elements.\n mask = combine_masks(\n mask,\n jnp.broadcast_to(\n jnp.arange(max_length) <= cur_index,\n tuple(batch_dims) + (1, 1, max_length),\n ),\n )\n\n if (\n self.dropout_rate > 0.0\n ): # Require `deterministic` only if using dropout.\n deterministic = first_from(\n deterministic,\n self.deterministic,\n error_msg=""""""No `deterministic` argument was provided to MultiHeadAttention\n as either a __call__ argument, class attribute, or nnx.flag."""""",\n )\n if not deterministic:\n if rngs is None:\n raise ValueError(\n ""'rngs' must be provided to __call__ method if ""\n ""MultiHeadAttention instance is defined with keep_rngs=False.""\n )\n dropout_rng = rngs.dropout()\n else:\n dropout_rng = None\n else:\n deterministic = True\n dropout_rng = None\n\n # apply attention\n x = self.attention_fn(\n query,\n key,\n value,\n mask=mask,\n dropout_rng=dropout_rng,\n dropout_rate=self.dropout_rate,\n broadcast_dropout=self.broadcast_dropout,\n deterministic=deterministic,\n dtype=self.dtype,\n precision=self.precision,\n module=self if sow_weights else None,\n )\n # back to the original inputs dimensions\n out = self.out(x)\n return out\n\n def init_cache(self, input_shape: Shape, dtype: Dtype = jnp.float32):\n """"""Initializes cache for fast autoregressive decoding. When\n ``decode=True``, this method must be called first before performing\n forward inference. When in decode mode, only one token must be passed\n at a time.\n\n Example usage::\n\n >>> from flax import nnx\n >>> import jax.numpy as jnp\n ...\n >>> batch_size = 5\n >>> embed_dim = 3\n >>> x = jnp.ones((batch_size, 1, embed_dim)) # single token\n ...\n >>> model_nnx = nnx.MultiHeadAttention(\n ... num_heads=2,\n ... in_features=3,\n ... qkv_features=6,\n ... out_features=6,\n ... decode=True,\n ... rngs=nnx.Rngs(42),\n ... )\n ...\n >>> # out_nnx = model_nnx(x) <-- throws an error because cache isn't initialized\n ...\n >>> model_nnx.init_cache(x.shape)\n >>> out_nnx = model_nnx(x)\n """"""\n cache_shape = (*input_shape[:-1], self.num_heads, self.head_dim)\n self.cached_key = nnx.Cache(jnp.zeros(cache_shape, dtype))\n self.cached_value = nnx.Cache(jnp.zeros(cache_shape, dtype))\n self.cache_index = nnx.Cache(jnp.array(0, dtype=jnp.int32))\n\n\n# mask-making utility functions\n\n\ndef make_attention_mask(\n query_input: Array,\n key_input: Array,\n pairwise_fn: Callable[..., Any] = jnp.multiply,\n extra_batch_dims: int = 0,\n dtype: Dtype = jnp.float32,\n):\n """"""Mask-making helper for attention weights.\n\n In case of 1d inputs (i.e., `[batch..., len_q]`, `[batch..., len_kv]`, the\n attention weights will be `[batch..., heads, len_q, len_kv]` and this\n function will produce `[batch..., 1, len_q, len_kv]`.\n\n Args:\n query_input: a batched, flat input of query_length size\n key_input: a batched, flat input of key_length size\n pairwise_fn: broadcasting elementwise comparison function\n extra_batch_dims: number of extra batch dims to add singleton axes for, none\n by default\n dtype: mask return dtype\n\n Returns:\n A `[batch..., 1, len_q, len_kv]` shaped mask for 1d attention.\n """"""\n mask = pairwise_fn(\n jnp.expand_dims(query_input, axis=-1), jnp.expand_dims(key_input, axis=-2)\n )\n mask = jnp.expand_dims(mask, axis=-3)\n mask = jnp.expand_dims(mask, axis=tuple(range(extra_batch_dims)))\n return mask.astype(dtype)\n\n\ndef make_causal_mask(\n x: Array, extra_batch_dims: int = 0, dtype: Dtype = jnp.float32\n) -> Array:\n """"""Make a causal mask for self-attention.\n\n In case of 1d inputs (i.e., `[batch..., len]`, the self-attention weights\n will be `[batch..., heads, len, len]` and this function will produce a\n causal mask of shape `[batch..., 1, len, len]`.\n\n Args:\n x: input array of shape `[batch..., len]`\n extra_batch_dims: number of batch dims to add singleton axes for, none by\n default\n dtype: mask return dtype\n\n Returns:\n A `[batch..., 1, len, len]` shaped causal mask for 1d attention.\n """"""\n idxs = jnp.broadcast_to(jnp.arange(x.shape[-1], dtype=jnp.int32), x.shape)\n return make_attention_mask(\n idxs,\n idxs,\n jnp.greater_equal,\n extra_batch_dims=extra_batch_dims,\n dtype=dtype,\n )\n\n\ndef combine_masks(\n *masks: Array | None, dtype: Dtype = jnp.float32\n) -> Array | None:\n """"""Combine attention masks.\n\n Args:\n *masks: set of attention mask arguments to combine, some can be None.\n dtype: dtype for the returned mask.\n\n Returns:\n Combined mask, reduced by logical and, returns None if no masks given.\n """"""\n masks_list = [m for m in masks if m is not None]\n if not masks_list:\n return None\n assert all(\n map(lambda x: x.ndim == masks_list[0].ndim, masks_list)\n ), f'masks must have same rank: {tuple(map(lambda x: x.ndim, masks_list))}'\n mask, *other_masks = masks_list\n for other_mask in other_masks:\n mask = jnp.logical_and(mask, other_mask)\n return mask.astype(dtype)\n",python,tab
+1413,1183615,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",9464,0,"",python,selection_command
+1414,1186071,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",9711,0,"",python,selection_command
+1415,1186371,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",11857,0,"",python,selection_command
+1416,1186654,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",13195,0,"",python,selection_command
+1417,1186853,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",14311,0,"",python,selection_command
+1418,1187226,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",14320,0,"",python,selection_command
+1419,1187419,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",17149,0,"",python,selection_command
+1420,1187583,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",18670,0,"",python,selection_command
+1421,1188276,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",18736,0,"",python,selection_command
+1422,1188423,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",18818,0,"",python,selection_command
+1423,1188571,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20111,0,"",python,selection_command
+1424,1189804,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20138,0,"",python,selection_command
+1425,1189984,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20157,0,"",python,selection_command
+1426,1190178,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20188,0,"",python,selection_command
+1427,1190402,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20327,0,"",python,selection_command
+1428,1191558,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,14," if decode:",python,selection_command
+1429,1192552,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,25," if decode:\n if (",python,selection_command
+1430,1192793,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,57," if decode:\n if (\n self.cached_key is None",python,selection_command
+1431,1192818,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,94," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None",python,selection_command
+1432,1192853,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,130," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None",python,selection_command
+1433,1192886,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,139," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):",python,selection_command
+1434,1192920,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,165," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(",python,selection_command
+1435,1192951,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,242," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'",python,selection_command
+1436,1192985,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,252," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )",python,selection_command
+1437,1193017,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,260," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (",python,selection_command
+1438,1193048,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,281," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,",python,selection_command
+1439,1193081,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,301," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,",python,selection_command
+1440,1193117,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,320," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,",python,selection_command
+1441,1193150,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,344," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,",python,selection_command
+1442,1193183,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,382," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape",python,selection_command
+1443,1193215,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,437," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input",python,selection_command
+1444,1193251,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,511," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)",python,selection_command
+1445,1193281,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,551," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:",python,selection_command
+1446,1193317,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,577," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(",python,selection_command
+1447,1193348,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,624," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '",python,selection_command
+1448,1193383,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,676," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '\n 'expected query shape %s instead got %s.'",python,selection_command
+1449,1193417,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,718," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '\n 'expected query shape %s instead got %s.'\n % (expected_shape, query.shape)",python,selection_command
+1450,1193449,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,728," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '\n 'expected query shape %s instead got %s.'\n % (expected_shape, query.shape)\n )",python,selection_command
+1451,1193482,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,792," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '\n 'expected query shape %s instead got %s.'\n % (expected_shape, query.shape)\n )\n # update key, value caches with our new 1d spatial slices",python,selection_command
+1452,1194751,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,728," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '\n 'expected query shape %s instead got %s.'\n % (expected_shape, query.shape)\n )",python,selection_command
+1453,1207648,"utils/nn.py",0,0,"",python,tab
+1454,1219782,"utils/nn.py",10057,0,"",python,selection_mouse
+1455,1219782,"utils/nn.py",10056,0,"",python,selection_command
+1456,1221475,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",0,0,"",python,tab
+1457,1224296,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20359,0,"",python,selection_mouse
+1458,1224691,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20345,0,"",python,selection_mouse
+1459,1224692,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20344,0,"",python,selection_command
+1460,1224993,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20360,0,"",python,selection_mouse
+1461,1231305,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",16732,0,"",python,selection_command
+1462,1233606,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20359,0,"",python,selection_command
+1463,1237257,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20542,0,"",python,selection_command
+1464,1237371,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23112,0,"",python,selection_command
+1465,1239256,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23184,0,"",python,selection_command
+1466,1239461,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23248,0,"",python,selection_command
+1467,1239492,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23320,0,"",python,selection_command
+1468,1239523,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23394,0,"",python,selection_command
+1469,1239640,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23403,0,"",python,selection_command
+1470,1239640,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23410,0,"",python,selection_command
+1471,1239641,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23424,0,"",python,selection_command
+1472,1239654,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23431,0,"",python,selection_command
+1473,1239685,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23462,0,"",python,selection_command
+1474,1239722,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23496,0,"",python,selection_command
+1475,1239757,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23506,0,"",python,selection_command
+1476,1239803,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23531,0,"",python,selection_command
+1477,1239822,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23555,0,"",python,selection_command
+1478,1239852,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23621,0,"",python,selection_command
+1479,1239888,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23631,0,"",python,selection_command
+1480,1239922,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23677,0,"",python,selection_command
+1481,1239953,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23702,0,"",python,selection_command
+1482,1239986,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23729,0,"",python,selection_command
+1483,1240021,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23757,0,"",python,selection_command
+1484,1240055,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23785,0,"",python,selection_command
+1485,1240164,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23810,0,"",python,selection_command
+1486,1240164,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23841,0,"",python,selection_command
+1487,1240165,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23853,0,"",python,selection_command
+1488,1240189,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23863,0,"",python,selection_command
+1489,1240220,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23951,0,"",python,selection_command
+1490,1240255,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",23961,0,"",python,selection_command
+1491,1240288,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24001,0,"",python,selection_command
+1492,1240322,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24034,0,"",python,selection_command
+1493,1240359,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24042,0,"",python,selection_command
+1494,1240389,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24111,0,"",python,selection_command
+1495,1240422,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24174,0,"",python,selection_command
+1496,1240776,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24239,0,"",python,selection_command
+1497,1240962,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24174,0,"",python,selection_command
+1498,1241213,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24176,0,"",python,selection_command
+1499,1241574,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24113,0,"",python,selection_command
+1500,1241943,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",24114,0,"",python,selection_command
+1501,1354683,"utils/nn.py",0,0,"",python,tab
+1502,1356069,"utils/nn.py",10007,0,"",python,selection_command
+1503,1356217,"utils/nn.py",9947,0,"",python,selection_command
+1504,1356373,"utils/nn.py",9906,0,"",python,selection_command
+1505,1356662,"utils/nn.py",9947,0,"",python,selection_command
+1506,1399775,"utils/nn.py",10007,0,"",python,selection_command
+1507,1399776,"utils/nn.py",10056,0,"",python,selection_command
+1508,1400644,"utils/nn.py",10044,13," else:",python,selection_command
+1509,1400893,"utils/nn.py",9995,62," z_B1M = jnp.reshape(z_BM, (B, 1, M))\n else:",python,selection_command
+1510,1401021,"utils/nn.py",9935,122," z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n z_B1M = jnp.reshape(z_BM, (B, 1, M))\n else:",python,selection_command
+1511,1401171,"utils/nn.py",9894,163," assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n z_B1M = jnp.reshape(z_BM, (B, 1, M))\n else:",python,selection_command
+1512,1402748,"utils/nn.py",9894,164,"",python,content
+1513,1402750,"utils/nn.py",9906,0,"",python,selection_command
+1514,1408706,"utils/nn.py",9894,68," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")",python,selection_command
+1515,1409230,"utils/nn.py",9894,113," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)",python,selection_command
+1516,1409279,"utils/nn.py",9894,170," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token",python,selection_command
+1517,1409426,"utils/nn.py",9894,220," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)",python,selection_command
+1518,1409641,"utils/nn.py",9894,294," z_FNM = einops.rearrange(x_BTNM, ""b t n m -> (b t) n m"")\n z_FNM = self.spatial_norm(z_FNM)\n # FIXME (f.srambical): only input last token\n z_FNM = self.spatial_attention(z_FNM)\n z_BTNM = einops.rearrange(z_FNM, ""(b t) n m -> b t n m"", t=T)",python,selection_command
+1519,1410284,"utils/nn.py",10115,12," ",python,content
+1520,1410284,"utils/nn.py",10065,12," ",python,content
+1521,1410284,"utils/nn.py",10008,12," ",python,content
+1522,1410284,"utils/nn.py",9963,12," ",python,content
+1523,1410284,"utils/nn.py",9894,12," ",python,content
+1524,1410287,"utils/nn.py",9902,0,"",python,selection_command
+1525,1411148,"utils/nn.py",9967,0,"",python,selection_command
+1526,1411328,"utils/nn.py",10008,0,"",python,selection_command
+1527,1411438,"utils/nn.py",10061,0,"",python,selection_command
+1528,1411655,"utils/nn.py",10107,0,"",python,selection_command
+1529,1411717,"utils/nn.py",10177,0,"",python,selection_command
+1530,1411873,"utils/nn.py",10210,0,"",python,selection_command
+1531,1412016,"utils/nn.py",10247,0,"",python,selection_command
+1532,1412214,"utils/nn.py",10271,0,"",python,selection_command
+1533,1412900,"utils/nn.py",10263,40," assert pos_index is not None",python,selection_command
+1534,1413279,"utils/nn.py",10263,100," assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]",python,selection_command
+1535,1413439,"utils/nn.py",10263,149," assert pos_index is not None\n z_BM = x_BTNM[:, pos_index[0], pos_index[1], :]\n z_B1M = jnp.reshape(z_BM, (B, 1, M))",python,selection_command
+1536,1413518,"utils/nn.py",10263,150,"",python,content
+1537,1413522,"utils/nn.py",10271,0,"",python,selection_command
+1538,1414571,"utils/nn.py",10263,14,"",python,content
+1539,1414583,"utils/nn.py",10275,0,"",python,selection_command
+1540,1414997,"utils/nn.py",10263,68," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")",python,selection_command
+1541,1415355,"utils/nn.py",10263,114," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)",python,selection_command
+1542,1415418,"utils/nn.py",10263,171," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token",python,selection_command
+1543,1415556,"utils/nn.py",10263,222," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)",python,selection_command
+1544,1415735,"utils/nn.py",10263,296," z_PTM = einops.rearrange(x_BTNM, ""b t n m -> (b n) t m"")\n z_PTM = self.temporal_norm(z_PTM)\n # FIXME (f.srambical): only input last token\n z_PTM = self.temporal_attention(z_PTM)\n z_BTNM = einops.rearrange(z_PTM, ""(b n) t m -> b t n m"", n=N)",python,selection_command
+1545,1416224,"utils/nn.py",10486,12," ",python,content
+1546,1416224,"utils/nn.py",10435,12," ",python,content
+1547,1416225,"utils/nn.py",10378,12," ",python,content
+1548,1416225,"utils/nn.py",10332,12," ",python,content
+1549,1416225,"utils/nn.py",10263,12," ",python,content
+1550,1416227,"utils/nn.py",10271,0,"",python,selection_command
+1551,1417095,"utils/nn.py",10247,0,"",python,selection_command
+1552,1417239,"utils/nn.py",10210,0,"",python,selection_command
+1553,1417423,"utils/nn.py",10177,0,"",python,selection_command
+1554,1417506,"utils/nn.py",10107,0,"",python,selection_command
+1555,1417639,"utils/nn.py",10061,0,"",python,selection_command
+1556,1417774,"utils/nn.py",10008,0,"",python,selection_command
+1557,1417948,"utils/nn.py",9967,0,"",python,selection_command
+1558,1418053,"utils/nn.py",9902,0,"",python,selection_command
+1559,1418208,"utils/nn.py",9878,0,"",python,selection_command
+1560,1418832,"utils/nn.py",9870,24,"",python,content
+1561,1418844,"utils/nn.py",9878,0,"",python,selection_command
+1562,1420572,"utils/nn.py",9943,0,"",python,selection_command
+1563,1422522,"utils/nn.py",9984,0,"",python,selection_command
+1564,1422873,"utils/nn.py",10028,0,"\n if self.decode:",python,content
+1565,1422878,"utils/nn.py",10037,0,"",python,selection_command
+1566,1423622,"utils/nn.py",10107,0,"",python,selection_command
+1567,1423781,"utils/nn.py",10177,0,"",python,selection_command
+1568,1423922,"utils/nn.py",10210,0,"",python,selection_command
+1569,1424045,"utils/nn.py",10247,0,"",python,selection_command
+1570,1424601,"utils/nn.py",10239,24,"",python,content
+1571,1424616,"utils/nn.py",10247,0,"",python,selection_command
+1572,1424832,"utils/nn.py",10312,0,"",python,selection_command
+1573,1424971,"utils/nn.py",10354,0,"",python,selection_command
+1574,1425433,"utils/nn.py",10312,0,"",python,selection_command
+1575,1425592,"utils/nn.py",10247,0,"",python,selection_command
+1576,1425826,"utils/nn.py",10312,0,"",python,selection_command
+1577,1425986,"utils/nn.py",10354,0,"",python,selection_command
+1578,1426335,"utils/nn.py",10398,0,"\n if self.decode:",python,content
+1579,1426335,"utils/nn.py",10407,0,"",python,selection_command
+1580,1426712,"utils/nn.py",10431,0,"",python,selection_command
+1581,1428021,"utils/nn.py",10407,0,"",python,selection_command
+1582,1428274,"utils/nn.py",10354,0,"",python,selection_command
+1583,1428295,"utils/nn.py",10312,0,"",python,selection_command
+1584,1428330,"utils/nn.py",10247,0,"",python,selection_command
+1585,1428435,"utils/nn.py",10210,0,"",python,selection_command
+1586,1428436,"utils/nn.py",10177,0,"",python,selection_command
+1587,1428436,"utils/nn.py",10107,0,"",python,selection_command
+1588,1428458,"utils/nn.py",10061,0,"",python,selection_command
+1589,1428597,"utils/nn.py",10037,0,"",python,selection_command
+1590,1437247,"utils/nn.py",10052,0,"\n ",python,content
+1591,1438946,"utils/nn.py",10065,0,"z",python,content
+1592,1438946,"utils/nn.py",10066,0,"",python,selection_keyboard
+1593,1439324,"utils/nn.py",10066,0,"_",python,content
+1594,1439324,"utils/nn.py",10067,0,"",python,selection_keyboard
+1595,1441072,"utils/nn.py",10067,0,"F",python,content
+1596,1441073,"utils/nn.py",10068,0,"",python,selection_keyboard
+1597,1442349,"utils/nn.py",10068,0,"1",python,content
+1598,1442350,"utils/nn.py",10069,0,"",python,selection_keyboard
+1599,1443021,"utils/nn.py",10069,0,"M",python,content
+1600,1443021,"utils/nn.py",10070,0,"",python,selection_keyboard
+1601,1453442,"utils/nn.py",10070,0," ",python,content
+1602,1453442,"utils/nn.py",10071,0,"",python,selection_keyboard
+1603,1453886,"utils/nn.py",10071,0,"g",python,content
+1604,1453887,"utils/nn.py",10072,0,"",python,selection_keyboard
+1605,1454648,"utils/nn.py",10071,1,"",python,content
+1606,1455194,"utils/nn.py",10071,0,"=",python,content
+1607,1455194,"utils/nn.py",10072,0,"",python,selection_keyboard
+1608,1455741,"utils/nn.py",10072,0," ",python,content
+1609,1455741,"utils/nn.py",10073,0,"",python,selection_keyboard
+1610,1458534,"utils/nn.py",10072,0,"",python,selection_command
+1611,1459026,"utils/nn.py",10071,0,"",python,selection_command
+1612,1459364,"utils/nn.py",10070,0,"",python,selection_command
+1613,1459365,"utils/nn.py",10069,0,"",python,selection_command
+1614,1459503,"utils/nn.py",10068,0,"",python,selection_command
+1615,1459672,"utils/nn.py",10069,0,"",python,selection_command
+1616,1459889,"utils/nn.py",10070,0,"",python,selection_command
+1617,1459996,"utils/nn.py",10071,0,"",python,selection_command
+1618,1460232,"utils/nn.py",10072,0,"",python,selection_command
+1619,1460265,"utils/nn.py",10073,0,"",python,selection_command
+1620,1460592,"utils/nn.py",10072,0,"",python,selection_command
+1621,1460644,"utils/nn.py",10071,0,"",python,selection_command
+1622,1460796,"utils/nn.py",10070,0,"",python,selection_command
+1623,1460939,"utils/nn.py",10069,0,"",python,selection_command
+1624,1461462,"utils/nn.py",10068,1,"",python,content
+1625,1461708,"utils/nn.py",10067,1,"",python,content
+1626,1462690,"utils/nn.py",10067,0,"F",python,content
+1627,1462690,"utils/nn.py",10068,0,"",python,selection_keyboard
+1628,1462914,"utils/nn.py",10067,0,"",python,selection_command
+1629,1463561,"utils/nn.py",10072,0,"",python,selection_command
+1630,1466816,"utils/nn.py",10072,0,"z",python,content
+1631,1466816,"utils/nn.py",10073,0,"",python,selection_keyboard
+1632,1467128,"utils/nn.py",10073,0,"-",python,content
+1633,1467128,"utils/nn.py",10074,0,"",python,selection_keyboard
+1634,1467649,"utils/nn.py",10073,1,"",python,content
+1635,1467953,"utils/nn.py",10073,0,"_",python,content
+1636,1467953,"utils/nn.py",10074,0,"",python,selection_keyboard
+1637,1469736,"utils/nn.py",10074,0,"F",python,content
+1638,1469737,"utils/nn.py",10075,0,"",python,selection_keyboard
+1639,1470215,"utils/nn.py",10075,0,"N",python,content
+1640,1470215,"utils/nn.py",10076,0,"",python,selection_keyboard
+1641,1470391,"utils/nn.py",10076,0,"M",python,content
+1642,1470391,"utils/nn.py",10077,0,"",python,selection_keyboard
+1643,1472327,"utils/nn.py",10077,0,"[]",python,content
+1644,1472327,"utils/nn.py",10078,0,"",python,selection_keyboard
+1645,1472381,"utils/nn.py",10078,1,"]",python,content
+1646,1472381,"utils/nn.py",10079,0,"",python,selection_keyboard
+1647,1472864,"utils/nn.py",10078,0,"",python,selection_command
+1648,1475511,"utils/nn.py",10078,0,"p",python,content
+1649,1475511,"utils/nn.py",10079,0,"",python,selection_keyboard
+1650,1475618,"utils/nn.py",10079,0,"o",python,content
+1651,1475619,"utils/nn.py",10080,0,"",python,selection_keyboard
+1652,1475729,"utils/nn.py",10080,0,"s",python,content
+1653,1475730,"utils/nn.py",10081,0,"",python,selection_keyboard
+1654,1476669,"utils/nn.py",10080,1,"",python,content
+1655,1476788,"utils/nn.py",10079,1,"",python,content
+1656,1477203,"utils/nn.py",10078,1,"",python,content
+1657,1477544,"utils/nn.py",10078,0,":",python,content
+1658,1477544,"utils/nn.py",10079,0,"",python,selection_keyboard
+1659,1477715,"utils/nn.py",10079,0,",",python,content
+1660,1477716,"utils/nn.py",10080,0,"",python,selection_keyboard
+1661,1477880,"utils/nn.py",10080,0," ",python,content
+1662,1477880,"utils/nn.py",10081,0,"",python,selection_keyboard
+1663,1478091,"utils/nn.py",10081,0,"p",python,content
+1664,1478092,"utils/nn.py",10082,0,"",python,selection_keyboard
+1665,1478141,"utils/nn.py",10082,0,"o",python,content
+1666,1478142,"utils/nn.py",10083,0,"",python,selection_keyboard
+1667,1478327,"utils/nn.py",10083,0,"s",python,content
+1668,1478327,"utils/nn.py",10084,0,"",python,selection_keyboard
+1669,1478616,"utils/nn.py",10084,0,"-",python,content
+1670,1478617,"utils/nn.py",10085,0,"",python,selection_keyboard
+1671,1479069,"utils/nn.py",10084,1,"",python,content
+1672,1480207,"utils/nn.py",10084,0,"_",python,content
+1673,1480208,"utils/nn.py",10085,0,"",python,selection_keyboard
+1674,1480457,"utils/nn.py",10085,0,"_",python,content
+1675,1480458,"utils/nn.py",10086,0,"",python,selection_keyboard
+1676,1481146,"utils/nn.py",10085,1,"",python,content
+1677,1481386,"utils/nn.py",10085,0,"i",python,content
+1678,1481386,"utils/nn.py",10086,0,"",python,selection_keyboard
+1679,1481532,"utils/nn.py",10086,0,"n",python,content
+1680,1481532,"utils/nn.py",10087,0,"",python,selection_keyboard
+1681,1481665,"utils/nn.py",10087,0,"d",python,content
+1682,1481665,"utils/nn.py",10088,0,"",python,selection_keyboard
+1683,1481760,"utils/nn.py",10088,0,"e",python,content
+1684,1481760,"utils/nn.py",10089,0,"",python,selection_keyboard
+1685,1481994,"utils/nn.py",10089,0,"x",python,content
+1686,1481994,"utils/nn.py",10090,0,"",python,selection_keyboard
+1687,1483214,"utils/nn.py",10090,0,"[]",python,content
+1688,1483214,"utils/nn.py",10091,0,"",python,selection_keyboard
+1689,1484394,"utils/nn.py",10091,0,"4",python,content
+1690,1484394,"utils/nn.py",10092,0,"",python,selection_keyboard
+1691,1484405,"utils/nn.py",10092,0,"1",python,content
+1692,1484405,"utils/nn.py",10093,0,"",python,selection_keyboard
+1693,1484909,"utils/nn.py",10092,1,"",python,content
+1694,1485198,"utils/nn.py",10092,0,"1",python,content
+1695,1485198,"utils/nn.py",10093,0,"",python,selection_keyboard
+1696,1485730,"utils/nn.py",10092,0,"",python,selection_command
+1697,1486630,"utils/nn.py",10091,0,"",python,selection_command
+1698,1487408,"utils/nn.py",10091,1,"",python,content
+1699,1489661,"utils/nn.py",10090,0,"",python,selection_command
+1700,1489904,"utils/nn.py",10089,0,"",python,selection_command
+1701,1491873,"utils/nn.py",10052,0,"\n ",python,content
+1702,1492133,"utils/nn.py",10065,0,"s",python,content
+1703,1492134,"utils/nn.py",10066,0,"",python,selection_keyboard
+1704,1492567,"utils/nn.py",10065,1,"",python,content
+1705,1492701,"utils/nn.py",10065,0,"a",python,content
+1706,1492701,"utils/nn.py",10066,0,"",python,selection_keyboard
+1707,1492749,"utils/nn.py",10066,0,"s",python,content
+1708,1492749,"utils/nn.py",10067,0,"",python,selection_keyboard
+1709,1492936,"utils/nn.py",10067,0,"s",python,content
+1710,1492936,"utils/nn.py",10068,0,"",python,selection_keyboard
+1711,1493073,"utils/nn.py",10068,0,"e",python,content
+1712,1493073,"utils/nn.py",10069,0,"",python,selection_keyboard
+1713,1493131,"utils/nn.py",10069,0,"r",python,content
+1714,1493131,"utils/nn.py",10070,0,"",python,selection_keyboard
+1715,1493312,"utils/nn.py",10070,0,"t",python,content
+1716,1493313,"utils/nn.py",10071,0,"",python,selection_keyboard
+1717,1493742,"utils/nn.py",10071,0," pos_index is not None",python,content
+1718,1494055,"utils/nn.py",10092,0,"",python,selection_command
+1719,1506333,"utils/nn.py",10133,0,"",python,selection_command
+1720,1593871,"utils/nn.py",10135,0,"\n ",python,content
+1721,1594202,"utils/nn.py",10148,0,"j",python,content
+1722,1594202,"utils/nn.py",10149,0,"",python,selection_keyboard
+1723,1594298,"utils/nn.py",10149,0,"n",python,content
+1724,1594299,"utils/nn.py",10150,0,"",python,selection_keyboard
+1725,1594364,"utils/nn.py",10150,0,"p",python,content
+1726,1594365,"utils/nn.py",10151,0,"",python,selection_keyboard
+1727,1594656,"utils/nn.py",10151,0,".",python,content
+1728,1594657,"utils/nn.py",10152,0,"",python,selection_keyboard
+1729,1595689,"utils/nn.py",10152,0,"r",python,content
+1730,1595689,"utils/nn.py",10153,0,"",python,selection_keyboard
+1731,1595689,"utils/nn.py",10153,0,"e",python,content
+1732,1595689,"utils/nn.py",10154,0,"",python,selection_keyboard
+1733,1595954,"utils/nn.py",10154,0,"s",python,content
+1734,1595955,"utils/nn.py",10155,0,"",python,selection_keyboard
+1735,1595978,"utils/nn.py",10155,0,"h",python,content
+1736,1595978,"utils/nn.py",10156,0,"",python,selection_keyboard
+1737,1595995,"utils/nn.py",10156,0,"h",python,content
+1738,1595995,"utils/nn.py",10157,0,"",python,selection_keyboard
+1739,1596210,"utils/nn.py",10157,0,"a",python,content
+1740,1596210,"utils/nn.py",10158,0,"",python,selection_keyboard
+1741,1596210,"utils/nn.py",10158,0,"p",python,content
+1742,1596210,"utils/nn.py",10159,0,"",python,selection_keyboard
+1743,1596232,"utils/nn.py",10159,0,"e",python,content
+1744,1596233,"utils/nn.py",10160,0,"",python,selection_keyboard
+1745,1596738,"utils/nn.py",10159,1,"",python,content
+1746,1596821,"utils/nn.py",10158,1,"",python,content
+1747,1596968,"utils/nn.py",10157,1,"",python,content
+1748,1597069,"utils/nn.py",10156,1,"",python,content
+1749,1597262,"utils/nn.py",10156,0,"a",python,content
+1750,1597262,"utils/nn.py",10157,0,"",python,selection_keyboard
+1751,1597262,"utils/nn.py",10157,0,"p",python,content
+1752,1597262,"utils/nn.py",10158,0,"",python,selection_keyboard
+1753,1597307,"utils/nn.py",10158,0,"e",python,content
+1754,1597308,"utils/nn.py",10159,0,"",python,selection_keyboard
+1755,1598687,"utils/nn.py",10158,0,"",python,selection_command
+1756,1598990,"utils/nn.py",10148,0,"",python,selection_command
+1757,1599363,"utils/nn.py",10148,0,"z",python,content
+1758,1599363,"utils/nn.py",10149,0,"",python,selection_keyboard
+1759,1599594,"utils/nn.py",10148,1,"",python,content
+1760,1600072,"utils/nn.py",10148,0,"z",python,content
+1761,1600072,"utils/nn.py",10149,0,"",python,selection_keyboard
+1762,1600425,"utils/nn.py",10149,0,"_",python,content
+1763,1600426,"utils/nn.py",10150,0,"",python,selection_keyboard
+1764,1601012,"utils/nn.py",10150,0,"F",python,content
+1765,1601744,"utils/nn.py",10151,0,"1",python,content
+1766,1602143,"utils/nn.py",10152,0,"M",python,content
+1767,1602143,"utils/nn.py",10153,0,"",python,selection_keyboard
+1768,1602663,"utils/nn.py",10153,0," ",python,content
+1769,1602663,"utils/nn.py",10154,0,"",python,selection_keyboard
+1770,1603227,"utils/nn.py",10154,0,"=",python,content
+1771,1603227,"utils/nn.py",10155,0,"",python,selection_keyboard
+1772,1603553,"utils/nn.py",10155,0," ",python,content
+1773,1603553,"utils/nn.py",10156,0,"",python,selection_keyboard
+1774,1604079,"utils/nn.py",10155,0,"",python,selection_command
+1775,1604666,"utils/nn.py",10167,0,"",python,selection_command
+1776,1605180,"utils/nn.py",10167,0,"()",python,content
+1777,1605181,"utils/nn.py",10168,0,"",python,selection_keyboard
+1778,1606600,"utils/nn.py",10168,0,"z_FM, (B, 1, M)",python,content
+1779,1606919,"utils/nn.py",10182,0,"",python,selection_command
+1780,1609070,"utils/nn.py",10181,0,"",python,selection_command
+1781,1609319,"utils/nn.py",10179,0,"",python,selection_command
+1782,1609382,"utils/nn.py",10178,0,"",python,selection_command
+1783,1609564,"utils/nn.py",10176,0,"",python,selection_command
+1784,1609842,"utils/nn.py",10175,0,"",python,selection_command
+1785,1610967,"utils/nn.py",10175,1,"F",python,content
+1786,1612610,"utils/nn.py",10175,1,"",python,content
+1787,1613706,"utils/nn.py",10175,0,"B",python,content
+1788,1613706,"utils/nn.py",10176,0,"",python,selection_keyboard
+1789,1614892,"utils/nn.py",10176,0,"*",python,content
+1790,1614892,"utils/nn.py",10177,0,"",python,selection_keyboard
+1791,1615721,"utils/nn.py",10176,1,"",python,content
+1792,1615905,"utils/nn.py",10176,0," ",python,content
+1793,1615905,"utils/nn.py",10177,0,"",python,selection_keyboard
+1794,1616137,"utils/nn.py",10177,0,"*",python,content
+1795,1616137,"utils/nn.py",10178,0,"",python,selection_keyboard
+1796,1616508,"utils/nn.py",10178,0," ",python,content
+1797,1616508,"utils/nn.py",10179,0,"",python,selection_keyboard
+1798,1616946,"utils/nn.py",10179,0,"T",python,content
+1799,1616947,"utils/nn.py",10180,0,"",python,selection_keyboard
+1800,1617161,"utils/nn.py",10179,0,"",python,selection_command
+1801,1619015,"utils/nn.py",10232,0,"",python,selection_command
+1802,1619240,"utils/nn.py",10179,0,"",python,selection_command
+1803,1620281,"utils/nn.py",10188,0,"\n ",python,content
+1804,1622922,"utils/nn.py",10201,0,"z",python,content
+1805,1622922,"utils/nn.py",10202,0,"",python,selection_keyboard
+1806,1623608,"utils/nn.py",10202,0,"_",python,content
+1807,1623609,"utils/nn.py",10203,0,"",python,selection_keyboard
+1808,1624597,"utils/nn.py",10203,0,"F",python,content
+1809,1624598,"utils/nn.py",10204,0,"",python,selection_keyboard
+1810,1624970,"utils/nn.py",10204,0,"N",python,content
+1811,1624970,"utils/nn.py",10205,0,"",python,selection_keyboard
+1812,1625083,"utils/nn.py",10205,0,"M",python,content
+1813,1625083,"utils/nn.py",10206,0,"",python,selection_keyboard
+1814,1625932,"utils/nn.py",10205,0,"",python,selection_command
+1815,1626623,"utils/nn.py",10189,18,"",python,content
+1816,1626643,"utils/nn.py",10197,0,"",python,selection_command
+1817,1629983,"utils/nn.py",10188,0,"\n z_FNM = self.spatial_attention(z_FNM)",python,content
+1818,1629991,"utils/nn.py",10197,0,"",python,selection_command
+1819,1631463,"utils/nn.py",10235,0," else:\n ",python,content
+1820,1631463,"utils/nn.py",10233,0,", ""(b t) n m -> b t n m"", t=T",python,content
+1821,1631463,"utils/nn.py",10227,0,"(z_F1M)\n z_FNM = einops.rearrange",python,content
+1822,1631463,"utils/nn.py",10197,0," ",python,content
+1823,1631683,"utils/nn.py",10200,0,"",python,selection_command
+1824,1632387,"utils/nn.py",10312,18,"",python,content
+1825,1632388,"utils/nn.py",10281,29,"",python,content
+1826,1632389,"utils/nn.py",10231,44,"",python,content
+1827,1632391,"utils/nn.py",10197,4,"",python,content
+1828,1632408,"utils/nn.py",10201,0,"",python,selection_command
+1829,1633336,"utils/nn.py",10197,0,"",python,selection_command
+1830,1633723,"utils/nn.py",10197,0," ",python,content
+1831,1634183,"utils/nn.py",10200,0,"",python,selection_command
+1832,1634540,"utils/nn.py",10201,0,"",python,selection_command
+1833,1634960,"utils/nn.py",10207,0,"",python,selection_command
+1834,1635161,"utils/nn.py",10209,0,"",python,selection_command
+1835,1635576,"utils/nn.py",10213,0,"",python,selection_command
+1836,1635770,"utils/nn.py",10230,0,"",python,selection_command
+1837,1635919,"utils/nn.py",10231,0,"",python,selection_command
+1838,1636074,"utils/nn.py",10236,0,"",python,selection_command
+1839,1636687,"utils/nn.py",10235,0,"",python,selection_command
+1840,1637560,"utils/nn.py",10235,1,"1",python,content
+1841,1640135,"utils/nn.py",10238,0,"\n ",python,content
+1842,1640590,"utils/nn.py",10247,4,"",python,content
+1843,1640762,"utils/nn.py",10247,0,"e",python,content
+1844,1640762,"utils/nn.py",10248,0,"",python,selection_keyboard
+1845,1640972,"utils/nn.py",10248,0,"l",python,content
+1846,1640972,"utils/nn.py",10249,0,"",python,selection_keyboard
+1847,1641072,"utils/nn.py",10249,0,"s",python,content
+1848,1641072,"utils/nn.py",10250,0,"",python,selection_keyboard
+1849,1641075,"utils/nn.py",10250,0,"e",python,content
+1850,1641075,"utils/nn.py",10251,0,"",python,selection_keyboard
+1851,1641746,"utils/nn.py",10251,0,":",python,content
+1852,1641747,"utils/nn.py",10252,0,"",python,selection_keyboard
+1853,1641991,"utils/nn.py",10251,0,"",python,selection_command
+1854,1642379,"utils/nn.py",10265,0,"",python,selection_command
+1855,1643749,"utils/nn.py",10261,0,"",python,selection_command
+1856,1644774,"utils/nn.py",10261,1,"z",python,selection_command
+1857,1645251,"utils/nn.py",10253,8," ",python,content
+1858,1645253,"utils/nn.py",10265,0,"",python,selection_command
+1859,1671804,"utils/nn.py",10315,0,"",python,selection_command
+1860,1671804,"utils/nn.py",10385,0,"",python,selection_command
+1861,1671946,"utils/nn.py",10418,0,"",python,selection_command
+1862,1672081,"utils/nn.py",10455,0,"",python,selection_command
+1863,1672330,"utils/nn.py",10520,0,"",python,selection_command
+1864,1672509,"utils/nn.py",10562,0,"",python,selection_command
+1865,1673233,"utils/nn.py",10615,0,"",python,selection_command
+1866,1674604,"utils/nn.py",10626,0,"\n ",python,content
+1867,1675307,"utils/nn.py",10639,0,"assert pos_index is not None\n z_PM = z_PTM[:, pos_index[0]]\n z_P1M = jnp.reshape(z_PM, (B * N, 1, M))\n z_PTM = self.temporal_attention(z_P1M)\n else:",python,content
+1868,1675653,"utils/nn.py",10826,0,"",python,selection_command
+1869,1677836,"utils/nn.py",10840,0,"",python,selection_command
+1870,1679394,"utils/nn.py",10840,1,"M",python,selection_command
+1871,1679888,"utils/nn.py",10828,8," ",python,content
+1872,1679893,"utils/nn.py",10840,0,"",python,selection_command
+1873,1681109,"utils/nn.py",10826,0,"",python,selection_command
+1874,1681243,"utils/nn.py",10775,0,"",python,selection_command
+1875,1681440,"utils/nn.py",10722,0,"",python,selection_command
+1876,1681503,"utils/nn.py",10680,0,"",python,selection_command
+1877,1681631,"utils/nn.py",10639,0,"",python,selection_command
+1878,1681965,"utils/nn.py",10680,0,"",python,selection_command
+1879,1683864,"utils/nn.py",10722,0,"",python,selection_command
+1880,1684514,"utils/nn.py",10728,0,"",python,selection_command
+1881,1684763,"utils/nn.py",10730,0,"",python,selection_command
+1882,1684789,"utils/nn.py",10733,0,"",python,selection_command
+1883,1684820,"utils/nn.py",10734,0,"",python,selection_command
+1884,1684913,"utils/nn.py",10741,0,"",python,selection_command
+1885,1685080,"utils/nn.py",10742,0,"",python,selection_command
+1886,1685261,"utils/nn.py",10746,0,"",python,selection_command
+1887,1685549,"utils/nn.py",10742,0,"",python,selection_command
+1888,1685798,"utils/nn.py",10741,0,"",python,selection_command
+1889,1685828,"utils/nn.py",10734,0,"",python,selection_command
+1890,1685857,"utils/nn.py",10733,0,"",python,selection_command
+1891,1685964,"utils/nn.py",10730,0,"",python,selection_command
+1892,1685965,"utils/nn.py",10728,0,"",python,selection_command
+1893,1686112,"utils/nn.py",10722,0,"",python,selection_command
+1894,1688207,"utils/nn.py",10775,0,"",python,selection_command
+1895,1693506,"utils/nn.py",10826,0,"",python,selection_command
+1896,1693676,"utils/nn.py",10840,0,"",python,selection_command
+1897,1694401,"utils/nn.py",10828,0,"",python,selection_command
+1898,1766866,"utils/nn.py",10223,0,"",python,selection_mouse
+1899,1767242,"utils/nn.py",8674,0,"",python,selection_command
+1900,1768200,"utils/nn.py",8692,0,"",python,selection_command
+1901,1768325,"utils/nn.py",8694,0,"",python,selection_command
+1902,1768468,"utils/nn.py",8697,0,"",python,selection_command
+1903,1768614,"utils/nn.py",8698,0,"",python,selection_command
+1904,1769089,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",0,0,"",python,tab
+1905,1769089,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",9464,0,"",python,selection_command
+1906,1783241,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20331,0,"",python,selection_mouse
+1907,1792906,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21288,0,"",python,selection_mouse
+1908,1798360,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21289,0,"",python,selection_command
+1909,1799123,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21288,0,"",python,selection_command
+1910,1799662,"utils/nn.py",0,0,"",python,tab
+1911,1799663,"utils/nn.py",8698,0,"",python,selection_command
+1912,1801715,"utils/nn.py",10223,0,"",python,selection_command
+1913,1845858,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",0,0,"",python,tab
+1914,1848848,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21220,0,"",python,selection_command
+1915,1849111,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21160,0,"",python,selection_command
+1916,1849125,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21120,0,"",python,selection_command
+1917,1849160,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21056,0,"",python,selection_command
+1918,1849189,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21046,0,"",python,selection_command
+1919,1849223,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",21004,0,"",python,selection_command
+1920,1849259,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20952,0,"",python,selection_command
+1921,1849291,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20905,0,"",python,selection_command
+1922,1849326,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20879,0,"",python,selection_command
+1923,1849360,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20839,0,"",python,selection_command
+1924,1849392,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20765,0,"",python,selection_command
+1925,1849426,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20710,0,"",python,selection_command
+1926,1849460,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20672,0,"",python,selection_command
+1927,1849490,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20648,0,"",python,selection_command
+1928,1849529,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20629,0,"",python,selection_command
+1929,1849558,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20609,0,"",python,selection_command
+1930,1849590,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20588,0,"",python,selection_command
+1931,1849623,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20579,0,"",python,selection_command
+1932,1849658,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20570,0,"",python,selection_command
+1933,1849690,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20493,0,"",python,selection_command
+1934,1849724,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20467,0,"",python,selection_command
+1935,1849759,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20458,0,"",python,selection_command
+1936,1849791,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20422,0,"",python,selection_command
+1937,1849824,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20385,0,"",python,selection_command
+1938,1849860,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20353,0,"",python,selection_command
+1939,1849907,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20342,0,"",python,selection_command
+1940,1850024,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20327,0,"",python,selection_command
+1941,1850709,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,14," if decode:",python,selection_command
+1942,1852616,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",20320,1625," if decode:\n if (\n self.cached_key is None\n or self.cached_value is None\n or self.cache_index is None\n ):\n raise ValueError(\n 'Autoregressive cache not initialized, call ``init_cache`` first.'\n )\n (\n *batch_dims,\n max_length,\n num_heads,\n depth_per_head,\n ) = self.cached_key.value.shape\n # shape check of cached keys against query input\n expected_shape = tuple(batch_dims) + (1, num_heads, depth_per_head)\n if expected_shape != query.shape:\n raise ValueError(\n 'Autoregressive cache shape error, '\n 'expected query shape %s instead got %s.'\n % (expected_shape, query.shape)\n )\n # update key, value caches with our new 1d spatial slices\n cur_index = self.cache_index[...]\n zero = jnp.array(0, dtype=lax.dtype(cur_index.dtype))\n indices = (zero,) * len(batch_dims) + (cur_index, zero, zero)\n key = lax.dynamic_update_slice(self.cached_key[...], key, indices)\n value = lax.dynamic_update_slice(self.cached_value[...], value, indices)\n self.cached_key[...] = key\n self.cached_value[...] = value\n self.cache_index[...] += 1\n # causal mask for cached decoder self-attention:\n # our single query position should only attend to those key\n # positions that have already been generated and cached,\n # not the remaining zero elements.\n mask = combine_masks(\n mask,\n jnp.broadcast_to(\n jnp.arange(max_length) <= cur_index,\n tuple(batch_dims) + (1, 1, max_length),\n ),\n )\n",python,selection_command
+1943,1855207,"utils/nn.py",0,0,"",python,tab
+1944,1911842,"utils/nn.py",10594,0,"",python,selection_mouse
+1945,1913036,"utils/nn.py",10550,53,"",python,content
+1946,1913058,"utils/nn.py",10558,0,"",python,selection_command
+1947,1914245,"utils/nn.py",10011,0,"",python,selection_mouse
+1948,1914636,"utils/nn.py",9976,53,"",python,content
+1949,1914665,"utils/nn.py",9984,0,"",python,selection_command
+1950,1920447,"genie.py",0,0,"from typing import Dict\n\nimport optax\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nimport orbax.checkpoint as ocp\n\nfrom models.dynamics import DynamicsMaskGIT, DynamicsCausal\nfrom models.lam import LatentActionModel\nfrom models.tokenizer import TokenizerVQVAE\n\n\nclass Genie(nnx.Module):\n """"""Genie model""""""\n\n def __init__(\n self,\n in_dim: int,\n tokenizer_dim: int,\n tokenizer_ffn_dim: int,\n latent_patch_dim: int,\n num_patch_latents: int,\n patch_size: int,\n tokenizer_num_blocks: int,\n tokenizer_num_heads: int,\n lam_dim: int,\n lam_ffn_dim: int,\n latent_action_dim: int,\n num_latent_actions: int,\n lam_patch_size: int,\n lam_num_blocks: int,\n lam_num_heads: int,\n lam_co_train: bool,\n dyna_type: str,\n dyna_dim: int,\n dyna_ffn_dim: int,\n dyna_num_blocks: int,\n dyna_num_heads: int,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n decode: bool,\n rngs: nnx.Rngs,\n dropout: float = 0.0,\n mask_limit: float = 0.0,\n ):\n # --- Tokenizer ---\n self.in_dim = in_dim\n self.tokenizer_dim = tokenizer_dim\n self.tokenizer_ffn_dim = tokenizer_ffn_dim\n self.latent_patch_dim = latent_patch_dim\n self.num_patch_latents = num_patch_latents\n self.patch_size = patch_size\n self.tokenizer_num_blocks = tokenizer_num_blocks\n self.tokenizer_num_heads = tokenizer_num_heads\n # --- LAM ---\n self.lam_dim = lam_dim\n self.lam_ffn_dim = lam_ffn_dim\n self.latent_action_dim = latent_action_dim\n self.num_latent_actions = num_latent_actions\n self.lam_patch_size = lam_patch_size\n self.lam_num_blocks = lam_num_blocks\n self.lam_num_heads = lam_num_heads\n self.lam_co_train = lam_co_train\n # --- Dynamics ---\n self.dyna_type = dyna_type\n self.dyna_dim = dyna_dim\n self.dyna_ffn_dim = dyna_ffn_dim\n self.dyna_num_blocks = dyna_num_blocks\n self.dyna_num_heads = dyna_num_heads\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n self.dropout = dropout\n self.mask_limit = mask_limit\n\n self.tokenizer = TokenizerVQVAE(\n in_dim=self.in_dim,\n model_dim=self.tokenizer_dim,\n ffn_dim=self.tokenizer_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_patch_latents,\n patch_size=self.patch_size,\n num_blocks=self.tokenizer_num_blocks,\n num_heads=self.tokenizer_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.lam = LatentActionModel(\n in_dim=self.in_dim,\n model_dim=self.lam_dim,\n ffn_dim=self.lam_ffn_dim,\n latent_dim=self.latent_patch_dim,\n num_latents=self.num_latent_actions,\n patch_size=self.lam_patch_size,\n num_blocks=self.lam_num_blocks,\n num_heads=self.lam_num_heads,\n dropout=0.0,\n codebook_dropout=0.0,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n if self.dyna_type == ""maskgit"":\n self.dynamics = DynamicsMaskGIT(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n mask_limit=self.mask_limit,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n elif self.dyna_type == ""causal"":\n self.dynamics = DynamicsCausal(\n model_dim=self.dyna_dim,\n ffn_dim=self.dyna_ffn_dim,\n num_latents=self.num_patch_latents,\n latent_action_dim=self.latent_action_dim,\n num_blocks=self.dyna_num_blocks,\n num_heads=self.dyna_num_heads,\n dropout=self.dropout,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n use_flash_attention=self.use_flash_attention,\n decode=decode,\n rngs=rngs,\n )\n else:\n raise ValueError(f""Invalid dynamics type: {self.dyna_type}"")\n\n def __call__(\n self, batch: Dict[str, jax.Array], training: bool = True\n ) -> Dict[str, jax.Array]:\n videos_BTHWC = batch[""videos""]\n tokenizer_outputs = self.tokenizer.vq_encode(videos_BTHWC, training=False)\n token_indices_BTN = tokenizer_outputs[""indices""]\n lam_outputs = self.lam.vq_encode(videos_BTHWC, training=False)\n z_q_BTm11L = lam_outputs[""z_q""]\n action_indices_E = lam_outputs[""indices""]\n latent_actions_BTm11L = jax.lax.cond(\n self.lam_co_train,\n lambda: z_q_BTm11L,\n lambda: jax.lax.stop_gradient(z_q_BTm11L),\n )\n outputs = dict(\n video_tokens=jax.lax.stop_gradient(token_indices_BTN),\n latent_actions=latent_actions_BTm11L,\n )\n outputs[""mask_rng""] = batch[""mask_rng""]\n dyna_logits_BTNV, dyna_mask = self.dynamics(outputs, training)\n outputs[""token_logits""] = dyna_logits_BTNV\n if dyna_mask is not None:\n outputs[""mask""] = dyna_mask\n mle_indices_BTN = jnp.argmax(outputs[""token_logits""], axis=-1)\n H, W = batch[""videos""].shape[2:4]\n outputs[""recon""] = self.tokenizer.decode(mle_indices_BTN, (H, W))\n outputs[""lam_indices""] = action_indices_E\n return outputs\n\n # FIXME (f.srambical): sampling should be moved to the dynamics classes\n def sample(\n self,\n batch: Dict[str, jax.Array],\n seq_len: int,\n steps: int = 25,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> jax.Array:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: number of patches per frame\n M: model dimension\n S: sequence length\n H: height\n W: width\n E: B * (S - 1)\n """"""\n # --- Encode videos and actions ---\n videos_BTHWC = batch[""videos""]\n latent_actions_E = batch[""latent_actions""]\n tokenizer_out = self.tokenizer.vq_encode(videos_BTHWC, training=False)\n token_idxs_BTN = tokenizer_out[""indices""]\n B, T, N = token_idxs_BTN.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs_BTN.dtype)\n token_idxs_BSN = jnp.concatenate([token_idxs_BTN, pad], axis=1)\n action_tokens_EL = self.lam.vq.get_codes(latent_actions_E)\n\n def maskgit_step_fn(\n carry: tuple[jax.Array, jax.Array, jax.Array, jax.Array], step: jax.Array\n ) -> tuple[tuple[jax.Array, jax.Array, jax.Array, jax.Array], None]:\n rng, token_idxs_BSN, mask_BSN, action_tokens_EL = carry\n S, N = token_idxs_BSN.shape[1:]\n L = action_tokens_EL.shape[-1]\n\n # --- Construct + encode video ---\n vid_embed_BSNM = self.dynamics.patch_embed(token_idxs_BSN)\n mask_token_111M = self.dynamics.mask_token.value\n mask_expanded_BSN1 = mask_BSN[..., None]\n vid_embed_BSNM = jnp.where(mask_expanded_BSN1, mask_token_111M, vid_embed_BSNM)\n\n # --- Predict transition ---\n action_tokens_BSm1L = jnp.reshape(action_tokens_EL, (B, S - 1, L))\n act_embed_BSm1M = self.dynamics.action_up(action_tokens_BSm1L)\n act_embed_BSM = jnp.pad(act_embed_BSm1M, ((0, 0), (1, 0), (0, 0)))\n act_embed_BS1M = jnp.reshape(act_embed_BSM, (B, S, 1, act_embed_BSM.shape[-1]))\n vid_embed_BSNM += act_embed_BS1M\n unmasked_ratio = jnp.cos(jnp.pi * (step + 1) / (steps * 2))\n step_temp = temperature * (1.0 - unmasked_ratio)\n final_logits_BSNV = self.dynamics.transformer(vid_embed_BSNM) / step_temp\n\n # --- Sample new tokens for final frame ---\n if sample_argmax:\n sampled_token_idxs_BSN = jnp.argmax(final_logits_BSNV, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs_BSN = jax.random.categorical(_rng, final_logits_BSNV)\n gather_fn = jax.vmap(jax.vmap(jax.vmap(lambda x, y: x[y])))\n final_token_probs_BSN = gather_fn(\n jax.nn.softmax(final_logits_BSNV), sampled_token_idxs_BSN\n )\n final_token_probs_BSN += ~mask_BSN\n # Update masked tokens only\n token_idxs_BSN = jnp.where(mask_BSN, sampled_token_idxs_BSN, token_idxs_BSN)\n\n # --- Update mask ---\n num_unmasked_tokens = jnp.round(N * (1.0 - unmasked_ratio)).astype(int)\n idx_mask_N = jnp.arange(final_token_probs_BSN.shape[-1]) > num_unmasked_tokens\n sorted_idxs_BSN = jnp.argsort(final_token_probs_BSN, axis=-1, descending=True)\n mask_update_fn = jax.vmap(lambda msk, ids: msk.at[ids].set(idx_mask_N))\n new_mask_BSN = mask_update_fn(mask_BSN, sorted_idxs_BSN)\n\n new_carry = (rng, token_idxs_BSN, new_mask_BSN, action_tokens_EL)\n return new_carry, None\n\n def generation_step_fn(\n carry: tuple[jax.Array, jax.Array], step_t: jax.Array\n ) -> tuple[tuple[jax.Array, jax.Array], None]:\n rng, current_token_idxs_BSN = carry\n rng, step_rng = jax.random.split(rng)\n\n # Mask current and future frames (i.e., t >= step_t)\n mask_S = jnp.arange(seq_len) >= step_t\n mask_BSN = jnp.broadcast_to(mask_S[None, :, None], (B, seq_len, N)).astype(\n bool\n )\n masked_token_idxs_BSN = current_token_idxs_BSN * ~mask_BSN\n\n # --- Initialize and run MaskGIT loop ---\n init_carry_maskgit = (\n step_rng,\n masked_token_idxs_BSN,\n mask_BSN,\n action_tokens_EL,\n )\n final_carry_maskgit, _ = jax.lax.scan(\n maskgit_step_fn, init_carry_maskgit, jnp.arange(steps)\n )\n updated_token_idxs_BSN = final_carry_maskgit[1]\n new_carry = (rng, updated_token_idxs_BSN)\n return new_carry, None\n\n # --- Run the autoregressive generation using jax.lax.scan ---\n initial_carry = (batch[""rng""], token_idxs_BSN)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs_BSN = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n H, W = batch[""videos""].shape[2:4]\n final_frames_BSHWC = self.tokenizer.decode(\n final_token_idxs_BSN,\n video_hw=(H, W),\n )\n return final_frames_BSHWC\n\n def sample_causal(\n self,\n batch: Dict[str, jax.Array],\n seq_len: int,\n temperature: float = 1,\n sample_argmax: bool = False,\n ) -> jax.Array:\n """"""\n Autoregressively samples up to `seq_len` future frames, following Figure 8 of the paper.\n\n - Input frames are tokenized once.\n - Future frames are generated autoregressively in token space.\n - All frames are detokenized in a single pass.\n\n Note:\n - For interactive or step-wise sampling, detokenization should occur after each action.\n - To maintain consistent tensor shapes across timesteps, all current and future frames are decoded at every step.\n - Temporal causal structure is preserved by\n a) reapplying the mask before each decoding step.\n b) a temporal causal mask is applied within each ST-transformer block.\n\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: number of patches per frame\n M: model dimension\n S: sequence length\n H: height\n W: width\n E: B * (S - 1)\n """"""\n # --- Encode videos and actions ---\n videos_BTHWC = batch[""videos""]\n latent_actions_E = batch[""latent_actions""]\n tokenizer_out = self.tokenizer.vq_encode(videos_BTHWC, training=False)\n token_idxs_BTN = tokenizer_out[""indices""]\n B, T, N = token_idxs_BTN.shape\n pad_shape = (B, seq_len - T, N)\n pad = jnp.zeros(pad_shape, dtype=token_idxs_BTN.dtype)\n token_idxs_BSN = jnp.concatenate([token_idxs_BTN, pad], axis=1)\n action_tokens_EL = self.lam.vq.get_codes(latent_actions_E)\n\n def causal_step_fn(\n carry: tuple[jax.Array, jax.Array, jax.Array, jax.Array], step_n: jax.Array\n ) -> tuple[tuple[jax.Array, jax.Array, jax.Array, jax.Array], None]:\n rng, token_idxs_BSN, action_tokens_EL, step_t = carry\n S, N = token_idxs_BSN.shape[1:]\n L = action_tokens_EL.shape[-1]\n\n # --- Construct + encode video ---\n vid_embed_BSNM = self.dynamics.patch_embed(token_idxs_BSN)\n\n # --- Predict transition ---\n action_tokens_BSm1L = jnp.reshape(action_tokens_EL, (B, S - 1, L))\n act_embed_BSm1M = self.dynamics.action_up(action_tokens_BSm1L)\n act_embed_BSM = jnp.pad(act_embed_BSm1M, ((0, 0), (1, 0), (0, 0)))\n act_embed_BS1M = jnp.reshape(act_embed_BSM, (B, S, 1, act_embed_BSM.shape[-1]))\n vid_embed_BSNp1M = jnp.concatenate([act_embed_BS1M, vid_embed_BSNM], axis=2)\n final_logits_BTNp1V = self.dynamics.transformer(vid_embed_BSNp1M) / temperature\n final_logits_BV = final_logits_BTNp1V[:, step_t, step_n, :]\n\n # --- Sample new tokens for final frame ---\n if sample_argmax:\n sampled_token_idxs_B = jnp.argmax(final_logits_BV, axis=-1)\n else:\n rng, _rng = jax.random.split(rng)\n sampled_token_idxs_B = jax.random.categorical(_rng, final_logits_BV)\n # Update next tokens only\n token_idxs_BSN = token_idxs_BSN.at[:, step_t, step_n].set(sampled_token_idxs_B)\n step_t += 1\n\n new_carry = (rng, token_idxs_BSN, action_tokens_EL, step_t)\n return new_carry, None\n\n def generation_step_fn(\n carry: tuple[jax.Array, jax.Array], step_t: jax.Array\n ) -> tuple[tuple[jax.Array, jax.Array], None]:\n rng, current_token_idxs_BSN = carry\n rng, step_rng = jax.random.split(rng)\n\n # --- Initialize and run causal loop ---\n init_carry_causal = (\n step_rng,\n current_token_idxs_BSN,\n action_tokens_EL,\n step_t,\n )\n final_carry_causal, _ = jax.lax.scan(\n causal_step_fn, init_carry_causal, jnp.arange(N)\n )\n updated_token_idxs_BSN = final_carry_causal[1]\n new_carry = (rng, updated_token_idxs_BSN)\n return new_carry, None\n\n # --- Run the autoregressive generation using jax.lax.scan ---\n initial_carry = (batch[""rng""], token_idxs_BSN)\n timesteps_to_scan = jnp.arange(T, seq_len)\n final_carry, _ = jax.lax.scan(\n generation_step_fn, initial_carry, timesteps_to_scan\n )\n final_token_idxs_BSN = final_carry[1]\n\n # --- Decode all tokens at once at the end ---\n H, W = batch[""videos""].shape[2:4]\n final_frames_BSHWC = self.tokenizer.decode(\n final_token_idxs_BSN,\n video_hw=(H, W),\n )\n return final_frames_BSHWC\n\n def vq_encode(self, batch: Dict[str, jax.Array], training: bool) -> jax.Array:\n # --- Preprocess videos ---\n video_BTHWC = batch[""videos""]\n lam_output = self.lam.vq_encode(video_BTHWC, training=training)\n lam_indices_E = lam_output[""indices""]\n return lam_indices_E\n\n# FIXME (f.srambical): add conversion script for old checkpoints\ndef restore_genie_components(\n optimizer: nnx.Optimizer,\n sharding: jax.sharding.NamedSharding,\n rng: jax.Array,\n args,\n) -> nnx.Optimizer:\n """"""Restore pre-trained Genie components""""""\n rngs = nnx.Rngs(rng)\n\n tx = optimizer.tx\n model = optimizer.model\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n tokenizer_checkpoint_manager = ocp.CheckpointManager(\n directory=args.tokenizer_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_tokenizer = TokenizerVQVAE(\n in_dim=args.image_channels,\n model_dim=args.tokenizer_dim,\n ffn_dim=args.tokenizer_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n num_blocks=args.tokenizer_num_blocks,\n num_heads=args.tokenizer_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_tokenizer_optimizer = nnx.Optimizer(dummy_tokenizer, tx)\n dummy_tokenizer_optimizer_state = nnx.state(dummy_tokenizer_optimizer)\n abstract_sharded_tokenizer_optimizer_state = _create_abstract_sharded_pytree(\n dummy_tokenizer_optimizer_state, sharding\n )\n restored_tokenizer = tokenizer_checkpoint_manager.restore(\n step=tokenizer_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore( # type: ignore\n abstract_sharded_tokenizer_optimizer_state # type: ignore\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_tokenizer_optimizer.model, restored_tokenizer.model)\n model.tokenizer = dummy_tokenizer_optimizer.model\n tokenizer_checkpoint_manager.close()\n\n if args.lam_checkpoint:\n lam_checkpoint_manager = ocp.CheckpointManager(\n directory=args.lam_checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n dummy_lam = LatentActionModel(\n in_dim=args.image_channels,\n model_dim=args.lam_dim,\n ffn_dim=args.lam_ffn_dim,\n latent_dim=args.latent_patch_dim,\n num_latents=args.num_latent_actions,\n patch_size=args.lam_patch_size,\n num_blocks=args.lam_num_blocks,\n num_heads=args.lam_num_heads,\n dropout=args.dropout,\n codebook_dropout=args.dropout,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n rngs=rngs,\n )\n dummy_lam_optimizer = nnx.Optimizer(dummy_lam, tx)\n dummy_lam_optimizer_state = nnx.state(dummy_lam_optimizer)\n abstract_sharded_lam_optimizer_state = _create_abstract_sharded_pytree(\n dummy_lam_optimizer_state, sharding\n )\n restored_lam_optimizer = lam_checkpoint_manager.restore(\n step=lam_checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore( # type: ignore\n abstract_sharded_lam_optimizer_state # type: ignore\n ),\n ),\n )[""model_state""]\n nnx.update(dummy_lam_optimizer.model, restored_lam_optimizer.model)\n model.lam = dummy_lam_optimizer.model\n # Remove the LAM decoder to save memory and avoid unnecessary computation.\n del model.lam.decoder\n lam_checkpoint_manager.close()\n \n # Reinitialize the optimizer states\n optimizer = nnx.Optimizer(model, tx)\n return optimizer\n\n\ndef _create_abstract_sharded_pytree(\n pytree_template: nnx.GraphState, sharding_spec: jax.sharding.NamedSharding\n) -> jax.Array:\n """"""Replaces arrays in a pytree with ShapeDtypeStructs having the given sharding.""""""\n\n def map_fn(leaf_template):\n if hasattr(leaf_template, ""shape"") and hasattr(leaf_template, ""dtype""):\n return jax.ShapeDtypeStruct(\n leaf_template.shape, leaf_template.dtype, sharding=sharding_spec\n )\n return leaf_template\n\n return jax.tree_util.tree_map(map_fn, pytree_template)\n",python,tab
+1951,1922177,"genie.py",6307,0,"",python,selection_command
+1952,1922332,"genie.py",8424,0,"",python,selection_command
+1953,1922508,"genie.py",11085,0,"",python,selection_command
+1954,1923301,"genie.py",12875,0,"",python,selection_command
+1955,1924283,"genie.py",12997,0,"",python,selection_command
+1956,1924532,"genie.py",13049,0,"",python,selection_command
+1957,1924555,"genie.py",13111,0,"",python,selection_command
+1958,1924592,"genie.py",13186,0,"",python,selection_command
+1959,1924629,"genie.py",13195,0,"",python,selection_command
+1960,1924656,"genie.py",13219,0,"",python,selection_command
+1961,1924692,"genie.py",13245,0,"",python,selection_command
+1962,1924723,"genie.py",13298,0,"",python,selection_command
+1963,1924759,"genie.py",13341,0,"",python,selection_command
+1964,1924789,"genie.py",13372,0,"",python,selection_command
+1965,1924823,"genie.py",13403,0,"",python,selection_command
+1966,1924855,"genie.py",13425,0,"",python,selection_command
+1967,1924891,"genie.py",13446,0,"",python,selection_command
+1968,1924924,"genie.py",13473,0,"",python,selection_command
+1969,1925368,"genie.py",13476,0,"\n ",python,content
+1970,1926252,"genie.py",13485,0,"#",python,content
+1971,1926253,"genie.py",13486,0,"",python,selection_keyboard
+1972,1926826,"genie.py",13486,0," ",python,content
+1973,1926826,"genie.py",13487,0,"",python,selection_keyboard
+1974,1927166,"genie.py",13487,0,"F",python,content
+1975,1927166,"genie.py",13488,0,"",python,selection_keyboard
+1976,1927225,"genie.py",13488,0,"I",python,content
+1977,1927226,"genie.py",13489,0,"",python,selection_keyboard
+1978,1927329,"genie.py",13489,0,"X",python,content
+1979,1927329,"genie.py",13490,0,"",python,selection_keyboard
+1980,1928585,"genie.py",13490,0,"ME (f.srambical): this is not used anywhere",python,content
+1981,1929093,"genie.py",13532,0,"",python,selection_command
+1982,1929551,"genie.py",13525,0,"",python,selection_command
+1983,1929704,"genie.py",13520,0,"",python,selection_command
+1984,1929952,"genie.py",13516,0,"",python,selection_command
+1985,1930076,"genie.py",13513,0,"",python,selection_command
+1986,1930277,"genie.py",13508,0,"",python,selection_command
+1987,1930735,"genie.py",13508,25,"",python,content
+1988,1931078,"genie.py",13508,0,"r",python,content
+1989,1931078,"genie.py",13509,0,"",python,selection_keyboard
+1990,1931159,"genie.py",13509,0,"e",python,content
+1991,1931160,"genie.py",13510,0,"",python,selection_keyboard
+1992,1931483,"genie.py",13510,0,"´",python,content
+1993,1931483,"genie.py",13511,0,"",python,selection_keyboard
+1994,1931487,"genie.py",13510,1,"´",python,content
+1995,1931490,"genie.py",13510,1,"´",python,content
+1996,1931493,"genie.py",13510,1,"",python,content
+1997,1931494,"genie.py",13510,0,"",python,selection_keyboard
+1998,1931496,"genie.py",13510,0,"´",python,content
+1999,1931496,"genie.py",13511,0,"",python,selection_keyboard
+2000,1931496,"genie.py",13511,0,"´",python,content
+2001,1931497,"genie.py",13512,0,"",python,selection_keyboard
+2002,1931548,"genie.py",13511,1,"´t",python,content
+2003,1931548,"genie.py",13513,0,"",python,selection_keyboard
+2004,1931549,"genie.py",13511,2,"´t",python,content
+2005,1931551,"genie.py",13511,2,"",python,content
+2006,1931551,"genie.py",13511,0,"",python,selection_keyboard
+2007,1931554,"genie.py",13511,0,"´",python,content
+2008,1931554,"genie.py",13512,0,"",python,selection_keyboard
+2009,1931585,"genie.py",13512,0,"t",python,content
+2010,1931586,"genie.py",13513,0,"",python,selection_keyboard
+2011,1931998,"genie.py",13512,1,"",python,content
+2012,1932145,"genie.py",13511,1,"",python,content
+2013,1932275,"genie.py",13510,1,"",python,content
+2014,1932396,"genie.py",13510,0,"s",python,content
+2015,1932397,"genie.py",13511,0,"",python,selection_keyboard
+2016,1932398,"genie.py",13511,0,"e",python,content
+2017,1932398,"genie.py",13512,0,"",python,selection_keyboard
+2018,1932426,"genie.py",13512,0,"t",python,content
+2019,1932426,"genie.py",13513,0,"",python,selection_keyboard
+2020,1932673,"genie.py",13513,0," ",python,content
+2021,1932673,"genie.py",13514,0,"",python,selection_keyboard
+2022,1932791,"genie.py",13514,0,"s",python,content
+2023,1932791,"genie.py",13515,0,"",python,selection_keyboard
+2024,1932847,"genie.py",13515,0,"p",python,content
+2025,1932847,"genie.py",13516,0,"",python,selection_keyboard
+2026,1933186,"genie.py",13516,0,"t",python,content
+2027,1933186,"genie.py",13517,0,"",python,selection_keyboard
+2028,1933559,"genie.py",13516,1,"",python,content
+2029,1933668,"genie.py",13516,0,"a",python,content
+2030,1933668,"genie.py",13517,0,"",python,selection_keyboard
+2031,1933671,"genie.py",13517,0,"t",python,content
+2032,1933671,"genie.py",13518,0,"",python,selection_keyboard
+2033,1933711,"genie.py",13518,0,"i",python,content
+2034,1933711,"genie.py",13519,0,"",python,selection_keyboard
+2035,1933932,"genie.py",13519,0,"a",python,content
+2036,1933932,"genie.py",13520,0,"",python,selection_keyboard
+2037,1933951,"genie.py",13520,0,"l",python,content
+2038,1933951,"genie.py",13521,0,"",python,selection_keyboard
+2039,1934067,"genie.py",13521,0," ",python,content
+2040,1934067,"genie.py",13522,0,"",python,selection_keyboard
+2041,1934387,"genie.py",13514,8,"",python,content
+2042,1934460,"genie.py",13508,6,"",python,content
+2043,1934601,"genie.py",13505,3,"",python,content
+2044,1935691,"genie.py",13505,0,":",python,content
+2045,1935691,"genie.py",13506,0,"",python,selection_keyboard
+2046,1936225,"genie.py",13505,0,"",python,selection_command
+2047,1936475,"genie.py",13505,0,"n",python,content
+2048,1936475,"genie.py",13506,0,"",python,selection_keyboard
+2049,1937216,"genie.py",13505,1,"",python,content
+2050,1937698,"genie.py",13504,0,"",python,selection_command
+2051,1938346,"genie.py",13505,0,"",python,selection_command
+2052,1939108,"genie.py",13505,0,")",python,content
+2053,1939108,"genie.py",13506,0,"",python,selection_keyboard
+2054,1939586,"genie.py",13505,0,"",python,selection_command
+2055,1939872,"genie.py",13475,0,"",python,selection_command
+2056,1940761,"genie.py",13505,0,"",python,selection_command
+2057,1941153,"genie.py",13507,0,"",python,selection_command
+2058,1941689,"genie.py",13507,0," ",python,content
+2059,1941690,"genie.py",13508,0,"",python,selection_keyboard
+2060,1942096,"genie.py",13508,0,"i",python,content
+2061,1942097,"genie.py",13509,0,"",python,selection_keyboard
+2062,1942229,"genie.py",13509,0,"n",python,content
+2063,1942230,"genie.py",13510,0,"",python,selection_keyboard
+2064,1945399,"genie.py",13510,0,"i",python,content
+2065,1945399,"genie.py",13511,0,"",python,selection_keyboard
+2066,1945400,"genie.py",13511,0,"t",python,content
+2067,1945401,"genie.py",13512,0,"",python,selection_keyboard
+2068,1945407,"genie.py",13512,0,"i",python,content
+2069,1945408,"genie.py",13513,0,"",python,selection_keyboard
+2070,1945409,"genie.py",13513,0,"a",python,content
+2071,1945409,"genie.py",13514,0,"",python,selection_keyboard
+2072,1945410,"genie.py",13514,0,"l",python,content
+2073,1945411,"genie.py",13515,0,"",python,selection_keyboard
+2074,1945411,"genie.py",13515,0,"i",python,content
+2075,1945411,"genie.py",13516,0,"",python,selection_keyboard
+2076,1945412,"genie.py",13516,0,"z",python,content
+2077,1945412,"genie.py",13517,0,"",python,selection_keyboard
+2078,1945413,"genie.py",13517,0,"e",python,content
+2079,1945413,"genie.py",13518,0,"",python,selection_keyboard
+2080,1945414,"genie.py",13518,0," ",python,content
+2081,1945414,"genie.py",13519,0,"",python,selection_keyboard
+2082,1945416,"genie.py",13519,0,"s",python,content
+2083,1945416,"genie.py",13520,0,"",python,selection_keyboard
+2084,1945417,"genie.py",13520,0,"p",python,content
+2085,1945417,"genie.py",13521,0,"",python,selection_keyboard
+2086,1945419,"genie.py",13520,1,"",python,content
+2087,1945422,"genie.py",13519,1,"",python,content
+2088,1946242,"genie.py",13519,0,"k",python,content
+2089,1946242,"genie.py",13520,0,"",python,selection_keyboard
+2090,1946243,"genie.py",13520,0,"v",python,content
+2091,1946243,"genie.py",13521,0,"",python,selection_keyboard
+2092,1946440,"genie.py",13521,0," ",python,content
+2093,1946441,"genie.py",13522,0,"",python,selection_keyboard
+2094,1946561,"genie.py",13522,0,"a",python,content
+2095,1946561,"genie.py",13523,0,"",python,selection_keyboard
+2096,1946967,"genie.py",13522,1,"",python,content
+2097,1947087,"genie.py",13522,0,"c",python,content
+2098,1947087,"genie.py",13523,0,"",python,selection_keyboard
+2099,1947281,"genie.py",13523,0,"a",python,content
+2100,1947282,"genie.py",13524,0,"",python,selection_keyboard
+2101,1947282,"genie.py",13524,0,"c",python,content
+2102,1947282,"genie.py",13525,0,"",python,selection_keyboard
+2103,1947421,"genie.py",13525,0,"h",python,content
+2104,1947422,"genie.py",13526,0,"",python,selection_keyboard
+2105,1947512,"genie.py",13526,0,"e",python,content
+2106,1947512,"genie.py",13527,0,"",python,selection_keyboard
+2107,1947806,"genie.py",13527,0,"s",python,content
+2108,1947806,"genie.py",13528,0,"",python,selection_keyboard
+2109,1947997,"genie.py",13527,0,"",python,selection_command
+2110,1948410,"genie.py",13528,0,"\n # FIXME (f.srambical): initialize kv caches",python,content
+2111,1948411,"genie.py",13537,0,"",python,selection_command
+2112,1948593,"genie.py",13539,0,"",python,selection_command
+2113,1948723,"genie.py",13545,0,"",python,selection_command
+2114,1948912,"genie.py",13546,0,"",python,selection_command
+2115,1949181,"genie.py",13547,0,"",python,selection_command
+2116,1949378,"genie.py",13548,0,"",python,selection_command
+2117,1949509,"genie.py",13557,0,"",python,selection_command
+2118,1949710,"genie.py",13560,0,"",python,selection_command
+2119,1949929,"genie.py",13571,0,"",python,selection_command
+2120,1950281,"genie.py",13560,0,"",python,selection_command
+2121,1950759,"genie.py",13560,20,"",python,content
+2122,1950954,"genie.py",13560,0,"r",python,content
+2123,1950954,"genie.py",13561,0,"",python,selection_keyboard
+2124,1950954,"genie.py",13561,0,"e",python,content
+2125,1950954,"genie.py",13562,0,"",python,selection_keyboard
+2126,1951480,"genie.py",13562,0,"s",python,content
+2127,1951480,"genie.py",13563,0,"",python,selection_keyboard
+2128,1951512,"genie.py",13563,0,"e",python,content
+2129,1951512,"genie.py",13564,0,"",python,selection_keyboard
+2130,1951619,"genie.py",13564,0,"t",python,content
+2131,1951620,"genie.py",13565,0,"",python,selection_keyboard
+2132,1951835,"genie.py",13565,0," ",python,content
+2133,1951835,"genie.py",13566,0,"",python,selection_keyboard
+2134,1952329,"genie.py",13566,0,"s",python,content
+2135,1952329,"genie.py",13567,0,"",python,selection_keyboard
+2136,1952333,"genie.py",13567,0,"p",python,content
+2137,1952333,"genie.py",13568,0,"",python,selection_keyboard
+2138,1952527,"genie.py",13568,0,"a",python,content
+2139,1952527,"genie.py",13569,0,"",python,selection_keyboard
+2140,1952528,"genie.py",13569,0,"t",python,content
+2141,1952528,"genie.py",13570,0,"",python,selection_keyboard
+2142,1952615,"genie.py",13570,0,"i",python,content
+2143,1952616,"genie.py",13571,0,"",python,selection_keyboard
+2144,1952855,"genie.py",13571,0,"a",python,content
+2145,1952855,"genie.py",13572,0,"",python,selection_keyboard
+2146,1952865,"genie.py",13572,0,"l",python,content
+2147,1952865,"genie.py",13573,0,"",python,selection_keyboard
+2148,1953049,"genie.py",13573,0," ",python,content
+2149,1953049,"genie.py",13574,0,"",python,selection_keyboard
+2150,1953137,"genie.py",13574,0,"k",python,content
+2151,1953137,"genie.py",13575,0,"",python,selection_keyboard
+2152,1953137,"genie.py",13575,0,"c",python,content
+2153,1953137,"genie.py",13576,0,"",python,selection_keyboard
+2154,1953378,"genie.py",13576,0," ",python,content
+2155,1953378,"genie.py",13577,0,"",python,selection_keyboard
+2156,1953468,"genie.py",13577,0,"c",python,content
+2157,1953468,"genie.py",13578,0,"",python,selection_keyboard
+2158,1953723,"genie.py",13578,0,"a",python,content
+2159,1953723,"genie.py",13579,0,"",python,selection_keyboard
+2160,1953943,"genie.py",13578,1,"",python,content
+2161,1954102,"genie.py",13577,1,"",python,content
+2162,1954236,"genie.py",13576,1,"",python,content
+2163,1954426,"genie.py",13575,1,"",python,content
+2164,1954486,"genie.py",13575,0,"v",python,content
+2165,1954487,"genie.py",13576,0,"",python,selection_keyboard
+2166,1954804,"genie.py",13576,0," ",python,content
+2167,1954804,"genie.py",13577,0,"",python,selection_keyboard
+2168,1954950,"genie.py",13577,0,"c",python,content
+2169,1954951,"genie.py",13578,0,"",python,selection_keyboard
+2170,1955016,"genie.py",13578,0,"a",python,content
+2171,1955016,"genie.py",13579,0,"",python,selection_keyboard
+2172,1955147,"genie.py",13579,0,"c",python,content
+2173,1955147,"genie.py",13580,0,"",python,selection_keyboard
+2174,1955184,"genie.py",13580,0,"h",python,content
+2175,1955184,"genie.py",13581,0,"",python,selection_keyboard
+2176,1955317,"genie.py",13581,0,"e",python,content
+2177,1955317,"genie.py",13582,0,"",python,selection_keyboard
+2178,1955557,"genie.py",13582,0," ",python,content
+2179,1955557,"genie.py",13583,0,"",python,selection_keyboard
+2180,1955673,"genie.py",13583,0,"a",python,content
+2181,1955673,"genie.py",13584,0,"",python,selection_keyboard
+2182,1955698,"genie.py",13584,0,"f",python,content
+2183,1955699,"genie.py",13585,0,"",python,selection_keyboard
+2184,1955784,"genie.py",13585,0,"t",python,content
+2185,1955784,"genie.py",13586,0,"",python,selection_keyboard
+2186,1955872,"genie.py",13586,0,"e",python,content
+2187,1955872,"genie.py",13587,0,"",python,selection_keyboard
+2188,1955998,"genie.py",13587,0,"r",python,content
+2189,1955998,"genie.py",13588,0,"",python,selection_keyboard
+2190,1956196,"genie.py",13588,0," ",python,content
+2191,1956196,"genie.py",13589,0,"",python,selection_keyboard
+2192,1956219,"genie.py",13589,0,"e",python,content
+2193,1956219,"genie.py",13590,0,"",python,selection_keyboard
+2194,1956523,"genie.py",13590,0,"a",python,content
+2195,1956523,"genie.py",13591,0,"",python,selection_keyboard
+2196,1956523,"genie.py",13591,0,"c",python,content
+2197,1956523,"genie.py",13592,0,"",python,selection_keyboard
+2198,1956719,"genie.py",13592,0,"h",python,content
+2199,1956719,"genie.py",13593,0,"",python,selection_keyboard
+2200,1956889,"genie.py",13593,0," ",python,content
+2201,1956890,"genie.py",13594,0,"",python,selection_keyboard
+2202,1957390,"genie.py",13594,0,"f",python,content
+2203,1957390,"genie.py",13595,0,"",python,selection_keyboard
+2204,1957467,"genie.py",13595,0,"r",python,content
+2205,1957467,"genie.py",13596,0,"",python,selection_keyboard
+2206,1957655,"genie.py",13596,0,"a",python,content
+2207,1957655,"genie.py",13597,0,"",python,selection_keyboard
+2208,1957655,"genie.py",13597,0,"m",python,content
+2209,1957655,"genie.py",13598,0,"",python,selection_keyboard
+2210,1957681,"genie.py",13598,0,"e",python,content
+2211,1957682,"genie.py",13599,0,"",python,selection_keyboard
+2212,1957920,"genie.py",13598,0,"",python,selection_command
+2213,1959151,"utils/nn.py",0,0,"",python,tab
+2214,2017127,"genie.py",0,0,"",python,tab
+2215,2021161,"utils/nn.py",0,0,"",python,tab
+2216,2025757,".venv/lib/python3.10/site-packages/flax/nnx/nn/attention.py",0,0,"",python,tab
+2217,2034886,"utils/nn.py",0,0,"",python,tab
+2218,2192405,"utils/nn.py",10185,0,"",python,selection_mouse
+2219,2192406,"utils/nn.py",10184,0,"",python,selection_command
+2220,2218885,"utils/nn.py",10185,0,"\n ",python,content
+2221,2219785,"utils/nn.py",10198,0,"a",python,content
+2222,2219785,"utils/nn.py",10199,0,"",python,selection_keyboard
+2223,2219834,"utils/nn.py",10199,0,"s",python,content
+2224,2219834,"utils/nn.py",10200,0,"",python,selection_keyboard
+2225,2220021,"utils/nn.py",10200,0,"s",python,content
+2226,2220021,"utils/nn.py",10201,0,"",python,selection_keyboard
+2227,2220046,"utils/nn.py",10201,0,"e",python,content
+2228,2220046,"utils/nn.py",10202,0,"",python,selection_keyboard
+2229,2220093,"utils/nn.py",10202,0,"r",python,content
+2230,2220093,"utils/nn.py",10203,0,"",python,selection_keyboard
+2231,2220309,"utils/nn.py",10203,0,"t",python,content
+2232,2220309,"utils/nn.py",10204,0,"",python,selection_keyboard
+2233,2220506,"utils/nn.py",10204,0," ",python,content
+2234,2220506,"utils/nn.py",10205,0,"",python,selection_keyboard
+2235,2221384,"utils/nn.py",10205,0,"z_FNM.shape == (B * T, 1, M)",python,content
+2236,2221598,"utils/nn.py",10232,0,"",python,selection_command
+2237,2222958,"utils/nn.py",10231,0,"",python,selection_command
+2238,2223058,"utils/nn.py",10229,0,"",python,selection_command
+2239,2223286,"utils/nn.py",10228,0,"",python,selection_command
+2240,2223386,"utils/nn.py",10226,0,"",python,selection_command
+2241,2223587,"utils/nn.py",10225,0,"",python,selection_command
+2242,2224942,"utils/nn.py",10186,48,"",python,content
+2243,2224951,"utils/nn.py",10194,0,"",python,selection_command
+2244,2225387,"utils/nn.py",10144,0,"",python,selection_command
+2245,2225437,"utils/nn.py",10091,0,"",python,selection_command
+2246,2225594,"utils/nn.py",10049,0,"",python,selection_command
+2247,2227356,"utils/nn.py",10091,0,"",python,selection_command
+2248,2227544,"utils/nn.py",10144,0,"",python,selection_command
+2249,2228080,"utils/nn.py",10185,0,"\n assert z_FNM.shape == (B * T, 1, M)",python,content
+2250,2228091,"utils/nn.py",10198,0,"",python,selection_command
+2251,2228727,"utils/nn.py",10205,0,"",python,selection_command
+2252,2228796,"utils/nn.py",10210,0,"",python,selection_command
+2253,2229777,"utils/nn.py",10211,0,"",python,selection_command
+2254,2229936,"utils/nn.py",10217,0,"",python,selection_command
+2255,2230107,"utils/nn.py",10220,0,"",python,selection_command
+2256,2230300,"utils/nn.py",10221,0,"",python,selection_command
+2257,2230871,"utils/nn.py",10223,0,"",python,selection_command
+2258,2231065,"utils/nn.py",10225,0,"",python,selection_command
+2259,2231241,"utils/nn.py",10226,0,"",python,selection_command
+2260,2231743,"utils/nn.py",10228,0,"",python,selection_command
+2261,2233250,"utils/nn.py",10228,1,"N",python,content
+2262,2237662,"utils/nn.py",10233,0,"\n ",python,content
+2263,2237761,"utils/nn.py",10246,0,"b",python,content
+2264,2237761,"utils/nn.py",10247,0,"",python,selection_keyboard
+2265,2237981,"utils/nn.py",10247,0,"r",python,content
+2266,2237982,"utils/nn.py",10248,0,"",python,selection_keyboard
+2267,2238056,"utils/nn.py",10248,0,"e",python,content
+2268,2238057,"utils/nn.py",10249,0,"",python,selection_keyboard
+2269,2238235,"utils/nn.py",10249,0,"a",python,content
+2270,2238236,"utils/nn.py",10250,0,"",python,selection_keyboard
+2271,2238238,"utils/nn.py",10250,0,"k",python,content
+2272,2238238,"utils/nn.py",10251,0,"",python,selection_keyboard
+2273,2238354,"utils/nn.py",10251,0,"p",python,content
+2274,2238354,"utils/nn.py",10252,0,"",python,selection_keyboard
+2275,2238521,"utils/nn.py",10252,0,"a",python,content
+2276,2238521,"utils/nn.py",10253,0,"",python,selection_keyboard
+2277,2238523,"utils/nn.py",10253,0,"o",python,content
+2278,2238523,"utils/nn.py",10254,0,"",python,selection_keyboard
+2279,2239067,"utils/nn.py",10253,1,"",python,content
+2280,2239131,"utils/nn.py",10252,1,"",python,content
+2281,2239544,"utils/nn.py",10252,0,"o",python,content
+2282,2239545,"utils/nn.py",10253,0,"",python,selection_keyboard
+2283,2239583,"utils/nn.py",10253,0,"i",python,content
+2284,2239583,"utils/nn.py",10254,0,"",python,selection_keyboard
+2285,2239769,"utils/nn.py",10254,0,"n",python,content
+2286,2239769,"utils/nn.py",10255,0,"",python,selection_keyboard
+2287,2240485,"utils/nn.py",10255,0,"t()",python,content
+2288,2240788,"utils/nn.py",10257,0,"",python,selection_command
+2289,2241741,"TERMINAL",0,0,"\r[K[franz.srambical@hai004.haicore.berlin:~/jafar] $ ",,terminal_output
+2290,2242554,"TERMINAL",0,0,"b",,terminal_output
+2291,2242791,"TERMINAL",0,0,"a",,terminal_output
+2292,2242884,"TERMINAL",0,0,"sh",,terminal_output
+2293,2242986,"TERMINAL",0,0,"e",,terminal_output
+2294,2243212,"TERMINAL",0,0," ",,terminal_output
+2295,2243314,"TERMINAL",0,0,"e",,terminal_output
+2296,2243736,"TERMINAL",0,0,"[K",,terminal_output
+2297,2243933,"TERMINAL",0,0,"[K",,terminal_output
+2298,2244035,"TERMINAL",0,0,"[Ke",,terminal_output
+2299,2244120,"TERMINAL",0,0," ",,terminal_output
+2300,2244571,"TERMINAL",0,0,"[K",,terminal_output
+2301,2244785,"TERMINAL",0,0,"[K",,terminal_output
+2302,2244886,"TERMINAL",0,0," e",,terminal_output
+2303,2245086,"TERMINAL",0,0,"xp",,terminal_output
+2304,2245204,"TERMINAL",0,0,"e",,terminal_output
+2305,2245371,"TERMINAL",0,0,"r",,terminal_output
+2306,2245630,"TERMINAL",0,0,"iments/",,terminal_output
+2307,2246697,"TERMINAL",0,0,"samp",,terminal_output
+2308,2246942,"TERMINAL",0,0,"lo",,terminal_output
+2309,2247076,"TERMINAL",0,0,"",,terminal_output
+2310,2247702,"TERMINAL",0,0,"[Ke",,terminal_output
+2311,2248332,"TERMINAL",0,0,".sh ",,terminal_output
+2312,2251787,"experiments/sample.sh",0,0,"source .venv/bin/activate\n\ndata_dir=""$PWD/data_arrayrecord/dummy""\nckpt_dir=""$PWD/checkpoints/causal_dynamics_openai_grain_tok_restore""\n\nexport XLA_FLAGS='--xla_gpu_autotune_level=0'\nexport PYTHONUNBUFFERED=1\nsrun python sample.py \\n --dyna_type ""causal"" \\n --batch_size 1 \\n --seq_len 2 \\n --start_frame 1 \\n --checkpoint $ckpt_dir \\n --data_dir $data_dir",shellscript,tab
+2313,2252847,"experiments/sample.sh",273,0,"",shellscript,selection_command
+2314,2253026,"experiments/sample.sh",246,0,"",shellscript,selection_command
+2315,2253184,"experiments/sample.sh",222,0,"",shellscript,selection_command
+2316,2254255,"experiments/sample.sh",246,0,"",shellscript,selection_command
+2317,2254255,"experiments/sample.sh",273,0,"",shellscript,selection_command
+2318,2256208,"sample.py",0,0,"from dataclasses import dataclass\nimport time\nimport os\nimport optax\n\nimport dm_pix as pix\nimport einops\nimport jax\nimport jax.numpy as jnp\nimport flax.linen as nn\nimport numpy as np\nimport orbax.checkpoint as ocp\nfrom PIL import Image, ImageDraw\nimport tyro\nfrom flax import nnx\n\nfrom genie import Genie\nfrom utils.dataloader import get_dataloader\n\n\n@dataclass\nclass Args:\n # Experiment\n seed: int = 0\n seq_len: int = 16\n image_channels: int = 3\n image_height: int = 90\n image_width: int = 160\n data_dir: str = ""data/coinrun_episodes""\n checkpoint: str = """"\n # Sampling\n batch_size: int = 1\n maskgit_steps: int = 25\n temperature: float = 1.0\n sample_argmax: bool = True\n start_frame: int = 0\n # Tokenizer checkpoint\n tokenizer_dim: int = 512\n tokenizer_ffn_dim: int = 2048\n latent_patch_dim: int = 32\n num_patch_latents: int = 1024\n patch_size: int = 4\n tokenizer_num_blocks: int = 4\n tokenizer_num_heads: int = 8\n # LAM checkpoint\n lam_dim: int = 512\n lam_ffn_dim: int = 2048\n latent_action_dim: int = 32\n num_latent_actions: int = 6\n lam_patch_size: int = 16\n lam_num_blocks: int = 4\n lam_num_heads: int = 8\n # Dynamics checkpoint\n dyna_type: str = ""maskgit""\n dyna_dim: int = 512\n dyna_ffn_dim: int = 2048\n dyna_num_blocks: int = 6\n dyna_num_heads: int = 8\n param_dtype = jnp.float32\n dtype = jnp.bfloat16\n use_flash_attention: bool = True\n\n\nargs = tyro.cli(Args)\n\nif __name__ == ""__main__"":\n """"""\n Dimension keys:\n B: batch size\n T: number of input (conditioning) frames\n N: number of patches per frame\n S: sequence length\n H: height\n W: width\n E: B * (S - 1)\n """"""\n jax.distributed.initialize()\n\n rng = jax.random.key(args.seed)\n\n # --- Load Genie checkpoint ---\n rngs = nnx.Rngs(rng)\n genie = Genie(\n # Tokenizer\n in_dim=args.image_channels,\n tokenizer_dim=args.tokenizer_dim,\n tokenizer_ffn_dim=args.tokenizer_ffn_dim,\n latent_patch_dim=args.latent_patch_dim,\n num_patch_latents=args.num_patch_latents,\n patch_size=args.patch_size,\n tokenizer_num_blocks=args.tokenizer_num_blocks,\n tokenizer_num_heads=args.tokenizer_num_heads,\n # LAM\n lam_dim=args.lam_dim,\n lam_ffn_dim=args.lam_ffn_dim,\n latent_action_dim=args.latent_action_dim,\n num_latent_actions=args.num_latent_actions,\n lam_patch_size=args.lam_patch_size,\n lam_num_blocks=args.lam_num_blocks,\n lam_num_heads=args.lam_num_heads,\n lam_co_train=False,\n # Dynamics\n dyna_type=args.dyna_type,\n dyna_dim=args.dyna_dim,\n dyna_ffn_dim=args.dyna_ffn_dim,\n dyna_num_blocks=args.dyna_num_blocks,\n dyna_num_heads=args.dyna_num_heads,\n param_dtype=args.param_dtype,\n dtype=args.dtype,\n use_flash_attention=args.use_flash_attention,\n decode=True,\n rngs=rngs,\n )\n\n handler_registry = ocp.handlers.DefaultCheckpointHandlerRegistry()\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeSave, ocp.handlers.PyTreeCheckpointHandler\n )\n handler_registry.add(\n ""model_state"", ocp.args.PyTreeRestore, ocp.handlers.PyTreeCheckpointHandler\n )\n checkpoint_options = ocp.CheckpointManagerOptions(\n step_format_fixed_length=6,\n )\n checkpoint_manager = ocp.CheckpointManager(\n args.checkpoint,\n options=checkpoint_options,\n handler_registry=handler_registry,\n )\n\n dummy_tx = optax.adamw(\n learning_rate=optax.linear_schedule(0.0001, 0.0001, 10000),\n b1=0.9,\n b2=0.9,\n weight_decay=1e-4,\n mu_dtype=args.dtype,\n )\n dummy_optimizer = nnx.Optimizer(genie, dummy_tx)\n\n abstract_optimizer = nnx.eval_shape(lambda: dummy_optimizer)\n abstract_optimizer_state = nnx.state(abstract_optimizer)\n restored = checkpoint_manager.restore(\n checkpoint_manager.latest_step(),\n args=ocp.args.Composite(\n model_state=ocp.args.PyTreeRestore(abstract_optimizer_state), # type: ignore\n ),\n )\n restored_optimizer_state = restored[""model_state""]\n nnx.update(dummy_optimizer, restored_optimizer_state)\n\n # --- Define sampling function ---\n def _sampling_fn(model: Genie, batch: dict) -> jax.Array:\n """"""Runs Genie.sample with pre-defined generation hyper-parameters.""""""\n if args.dyna_type == ""maskgit"":\n return model.sample(\n batch,\n args.seq_len,\n args.maskgit_steps,\n args.temperature,\n args.sample_argmax,\n )\n elif args.dyna_type == ""causal"":\n return model.sample_causal(\n batch,\n args.seq_len,\n args.temperature,\n args.sample_argmax,\n )\n else:\n raise ValueError(f""Invalid dynamics type: {args.dyna_type}"")\n\n # --- Define autoregressive sampling loop ---\n @nnx.jit\n def _autoreg_sample(rng, video_batch_BSHWC, action_batch_E):\n input_video_BTHWC = video_batch_BSHWC[:, : args.start_frame + 1]\n rng, _rng = jax.random.split(rng)\n batch = dict(videos=input_video_BTHWC, latent_actions=action_batch_E, rng=_rng)\n generated_vid_BSHWC = _sampling_fn(genie, batch)\n return generated_vid_BSHWC\n\n # --- Get video + latent actions ---\n array_record_files = [\n os.path.join(args.data_dir, x)\n for x in os.listdir(args.data_dir)\n if x.endswith("".array_record"")\n ]\n dataloader = get_dataloader(\n array_record_files,\n args.seq_len,\n args.batch_size,\n args.image_height,\n args.image_width,\n args.image_channels,\n # We don't use workers in order to avoid grain shutdown issues (https://github.com/google/grain/issues/398)\n num_workers=0,\n prefetch_buffer_size=1,\n seed=args.seed,\n )\n dataloader = iter(dataloader)\n video_batch_BSHWC = next(dataloader)\n gt_video = jnp.asarray(video_batch_BSHWC, dtype=jnp.float32) / 255.0\n video_batch_BSHWC = gt_video.astype(args.dtype)\n # Get latent actions for all videos in the batch\n batch = dict(videos=video_batch_BSHWC)\n action_batch_E = genie.vq_encode(batch, training=False)\n\n # --- Sample + evaluate video ---\n recon_video_BSHWC = _autoreg_sample(rng, video_batch_BSHWC, action_batch_E)\n recon_video_BSHWC = recon_video_BSHWC.astype(jnp.float32)\n gt = gt_video[:, : recon_video_BSHWC.shape[1]].clip(0, 1).reshape(-1, *gt_video.shape[2:])\n recon = recon_video_BSHWC.clip(0, 1).reshape(-1, *recon_video_BSHWC.shape[2:])\n ssim = jnp.asarray(\n pix.ssim(gt[:, args.start_frame + 1 :], recon[:, args.start_frame + 1 :])\n ).mean()\n print(f""SSIM: {ssim}"")\n\n # --- Construct video ---\n true_videos = (gt_video * 255).astype(np.uint8)\n pred_videos = (recon_video_BSHWC * 255).astype(np.uint8)\n video_comparison = np.zeros((2, *recon_video_BSHWC.shape), dtype=np.uint8)\n video_comparison[0] = true_videos[:, : args.seq_len]\n video_comparison[1] = pred_videos\n frames = einops.rearrange(video_comparison, ""n b t h w c -> t (b h) (n w) c"")\n\n # --- Save video ---\n imgs = [Image.fromarray(img) for img in frames]\n # Write actions on each frame, on each row (i.e., for each video in the batch, on the GT row)\n B, S, _, _, _ = video_batch_BSHWC.shape\n action_batch_BSm11 = jnp.reshape(action_batch_E, (B, S-1, 1))\n for t, img in enumerate(imgs[1:]):\n d = ImageDraw.Draw(img)\n for row in range(action_batch_BSm11.shape[0]):\n action = action_batch_BSm11[row, t, 0]\n y_offset = row * video_batch_BSHWC.shape[2] + 2\n d.text((2, y_offset), f""{action}"", fill=255)\n imgs[0].save(\n f""generation_{time.time()}.gif"",\n save_all=True,\n append_images=imgs[1:],\n duration=250,\n loop=0,\n )\n",python,tab
+2319,2258316,"sample.py",2968,0,"",python,selection_command
+2320,2259128,"experiments/sample.sh",0,0,"",shellscript,tab
+2321,2260870,"utils/nn.py",0,0,"",python,tab
+2322,2261628,"TERMINAL",0,0,"\r\n[?2004l\r",,terminal_output
+2323,2262614,"TERMINAL",0,0,"\r\n",,terminal_output
+2324,2262928,"TERMINAL",0,0,"\r\n",,terminal_output
+2325,2273914,"TERMINAL",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\r\n warnings.warn(\r\n",,terminal_output
+2326,2282122,"TERMINAL",0,0,"2025-07-31 20:59:54.149920: W external/xla/xla/service/gpu/autotuning/dot_search_space.cc:200] All configs were filtered out because none of them sufficiently match the hints. Maybe the hints set does not contain a good representative set of valid configs?Working around this by using the full hints set instead.\r\n",,terminal_output
+2327,2283122,"TERMINAL",0,0,"jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 208, in \r\n recon_video_BSHWC = _autoreg_sample(rng, video_batch_BSHWC, action_batch_E)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 431, in __call__\r\n pure_args_out, pure_kwargs_out, pure_out = self.jitted_fn(\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 126, in __call__\r\n out = self.f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 178, in _autoreg_sample\r\n generated_vid_BSHWC = _sampling_fn(genie, batch)\r\n File ""/fast/home/franz.srambical/jafar/sample.py"", line 163, in _sampling_fn\r\n return model.sample_causal(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 405, in sample_causal\r\n final_carry, _ = jax.lax.scan(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 395, in generation_step_fn\r\n final_carry_causal, _ = jax.lax.scan(\r\n File ""/fast/home/franz.srambical/jafar/genie.py"", line 366, in causal_step_fn\r\n final_logits_BTNp1V = self.dynamics.transformer(vid_embed_BSNp1M) / temperature\r\n File ""/fast/home/franz.srambical/jafar/utils/nn.py"", line 442, in __call__\r\n x_BTNM = block(x_BTNM, pos_index)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/transforms.py"", line 73, in resolve_kwargs_wrapper\r\n return f(*args)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/graph.py"", line 2051, in update_context_manager_wrapper\r\n return f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/graph.py"", line 2051, in update_context_manager_wrapper\r\n return f(*args, **kwargs)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/general.py"", line 153, in split_inputs_wrapper\r\n pure_args_out, pure_out = f(*pure_args)\r\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/general.py"", line 198, in merge_inputs_wrapper\r\n out = f(*args)\r\n File ""/fast/home/franz.srambical/jafar/utils/nn.py"", line 321, in __call__\r\n assert pos_index is not None\r\nAssertionError\r\n",,terminal_output
+2328,2283950,"TERMINAL",0,0,"srun: error: hai004: task 0: Exited with exit code 1\r\n]0;franz.srambical@hai-login2:~/jafar[?2004h[franz.srambical@hai004.haicore.berlin:~/jafar] $ ",,terminal_output
+2329,2296542,"utils/nn.py",6909,0,"",python,selection_mouse
+2330,2297779,"utils/nn.py",13032,0,"",python,selection_command
+2331,2305496,"utils/nn.py",6901,0,"",python,selection_command
+2332,2312166,"utils/nn.py",13032,0,"",python,selection_command
+2333,2319309,"utils/nn.py",11206,0,"",python,selection_mouse
+2334,2322980,"models/dynamics.py",0,0,"from typing import Dict\n\nimport jax\nimport jax.numpy as jnp\nimport flax.nnx as nnx\nimport einops\n\nfrom utils.nn import STTransformer, Transformer\n\n\nclass DynamicsMaskGIT(nnx.Module):\n """"""\n MaskGIT dynamics model\n \n Dimension keys:\n B: batch size\n T: sequence length\n N: number of patches per frame\n L: latent dimension\n V: vocabulary size (number of latents)\n """"""\n\n def __init__(\n self,\n model_dim: int,\n ffn_dim: int,\n num_latents: int,\n latent_action_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n mask_limit: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n rngs: nnx.Rngs,\n ):\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.num_latents = num_latents\n self.latent_action_dim = latent_action_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.mask_limit = mask_limit\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.transformer = STTransformer(\n self.model_dim,\n self.model_dim,\n self.ffn_dim,\n self.num_latents,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n rngs=rngs,\n )\n self.patch_embed = nnx.Embed(self.num_latents, self.model_dim, rngs=rngs)\n self.mask_token = nnx.Param(\n nnx.initializers.lecun_uniform()(rngs.params(), (1, 1, 1, self.model_dim))\n )\n self.action_up = nnx.Linear(\n self.latent_action_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(\n self, batch: Dict[str, jax.Array], training: bool = True\n ) -> tuple[jax.Array, jax.Array | None]:\n # --- Mask videos ---\n video_tokens_BTN = batch[""video_tokens""]\n latent_actions_BTm11L = batch[""latent_actions""]\n vid_embed_BTNM = self.patch_embed(video_tokens_BTN)\n if training:\n batch_size = vid_embed_BTNM.shape[0]\n _rng_prob, *_rngs_mask = jax.random.split(batch[""mask_rng""], batch_size + 1)\n mask_prob = jax.random.uniform(\n _rng_prob, shape=(batch_size,), minval=self.mask_limit\n )\n per_sample_shape = vid_embed_BTNM.shape[1:-1]\n mask = jax.vmap(\n lambda rng, prob: jax.random.bernoulli(rng, prob, per_sample_shape),\n in_axes=(0, 0),\n )(jnp.asarray(_rngs_mask), mask_prob)\n mask = mask.at[:, 0].set(False)\n vid_embed_BTNM = jnp.where(\n jnp.expand_dims(mask, -1), self.mask_token.value, vid_embed_BTNM\n )\n else:\n mask = None\n\n # --- Predict transition ---\n act_embed_BTm11M = self.action_up(latent_actions_BTm11L)\n padded_act_embed_BT1M = jnp.pad(act_embed_BTm11M, ((0, 0), (1, 0), (0, 0), (0, 0)))\n padded_act_embed_BTNM = jnp.broadcast_to(padded_act_embed_BT1M, vid_embed_BTNM.shape)\n vid_embed_BTNM += padded_act_embed_BTNM\n logits_BTNV = self.transformer(vid_embed_BTNM)\n return logits_BTNV, mask\n\nclass DynamicsCausal(nnx.Module):\n """"""Causal dynamics model""""""\n\n def __init__(\n self,\n model_dim: int,\n ffn_dim: int,\n num_latents: int,\n latent_action_dim: int,\n num_blocks: int,\n num_heads: int,\n dropout: float,\n param_dtype: jnp.dtype,\n dtype: jnp.dtype,\n use_flash_attention: bool,\n decode: bool,\n rngs: nnx.Rngs,\n ):\n self.model_dim = model_dim\n self.ffn_dim = ffn_dim\n self.num_latents = num_latents\n self.latent_action_dim = latent_action_dim\n self.num_blocks = num_blocks\n self.num_heads = num_heads\n self.dropout = dropout\n self.param_dtype = param_dtype\n self.dtype = dtype\n self.use_flash_attention = use_flash_attention\n\n self.transformer = Transformer(\n self.model_dim,\n self.model_dim,\n self.ffn_dim,\n self.num_latents,\n self.num_blocks,\n self.num_heads,\n self.dropout,\n self.param_dtype,\n self.dtype,\n use_flash_attention=self.use_flash_attention,\n decode=decode,\n rngs=rngs,\n )\n self.patch_embed = nnx.Embed(self.num_latents, self.model_dim, rngs=rngs)\n self.action_up = nnx.Linear(\n self.latent_action_dim,\n self.model_dim,\n param_dtype=self.param_dtype,\n dtype=self.dtype,\n rngs=rngs,\n )\n\n def __call__(\n self, batch: Dict[str, jax.Array], training: bool = True\n ) -> tuple[jax.Array, jax.Array | None]:\n # FIXME (f.srambical): this is exactly the same as STTransformer, just without the masking\n video_tokens_BTN = batch[""video_tokens""]\n latent_actions_BTm11L = batch[""latent_actions""]\n\n vid_embed_BTNM = self.patch_embed(video_tokens_BTN)\n act_embed_BTm11M = self.action_up(latent_actions_BTm11L)\n # FIXME (f.srambical): do we need to embed the action padding?\n padded_act_embed_BT1M = jnp.pad(act_embed_BTm11M, ((0, 0), (1, 0), (0, 0), (0, 0)))\n vid_embed_BTNp1M = jnp.concatenate([padded_act_embed_BT1M, vid_embed_BTNM], axis=2)\n\n logits_BTNp1V = self.transformer(vid_embed_BTNp1M)\n logits_BTNV = logits_BTNp1V[:, :, :-1]\n\n return logits_BTNV, jnp.ones_like(video_tokens_BTN)\n",python,tab
+2335,2322980,"models/dynamics.py",4336,11,"Transformer",python,selection_command
+2336,2323517,"models/dynamics.py",4346,0,"",python,selection_command
+2337,2324269,"models/dynamics.py",4332,0,"",python,selection_mouse
+2338,2326246,"models/dynamics.py",4336,0,"",python,selection_command
+2339,2326740,"models/dynamics.py",5748,0,"",python,selection_command
+2340,2327880,"models/dynamics.py",134,0,"",python,selection_command
+2341,2329993,"models/dynamics.py",1206,0,"",python,selection_command
+2342,2330243,"models/dynamics.py",3444,0,"",python,selection_command
+2343,2333229,"models/dynamics.py",4322,0,"",python,selection_command
+2344,2335363,"models/dynamics.py",4336,0,"",python,selection_command
+2345,2336212,"models/dynamics.py",5748,0,"",python,selection_command
+2346,2345411,"genie.py",0,0,"",python,tab
+2347,2348584,"genie.py",15114,0,"",python,selection_command
+2348,2354780,"genie.py",15124,0,"",python,selection_command
+2349,2354920,"genie.py",15125,0,"",python,selection_command
+2350,2355077,"genie.py",15141,0,"",python,selection_command
+2351,2355416,"genie.py",15142,0,"",python,selection_command
+2352,2355497,"genie.py",15142,0,",",python,content
+2353,2355497,"genie.py",15143,0,"",python,selection_keyboard
+2354,2355677,"genie.py",15143,0," ",python,content
+2355,2355677,"genie.py",15144,0,"",python,selection_keyboard
+2356,2358188,"genie.py",15144,0,"(step_t, step_n)",python,content
+2357,2358481,"genie.py",15159,0,"",python,selection_command
+2358,2359433,"genie.py",15153,0,"",python,selection_command
+2359,2359587,"genie.py",15151,0,"",python,selection_command
+2360,2360152,"genie.py",15145,0,"",python,selection_command
+2361,2373686,"genie.py",15151,0,"",python,selection_command
+2362,2376412,"genie.py",15145,0,"",python,selection_command
+2363,2376807,"genie.py",15150,0,"",python,selection_command
+2364,2377085,"genie.py",15151,0,"",python,selection_command
+2365,2377814,"genie.py",15150,0,"",python,selection_command
+2366,2378312,"genie.py",15061,0,"",python,selection_command
+2367,2378566,"genie.py",14969,0,"",python,selection_command
+2368,2378587,"genie.py",14883,0,"",python,selection_command
+2369,2378617,"genie.py",14804,0,"",python,selection_command
+2370,2378656,"genie.py",14729,0,"",python,selection_command
+2371,2378682,"genie.py",14650,0,"",python,selection_command
+2372,2378720,"genie.py",14610,0,"",python,selection_command
+2373,2378757,"genie.py",14608,0,"",python,selection_command
+2374,2378788,"genie.py",14537,0,"",python,selection_command
+2375,2378830,"genie.py",14491,0,"",python,selection_command
+2376,2378857,"genie.py",14489,0,"",python,selection_command
+2377,2378997,"genie.py",14446,0,"",python,selection_command
+2378,2379187,"genie.py",14402,0,"",python,selection_command
+2379,2379474,"genie.py",14398,0,"",python,selection_command
+2380,2379600,"genie.py",14396,0,"",python,selection_command
+2381,2379766,"genie.py",14389,0,"",python,selection_command
+2382,2383441,"genie.py",14312,0,"",python,selection_command
+2383,2383554,"genie.py",14224,0,"",python,selection_command
+2384,2383773,"genie.py",14229,0,"",python,selection_command
+2385,2383959,"genie.py",14231,0,"",python,selection_command
+2386,2384942,"genie.py",14231,3,"",python,content
+2387,2385626,"genie.py",14230,0,"",python,selection_command
+2388,2385858,"genie.py",14231,0,"",python,selection_command
+2389,2386129,"genie.py",14232,0,"",python,selection_command
+2390,2386308,"genie.py",14232,1,"A",python,selection_command
+2391,2387229,"genie.py",14232,5,"Array",python,selection_command
+2392,2387511,"genie.py",14232,5,"",python,content
+2393,2387983,"genie.py",14231,1,"",python,content
+2394,2388160,"genie.py",14231,0,"i",python,content
+2395,2388161,"genie.py",14232,0,"",python,selection_keyboard
+2396,2388342,"genie.py",14232,0,"n",python,content
+2397,2388342,"genie.py",14233,0,"",python,selection_keyboard
+2398,2388372,"genie.py",14233,0,"t",python,content
+2399,2388372,"genie.py",14234,0,"",python,selection_keyboard
+2400,2388676,"genie.py",14233,0,"",python,selection_command
+2401,2392128,"genie.py",14315,0,"",python,selection_command
+2402,2392359,"genie.py",14392,0,"",python,selection_command
+2403,2392389,"genie.py",14440,0,"",python,selection_command
+2404,2392421,"genie.py",14483,0,"",python,selection_command
+2405,2392457,"genie.py",14485,0,"",python,selection_command
+2406,2392490,"genie.py",14531,0,"",python,selection_command
+2407,2392553,"genie.py",14593,0,"",python,selection_command
+2408,2392559,"genie.py",14604,0,"",python,selection_command
+2409,2392588,"genie.py",14644,0,"",python,selection_command
+2410,2392621,"genie.py",14706,0,"",python,selection_command
+2411,2392654,"genie.py",14785,0,"",python,selection_command
+2412,2392687,"genie.py",14860,0,"",python,selection_command
+2413,2392830,"genie.py",14939,0,"",python,selection_command
+2414,2393013,"genie.py",15031,0,"",python,selection_command
+2415,2393137,"genie.py",15120,0,"",python,selection_command
+2416,2393327,"genie.py",15136,0,"",python,selection_command
+2417,2393486,"genie.py",15138,0,"",python,selection_command
+2418,2393651,"genie.py",15139,0,"",python,selection_command
+2419,2396854,"genie.py",15145,0,"",python,selection_command
+2420,2397014,"genie.py",15147,0,"",python,selection_command
+2421,2399415,"genie.py",15058,0,"",python,selection_command
+2422,2399663,"genie.py",14966,0,"",python,selection_command
+2423,2399680,"genie.py",14877,0,"",python,selection_command
+2424,2399715,"genie.py",14798,0,"",python,selection_command
+2425,2399745,"genie.py",14723,0,"",python,selection_command
+2426,2399778,"genie.py",14644,0,"",python,selection_command
+2427,2399810,"genie.py",14604,0,"",python,selection_command
+2428,2399844,"genie.py",14602,0,"",python,selection_command
+2429,2399876,"genie.py",14531,0,"",python,selection_command
+2430,2399910,"genie.py",14485,0,"",python,selection_command
+2431,2399944,"genie.py",14483,0,"",python,selection_command
+2432,2399977,"genie.py",14440,0,"",python,selection_command
+2433,2400102,"genie.py",14396,0,"",python,selection_command
+2434,2400269,"genie.py",14330,0,"",python,selection_command
+2435,2400684,"genie.py",14253,0,"",python,selection_command
+2436,2401050,"genie.py",14249,0,"",python,selection_command
+2437,2401134,"genie.py",14248,0,"",python,selection_command
+2438,2401405,"genie.py",14245,0,"",python,selection_command
+2439,2401936,"genie.py",14245,9,"",python,content
+2440,2402118,"genie.py",14245,0,"i",python,content
+2441,2402118,"genie.py",14246,0,"",python,selection_keyboard
+2442,2402289,"genie.py",14246,0,"n",python,content
+2443,2402289,"genie.py",14247,0,"",python,selection_keyboard
+2444,2402314,"genie.py",14247,0,"t",python,content
+2445,2402314,"genie.py",14248,0,"",python,selection_keyboard
+2446,2402645,"genie.py",14247,0,"",python,selection_command
+2447,2405086,"genie.py",14323,0,"",python,selection_command
+2448,2405289,"genie.py",14390,0,"",python,selection_command
+2449,2405300,"genie.py",14434,0,"",python,selection_command
+2450,2405328,"genie.py",14477,0,"",python,selection_command
+2451,2405361,"genie.py",14479,0,"",python,selection_command
+2452,2405394,"genie.py",14525,0,"",python,selection_command
+2453,2405428,"genie.py",14596,0,"",python,selection_command
+2454,2405467,"genie.py",14598,0,"",python,selection_command
+2455,2405501,"genie.py",14638,0,"",python,selection_command
+2456,2405608,"genie.py",14714,0,"",python,selection_command
+2457,2405608,"genie.py",14792,0,"",python,selection_command
+2458,2405608,"genie.py",14868,0,"",python,selection_command
+2459,2405627,"genie.py",14947,0,"",python,selection_command
+2460,2405661,"genie.py",15039,0,"",python,selection_command
+2461,2405695,"genie.py",15128,0,"",python,selection_command
+2462,2407903,"genie.py",15130,0,"",python,selection_command
+2463,2408003,"genie.py",15132,0,"",python,selection_command
+2464,2410427,"genie.py",15133,0,"",python,selection_command
+2465,2412099,"genie.py",15132,0,"",python,selection_command
+2466,2412169,"genie.py",15130,0,"",python,selection_command
+2467,2412327,"genie.py",15114,0,"",python,selection_command
+2468,2412481,"genie.py",15113,0,"",python,selection_command
+2469,2412627,"genie.py",15102,0,"",python,selection_command
+2470,2416480,"models/dynamics.py",0,0,"",python,tab
+2471,2416480,"models/dynamics.py",4322,11,"transformer",python,selection_command
+2472,2416818,"models/dynamics.py",4332,0,"",python,selection_command
+2473,2416948,"models/dynamics.py",4334,0,"",python,selection_command
+2474,2417442,"models/dynamics.py",4336,0,"",python,selection_command
+2475,2417866,"utils/nn.py",0,0,"",python,tab
+2476,2417867,"utils/nn.py",11200,0,"",python,selection_command
+2477,2419048,"utils/nn.py",11979,0,"",python,selection_command
+2478,2419241,"utils/nn.py",12926,0,"",python,selection_command
+2479,2435136,"models/dynamics.py",0,0,"",python,tab
+2480,2435137,"models/dynamics.py",4336,0,"",python,selection_command
+2481,2435744,"genie.py",0,0,"",python,tab
+2482,2435744,"genie.py",15102,0,"",python,selection_command
+2483,2436513,"genie.py",15113,0,"",python,selection_command
+2484,2436705,"genie.py",15114,0,"",python,selection_command
+2485,2436885,"genie.py",15130,0,"",python,selection_command
+2486,2437522,"genie.py",15114,0,"",python,selection_command
+2487,2437679,"genie.py",15113,0,"",python,selection_command
+2488,2437818,"genie.py",15102,0,"",python,selection_command
+2489,2437966,"genie.py",15101,0,"",python,selection_command
+2490,2438122,"genie.py",15093,0,"",python,selection_command
+2491,2441288,"genie.py",15004,0,"",python,selection_command
+2492,2441546,"genie.py",14912,0,"",python,selection_command
+2493,2441567,"genie.py",14833,0,"",python,selection_command
+2494,2441600,"genie.py",14758,0,"",python,selection_command
+2495,2441632,"genie.py",14679,0,"",python,selection_command
+2496,2441666,"genie.py",14638,0,"",python,selection_command
+2497,2441808,"genie.py",14598,0,"",python,selection_command
+2498,2441972,"genie.py",14566,0,"",python,selection_command
+2499,2449828,"genie.py",14519,0,"",python,selection_command
+2500,2450047,"genie.py",14479,0,"",python,selection_command
+2501,2450057,"genie.py",14475,0,"",python,selection_command
+2502,2450089,"genie.py",14431,0,"",python,selection_command
+2503,2450157,"genie.py",14365,0,"",python,selection_command
+2504,2450158,"genie.py",14288,0,"",python,selection_command
+2505,2450190,"genie.py",14212,0,"",python,selection_command
+2506,2450340,"genie.py",14171,0,"",python,selection_command
+2507,2450515,"genie.py",14144,0,"",python,selection_command
+2508,2450668,"genie.py",14116,0,"",python,selection_command
+2509,2452214,"genie.py",14143,0,"\n ",python,content
+2510,2452547,"genie.py",14152,0,"d",python,content
+2511,2452547,"genie.py",14153,0,"",python,selection_keyboard
+2512,2452574,"genie.py",14153,0,"y",python,content
+2513,2452575,"genie.py",14154,0,"",python,selection_keyboard
+2514,2452749,"genie.py",14154,0,"n",python,content
+2515,2452749,"genie.py",14155,0,"",python,selection_keyboard
+2516,2452890,"genie.py",14155,0,"a",python,content
+2517,2452891,"genie.py",14156,0,"",python,selection_keyboard
+2518,2452924,"genie.py",14156,0,"m",python,content
+2519,2452925,"genie.py",14157,0,"",python,selection_keyboard
+2520,2452991,"genie.py",14157,0,"i",python,content
+2521,2452991,"genie.py",14158,0,"",python,selection_keyboard
+2522,2453061,"genie.py",14158,0,"c",python,content
+2523,2453061,"genie.py",14159,0,"",python,selection_keyboard
+2524,2453276,"genie.py",14159,0,"s",python,content
+2525,2453277,"genie.py",14160,0,"",python,selection_keyboard
+2526,2453360,"genie.py",14160,0," ",python,content
+2527,2453360,"genie.py",14161,0,"",python,selection_keyboard
+2528,2454024,"genie.py",14160,1,"",python,content
+2529,2454432,"genie.py",14160,0,"_",python,content
+2530,2454432,"genie.py",14161,0,"",python,selection_keyboard
+2531,2454850,"genie.py",14161,0,"m",python,content
+2532,2454851,"genie.py",14162,0,"",python,selection_keyboard
+2533,2454927,"genie.py",14162,0,"o",python,content
+2534,2454927,"genie.py",14163,0,"",python,selection_keyboard
+2535,2455062,"genie.py",14163,0,"d",python,content
+2536,2455062,"genie.py",14164,0,"",python,selection_keyboard
+2537,2455148,"genie.py",14164,0,"e",python,content
+2538,2455148,"genie.py",14165,0,"",python,selection_keyboard
+2539,2455275,"genie.py",14165,0,"l",python,content
+2540,2455275,"genie.py",14166,0,"",python,selection_keyboard
+2541,2455518,"genie.py",14166,0," ",python,content
+2542,2455518,"genie.py",14167,0,"",python,selection_keyboard
+2543,2455900,"genie.py",14167,0,"=",python,content
+2544,2455900,"genie.py",14168,0,"",python,selection_keyboard
+2545,2456347,"genie.py",14168,0," self.dynamics.transformer",python,content
+2546,2456640,"genie.py",14193,0,"",python,selection_command
+2547,2456927,"genie.py",14183,0,"",python,selection_command
+2548,2457061,"genie.py",14182,0,"",python,selection_command
+2549,2459986,"genie.py",14182,12,"",python,content
+2550,2459987,"genie.py",14181,0,"",python,selection_command
+2551,2460603,"genie.py",14174,0,"",python,selection_command
+2552,2460766,"genie.py",14173,0,"",python,selection_command
+2553,2460920,"genie.py",14169,0,"",python,selection_command
+2554,2461091,"genie.py",14167,0,"",python,selection_command
+2555,2461254,"genie.py",14152,0,"",python,selection_command
+2556,2461534,"genie.py",14165,0,"",python,selection_command
+2557,2461948,"genie.py",14165,1,"a",python,content
+2558,2463408,"genie.py",14165,1,"l",python,content
+2559,2463889,"genie.py",14166,0,"",python,selection_command
+2560,2464656,"genie.py",14166,0,":",python,content
+2561,2464656,"genie.py",14167,0,"",python,selection_keyboard
+2562,2464953,"genie.py",14167,0," ",python,content
+2563,2464953,"genie.py",14168,0,"",python,selection_keyboard
+2564,2466073,"genie.py",14168,0,"DynamicsCausal",python,content
+2565,2466296,"genie.py",14181,0,"",python,selection_command
+2566,2467073,"genie.py",14183,0,"",python,selection_command
+2567,2467240,"genie.py",14185,0,"",python,selection_command
+2568,2467488,"genie.py",14189,0,"",python,selection_command
+2569,2467672,"genie.py",14190,0,"",python,selection_command
+2570,2477501,"genie.py",14199,0,"",python,selection_command
+2571,2479601,"genie.py",14144,0,"",python,selection_command
+2572,2480367,"genie.py",14077,0,"",python,selection_command
+2573,2480581,"genie.py",14005,0,"",python,selection_command
+2574,2480705,"genie.py",13942,0,"",python,selection_command
+2575,2480705,"genie.py",13902,0,"",python,selection_command
+2576,2480765,"genie.py",13863,0,"",python,selection_command
+2577,2480922,"genie.py",13813,0,"",python,selection_command
+2578,2481087,"genie.py",13734,0,"",python,selection_command
+2579,2481244,"genie.py",13683,0,"",python,selection_command
+2580,2481396,"genie.py",13644,0,"",python,selection_command
+2581,2481745,"genie.py",13600,0,"",python,selection_command
+2582,2481746,"genie.py",13529,0,"",python,selection_command
+2583,2481746,"genie.py",13477,0,"",python,selection_command
+2584,2481746,"genie.py",13465,0,"",python,selection_command
+2585,2481779,"genie.py",13438,0,"",python,selection_command
+2586,2481811,"genie.py",13417,0,"",python,selection_command
+2587,2481846,"genie.py",13395,0,"",python,selection_command
+2588,2481943,"genie.py",13364,0,"",python,selection_command
+2589,2481943,"genie.py",13333,0,"",python,selection_command
+2590,2481947,"genie.py",13290,0,"",python,selection_command
+2591,2481979,"genie.py",13237,0,"",python,selection_command
+2592,2482014,"genie.py",13211,0,"",python,selection_command
+2593,2482048,"genie.py",13187,0,"",python,selection_command
+2594,2482104,"genie.py",13211,0,"",python,selection_command
+2595,2482379,"genie.py",13237,0,"",python,selection_command
+2596,2482465,"genie.py",13290,0,"",python,selection_command
+2597,2482465,"genie.py",13333,0,"",python,selection_command
+2598,2482465,"genie.py",13364,0,"",python,selection_command
+2599,2482492,"genie.py",13395,0,"",python,selection_command
+2600,2482525,"genie.py",13417,0,"",python,selection_command
+2601,2482558,"genie.py",13438,0,"",python,selection_command
+2602,2482591,"genie.py",13465,0,"",python,selection_command
+2603,2482634,"genie.py",13477,0,"",python,selection_command
+2604,2482666,"genie.py",13529,0,"",python,selection_command
+2605,2482789,"genie.py",13600,0,"",python,selection_command
+2606,2482988,"genie.py",13644,0,"",python,selection_command
+2607,2483838,"genie.py",13600,0,"",python,selection_command
+2608,2485653,"genie.py",13599,0,"\n ",python,content
+2609,2486009,"genie.py",13608,0,"a",python,content
+2610,2486009,"genie.py",13609,0,"",python,selection_keyboard
+2611,2486135,"genie.py",13609,0,"s",python,content
+2612,2486135,"genie.py",13610,0,"",python,selection_keyboard
+2613,2486304,"genie.py",13610,0,"s",python,content
+2614,2486304,"genie.py",13611,0,"",python,selection_keyboard
+2615,2486311,"genie.py",13611,0,"e",python,content
+2616,2486311,"genie.py",13612,0,"",python,selection_keyboard
+2617,2486336,"genie.py",13612,0,"r",python,content
+2618,2486336,"genie.py",13613,0,"",python,selection_keyboard
+2619,2486523,"genie.py",13613,0,"t",python,content
+2620,2486523,"genie.py",13614,0,"",python,selection_keyboard
+2621,2486531,"genie.py",13614,0,"r",python,content
+2622,2486531,"genie.py",13615,0,"",python,selection_keyboard
+2623,2487183,"genie.py",13614,1,"",python,content
+2624,2487289,"genie.py",13614,0," ",python,content
+2625,2487289,"genie.py",13615,0,"",python,selection_keyboard
+2626,2488559,"genie.py",13615,0,"isinstance(self.dynamics, DynamicsCausal)",python,content
+2627,2488764,"genie.py",13655,0,"",python,selection_command
+2628,2489879,"genie.py",13699,0,"",python,selection_command
+2629,2490136,"genie.py",13738,0,"",python,selection_command
+2630,2490148,"genie.py",13789,0,"",python,selection_command
+2631,2490182,"genie.py",13846,0,"",python,selection_command
+2632,2490224,"genie.py",13918,0,"",python,selection_command
+2633,2490332,"genie.py",13957,0,"",python,selection_command
+2634,2490333,"genie.py",13997,0,"",python,selection_command
+2635,2490333,"genie.py",14054,0,"",python,selection_command
+2636,2490354,"genie.py",14117,0,"",python,selection_command
+2637,2490387,"genie.py",14189,0,"",python,selection_command
+2638,2490424,"genie.py",14254,0,"",python,selection_command
+2639,2490453,"genie.py",14256,0,"",python,selection_command
+2640,2490492,"genie.py",14283,0,"",python,selection_command
+2641,2490711,"genie.py",14256,0,"",python,selection_command
+2642,2490931,"genie.py",14254,0,"",python,selection_command
+2643,2492564,"genie.py",14256,0,"",python,selection_command
+2644,2492814,"genie.py",14283,0,"",python,selection_command
+2645,2492832,"genie.py",14340,0,"",python,selection_command
+2646,2492952,"genie.py",14416,0,"",python,selection_command
+2647,2492953,"genie.py",14493,0,"",python,selection_command
+2648,2492953,"genie.py",14546,0,"",python,selection_command
+2649,2492969,"genie.py",14589,0,"",python,selection_command
+2650,2493043,"genie.py",14546,0,"",python,selection_command
+2651,2493293,"genie.py",14493,0,"",python,selection_command
+2652,2493327,"genie.py",14416,0,"",python,selection_command
+2653,2493350,"genie.py",14340,0,"",python,selection_command
+2654,2493384,"genie.py",14283,0,"",python,selection_command
+2655,2493473,"genie.py",14256,0,"",python,selection_command
+2656,2493801,"genie.py",14254,0,"",python,selection_command
+2657,2494168,"genie.py",14256,0,"",python,selection_command
+2658,2494425,"genie.py",14283,0,"",python,selection_command
+2659,2494523,"genie.py",14340,0,"",python,selection_command
+2660,2494524,"genie.py",14416,0,"",python,selection_command
+2661,2494524,"genie.py",14493,0,"",python,selection_command
+2662,2494536,"genie.py",14546,0,"",python,selection_command
+2663,2494570,"genie.py",14589,0,"",python,selection_command
+2664,2494607,"genie.py",14591,0,"",python,selection_command
+2665,2494643,"genie.py",14637,0,"",python,selection_command
+2666,2494686,"genie.py",14694,0,"",python,selection_command
+2667,2494717,"genie.py",14710,0,"",python,selection_command
+2668,2494744,"genie.py",14750,0,"",python,selection_command
+2669,2494848,"genie.py",14807,0,"",python,selection_command
+2670,2494848,"genie.py",14886,0,"",python,selection_command
+2671,2494849,"genie.py",14961,0,"",python,selection_command
+2672,2495048,"genie.py",15040,0,"",python,selection_command
+2673,2495210,"genie.py",15132,0,"",python,selection_command
+2674,2495381,"genie.py",15221,0,"",python,selection_command
+2675,2495748,"genie.py",15214,0,"",python,selection_command
+2676,2495901,"genie.py",15213,0,"",python,selection_command
+2677,2496099,"genie.py",15205,0,"",python,selection_command
+2678,2497265,"genie.py",15213,0,"_model",python,content
+2679,2497265,"genie.py",15200,5,"",python,content
+2680,2510581,"genie.py",15111,0,"",python,selection_command
+2681,2510741,"genie.py",15019,0,"",python,selection_command
+2682,2510756,"genie.py",14940,0,"",python,selection_command
+2683,2510790,"genie.py",14865,0,"",python,selection_command
+2684,2510824,"genie.py",14786,0,"",python,selection_command
+2685,2510856,"genie.py",14745,0,"",python,selection_command
+2686,2510894,"genie.py",14710,0,"",python,selection_command
+2687,2510926,"genie.py",14673,0,"",python,selection_command
+2688,2510966,"genie.py",14626,0,"",python,selection_command
+2689,2510992,"genie.py",14591,0,"",python,selection_command
+2690,2511101,"genie.py",14582,0,"",python,selection_command
+2691,2511102,"genie.py",14538,0,"",python,selection_command
+2692,2511102,"genie.py",14472,0,"",python,selection_command
+2693,2511134,"genie.py",14395,0,"",python,selection_command
+2694,2511164,"genie.py",14319,0,"",python,selection_command
+2695,2511198,"genie.py",14283,0,"",python,selection_command
+2696,2511367,"genie.py",14256,0,"",python,selection_command
+2697,2511525,"genie.py",14235,0,"",python,selection_command
+2698,2511745,"genie.py",14225,0,"",python,selection_command
+2699,2511875,"genie.py",14223,0,"",python,selection_command
+2700,2512151,"genie.py",14209,0,"",python,selection_command
+2701,2512676,"genie.py",14210,0,"",python,selection_command
+2702,2512879,"genie.py",14211,0,"",python,selection_command
+2703,2512896,"genie.py",14212,0,"",python,selection_command
+2704,2512929,"genie.py",14213,0,"",python,selection_command
+2705,2512968,"genie.py",14214,0,"",python,selection_command
+2706,2512999,"genie.py",14215,0,"",python,selection_command
+2707,2513040,"genie.py",14216,0,"",python,selection_command
+2708,2513401,"genie.py",14217,0,"",python,selection_command
+2709,2513493,"genie.py",14218,0,"",python,selection_command
+2710,2513904,"genie.py",14218,5,"",python,content
+2711,2514266,"genie.py",14218,0,"c",python,content
+2712,2514266,"genie.py",14219,0,"",python,selection_keyboard
+2713,2514662,"genie.py",14219,0,"a",python,content
+2714,2514662,"genie.py",14220,0,"",python,selection_keyboard
+2715,2514772,"genie.py",14220,0,"u",python,content
+2716,2514773,"genie.py",14221,0,"",python,selection_keyboard
+2717,2514895,"genie.py",14221,0,"s",python,content
+2718,2514895,"genie.py",14222,0,"",python,selection_keyboard
+2719,2514962,"genie.py",14222,0,"a",python,content
+2720,2514962,"genie.py",14223,0,"",python,selection_keyboard
+2721,2515191,"genie.py",14223,0,"l",python,content
+2722,2515191,"genie.py",14224,0,"",python,selection_keyboard
+2723,2515192,"genie.py",14223,0,"",python,selection_command
+2724,2515663,"genie.py",14257,0,"",python,selection_command
+2725,2515907,"genie.py",14280,0,"",python,selection_command
+2726,2515938,"genie.py",14308,0,"",python,selection_command
+2727,2515969,"genie.py",14384,0,"",python,selection_command
+2728,2516008,"genie.py",14461,0,"",python,selection_command
+2729,2516035,"genie.py",14527,0,"",python,selection_command
+2730,2516068,"genie.py",14571,0,"",python,selection_command
+2731,2516101,"genie.py",14592,0,"",python,selection_command
+2732,2516142,"genie.py",14615,0,"",python,selection_command
+2733,2516183,"genie.py",14662,0,"",python,selection_command
+2734,2516206,"genie.py",14711,0,"",python,selection_command
+2735,2516237,"genie.py",14734,0,"",python,selection_command
+2736,2516269,"genie.py",14775,0,"",python,selection_command
+2737,2516302,"genie.py",14854,0,"",python,selection_command
+2738,2516334,"genie.py",14929,0,"",python,selection_command
+2739,2516368,"genie.py",15008,0,"",python,selection_command
+2740,2516408,"genie.py",15100,0,"",python,selection_command
+2741,2516712,"genie.py",15189,0,"",python,selection_command
+2742,2516912,"genie.py",15199,0,"",python,selection_command
+2743,2517098,"genie.py",15201,0,"",python,selection_command
+2744,2517487,"genie.py",15214,0,"causa",python,content
+2745,2517487,"genie.py",15210,4,"",python,content
+2746,2521939,"genie.py",140,0,"",python,selection_command
+2747,2522768,"genie.py",15201,0,"",python,selection_command
+2748,2523986,"genie.py",14867,0,"",python,selection_command
+2749,2525620,"genie.py",14875,0,"_causal",python,content
+2750,2525620,"genie.py",14862,5,"",python,content
+2751,2526238,"genie.py",14674,0,"",python,selection_command
+2752,2527213,"genie.py",14682,0,"_causal",python,content
+2753,2527213,"genie.py",14669,5,"",python,content
+2754,2527689,"genie.py",14248,0,"",python,selection_command
+2755,2528825,"genie.py",14226,0,"",python,selection_command
+2756,2529190,"genie.py",14209,0,"",python,selection_command
+2757,2529633,"genie.py",13641,0,"",python,selection_command
+2758,2530808,"genie.py",14209,0,"",python,selection_command
+2759,2530987,"genie.py",14226,0,"",python,selection_command
+2760,2531155,"genie.py",14248,0,"",python,selection_command
+2761,2531959,"genie.py",14226,0,"",python,selection_command
+2762,2532117,"genie.py",14209,0,"",python,selection_command
+2763,2532278,"genie.py",13641,0,"",python,selection_command
+2764,2533654,"genie.py",14209,0,"",python,selection_command
+2765,2533826,"genie.py",14226,0,"",python,selection_command
+2766,2533974,"genie.py",14248,0,"",python,selection_command
+2767,2540735,"genie.py",14247,0,"",python,selection_command
+2768,2540884,"genie.py",14243,0,"",python,selection_command
+2769,2541082,"genie.py",14241,0,"",python,selection_command
+2770,2541269,"genie.py",14226,0,"",python,selection_command
+2771,2541923,"genie.py",14226,15,"",python,content
+2772,2542333,"genie.py",14225,0,"",python,selection_command
+2773,2542531,"genie.py",14224,0,"",python,selection_command
+2774,2542668,"genie.py",14224,1,"",python,content
+2775,2542883,"genie.py",14224,1,"",python,content
+2776,2544605,"genie.py",14224,0," ",python,content
+2777,2544605,"genie.py",14225,0,"",python,selection_keyboard
+2778,2544859,"genie.py",14224,0,"",python,selection_command
+2779,2550129,"genie.py",14201,40,"",python,content
+2780,2550642,"genie.py",14202,0,"",python,selection_command
+2781,2550889,"genie.py",14230,0,"",python,selection_command
+2782,2550914,"genie.py",14306,0,"",python,selection_command
+2783,2550954,"genie.py",14383,0,"",python,selection_command
+2784,2550982,"genie.py",14449,0,"",python,selection_command
+2785,2551015,"genie.py",14493,0,"",python,selection_command
+2786,2551271,"genie.py",14536,0,"",python,selection_command
+2787,2551433,"genie.py",14537,0,"",python,selection_command
+2788,2551582,"genie.py",14584,0,"",python,selection_command
+2789,2552478,"genie.py",14621,7,"",python,content
+2790,2552478,"genie.py",14613,0,"self.",python,content
+2791,2553713,"genie.py",14814,7,"",python,content
+2792,2553713,"genie.py",14806,0,"self.",python,content
+2793,2554876,"genie.py",15153,7,"",python,content
+2794,2554876,"genie.py",15145,0,"self.",python,content
+2795,2556545,"genie.py",15158,0,"_causal",python,content
+2796,2556548,"genie.py",15145,5,"",python,content
+2797,2556549,"genie.py",14819,0,"_causal",python,content
+2798,2556551,"genie.py",14806,5,"",python,content
+2799,2556551,"genie.py",14626,0,"_causal",python,content
+2800,2556551,"genie.py",14613,5,"",python,content
+2801,2558344,"genie.py",14201,0," dynamics_causal = self.dynamics\n",python,content
+2802,2558364,"genie.py",14224,0,"",python,selection_command
+2803,2558514,"genie.py",14224,1,"",python,content
+2804,2559222,"genie.py",14224,0," ",python,content
+2805,2559224,"genie.py",14224,0,"",python,selection_command
+2806,2560867,"genie.py",14224,0,":",python,content
+2807,2560874,"genie.py",14224,0,"",python,selection_command
+2808,2561263,"genie.py",14226,0,"DynamicsCausal ",python,content
+2809,2561263,"genie.py",14677,7,"",python,content
+2810,2561266,"genie.py",14669,0,"self.",python,content
+2811,2561266,"genie.py",14870,7,"",python,content
+2812,2561266,"genie.py",14862,0,"self.",python,content
+2813,2561266,"genie.py",14862,0,"",python,selection_command
+2814,2567291,"genie.py",14783,0,"",python,selection_command
+2815,2567443,"genie.py",14742,0,"",python,selection_command
+2816,2567600,"genie.py",14711,0,"",python,selection_command
+2817,2567737,"genie.py",14670,0,"",python,selection_command
+2818,2567885,"genie.py",14623,0,"",python,selection_command
+2819,2568032,"genie.py",14592,0,"",python,selection_command
+2820,2568192,"genie.py",14579,0,"",python,selection_command
+2821,2568343,"genie.py",14535,0,"",python,selection_command
+2822,2568481,"genie.py",14469,0,"",python,selection_command
+2823,2568629,"genie.py",14392,0,"",python,selection_command
+2824,2568925,"genie.py",14396,0,"",python,selection_command
+2825,2569174,"genie.py",14398,0,"",python,selection_command
+2826,2569204,"genie.py",14401,0,"",python,selection_command
+2827,2569230,"genie.py",14402,0,"",python,selection_command
+2828,2569268,"genie.py",14407,0,"",python,selection_command
+2829,2569651,"genie.py",14429,0,"int",python,content
+2830,2569651,"genie.py",14420,9,"",python,content
+2831,2573263,"genie.py",15932,0,"",python,selection_command
+2832,2574247,"genie.py",15964,0,"",python,selection_command
+2833,2574740,"genie.py",16021,0,"int",python,content
+2834,2574740,"genie.py",16012,9,"",python,content
+2835,2576309,"genie.py",16024,0,"",python,selection_command
+2836,2576562,"genie.py",16079,0,"",python,selection_command
+2837,2576580,"genie.py",16127,0,"",python,selection_command
+2838,2576613,"genie.py",16169,0,"",python,selection_command
+2839,2576652,"genie.py",16178,0,"",python,selection_command
+2840,2576752,"genie.py",16231,0,"",python,selection_command
+2841,2576913,"genie.py",16265,0,"",python,selection_command
+2842,2577078,"genie.py",16291,0,"",python,selection_command
+2843,2577276,"genie.py",16331,0,"",python,selection_command
+2844,2577382,"genie.py",16365,0,"",python,selection_command
+2845,2577603,"genie.py",16389,0,"",python,selection_command
+2846,2577682,"genie.py",16403,0,"",python,selection_command
+2847,2577839,"genie.py",16453,0,"",python,selection_command
+2848,2579176,"genie.py",16461,0,"",python,selection_command
+2849,2579372,"genie.py",16475,0,"",python,selection_command
+2850,2579395,"genie.py",16477,0,"",python,selection_command
+2851,2579427,"genie.py",16494,0,"",python,selection_command
+2852,2579449,"genie.py",16496,0,"",python,selection_command
+2853,2579487,"genie.py",16499,0,"",python,selection_command
+2854,2579519,"genie.py",16500,0,"",python,selection_command
+2855,2587258,"genie.py",16499,0,"",python,selection_command
+2856,2587402,"genie.py",16496,0,"",python,selection_command
+2857,2588659,"genie.py",16498,0,"",python,selection_command
+2858,2588823,"genie.py",16499,0,"",python,selection_command
+2859,2588984,"genie.py",16505,0,"",python,selection_command
+2860,2589559,"genie.py",16506,0,"",python,selection_command
+2861,2589918,"genie.py",16507,0,"",python,selection_command
+2862,2598063,"genie.py",16506,0,"",python,selection_command
+2863,2598218,"genie.py",16500,0,"",python,selection_command
+2864,2598347,"genie.py",16499,0,"",python,selection_command
+2865,2598574,"genie.py",16496,0,"",python,selection_command
+2866,2599008,"genie.py",16496,1,"j",python,selection_command
+2867,2599101,"genie.py",16496,3,"jnp",python,selection_command
+2868,2599264,"genie.py",16496,4,"jnp.",python,selection_command
+2869,2599436,"genie.py",16496,10,"jnp.arange",python,selection_command
+2870,2599624,"genie.py",16496,11,"jnp.arange(",python,selection_command
+2871,2599956,"genie.py",16496,12,"jnp.arange(N",python,selection_command
+2872,2600672,"genie.py",16444,53,"\n causal_step_fn, init_carry_causal, j",python,selection_command
+2873,2601985,"genie.py",16496,12,"jnp.arange(N",python,selection_command
+2874,2602307,"genie.py",16496,13,"jnp.arange(N)",python,selection_command
+2875,2603293,"genie.py",16461,0,"",python,selection_command
+2876,2606770,"genie.py",16445,0,"",python,selection_command
+2877,2614440,"genie.py",16445,0," causal_step_fn, init_carry_causal, range(int(N))\n",python,content
+2878,2614442,"genie.py",16510,65,"",python,content
+2879,2625133,"genie.py",16445,0,"",python,selection_command
+2880,2625500,"genie.py",16461,0,"",python,selection_command
+2881,2625643,"genie.py",16475,0,"",python,selection_command
+2882,2625902,"genie.py",16477,0,"",python,selection_command
+2883,2625916,"genie.py",16494,0,"",python,selection_command
+2884,2625949,"genie.py",16496,0,"",python,selection_command
+2885,2625980,"genie.py",16501,0,"",python,selection_command
+2886,2626014,"genie.py",16502,0,"",python,selection_command
+2887,2626452,"genie.py",16501,0,"",python,selection_command
+2888,2626792,"genie.py",16496,0,"",python,selection_command
+2889,2627130,"temp.out",0,0,"/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/orbax/checkpoint/_src/serialization/type_handlers.py:1256: UserWarning: Sharding info not provided when restoring. Populating sharding info from sharding file. Please note restoration time will be slightly increased due to reading from file. Note also that this option is unsafe when restoring on a different topology than the checkpoint was saved with.\n warnings.warn(\nRunning on 1 devices.\nCounting all components: ['dynamics', 'lam', 'tokenizer']\nParameter counts:\n{'dynamics': 26555904, 'lam': 35115232, 'tokenizer': 33750256, 'total': 95421392}\nStarting training from step 0...\njax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 362, in \n loss, recon, metrics = train_step(optimizer.model, optimizer, inputs)\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 431, in __call__\n pure_args_out, pure_kwargs_out, pure_out = self.jitted_fn(\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/transforms/compilation.py"", line 126, in __call__\n out = self.f(*args, **kwargs)\n File ""/fast/home/franz.srambical/jafar/train_dynamics.py"", line 146, in train_step\n optimizer.update(grads)\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/flax/nnx/training/optimizer.py"", line 271, in update\n updates, new_opt_state = self.tx.update(grads, opt_state, params, **kwargs)\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/optax/transforms/_combining.py"", line 89, in update_fn\n updates, new_s = fn(updates, s, params, **extra_args)\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/optax/_src/base.py"", line 335, in update\n return tx.update(updates, state, params)\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/optax/_src/transform.py"", line 283, in update_fn\n mu = optax.tree.update_moment(updates, state.mu, b1, 1)\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/optax/tree_utils/_tree_math.py"", line 332, in tree_update_moment\n return jax.tree.map(\n File ""/fast/home/franz.srambical/jafar/.venv/lib/python3.10/site-packages/jax/_src/tree.py"", line 155, in map\n return tree_util.tree_map(f, tree, *rest, is_leaf=is_leaf)\nValueError: Dict key mismatch; expected keys: ['action_in', 'action_up', 'encoder', 'patch_up', 'vq']; dict: {'action_in': VariableState( # 768 (1.5 KB)\n type=Param,\n value=Tracedwith\n), 'action_up': {'bias': VariableState( # 512 (1.0 KB)\n type=Param,\n value=Tracedwith\n), 'kernel': VariableState( # 16,384 (32.8 KB)\n type=Param,\n value=Tracedwith\n)}, 'decoder': {'blocks': {0: {'ffn_dense1': {'bias': VariableState( # 2,048 (4.1 KB)\n type=Param,\n value=Tracedwith\n), 'kernel': VariableState( # 1,048,576 (2.1 MB)\n type=Param,\n value=Tracedwith\n)}, 'ffn_dense2': {'bias': VariableState( # 512 (1.0 KB)\n type=Param,\n value=Tracedwith\n), 'kernel': VariableState( # 1,048,576 (2.1 MB)\n type=Param,\n value=Tracedwith\n)}, 'ffn_norm': {'bias': VariableState( # 512 (1.0 KB)\n type=Param,\n value=Traced