alibaba / FederatedScope

An easy-to-use federated learning platform
https://www.federatedscope.io
Apache License 2.0
1.26k stars 206 forks source link

Issue in DistributedRunner #745

Closed Yoda-wu closed 8 months ago

Yoda-wu commented 8 months ago

Describe the bug when i use distributed mode, in client side always report an error :No train_data or train_loader in the trianer. then i found that my data_dict.keys() only had [0, 1, 2, 3]. the reason is the funtion _get_client_args in DitributedRunner is wrong

    def _get_client_args(self, client_id, resource_info):
        client_data = self.data
        kw = self.client_address
        kw['server_host'] = self.server_address['host']
        kw['server_port'] = self.server_address['port']
        kw['resource_info'] = resource_info
        return client_data, kw

you can see the first line of this funtion , it unable to get the corresponding client's data。