feedzai / feedzai-openml-java

Implementations for Feedzai's OpenML APIs to allow for usage of machine learning models in the Java programming language.
https://www.feedzai.com
Apache License 2.0
2 stars 11 forks source link

openml-h2o: Force schema compatibility between H2O model schema and the openml schema #11

Closed JPDSousa closed 5 years ago

JPDSousa commented 5 years ago

In the context of QA testing, it was detected than when attempting to import a model with a given schema that contains a subset of the total fields with which the model was trained, the loading would succeed, while the expected behaviour would be for the loading operation to fail.

As such, this commit adds a new validation step to make sure that the schema included in the model to be loaded is compatible with the correspondent openml schema. Additionally, a regression test was added.

codecov[bot] commented 5 years ago

Codecov Report

Merging #11 into master will increase coverage by 0.32%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #11      +/-   ##
============================================
+ Coverage     79.17%   79.49%   +0.32%     
- Complexity      255      257       +2     
============================================
  Files            27       27              
  Lines           826      839      +13     
  Branches         75       76       +1     
============================================
+ Hits            654      667      +13     
  Misses          130      130              
  Partials         42       42
Impacted Files Coverage Δ Complexity Δ
...n/java/com/feedzai/openml/h2o/H2OModelCreator.java 67.5% <100%> (+6.3%) 15 <2> (+2) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ee7415f...4eef8c0. Read the comment docs.

nmldiegues commented 5 years ago

I don't get Codacy complaint. The Junit method has an assertion...

JPDSousa commented 5 years ago

Backported to hf-1.0.X and hf-0.5.X