pyopmnearwell.ml.utils module#
Utilility functions for the ensemble and ML capabilities.
Note: ml.ensemble makes use of np.random.default_rng, which ignores the global
seed of numpy. Make sure to set them locally for full determinism.
- enable_determinism(seed=None)[source]#
Set global random seeds and enable deterministic TensorFlow operations.
keras.utils.set_random_seedconfigures the Python, NumPy, and TensorFlow seeds. Localnumpy.random.Generatorinstances are independent and must be seeded when they are created.- Parameters:
seed (int | None, optional) -- Seed applied to the supported global random-number generators.