Skip to content

Commit

Permalink
Fix component weighting with floats
Browse files Browse the repository at this point in the history
  • Loading branch information
calebbraun committed Feb 18, 2019
1 parent 7d87ae2 commit 22b5a51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cassandra/mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def distribute_assignments_supervisor(args):
except ValueError as e:
raise RuntimeError("Config file must have a '[Global]' section") from e

section_weights = [config[s].get('mp.weight', 1.0) for s in section_names]
section_weights = [float(config[s].get('mp.weight', 1.0)) for s in section_names]
logging.debug(f'section_weights: {section_weights}')
name_weight = zip(section_names, section_weights)
section_names = [s[0] for s in sorted(name_weight, key=lambda x:x[1], reverse=True)]

Expand Down

0 comments on commit 22b5a51

Please sign in to comment.