bd-j / prospector

Python code for Stellar Population Inference from Spectra and SEDs
http://prospect.readthedocs.io
MIT License
153 stars 71 forks source link

write_h5_header: object header message is too large #291

Closed wangbingjie closed 11 months ago

wangbingjie commented 1 year ago

When using the Prospector-beta priors & the Fast* priors, the following error can occur:

OSError: Unable to synchronously create attribute (object header message is too large)

This is caused by the following line in prospect.io.write_results.write_h5_header

'model_params': [functions_to_names(p.copy()) for p in model.config_list],

I think this is because the my Prospector-beta priors and the Fast* priors are a bit hacked together -- they do not follow formats of the scipy counterparts for example?

As a temporary fix, I just commented out the above line so that model_params is not written to the HDF5 file. I am just flagging this up here... not sure if we should have a more elegant solution.

bd-j commented 1 year ago

I think this used to be wrapped in a try/except, so maybe we could do that again for generating the key before adding it to the dictionary, falling back to None in the except clause.