Skip to content

Conversation

@relf
Copy link
Member

@relf relf commented Oct 27, 2025

This PR upgrades smt from legacy np.random.RandomState to new random generator np.random.Generator.

Breaking change: Passing a np.random.RandomState does not work anymore. The following classes are impacted: LHS, Random, DesignSpace and all kriging-based surrogate models via "random_state" option.

If a random_state parameter was used with an integer it still works but is deprecated, the new seed parameter is added to handle passing an integer or a np.random.Generator. The random_state will be removed in future releases, use seed instead.

Breaking change: EGO and MixedInteger applications were directly upgraded, their random_state option was replaced by a seed option.

Note: smt now requires pyDOE3 >= 1.5.0

@relf relf force-pushed the deprecate-random-state branch from e366737 to 68743ee Compare October 27, 2025 14:37
@relf relf marked this pull request as ready for review October 28, 2025 07:59
@relf relf merged commit 4126607 into SMTorg:master Oct 30, 2025
15 of 16 checks passed
@relf relf deleted the deprecate-random-state branch October 30, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant