Fix series conversion in hdf5 encoding
All threads resolved!
All threads resolved!
Compare changes
Files
2+ 2
− 2
@@ -239,8 +239,8 @@ class Bilby_MCMC(MCMCSampler):
Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 22 April 2025 starting at approximately 9am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk. This maintenance will be upgrading the GitLab database in order to be ready for the migration.
Currently, the pandas Series
conversion creates a dictionary of key-value pairs where the keys are integers corresponding to the rows of the series. AFAIK, we do not ever intend to use Series to store data where the row ordering matters. But, there are cases where the extraction from the DataFrame
yields a Series
rather than an array (for example, the log-likelihood evaluations).
The issue is that, as noted in !1143 (closed), this then trips up the path conversion, which tries to add a string and integer together. In this MR, the Series is converted to an array, losing the row information but enabling the hdf5 file to save.
My understanding is that without the MR, bilby_mcmc
is unable to save complete hdf5 files so we should get this (or an alternative) merged.