Skip to content

Commit c9877dd

Browse files
committed
Fix import of CAGrad and NashMTL in __init__.py
1 parent ff01c83 commit c9877dd

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from .aligned_mtl import AlignedMTL
22
from .bases import Aggregator
3-
from .cagrad import CAGrad
43
from .config import ConFIG
54
from .constant import Constant
65
from .dualproj import DualProj
@@ -9,9 +8,18 @@
98
from .krum import Krum
109
from .mean import Mean
1110
from .mgda import MGDA
12-
from .nash_mtl import NashMTL
1311
from .pcgrad import PCGrad
1412
from .random import Random
1513
from .sum import Sum
1614
from .trimmed_mean import TrimmedMean
1715
from .upgrad import UPGrad
16+
17+
try:
18+
from .cagrad import CAGrad
19+
except ImportError: # The required dependencies are not installed
20+
pass
21+
22+
try:
23+
from .nash_mtl import NashMTL
24+
except ImportError: # The required dependencies are not installed
25+
pass

0 commit comments

Comments
 (0)