Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
After using the refactored documentation introduced in #526, I found it harder to navigate the Gen.jl docs than before, in part because reference material (e.g. explanations of the semantics of the GFI, MCMC kernels, and trace translators) was migrated to tutorials and how-tos.
I understand that some of these changes were made in order to follow the documentation system described here, but I actually think the strict separation between explanation and reference material recommended by that system is not the best fit for Gen. For key Gen features like the GFI and the Trace Translator system, as well as the numerous DSLs (e.g. the
@dist
DSL, or the compositional kernel DSL), reference material needs to explain the semantics of the language, and IMO that is best done through prose and examples.As such, I think the docs become less usable if we restrict the reference section to just describing function APIs, instead of also explaining the underlying concepts. Perhaps there is some version of the Gen documentation that would cleanly separate explanation from the API, but I think we're not ready to move to that yet without substantial rewriting of the material in the docs.
In any case, I should have reviewed the documentation changes in #526 more closely before releasing the most recent version of Gen --- apologies!
Changes in this PR
All that said, I think the Gen.jl docs were long due for an overhaul, and I'm glad #526 got that started! This PR reorganizes the documentation to address the issues described above, resulting in a documentation structure as follows:
This PR also contributes a number of additional changes:
accumulate_param_gradients!
forMap
andUnfold
, required for the above to work.Finally, this PR enables documentation previews for new pull requests, and a new GitHub action that cleans up the doc site previews once the PR is merged. This should make it much easier to review changes to the documentation going forward (without having to build locally).
The documentation preview for this PR should be available here once it is deployed: https://www.gen.dev/docs/previews/PR543