Closed frankstratton closed 2 years ago
Hey @frankstratton, thanks for the PR. Are you using Eps to generate the PMML? Also, can you share either code or PMML to reproduce the issue?
I am using EPS to generate the PMML. Unfortunately I cannot share the model itself. I'm trying to edit it down to something minimal that still has the error but it's not very easy to do. I've tracked it down to this node in the file, not sure if that's helpful to you or not. In my test years_experience is 4 and it dies on the lessOrEqual check.
<Node score="-0.013125003863849048">
<SimplePredicate field="years_experience" operator="lessOrEqual" value="5.500000000000001"/>
<Node score="0.011133097502084278">
<SimplePredicate field="job_descriptions(developing)" operator="greaterThan" value="1.0000000180025095e-35"/>
<Node score="-0.0407953976683559">
<SimplePredicate field="job_descriptions(problems)" operator="greaterThan" value="1.0000000180025095e-35"/>
</Node>
</Node>
<Node score="0.03872677470342471">
<SimplePredicate field="short_phrase(robotics)" operator="greaterThan" value="1.0000000180025095e-35"/>
</Node>
<Node score="0.009757622225846552">
<SimplePredicate field="job_descriptions(pipeline)" operator="greaterThan" value="1.0000000180025095e-35"/>
</Node>
</Node>```
Thanks @frankstratton, it looks like lessOrEqual
operators weren't being cast during PMML loading. Can you see if the commit above fixes it?
gem 'eps', github: 'ankane/eps'
works great thanks! Will you be releasing a new version of the gem soon?
Thanks for confirming. Just pushed a new release.
I have an integer field that sometimes, but not always, triggers this error. It looks like the comparison is reading a string from the pmml file and trying to compare against an int value. The following change fixes my issue but I'm not sure if it causes issues in other places.