bodkan / demografr

Fast and simple simulation-based population genetic inference in R
https://bodkan.net/demografr
Other
26 stars 1 forks source link

Missing Functions - expand_priors, get_prior_names #3

Closed GKresearch closed 9 months ago

GKresearch commented 9 months ago

Hi @bodkan,

I have been working through demografr this week and found that there were two functions called that didn't exist in the package. The functions were expand_priors() and get_prior_names(). get_prior_names seemed to be a simple name extraction function, so I made one of my own, but I'm not sure what expand_priors is used for. This was the only information I found about it in the code from the validate_abc function: # first expand any generic "..." prior sampling expressions (if needed). Is this just used for non-uniform priors? Could you explain in a bit more detail what expanding the prior in this context means?

Thanks, GK

bodkan commented 9 months ago

Hello @GKresearch,

First of all -- thanks for your interest in demografr. It makes me happy to see people discovering and expressing interest in using it.

Unfortunately I don't have great news for you: demografr is still very unstable and experimental. What's currently out there on GitHub really isn't suitable for public testing just yet. I do develop demografr out in the open (as I do with all of my software projects), but that shouldn't be a a sign that it's been "released", that's simply because I believe it's the best way to develop software. As a result, before there's a real release here (and eventually on CRAN), I can't accept bug reports because the software's internals are constantly changing and are in perpetual state of semi-brokenness (again, that's not because there are bugs, but because things keep changing).

I admit that the disclaimer on the main page hasn't been explicit enough. I will now update it to make it clear that:

  1. demografr is really in constant flux and things are expected to being broken on a weekly basis (i.e., if a function is broken or has been renamed, it's not really a "bug" that should be reported at this stage).
  2. Before it's released on CRAN and has a paper on bioRxiv (I'm about 60% of the way there), it probably shouldn't be used for research at all.
  3. Before 2. above happens, it doesn't really make much sense to report software issues -- this would mean that users would only likely waste their time reporting things that are no longer relevant (like you did here, as I explain below).

Sorry if you got the impression that demografr is more ready than it is.


To reveal a bit more into why this is the case (and the issue you've ran into) -- fairly recently I've decided to pivot demografr from being specifically an ABC inference package into a toolkit for simulation-based inference in general (ABC, standard optim() optimization, global optimization using genetic algorithms, plus providing individual components for designing new inference techniques).

In order to do this, I've been ripping out internal (non-exported) functions for parameter procession, prior "template expansion", etc., to make them work in a general cases. I.e., there are no priors in genetic algorithms, but there are parameter boundaries. So I had to generalize the functions (that you report are missing) to do all this. I'm about halfway through this transition in that it works for the non-ABC optimization, but ABC optimization is still broken because I've been focusing on a different part of what will eventually be the whole of demografr's functionality. In other words, I rewired the internal plumbing for processing parameter specification but that plumbing hasn't been reconnected to all of the appropriate places. That code is still on my computer being tested, it's not on GitHub. The functions that appear to be missing are still there, but have been either renamed, split, or redesigned.


Sorry for the frustration this has probably caused for you. If you want to get an update when demografr is a bit more ready, click on either the "Follow" button somewhere up there, which should notify you as soon as a more reasonably stable version appears here.

bodkan commented 9 months ago

Because this is not really a software bug (and because reporting software bugs isn't worth users' time before the software is more ready), I have to close this. The software is in a different state now and the "missing" functions are not actually an issue in its current version. Thanks for understanding!

bodkan commented 7 months ago

@GKresearch: I forgot to let you know that I've now re-connected the internal bits of demografr and that the original vignettes should be working again.

As I said, I can't guarantee that things won't break again, or functions won't be renamed slightly -- before demografr lands on CRAN a minor chaos could happen here or there, and until then I can't accept bugreports.

But, in case you wanted to play around with whatever is there now, feel free to do so.

GKresearch commented 7 months ago

Hi @bodkan,

That sounds awesome! Thanks for letting me know!