Skip to content

Builder property for strict input schema check #243

Description

@PsychedelicO0o

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:

Exception in thread "main" org.jpmml.evaluator.MissingFieldException: Field "pmml(prediction)" is not defined
	at org.jpmml.evaluator.ModelEvaluationContext.resolve(ModelEvaluationContext.java:149)
	at org.jpmml.evaluator.EvaluationContext.evaluate(EvaluationContext.java:95)
	at org.jpmml.evaluator.ExpressionUtil.evaluateMapValues(ExpressionUtil.java:321)
	at org.jpmml.evaluator.ExpressionUtil.evaluateExpression(ExpressionUtil.java:186)
	at org.jpmml.evaluator.ExpressionUtil.evaluate(ExpressionUtil.java:156)
	at org.jpmml.evaluator.ExpressionUtil.evaluateExpressionContainer(ExpressionUtil.java:82)
	at org.jpmml.evaluator.OutputUtil.evaluate(OutputUtil.java:250)
	at org.jpmml.evaluator.ModelEvaluator.evaluateInternal(ModelEvaluator.java:470)
	at org.jpmml.evaluator.mining.MiningModelEvaluator.evaluateInternal(MiningModelEvaluator.java:237)
	at org.jpmml.evaluator.ModelEvaluator.evaluate(ModelEvaluator.java:302)
	at com.jd.campus.algorithm.pmml.NewTest.main(NewTest.java:35)

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions