pettinato
pettinato

Reputation: 1552

Does a PMML Debugger exist that could help find PMML syntax and/or logic errors?

I have spent a lot of time during the last few weeks dealing with PMML files that have bad syntax or logic errors. My current process involves looking at the PMML file and stepping through JPMML code until I can figure out what's wrong.

Common issues I have found,

What debugging tools are available for PMML?

Any tools to help with Syntax or Logic debugging would be helpful.

Upvotes: 1

Views: 206

Answers (1)

user1808924
user1808924

Reputation: 4926

There are probably no such tools available yet. My logic goes that a debugger would be built on top of an evaluator. Since the JPMML-Evaluator library is the state-of-the-art evaluator, and it does not provide dedicated debugging tools, then it's hard to see how some other tool could beat it in this area.

When debugging PMML, you can have two types of issues. First, there are "static errors" that relate to the structure of the PMML document such as missing, invalid or misplaced XML elements and attributes. They can be discovered by performing XML validation against PMML XSD file, or using JPMML-Model Visitor APIs. Second, there are "dynamic errors" that relate to the evaluation path of some data record. For example, as you just pointed out, it may happen that a categorical field is assigned a value for which there is no handler.

The JPMML-Evaluator library should throw an exception whenever it detects an error condition. If you have SAX Locator information enabled, then the exception message provides the line number of the offending PMML content. Of course, the debugging work would be much easier if the JPMML-Evaluator library did proper logging.

You could also try analyzing the source code of your PMML producer application. Why is it doing so in the first place?

Upvotes: 1

Related Questions