-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CoreNeuron Rebalancer #206
base: main
Are you sure you want to change the base?
Conversation
d146b16
to
75edaaf
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d5a992e
to
9d04d8a
Compare
9d04d8a
to
00246c4
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
05a3012
to
8bf789f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Logfiles from GitLab pipeline #237055 (:white_check_mark:) have been uploaded here! Status and direct links: |
|
||
# Numpy may be required (histogram) | ||
numpy = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it makes sense to have some constants (for example):
PROGRESS_UPDATE_FREQUENCY = 50
DEFAULT_OUTPUT_FILE = "rebalanced-files.dat"
FILL_VALUE = "-1\n"
Or the names you think makes more sense
print(f" [{bin_start/(1024*1024):5.0f} - {bin_end/(1024*1024):5.0f}]: {count:0d}") | ||
bin_start = bin_end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a tool to be used in the future and not only a script that will be discarded soon maybe makes sense to have a class?
something like
class RebalancerConfig:
...
class CoreNeuronRebalancer:
def __init__(self, config: RebalancerConfig):
self.config = config
self.logger = self._setup_logger()
self.buckets = []
...
def main():
# Parse arguments and create config
args = parse_args()
config = RebalancerConfig.from_args(args)
# Create and run rebalancer
rebalancer = CoreNeuronRebalancer(config)
rebalancer.rebalance()
Context
CoreNeuron runs, in particular those using multi-cycle, may end up distributing cells unoptimally.
We want to mitigate that by introducing a post processing step which distributes the CoreNeuron input files evenly across ranks, based on their size.
Scope
Added
rebalance-corenrn-data.py
toneurodamus/tools
.CLI:
Testing
Using
/gpfs/bbp.cscs.ch/data/scratch/proj134/home/king/BBPP134-917/o_MultiCycle_Support/output/2557873/coreneuron_input/files.dat
for testingExample
Review