Using Linux Mint 19.2 cinnamon,
fresh mlagents installation via pip3 following the installation guide,
Unity 2019.2.6f1
i am able to run mlagents-learn successfully using the editor as environment, but after stopping playmode in the editor or canceling mlagents-learn in the terminal via ctrl-c, when restarting it i alway get:
ConnectionResetError: [Errno 104] Connection reset by peer
I have to wait about a minute every time until i can restart it without getting this error.
Do i have to accept that or is there maybe another preferred way to stop/cancel a run?
Hi @Flavelius -- this is a known issue on Linux. After closing the training session the OS seems to hold onto the ports used by the editor (or builds) for about a minute and not allow new connections. Since this isn't an issue with ML-Agents but the networking I don't believe there's anything we can do to fix it.
That's unfortunate. I've tried to find anwers to this and read that reusing the socket in question may be a way to overcome it. I think in this case the sideeffects are controlled/limited so maybe that could be worth to investigate.
Please share if you find a good fix for this :-)
In the meantime, one suggestion I can make is to create a binary build of your game and pass to --env. Then you can set the --base-port to change the port used on each run rather than waiting around.
Hi @Flavelius,
Thanks for your feedback. We have logged this bug internally as ID MLA-79, and will update this issue when a fix is merged into the develop branch.
Hi @Flavelius,
After some research we've decided that we won't pursue fixing this bug. If you can narrow it down further we may be able to point you to a 3rd part project we are using (gRPC for instance). A bug report may find a softer landing there. Thank you for the report.