Skip to content

Commit

Permalink
remove gen2 restriction (NVIDIA#2170)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuan-Ting Hsieh (謝沅廷) <[email protected]>
  • Loading branch information
yanchengnv and YuanTingHsieh authored Nov 28, 2023
1 parent 0594e66 commit 91beda7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions nvflare/fuel/f3/cellnet/connector_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ def should_connect_to_server(self, fqcn_info: FqcnInfo) -> bool:

def is_adhoc_allowed(self, c1: FqcnInfo, c2: FqcnInfo) -> bool:
"""
Is adhoc connection allowed between the two cells?
Is ad-hoc connection allowed between the two cells?
Args:
c1:
c2:
c1: FQCN info of cell one
c2: FQCN info of cell two. c2 will offer listener if ad-hoc is allowed.
Returns:
Returns: whether ad-hoc connection is allowed between the two cells
"""
if not self.adhoc_allowed:
Expand All @@ -132,10 +133,7 @@ def is_adhoc_allowed(self, c1: FqcnInfo, c2: FqcnInfo) -> bool:
# same family
return False

# we only allow gen2 (or above) cells to directly connect
if c1.gen >= 2 and c2.gen >= 2:
return True
return False
return True

@staticmethod
def _validate_conn_config(config: dict, key: str) -> Union[None, dict]:
Expand Down

0 comments on commit 91beda7

Please sign in to comment.