marrlab / DomainLab

modular domain generalization: https://pypi.org/project/domainlab/
https://marrlab.github.io/DomainLab/
MIT License
40 stars 2 forks source link

argument acc_val in method if_stop #809

Closed agisga closed 2 months ago

agisga commented 2 months ago

Introduction of a new argument acc_val to method if_stop breaks compatibility with prior versions of domainlab. Can we make it possible for acc_val to be None? Can it maybe be None by default? In line 60 shown in [1], the argument self.metric_val["acc"] is hard-coded, and may not exist in specific cases.

[1] https://github.com/marrlab/DomainLab/blob/af8a238645f9e777cc7233fcd5c7802fb27d087f/domainlab/algos/observers/b_obvisitor.py#L60 [2] https://github.com/marrlab/DomainLab/blob/af8a238645f9e777cc7233fcd5c7802fb27d087f/domainlab/algos/msels/a_model_sel.py#L77