Currently, this is not even implemented, but if you were to run parallel inference by distributing perform_bayesian_inference over multiple EIS datasets (as opposed to multiple circuits, single dataset), multiprocessing breaks. The real reason is still unclear to me, but it seems to be that when doing:
result = pool.map(func, *args)
func shouldn't return a list, which seems odd, so it might just be some quirk in the way mpire works. Anyway, if perform_bayesian_inference returns a single output (i.e., tuple of MCMC and exit code), it fixes the issue. This is a reasonable fix, since for single circuit inputs, a list of tuple of size 1 doesn't make much sense, although admittedly the output type is no longer stable (either a list of a tuple!)
Currently, this is not even implemented, but if you were to run parallel inference by distributing
perform_bayesian_inference
over multiple EIS datasets (as opposed to multiple circuits, single dataset), multiprocessing breaks. The real reason is still unclear to me, but it seems to be that when doing:func
shouldn't return a list, which seems odd, so it might just be some quirk in the waympire
works. Anyway, ifperform_bayesian_inference
returns a single output (i.e., tuple of MCMC and exit code), it fixes the issue. This is a reasonable fix, since for single circuit inputs, a list of tuple of size 1 doesn't make much sense, although admittedly the output type is no longer stable (either a list of a tuple!)