Bilby_pipe sometimes failing to recognize comments in .ini files
When running a job with bilby_pipe, it failed to correctly interpret the prior-dict being passed to it. After some investigation with @colm.talbot , it was determined that this was due to commented lines above the prior-dict line.
Steps to reproduce:
Attached are two inis: the one named comment fail did not work correctly, producing an error
Unrecognized arguments ["--chirp-mass=bilby.gw.prior.UniformInComponentsChirpMass(name='chirp_mass', minimum=25, maximum=35), mass_ratio = bilby.gw.prior.UniformInComponentsMassRatio(name='mass_ratio', minimum=0.125, maximum=1), mass_1 = Constraint(name='mass_1', minimum=30, maximum=50), mass_2 = Constraint(name='mass_2', minimum=20, maximum=40), a_1 = Uniform(name='a_1', minimum=0, maximum=0.88), a_2 = Uniform(name='a_2', minimum=0, maximum=0.88), tilt_1 = Sine(name='tilt_1'), tilt_2 = Sine(name='tilt_2'), phi_12 = Uniform(name='phi_12', minimum=0, maximum=2 * np.pi, boundary='periodic'), phi_jl = Uniform(name='phi_jl', minimum=0, maximum=2 * np.pi, boundary='periodic'), luminosity_distance = bilby.gw.prior.UniformSourceFrame(name='luminosity_distance', minimum=1e2, maximum=5e3, unit='Mpc'), dec = Cosine(name='dec'), ra = Uniform(name='ra', minimum=0, maximum=2 * np.pi, boundary='periodic'), theta_jn = Sine(name='theta_jn'), psi = Uniform(name='psi', minimum=0, maximum=np.pi, boundary='periodic'), phase = Uniform(name='phase', minimum=0, maximum=2 * np.pi, boundary='periodic'), }"]
While the latter worked as intended. Note that in the failure case, removing the linebreak after prior-dict - producing prior-dict=(chirp_mass...
while leaving the rest unchanged - instead produced the failure mode of submitting the job with the default prior dict as the prior dict in use.
Applying bilby_pipe to these files should allow reproduction of the behavior.
Environment: Cluster environment (CIT); copy of igwn-py37 conda environment, see attached envinfo.txt for details envinfo.txt