scvi-tools icon indicating copy to clipboard operation
scvi-tools copied to clipboard

Replace custom `attrdict` with `ml_collections` implementation.

Open martinkim0 opened this issue 1 year ago • 2 comments

Closes #1690.

martinkim0 avatar Sep 19 '22 23:09 martinkim0

Codecov Report

Base: 90.71% // Head: 90.84% // Increases project coverage by +0.12% :tada:

Coverage data is based on head (c7c34d2) compared to base (d09368d). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1696      +/-   ##
==========================================
+ Coverage   90.71%   90.84%   +0.12%     
==========================================
  Files         116      116              
  Lines        9791     9764      -27     
==========================================
- Hits         8882     8870      -12     
+ Misses        909      894      -15     
Impacted Files Coverage Δ
scvi/data/_utils.py 94.21% <ø> (+7.09%) :arrow_up:
scvi/module/_totalvae.py 88.19% <ø> (+0.64%) :arrow_up:
scvi/data/_manager.py 98.19% <100.00%> (ø)
scvi/data/fields/_protein.py 98.21% <100.00%> (ø)
scvi/model/_totalvi.py 87.59% <100.00%> (ø)
scvi/utils/_attrdict.py 100.00% <100.00%> (+11.76%) :arrow_up:
scvi/module/_multivae.py 82.07% <0.00%> (+0.22%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 19 '22 23:09 codecov[bot]

Seems that ml_collections does not allow ConfigDicts to be initialized with nested dictionaries where inner dictionaries have non-iterable types (e.g. ints) as keys (#13). This comes up as a problem when initializing ~scvi.model.TOTALVI, since "protein_batch_mask" has ints as keys.

martinkim0 avatar Sep 23 '22 18:09 martinkim0