cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
262 stars 57 forks source link

Test notebooks #30

Closed fracek closed 2 years ago

fracek commented 2 years ago

Like we mentioned, this PR add testing of notebooks.

fracek commented 2 years ago

Looks like the issue now is that the GBT notebook uses gurobi. We should stick to cbc for all notebooks so that everyone can try them out and we can test them. What do you think?

rmisener commented 2 years ago

Agreed. @ThebTron, would you please switch to CBC in the black-box optimization notebook? Maybe try making the trees smaller in LightGBM if there is computational trouble with CBC.

codecov[bot] commented 2 years ago

Codecov Report

Merging #30 (4c8901a) into main (139eb3d) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #30   +/-   ##
=======================================
  Coverage   88.79%   88.79%           
=======================================
  Files          23       23           
  Lines        1071     1071           
  Branches      160      160           
=======================================
  Hits          951      951           
  Misses         98       98           
  Partials       22       22           

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 139eb3d...4c8901a. Read the comment docs.

fracek commented 2 years ago

The issue was that the second test run (the one testing notebooks) was overwriting the coverage from the main tests. I changed the notebook run to merge coverage with the main tests.

rmisener commented 2 years ago

In this pull request, import_network.ipynb still mixes ReLU and sigmoid activation functions. @fracek, possible to just make sure that the activation functions are ones we typically allow together?

fracek commented 2 years ago

I changed it to not use sigmoid anymore.