@@ -95,28 +95,5 @@ def setup(
9595 # local_device_ids arg allows us to maintain expected behavior
9696 init_kwargs ["local_device_ids" ] = list (range (8 ))
9797
98- # pylint: disable-next=import-outside-toplevel
99- from jax ._src .lib import _jax
100-
101- if jax .__version__ == "0.8.2" :
102- # Jax-0.8.2 introduced a bug in https://github.com/openxla/xla/pull/35298
103- # Client only sends one heartbeat within heartbeat_timeout,
104- # so server might not receive a heartbeat
105- # in time, and would consider the client dead.
106- # The bug is fixed in https://github.com/openxla/xla/pull/35589 but not in jax-0.8.2
107- # We patch the fix here, so client sends heartbeats twice within heartbeat_timeout.
108- # TODO(ethanli): remove this hack.
109- old = _jax .get_distributed_runtime_client
110-
111- def f (* args , ** kwargs ):
112- logging .info (
113- "Reducing client heartbeat_timeout %s by half for a bug fix in jax-0.8.2" ,
114- kwargs ["heartbeat_timeout" ],
115- )
116- kwargs ["heartbeat_timeout" ] = kwargs ["heartbeat_timeout" ] // 2
117- return old (* args , ** kwargs )
118-
119- _jax .get_distributed_runtime_client = f
120-
12198 jax .distributed .initialize (** init_kwargs )
12299 _jax_distributed_initialized = True
0 commit comments