issue with acceptance_fraction sampler property when using sample(...,store=False)
[re emcee version 3.0.3.dev40+g408f422]
I use sample(..., store=False). Most of the important information (to me) is stored and recoverable from the State which EnsembleSampler.sample yields (ensemble.py, line 362). Unfortunately, "accepted" which is computed in ensemble.py line 347 is lost (not recorded, not recoverable), except via the Backend but only if one uses sample(..., store=True).
This is not an issue per se since many EnsembleSampler properties don't make sense when using the sampler via sample(..., store=False) anyways. However, since I want to do my own storing (store=False), in order to track the acceptance_fraction, I have written a (bad, minimal) work-around for myself for now by modifying ensemble.py line 347 to "yield state, accepted".
But I am wondering if maybe you agree this is perhaps a property that should be recoverable after (a) step(s)? If so, it would maybe make sense to add "accepted" as a State property? Or maybe there's a more emcee-minded way to make this info available when running sample(..., store=False)?
Or maybe you don't think that's appropriate at all, in which case please feel completely free to ignore this (non)issue and close it. I just thought I would raise it as a possible issue and see what you think.
@cbeauc: Sorry about the slow response. I totally agree that it would make sense for accepted to be available on State. I think the reason for the current design is historical: State was once a namedtuple and the accept property wasn't known when instantiated. I'd be totally in favor of adding an accepted property to the current State object. Thanks!