ICB-DCM / pyABC

distributed, likelihood-free inference
https://pyabc.rtfd.io
BSD 3-Clause "New" or "Revised" License
205 stars 44 forks source link

`meta_info` in `pyabc.ABCSMC.new()` is not actually saved to the db #603

Closed lm1909 closed 1 year ago

lm1909 commented 1 year ago

Bug description pyabc.ABCSMC.new() provides the argument meta_info which is documented as:

        meta_info: dict, optional
            Can contain an arbitrary number of keys, only for recording
            purposes. Store arbitrary
            meta information in this dictionary. Can be used for really
            anything.
            This dictionary is stored in the database.

However this data is not actually stored in the database, as ABCSMC is initialised with it for the argument json_parameter, which however is not used in ABCSMC. In effect, this metadata is used anywhere.

Expected behavior The information is stored in the database. There is a method which allows to retrieve this dictionary.

To reproduce Not applicable.

Environment pyABC version: 0.12.9 Python version: 3.10.8 OS: SUSE Linux Enterprise Server 15 SP4, v15.4

yannikschaelte commented 1 year ago

Hi @lm1909 , in fact the meta_info is stored, in field json_parameters. You can retrieve it (or rather its string representation) via

abc = history.get_abc()
abc.json_parameters

Does this help?

lm1909 commented 1 year ago

Ah indeed - apologies for missing this!