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

[BUG] Return shallow copy of outputs in Step.__call__ #7

Closed alegonz closed 4 years ago

alegonz commented 4 years ago

This is to avoid modifying self._outputs when using the idiom of passing a variable holding an output to another step and re-writing the variable with the new output:

zs = SomeMultiOutputStep()(...)
zs[i] = SomeStep()(zs[i])
codecov-io commented 4 years ago

Codecov Report

Merging #7 into master will decrease coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
- Coverage    96.5%   96.49%   -0.01%     
==========================================
  Files          13       13              
  Lines         600      599       -1     
  Branches      114      114              
==========================================
- Hits          579      578       -1     
  Misses         14       14              
  Partials        7        7
Impacted Files Coverage Δ
baikal/_core/step.py 94.39% <100%> (ø) :arrow_up:
baikal/_core/model.py 100% <0%> (ø) :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 ca813a7...efe8f3b. Read the comment docs.