alegonz / baikal

A graph-based functional API for building complex scikit-learn pipelines.
https://baikal.readthedocs.io
BSD 3-Clause "New" or "Revised" License
592 stars 30 forks source link

[REFACTOR] Move step arguments from __init__ to __call__ #18

Closed alegonz closed 4 years ago

alegonz commented 4 years ago

This is to pave the road for shareable steps. A shared step needs to specify different behavior depending on where it is called, hence the need to pass the arguments that control this behavior (compute_func (formerly function) and trainable) at __call__ time.

codecov-io commented 4 years ago

Codecov Report

Merging #18 into master will increase coverage by 0.97%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage    96.6%   97.57%   +0.97%     
==========================================
  Files          13       13              
  Lines         618      619       +1     
  Branches      115      114       -1     
==========================================
+ Hits          597      604       +7     
+ Misses         14       11       -3     
+ Partials        7        4       -3
Impacted Files Coverage Δ
baikal/_core/utils.py 96.22% <ø> (-0.14%) :arrow_down:
baikal/steps/factory.py 100% <100%> (ø) :arrow_up:
baikal/steps/expression.py 100% <100%> (ø) :arrow_up:
baikal/steps/merge.py 100% <100%> (ø) :arrow_up:
baikal/_core/step.py 100% <100%> (+5.6%) :arrow_up:
baikal/_core/model.py 100% <100%> (ø) :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 9ffd085...59aeac6. Read the comment docs.