Clone
 

lance leverich <lance.leverich@gmail.com> in Drools

RHPAM-2307[7.26.x] (#2564)

* DROOLS-4467 PMML with capitalized field names does not work (#2525)

* Updated the findDataDictionaryEntry method of PMML4UnitImpl. It now

looks through the raw DataDictionary values to find the entry, if the

entry isn't found using the field name as a key to the

dataDictionaryMap.

* Changed the AbstractModel.getMiningFields method (used by all models

except the MiningModel) to use findDataDictionaryEntry instead of trying

to use the field name as key into the dataDictionaryMap.

* Added a set of unit tests to make sure that the

findDataDictionaryEntry method works as intended. This includes also

adding a PMML file that contains fields, with names that start with both

upper and lower cases.

* RHPAM-2307 Guided Scorecard can not be tested according its name (#2520)

* Fixed methods that are used to find the package with a RuleUnit, so

that the model name can be in either upper or lower case.

* Updated the unit tests in kie-pmml so that they all use the

PMML4ExecutionHelper. This allowed refactoring of other classes, to

remove duplicated methods for determining the RuleUnit class to be used.

* Updated one of the test PMML resources (in kie-pmml) so that it has a

model name that starts with a lower case letter. This should make sure

that we are testing models with both upper and lower case letters at the

start of the model name.

RHPAM-2307 Guided Scorecard can not be tested according its name (#2520)

* Fixed methods that are used to find the package with a RuleUnit, so

that the model name can be in either upper or lower case.

* Updated the unit tests in kie-pmml so that they all use the

PMML4ExecutionHelper. This allowed refactoring of other classes, to

remove duplicated methods for determining the RuleUnit class to be used.

* Updated one of the test PMML resources (in kie-pmml) so that it has a

model name that starts with a lower case letter. This should make sure

that we are testing models with both upper and lower case letters at the

start of the model name.

DROOLS-4467 PMML with capitalized field names does not work (#2525)

* Updated the findDataDictionaryEntry method of PMML4UnitImpl. It now

looks through the raw DataDictionary values to find the entry, if the

entry isn't found using the field name as a key to the

dataDictionaryMap.

* Changed the AbstractModel.getMiningFields method (used by all models

except the MiningModel) to use findDataDictionaryEntry instead of trying

to use the field name as key into the dataDictionaryMap.

* Added a set of unit tests to make sure that the

findDataDictionaryEntry method works as intended. This includes also

adding a PMML file that contains fields, with names that start with both

upper and lower cases.

RHDM-1049 Wrong output variable values in PMML mining model (#2505)

* RHPAM-1049 Wrong output variable values in PMML mining model

* Changed output of the target field to be a simple value that is set at

the same time as the Sum_ version is created.

* Updated test to make sure change was effective in adding the output

value

* Fixed output so that it is based on PMML4OutputField. Actual class name is based on the package name, plus the name of the output field.

RHDM-1015 Rule-based test scenarios that contain maps of simple types fail (#2489)

* RHDM-1015 Rule-based test scenarios that contain maps of simple types fail

* Fixed an error that was being caused by the way the workbench writes the

JSON for Map objects that contain simple key/value pairs (e.g. String

and String).

* Fixed createObject so that it returns null if the className is one of

the simple types listed in the static List of simple types. Added comment

noting that this list is similar to a Map structure used in the interface

named DataManagementStrategy.

* Also added to the tests for the expression evaluator, creating a test

for a JSON string that is equivalent to one created by the workbench.

* Added tests that verify that the createObject method is returning

null when one of the listed simple types is requested, returning the

proper object when a non-simple type is requested, and throwing an

exception if it is unable to create an object of the requested non-simple type

* WIP

* Refactor to avoid recursion with simple types

* RHDM-1015 Rule-based test scenarios that contain maps of simple types fail

* Fixed an error that was being caused by the way the workbench writes the

JSON for Map objects that contain simple key/value pairs (e.g. String

and String).

* Fixed createObject so that it returns null if the className is one of

the simple types listed in the static List of simple types. Added comment

noting that this list is similar to a Map structure used in the interface

named DataManagementStrategy.

* Also added to the tests for the expression evaluator, creating a test

for a JSON string that is equivalent to one created by the workbench.

* Added tests that verify that the createObject method is returning

null when one of the listed simple types is requested, returning the

proper object when a non-simple type is requested, and throwing an

exception if it is unable to create an object of the requested non-simple type

* Removed SIMPLE_TYPES_LIST

DROOLS-4278 Applying PMML model using kie-server fails (#2430) (#2453)

* Changed the ApplyPmmlModelCommand execute method so that it uses a

RegistryContext, instead of a RequestContextImpl.

* Added more tests for ApplyPmmlModelCommand

* Changed how the ApplyPmmlModelCommand applied

results to the ExecutionResultImpl.

    • -0
    • +112
    /drools-core/src/test/resources/org/kie/pmml/test_scorecard.pmml
[RHDM-867] force load of package-info into PMML4Compiler classloader (#2436) (#2452)

DROOLS-4278 Applying PMML model using kie-server fails (#2430)

* Changed the ApplyPmmlModelCommand execute method so that it uses a

RegistryContext, instead of a RequestContextImpl.

* Added more tests for ApplyPmmlModelCommand

* Changed how the ApplyPmmlModelCommand applied

results to the ExecutionResultImpl.

    • -0
    • +112
    /drools-core/src/test/resources/org/kie/pmml/test_scorecard.pmml
RHDM-961 Random test failures (#2352)

The error message indicated that sometimes the format function being

called by an accumulate, in the rule "processDerivedField_MapValues",

was being called with a "type" parameter that was not a String. I

updated the function's signature to take a generic Object for the "type"

parameter, and then modified the function to check to see if the

parameter was indeed a String. If it is a String then the function works

as it was originally coded; otherwise it returns the passed in "val"

parameter, just as though the "type" parameter was null.

RHPAM-2107 ApplyPmmlModelCommand now accepts external objects as input (#2343)

    • -1
    • +12
    /drools-core/src/build/revapi-config.json
RHPAM 1815 7.18.x (#2295)

* RHPAM-1815 Unit tests fail for drools-scorecards

Declared types in the rules that are used to generate the rules from

PMML cause issues in Windows.

* Removed commented out declare statements

RHPAM-1815 Renamed the file ScoringStrategiesTest.java... (#2290)

* RHPAM-1815 Unit tests fail for drools-scorecards

Declared types in the rules that are used to generate the rules from

PMML cause issues in Windows.

* Removed commented out declare statements

RHPAM-1900 Fixes for XStream marshall/unmarshall using PMML structures (#2273) (#2283)

    • -0
    • +10
    /drools-core/src/build/revapi-config.json
RHPAM-1900 Fixes for XStream marshall/unmarshall using PMML structures (#2273)

    • -0
    • +10
    /drools-core/src/build/revapi-config.json
RHPAM-1875 Fixes for JSON marshalling/unmarshalling of PMML (#2258)

Moved all the DRLs to the proper directory for the package name (#2252)

Moved the DRL files from the model-based subdirectory to the package

name directory org/kie/pmml/pmml_4_2/compiler

  1. … 3 more files in changeset.
RHDM-766 / DROOLS-3404 (#2202)

* DROOLS-3404 Finish removing 'declare' statements from generated rules

@Ignored tests in guided scorecards that don't work due to empty field names

RHDM-766 Implementing REST API/kie-server support for PMML

Requested updates

Made requested change to the PMML4Compiler

* Added back in tests that had been @Ignored

Added back tests that had been @Ignored. This required updating the

Helper so that it produced scorecard models that had valid output field

definitions.

    • -1
    • +16
    /drools-core/src/build/revapi-config.json
  1. … 32 more files in changeset.
RHPAM-1509 Mining model modelChain mode does not compile (#2069)

* Fixed an error, in the PMML4Compiler, that was caused when instead of creating a copy of a DataField object the object was being updated

* Fixed problems in the test data...

- Models need to have a modelName attribute

- A target element, in a MiningSchema, must have a corresponding DataField defined

RHPAM-1509 Mining model modelChain mode does not compile (#2068)

* Fixed an error, in the PMML4Compiler, that was caused when instead of creating a copy of a DataField object the object was being updated

* Fixed problems in the test data...

- Models need to have a modelName attribute

- A target element, in a MiningSchema, must have a corresponding DataField defined

RHPAM-1492_ 7_11 (#2063)

* RHPAM-1492 Surrogate operator does not work correctly in decision trees

* Fixed problems in the PredicateRuleProducer classes, where the generated constraints

were not correctly taking into account compound predicates

* Changed treeCompiler.drl to use constraints created by PredicateRuleProducer classes

instead of using the compileConstraints query in common.drl

* Added a method to PMML4Helper (utils within treeCompiler.drl) to retrieve the

constraints/predicate for a node

* Added fix that uses new ArrayList<>() in place of Collections.emptyList()

  1. … 3 more files in changeset.
RHPAM-1492 Surrogate operator does not work correctly in decision trees (#2062)

* Fixed problems in the PredicateRuleProducer classes, where the generated constraints

were not correctly taking into account compound predicates

* Changed treeCompiler.drl to use constraints created by PredicateRuleProducer classes

instead of using the compileConstraints query in common.drl

* Added a method to PMML4Helper (utils within treeCompiler.drl) to retrieve the

constraints/predicate for a node

Added fix that uses new ArrayList<>() in place of Collections.emptyList()

  1. … 3 more files in changeset.
RHPAM-1500 PMML compilation problem with weightedAverage mining operator (#2052)

* Removed @Ignore from MiningModelWeightedAverageTest

* Added a method to get the Double value from the MiningSegmentWeight

* Fixed errors in the weightedAvg.mvel including

- making sure that the correct PMML4Result is used for setting a MiningSegmentWeight

- making sure that the correct PMML4Result gets the weighted average for its target field

- making sure that the all possible SegmentExecutions are inserted prior to starting any SegmentExecution

- updating the "Check Segment Can Fire" rules to update the proper SegmentExecution, instead of inserting a new one

* Fixed tests in MiningmodelTest that were broken by the above fixes

RHPAM-1500 PMML compilation problem with weightedAverage mining operator (#2052)

* Removed @Ignore from MiningModelWeightedAverageTest

* Added a method to get the Double value from the MiningSegmentWeight

* Fixed errors in the weightedAvg.mvel including

- making sure that the correct PMML4Result is used for setting a MiningSegmentWeight

- making sure that the correct PMML4Result gets the weighted average for its target field

- making sure that the all possible SegmentExecutions are inserted prior to starting any SegmentExecution

- updating the "Check Segment Can Fire" rules to update the proper SegmentExecution, instead of inserting a new one

* Fixed tests in MiningmodelTest that were broken by the above fixes

(cherry picked from commit 8eb1aae0dcbdf2b0f36e3ccbbc39e5291bf06c69)

DROOLS-2908 Guided Score Card (#2035)

* Fixed/updated unit tests and verified that scorecards are compiling and executing

* Added ability to use external types when using the PMML4ExecutionHelper

DROOLS-2884 Guided Score Card build fails (#2034)

* Fixed issue that prevented build/compile when the guided scorecard referenced a type without a fully qualified name

* Updated tests to include testing for external types referenced without fully qualified names

DROOLS-2875 Problem compiling PMML when multiple output fields are present (#2016)

* scorecardOutputGeneration.drlt - Updated rule names to add the target field for situations where there are

multiple output fields defined.

* regParams.drlt - Changed the insertion of RegTable objects to be insert instead of insertLogical

* Updated test files to include multiple fields tagged as output

* Fixed Miningmodel.java so that the getMiningFields method would also return any fields that were used by

sub-models. This removes a limitation that previously existed where the all fields that were in a sub-model's

mining schema had to be included in the mining models mining schema.

Removed all references to PMML from drools-compiler module (#1977)

Created PMMLAssemblerService to compile packages that contain PMML resources

    • -0
    • +132
    /kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/PMMLResource.java
[DROOLS-2752] - Fix for issue that caused a StringIndexOutOfBounds exception (#1988)

when using external types, without a package name.

RHDM-594 Remove drools-pmml dependency (#1922)

* Helper classes to streamline the creation of the elements necessary for submitting

a request to a PMML rule unit.

Updated tests to make use of the new helper classes

* * Removing dependencies on drools-pmml

* Changed the package for classes generated from the PMML schema and updated references to the package

* Added new methods for retrieving a KieBase, or a string that contains the PMML generated from a spreadsheet,

from the ScoreCardProvider and ScoreCardFactory classes

* * Making drools-scorecards work with kie-pmml

* Removing reliance by guided scorecards and adding in support for external beans

  1. … 64 more files in changeset.
Moved PMML generation of Java classes to KnowledgeBuilderImpl and (#1883)

removed it from KieBuilderImpl.