You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the type of feature and its functionality.
Currently, when the Server class initialises the global model parameters by randomly sampling a client, it provides an empty config. In my particular case, the client requires information from the server in order to initialise the model and hence the model parameters.
The proposed feature is to allow information to be passed from the server to the client during initialisation of global model parameters
Describe step by step what files and adjustments are you planning to include.
I see two ways of implementing this.
1. Create an optional argument to the Server class in server.py.
Either a dictionary (eg. init_params_config) or a function similar to on_fit_config_fn (eg. on_init_config_fn). Although a function might be overkill if we don't have any variables to pass to it. Use this argument to get a config for parameter initialization and on line 281 of server.py change ins = GetParametersIns(config={}) to ins = GetParametersIns(config=self.init_params_config)
2. Use the config from on_fit_config_fn
Replace line 281 of server.py with:
config = self.strategy.on_fit_config_fn(-1) # server round is -1
ins = GetParametersIns(config=config)
Is there something else you want to add?
This seems like a really easy feature to implement that provides a lot of immediate value. It also just seems natural. Whats the point of GetParameterIns if it is only used in Server._get_initial_parameters() where an empty dict is passed to it?
The text was updated successfully, but these errors were encountered:
Describe the type of feature and its functionality.
Currently, when the Server class initialises the global model parameters by randomly sampling a client, it provides an empty config. In my particular case, the client requires information from the server in order to initialise the model and hence the model parameters.
The proposed feature is to allow information to be passed from the server to the client during initialisation of global model parameters
Describe step by step what files and adjustments are you planning to include.
I see two ways of implementing this.
1. Create an optional argument to the Server class in server.py.
Either a dictionary (eg. init_params_config) or a function similar to on_fit_config_fn (eg. on_init_config_fn). Although a function might be overkill if we don't have any variables to pass to it. Use this argument to get a config for parameter initialization and on line 281 of server.py change
ins = GetParametersIns(config={})
toins = GetParametersIns(config=self.init_params_config)
2. Use the config from on_fit_config_fn
Replace line 281 of server.py with:
Is there something else you want to add?
This seems like a really easy feature to implement that provides a lot of immediate value. It also just seems natural. Whats the point of GetParameterIns if it is only used in Server._get_initial_parameters() where an empty dict is passed to it?
The text was updated successfully, but these errors were encountered: