My goal is the server selects the number of runners from a list list1=[7, 9, 5, 0, 8] instead of integer value (5) to send to those runners only (7, 9, 5, 0, 8).
This is my Code which is works:
This is my Code which is works:
for runner in random.sample(runners, k=self.sample_size): r_model = runner.optimise(self.intercept_, self.coef_, self.runner_hyperparams)
hyperparams = {
'n_runners': 10,
'sample_size': 5,
'rounds': 1,
'combine': 'weighted', # or 'mean'
'partition_params': {
'scheme': 'uniform'
},
'runner_hyperparams': {
'epochs': 10,
'lr': 0.15,
'batch_size': 0
}
}but when i trying to send to a list1, hyperparams = {
'n_runners': 10,
'sample_size':list1,
'rounds': 1,
'combine': 'weighted', # or 'mean'
'partition_params': {
'scheme': 'uniform' # stratified, non-iidness, noise injection etc.
},
'runner_hyperparams': {
'epochs': 10,
'lr': 0.15,
'batch_size': 0
}
}I am getting an IndexError, and not sure why? Error:TypeError: '<=' not supported between instances of 'int' and 'list'
