-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builder property for strict input schema check #243
Comments
When I try to run the example project then I get a different exception:
|
Anyway, the root cause of the original exception (a This issue is a functional duplicate of #237 I did rename some relevant exception classes in the JPMML-Evalautor 1.6.X development branch to make the troubleshooting process easier. |
In the current case, the missing input field is See for yourself: HashMap<String, Object> featureMap = JSON.parseObject(featureStr, new TypeReference<HashMap<String, Object>>() {});
String pmmlPath = "model_jy.pmml";
Evaluator evaluator = new LoadingModelEvaluatorBuilder().load(new File(pmmlPath)).build();
evaluator.verify();
Set<String> inputFieldNames = evaluator.getInputFields().stream()
.map(inputField -> inputField.getName().getValue())
.collect(Collectors.toSet());
inputFieldNames.removeAll(featureMap.keySet());
System.out.println("Missing input fields: " + inputFieldNames); |
I renamed/re-purposed this issue in order to design a If this property is activated, then the This problem is all too common with end users. |
Hi:
I've trained a pipeline model in SparkML and converted it to PMML. When I load it by using LoadingModelEvaluatorBuilder() in Java and pass a feature map into it to get result, it throws an Exception:
Could you please help me find how to solve it and what's the reason, cause some models throw this Exception but others are normal. Thanks
Here Is PMML File And Java Code
JMMPL-Evaluator Version : 1.5.16
The text was updated successfully, but these errors were encountered: