coding sprint plan 2020
- Dominant language
- C++
- Stars
- 607
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
Description
I'm just starting out on a two-month (with some interruptions) coding sprint on greta. There are a bunch of bugfixes, half-finished (and some half-baked) features, and some required refactoring that I have been putting off because 2019 was a pretty busy year. I'm hoping to make some headway on some of these major issues and features I've been promising for a while.
I'll keep chipping away at things on this list, which I will modify as I go. The list is just here for me to keep track of things to do, and for others to follow along and comment if there are features they are particularly interested in. The order here is neither in order of priority nor the order in which I intend to work on things. I'll release new versions as I go, but I'm not sure yet which features and fixes each release will contain.
During this work, I'll also be trying to keep on top of other issues that come up and the forum, which I've been neglecting over the Christmas break. Now's a good time to ask questions [over there](https://forum.greta-stats.org/) :)
## 1. Bugfixes & misc
This is a subset of the open issues that I'm particularly keen to fix, and have a plan for. This doesn't mean the other open issues aren't important as well, and I'll try to get to some of those too.
- [ ] 1.1 Fix thinning (to do after 2.3) #318
- [ ] 1.2 Speed up subsetting #309
- [x] 1.3 Array-scalar dispatch #298
- [ ] 1.4 Automated decentreing of distributions (requires delayed graph definition or extended representations interface, also applies to greta.gp for Gaussian GPs) #47
- [x] 1.5 Fix/exclude linting issues
- [x] 1.6 Enable memory-safe (batched) prediction in `calculate()` #236
- [x] 1.7 Make the output of `mcmc()` have its own class, inheriting from coda's mcmc class, and provide methods for post-hoc windowing, thinning etc.
- [x] 1.8 Fix silently erroring primitive functions #317
## 2. Compatibility
A number of things have changed in the interfaces to TF and TFP (particularly in moving to TF 2.0). greta currently still works with the compatibility functions, but some refactoring is needed to fully support these.
- [x] 2.1 Refactor distributions code to be closer to TFP (also enables greta.hmm to use the TFP hmm functionality)
- [ ] 2.2 Refactor internals to use TF functions, not graphs, for full compatibility with TF 2.0
- [ ] 2.3 Use TFP sampler adaptation (with progress bar updating)
## 3. Marginalisation
There's an incomplete branch `feature/marginalise` that implements an interface for marginalisation of discrete random variables in a greta model. There's some work towards marginalisation of *a priori* multivariate normal variables via the Laplace approximation too. This all needs polishing up, thorough testing, documenting and releasing.
- [ ] 3.1 Implement marginalisation interface #157
- [ ] 3.2 Check discrete marginalisation
- [ ] 3.3 Check and fix Laplace marginalisation
- [ ] 3.4 Plan general-purpose variational marginalisation
- [ ] 3.5 Write documentation that exaplains what this feature is, since it will be unfamiliar to most users of MCMC software.
## 4. Sampling discrete variables
This has been on the to-do list for a long time. It will require a bit of refactoring and redesigning internals, but there's nothing about sampling of discrete random variables that should bee particularly tricky to implemnent.
- [ ] 4.1 Implement discrete variables
- [ ] 4.2 Implement discrete-only samplers
- [ ] 4.3 Implement Gibbs sampling between discrete and continuous parameter spaces.
## 5. Simulation
Random independent sampling from a model object, optionally conditionally on fixed values or posterior samples, is a much-requested feature that needs a surprising amount of engineering in the background, and careful thinking about an intuitive interface. There's some existing work that just needs implementing, polishing up, testing and documenting, along with some examples of postreior predictive checks etc.
- [x] 5.1 Implement simulation interface via calculate(), following the discussion and proposed interface [here](https://forum.greta-stats.org/t/feedback-requested-proposed-simulate-interface/154/22?u=nick) (#342)
## 6. Continuous integration & TF versions
greta versions are now being tied to specific releases of TF and TFP. I was trying for a while not to do this, because I believe it's best practice not to be overly prescriptive about dependencies. However both TF and TFP are evolving fast and regularly introduce breaking changes. It would be good to catch these changes early with CI testing on the nightly releases of those dependencies.
- [ ] 6.1 Set up a continuous integration grid that reflects the specific dependencies of all currently available and recent releases of greta
- [ ] 6.2 Add a table (greta version vs. required TF and TF versions) of badges to the readme with the test results for these versions
- [ ] 6.3 Add an entry for the dev version of greta agains both stable and nightly versions of TF and TFP
Contributor guide
Assessment
This issue has not been assessed yet.