@@ -137,25 +137,23 @@ def test_signature_deterministic_across_processes(self):
137137 import subprocess
138138 import sys
139139
140- snippet = "\n " .join (
141- (
142- "import os" ,
143- "os.environ['JAX_PLATFORMS'] = 'cpu'" ,
144- "import jax" ,
145- "import jax.numpy as jnp" ,
146- "from flax import nnx" ,
147- "from maxdiffusion import aot_cache" ,
148- "" ,
149- "class T(nnx.Module):" ,
150- " def __init__(self, rngs):" ,
151- " self.lin = nnx.Linear(4, 4, rngs=rngs)" ,
152- "" ,
153- "graphdef, state = nnx.split(T(nnx.Rngs(0)))" ,
154- "sig = aot_cache._dynamic_signature(" ,
155- " (graphdef, state.to_pure_dict(), jnp.ones((2, 4))), {})" ,
156- "print(sig)" ,
157- )
158- )
140+ snippet = "\n " .join ((
141+ "import os" ,
142+ "os.environ['JAX_PLATFORMS'] = 'cpu'" ,
143+ "import jax" ,
144+ "import jax.numpy as jnp" ,
145+ "from flax import nnx" ,
146+ "from maxdiffusion import aot_cache" ,
147+ "" ,
148+ "class T(nnx.Module):" ,
149+ " def __init__(self, rngs):" ,
150+ " self.lin = nnx.Linear(4, 4, rngs=rngs)" ,
151+ "" ,
152+ "graphdef, state = nnx.split(T(nnx.Rngs(0)))" ,
153+ "sig = aot_cache._dynamic_signature(" ,
154+ " (graphdef, state.to_pure_dict(), jnp.ones((2, 4))), {})" ,
155+ "print(sig)" ,
156+ ))
159157 outs = [
160158 subprocess .run (
161159 [sys .executable , "-c" , snippet ],
0 commit comments