Skip to content

Commit

Permalink
Fix numpy random seed for PySMO test (#1264)
Browse files Browse the repository at this point in the history
* Minor change to trigger tests

* Added abs to tolerance check

* Run black

* Remove string comparison

* Tighten tolerance

* Fixed kriging test by removing variable dependence

* Fixing random seed for kriging test

(cherry picked from commit 02c20ac)
  • Loading branch information
OOAmusat authored and lbianchi-lbl committed Sep 14, 2023
1 parent 3476db5 commit 581e89e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions idaes/core/surrogate/pysmo/tests/test_kriging.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def test_parameter_optimization_01(self, array_type):
input_array = array_type(self.training_data)
KrigingClass = KrigingModel(input_array[0:3])
p = 2
np.random.seed(0)
opt_results = KrigingClass.parameter_optimization(p)
assert len(opt_results.x) == 3
assert opt_results.success == True
Expand Down

0 comments on commit 581e89e

Please sign in to comment.