Help understanding inheritance for scvi.models

I’m looking into implementing a new project as an scvi model and am working my way through the code base to understand a bit more what is going on.

I’m still new to python module development and I’m wondering why certain methods are inherited from an actual parent class (BaseModelClass), while others are inherited from mixins (RNASeqMixin, VAEMixin, ArchesMixin, UnsupervisedTrainingMixin), as shown in the definition below:

class SCVI(
    RNASeqMixin, VAEMixin, ArchesMixin, UnsupervisedTrainingMixin, BaseModelClass
):

This post might be helpful to you: python - What is a mixin and why is it useful? - Stack Overflow

Moving forward, if you could post scvi-tools specific questions here (as opposed to Python-related questions) it would be much appreciated, in order to keep the discourse organized and to the point.

1 Like