Proper macOS support
When creating DHT, calling run_in_background makes the process wait forever. So tests don't finish.
Were you able to run the Quick Start tutorial in macOS?
i.e. at least this script:
python scripts/run_server.py --expert_cls ffn --hidden_dim 512 --num_experts 5 --expert_pattern expert.[0:5] \ --listen_on 0.0.0.0:1337 --dht_port 1338
Yes. I suppose it is because the DHT instance is not created.
I find out that this bug has the same cause as the following error:
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
The former is arising when executing socket.getaddrinfo(socket.getfqdn(), 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
I think that it can be fixed by changing some macOS setting (e.g. editing /etc/hosts), although no success till now.
One more noted issue: by default, we download a version of libp2p-daemon that is compiled for Linux. We should check the system during installation and download the precompiled daemon only if the target system matches the current system: otherwise, the correct behavior is to fail during installation