ray-project / rayfed

A multiple parties joint, distributed execution engine based on Ray, to help build your own federated learning frameworks in minutes.
https://rayfed.readthedocs.io
Apache License 2.0
87 stars 20 forks source link

[Bug] shutdown is called more than once #205

Closed zhouaihui closed 6 months ago

zhouaihui commented 6 months ago

The shutdown can be called more than once.

A simple demo.


@fed.remote
def error_func():
    raise Exception('By design')

@fed.remote
def foo(o):
    print(o)

err = error_func.party('alice').remote()
foo.party('bob').remote(err)

fed.shutdown

If error occurred when alice ran into fed.shutdown already, signal handler was trigged and shutdown was called again.