Skip to content
Discussion options

You must be logged in to vote

The answer is to use the JIT-compatible run loop. This hasn't been documented yet as it's part of the internal experimental API, so use at your own risk!

Working example:

from torax.examples import step_flattop_bgb
import torax
import jax
import copy
import dataclasses
from torax._src.orchestration import jit_run_loop
import jax.numpy as jnp
from torax._src.config import build_runtime_params
from torax._src.orchestration import initial_state as initial_state_lib
from torax._src.orchestration import step_function


# Prepare the simulation objects we will modify
torax_config = torax.ToraxConfig.from_dict(step_flattop_bgb.CONFIG)
geometry_provider = torax_config.geometry.build_provider
solver 

Replies: 1 comment 1 reply

Comment options

theo-brown
Oct 30, 2025
Collaborator Author

You must be logged in to vote
1 reply
@theo-brown
Comment options

theo-brown Oct 30, 2025
Collaborator Author

Answer selected by theo-brown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant