Mleap Runtime serialization using wrong file name for DecisionTree models #843
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduced a bug in the Mleap Runtime serialization for DecisionTree-type models (DecisionTreeClassifier and DecisionTreeRegression). That PR intended to update how the trees in the DecisionTree are serialized, including switching the file name from "nodes" to "tree". However, two instances were missed, one in the runtime DecisionTreeClassifierOp and one in the runtime DecisionTreeRegressionOp. This bug means that any DecisionTreeClassifier or DecisionTreeRegression models that are serialized using Mleap Runtime will use the "nodes" file name and thus are unable to be deserialized because both Mleap Runtime and Mleap Spark expect the "tree" file name during deserialization (because they were correctly updated in that PR).
In this PR, I am fixing the two missed instances from the original PR and adding a test case for each of these instances. I have verified that the test case failed before the change and succeeds after the change.
Demonstrating that the two new tests failed before fixing the file name:
Demonstrating that the two new tests succeed after fixing the file name: