exo-explore / exo

Run your own AI cluster at home with everyday devices 📱💻 🖥️⌚
GNU General Public License v3.0
9.47k stars 499 forks source link

[BOUNTY - $200] Manual networking with configuration files #279

Open AlexCheema opened 14 hours ago

AlexCheema commented 14 hours ago
lipere123 commented 10 hours ago

Hello. Did the YAML that I did send you via discord is good for you ? Thanks in advance. Best Regards. Benjamin.

AlexCheema commented 10 hours ago

Hello. Did the YAML that I did send you via discord is good for you ? Thanks in advance. Best Regards. Benjamin.

It looks a bit overcomplicated. Basically you need to implement

  @abstractmethod
  async def discover_peers(self, wait_for_peers: int = 0) -> List[PeerHandle]:
    pass

The only PeerHandle we support right now is GRPCPeerHandle so you just need to be able to create a GRPCPeerHandle for each peer. Here's the constructor:

class GRPCPeerHandle(PeerHandle):
  def __init__(self, _id: str, address: str, device_capabilities: DeviceCapabilities):
    self._id = _id
    self.address = address
    self._device_capabilities = device_capabilities
    self.channel = None
    self.stub = None

So you need an id, address and device_capabilities for each peer in the configuration file.

lipere123 commented 10 hours ago

Okay, I will look into that.