Fix cluster client process registration dict comprehension

- Correct the dict comprehension for registering processes with master
- Fix duplicate entries and incorrect model assignment
- Apply same fix to restart workers function
parent d3ac0046
......@@ -173,13 +173,11 @@ class ClusterClient:
'type': 'register_processes',
'processes': {
name: {
'weight': weight,
'model': model,
'weight': self.process_weights.get(name, 10),
'model': self.process_models.get(name, 'default'),
'status': 'active'
}
for name, weight in self.process_weights.items()
for model_name, model in self.process_models.items()
if name in self.process_models
for name in self.process_weights
}
})
......@@ -442,13 +440,11 @@ class ClusterClient:
'type': 'register_processes',
'processes': {
name: {
'weight': weight,
'model': model,
'weight': self.process_weights.get(name, 10),
'model': self.process_models.get(name, 'default'),
'status': 'active'
}
for name, weight in self.process_weights.items()
for model_name, model in self.process_models.items()
if name in self.process_models
for name in self.process_weights
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment