You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Ml] Validate tree feature index is within range (elastic#52460)
This changes the tree validation code to ensure no node in the tree has a
feature index that is beyond the bounds of the feature_names array.
Specifically this handles the situation where the C++ emits a tree containing
a single node and an empty feature_names list. This is valid tree used to
centre the data in the ensemble but the validation code would reject this
as feature_names is empty. This meant a broken workflow as you cannot GET
the model and PUT it back
Copy file name to clipboardExpand all lines: client/rest-high-level/src/test/java/org/elasticsearch/client/ml/inference/trainedmodel/tree/TreeTests.java
+3-3
Original file line number
Diff line number
Diff line change
@@ -61,11 +61,11 @@ public static Tree createRandom() {
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/tree/TreeTests.java
+76-18
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@
29
29
importjava.util.stream.IntStream;
30
30
31
31
importstaticorg.hamcrest.Matchers.closeTo;
32
+
importstaticorg.hamcrest.Matchers.containsString;
32
33
importstaticorg.hamcrest.Matchers.equalTo;
33
34
34
35
@@ -72,10 +73,10 @@ public static Tree createRandom() {
0 commit comments