Closed xuehui1991 closed 2 years ago
@acassirer
Hi,
Everything looks like it is working fine? The server seems to be loading a checkpoint, starting up and then shutting down straight away, presumably because there isn't any server.wait()
(or anything else that blocks the program from completing).
Thank you for your answer @acassirer .
Seems it can work out now.
Here is my last question:
the usage of reverb client will make the server wait or not?
Becuase in the the tutorial, I can't see any usage of server.wait
in there.
Thanks again.
Hi,
There is no explicit need to call server.wait
, it is just an utility to block the program until Ctrl+C
is called (aka SIGINT
received). What you do need to make sure though is to ensure that the server
-object is not destroyed before you are done (with the test). When the server
goes out of scope the garbage collector will call Server.__del__
which shuts down the server.
The reason that server.wait
therefore isn't needed in the context of a colab, or any other interactive interpreter, is that the server
object doesn't go out of scope and thus doesn't get cleaned up.
If you want some concrete examples of how you could handle this then take a look at the test files within Reverb. client_test.py
would be a good place to start.
Thanks @acassirer.
Here is the test code:
Adding the result:
Can anyone give some suggestion?