scikit-adaptation / skada

Domain adaptation toolbox compatible with scikit-learn and pytorch
https://scikit-adaptation.github.io/
BSD 3-Clause "New" or "Revised" License
60 stars 16 forks source link

[MRG] Add TransferSubspaceLearning method #181

Closed antoinecollas closed 5 months ago

antoinecollas commented 5 months ago

Add TransferSubspaceLearning method

antoinecollas commented 5 months ago

@kachayev I updated the PR. I kept the import torch in the fit method. Otherwise, you can't even instantiate the class and then I have no idea how to get the CI test-minimal working. Also, we did similar things in other methods requiring torch for the optimization.

kachayev commented 5 months ago

Yeah, I got it.

I think if we allow torch as an optional dependency, we should never even export classes that are non-functional without torch being installed (i.e. those classes should not be in skada namespace). Same way it works for deep modules. But I agree this is a separate issue as we already have a few places where this happens.