Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jovany-wang committed Jul 21, 2023
1 parent b76feee commit 1c9912e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion fed/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ def from_dict(cls, data: Dict):
CrossSiloMessageConfig: An instance of CrossSiloMessageConfig.
"""
# Get the attributes of the class

data = data or {}
attrs = {attr for attr, _ in cls.__annotations__.items()}
all_annotations = {**cls.__annotations__, **cls.__base__.__annotations__}
attrs = {attr for attr, _ in all_annotations.items()}
# Filter the dictionary to only include keys that are attributes of the class
filtered_data = {key: value for key, value in data.items() if key in attrs}
return cls(**filtered_data)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_exit_on_failure_sending.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_value(self):
return self._value


def run(party, is_inner_party):
def run(party):
signal.signal(signal.SIGTERM, signal_handler)

compatible_utils.init_ray(address='local')
Expand Down Expand Up @@ -83,7 +83,7 @@ def run(party, is_inner_party):


def test_exit_when_failure_on_sending():
p_alice = multiprocessing.Process(target=run, args=('alice', True))
p_alice = multiprocessing.Process(target=run, args=('alice',))
p_alice.start()
p_alice.join()
assert p_alice.exitcode == 0
Expand Down

0 comments on commit 1c9912e

Please sign in to comment.