diff --git a/neurodamus/cell_distributor.py b/neurodamus/cell_distributor.py index 69e8a341..073419df 100644 --- a/neurodamus/cell_distributor.py +++ b/neurodamus/cell_distributor.py @@ -673,7 +673,14 @@ class LoadBalance: _cx_filename_tpl = "cx_%s#.dat" # use # to well delimiter the target name _cpu_assign_filename_tpl = "cx_%s#.%s.dat" # prefix must be same (imposed by Neuron) - def __init__(self, balance_mode, nodes_path, target_manager, output_path, target_cpu_count=None): + def __init__( + self, + balance_mode, + nodes_path, + target_manager, + output_path, + target_cpu_count=None, + ): """ Creates a new Load Balance object, associated with a given node file """ @@ -982,7 +989,11 @@ def load_balance_info(self, target_spec): def _loadbal_dir(cls, nodefile, output_path) -> Path: """Returns the dir where load balance files are stored for a given nodes file""" nodefile_hash = hashlib.md5(nodefile.encode()).digest().hex()[:10] - return Path(output_path) / (cls._base_output_dir) / (cls._circuit_lb_dir_tpl % nodefile_hash) + return ( + Path(output_path) + / (cls._base_output_dir) + / (cls._circuit_lb_dir_tpl % nodefile_hash) + ) def _cx_filename(self, target_str, basename_str=False) -> Path: """Gets the filename of a cell complexity file for a given target""" diff --git a/neurodamus/node.py b/neurodamus/node.py index 763ef6db..b5cd0f4b 100644 --- a/neurodamus/node.py +++ b/neurodamus/node.py @@ -379,7 +379,13 @@ def compute_load_balance(self): # Compat Note: data_src in BlueConfig mode was the nrnPath. Not anymore. prosp_hosts = self._run_conf.get("ProspectiveHosts") data_src = circuit.CircuitPath if is_sonata_config else self._run_conf["nrnPath"] - load_balancer = LoadBalance(lb_mode, data_src, self._target_manager, self._run_conf["OutputRoot"], prosp_hosts) + load_balancer = LoadBalance( + lb_mode, + data_src, + self._target_manager, + self._run_conf["OutputRoot"], + prosp_hosts + ) if load_balancer.valid_load_distribution(target_spec): logging.info("Load Balancing done.")