Fix an issue where np.random causes pjit deadlock if data is different on the hosts.
Fix an issue where np.random causes pjit deadlock if data is different on the hosts.

PiperOrigin-RevId: 420439220

google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research