summarypipe --rundir for pbilby: dealing with multiple result files and inis
Hi @charlie.hoy !459 (merged) looked super useful to me at first glance, particularly since you report @virginia.demilio had tested it on parallel_bilby
runs as well. However, when I do that on one of my runs, it runs into two "multiple file" issues:
-
Multiple result files found
and then it decides to use (going alphabetically, I guess) the first single-seed0_result.json
instead of themerged_result.json
which would be the natural choice. I think it should be hardcoded to, if encountering multiple files, try for a file ending in that str first, and else fail and ask the user to specify one, similar to the config situation. -
ValueError: Multiple configuration files found
as you also reported in yourbilby_pipe
example on the MR; so I could pass the right one manually as you suggest, however I think this is actually the generic situation withparallel_bilby
and should get a hardcoded workaround: the way we set upparallel_bilby
runs, we usually have a hand-edited config file, then callparallel_bilby_generation
on it, and that produces an additionaltag_config_complete.ini
file. So every rundir will have those two files. If that situation is encountered, I'd suggest to default to the one that does not end oncomplete.ini
, because that one omits the prior file information and is hence less useful for reproducibility of the run from the pesummary page. (parallel_bilby devs may comment on this, though - cc @gregory.ashton @rory-smith)
I'm not really ever using non-parallel bilby, so if any of what I suggest would lead to a problem for those runs and hence can't be implemented as global defaults, an extra switch to tell it it's looking at a parallel rundir would be a more convenient solution than having to hand-specify --pattern
and/or --config
to work around those two issues.