Closed aliutkus closed 4 years ago
Merging #65 into dev will increase coverage by
1.82%
. The diff coverage is21.42%
.
@@ Coverage Diff @@
## dev #65 +/- ##
==========================================
+ Coverage 63.87% 65.69% +1.82%
==========================================
Files 19 18 -1
Lines 1204 1169 -35
==========================================
- Hits 769 768 -1
+ Misses 435 401 -34
Impacted Files | Coverage Δ | |
---|---|---|
openunmix/evaluate.py | 39.34% <0.00%> (-3.76%) |
:arrow_down: |
setup.py | 0.00% <ø> (ø) |
|
openunmix/predict.py | 19.04% <25.00%> (-2.70%) |
:arrow_down: |
openunmix/__init__.py | 40.90% <100.00%> (+0.90%) |
: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 a89052b...d8ba6e3. Read the comment docs.
predict.py
file is not so much intuitive => I importedseparate
in the__init__
of the package along with the models constructions. This provide a functionalopenunmix.separate
function. I believe it's way simpler and better this wayseparate
function was limited to filepaths. I think that when you call separation programatically, it's actually quite common that you want to process tensors directly. I modified theseparate
function so that you can either haveinput
as astr
(in which case it's understood as a filepath) or as atorch.Tensor
(in which case you should also provide the otherwise ignoredrate
parameter)predict.inference_args
. I duplicated the corresponding code incli.py
andeval.py
I understand it's arguably less elegant, but I'm actually not even sure we want the same defaults for cli and eval. It's just 4 parameters anyways, and I believe it makes the code more readable.