File tree Expand file tree Collapse file tree
checkpoint/orbax/checkpoint/_src/testing/benchmarks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020using standard environment variables like JAX_COORDINATOR_ADDRESS,
2121JAX_PROCESS_ID and JAX_NUM_PROCESSES.
2222"""
23- # pylint: disable=g-statement-before-imports,g- import-not-at-top
23+ import os
2424
25- try : # SimDevice import must occur before JAX.
26- import simdevice # pylint: disable=unused-import
27- except (ImportError , FileNotFoundError ):
28- pass
25+ # pylint: disable=g-statement-before-imports,g-import-not-at-top
26+ if os .environ .get ('SIMDEVICE_CONFIG_PATH' ) or os .environ .get (
27+ 'ENABLE_SIMDEVICE' , ''
28+ ).lower () in ('true' , '1' ):
29+ try : # SimDevice import must occur before JAX.
30+ import simdevice # pylint: disable=unused-import
31+ except (ImportError , FileNotFoundError ):
32+ pass
2933
30- import os
3134
3235from absl import app
3336from absl import flags
You can’t perform that action at this time.
0 commit comments