adriangb / scikeras

Scikit-Learn API wrapper for Keras.
https://www.adriangb.com/scikeras/
MIT License
239 stars 47 forks source link

Allow functools.partial in wrappers.py #279

Closed jpgard closed 2 years ago

jpgard commented 2 years ago

Allow for model instantiation functions which are built using functools.partial.

I imagine this is a common use case, where model functions might need to have certain parameters set using functools.partial. In that case, inspect.function() returns False, and this extra check is required.

Thanks for the awesome package, super useful!!!

codecov-commenter commented 2 years ago

Codecov Report

Merging #279 (4f82ce5) into master (2c8e9e0) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #279   +/-   ##
=======================================
  Coverage   98.27%   98.28%           
=======================================
  Files           7        7           
  Lines         755      756    +1     
=======================================
+ Hits          742      743    +1     
  Misses         13       13           
Impacted Files Coverage Δ
scikeras/wrappers.py 97.51% <100.00%> (+<0.01%) :arrow_up:
adriangb commented 2 years ago

Seems reasonable. Docs failure is unrelated. Can you just add a small test?