TuringLang / docs

Documentation and tutorials for the Turing language
https://turinglang.org/docs/tutorials/docs-00-getting-started/
MIT License
225 stars 97 forks source link

Converting all docs and tutorials to Quarto #441

Closed shravanngoswamii closed 1 month ago

yebai commented 1 month ago

@shravanngoswamii It might be better to split this into several smaller PRs so we can review it. I suggest that we first convert jmd to qmd without changing any other files (e.g. do not change building scripts, or reorganise folder structure). This allows us to see the edits in the docs and tutorial texts. Then, we can have another PR update the building workflow, etc.

shravanngoswamii commented 1 month ago

Ok, so you want to just replace jmd files with qmd without touching any other files!

One thing I would like to mention that each file will be renamed to index.qmd!

yebai commented 1 month ago

One thing I would like to mention that each file will be renamed to index.qmd!

If you add a commit to rename all files and then add all the changes, Git will correctly track them.

shravanngoswamii commented 1 month ago

For now, they all will execute without any error because I put "eval=false" on the code blocks where I was getting errors and these are only a few documents from only tutorials section!

shravanngoswamii commented 1 month ago

Warnings in Using Turing section:

    • [x] I do not know if this progress log is meant to be visible or not - Preview and Code Block

Warnings in the Tutorials section:

Errors in Tutorials section:

    • [x] 08-multinomial-logistic-regression: These Code Blocks are not executing successfully: Code Blocks
      • Reason: in the current .jmd version, there is a parameter - fig_ext=".png" passed along with code block but there no feature like this in Quarto as far as I know!
      • MCMCChains related error.
    • [x] 10-bayesian-differential-equations: I do not know if this is an issue or not because here after this Code Block, its like never-ending execution, I waited for more than an hour but the execution is not ending after this code block, for now, I put an eval: false on all code blocks after this!
      • lots of warning in the SDE part -- planed to separate the SDE part into a separate tutorial.
yebai commented 1 month ago

08-multinomial-logistic-regression: These Code Blocks are not executing successfully: Code Blocks Reason: in the current .jmd version, there is a parameter - fig_ext=".png" passed along with code block but there no feature like this in Quarto as far as I know!

Can you find an alternative way to visualise the result?

shravanngoswamii commented 1 month ago

Can you find an alternative way to visualise the result?

Ok, I will search for it!

yebai commented 1 month ago

10-bayesian-differential-equations: I do not know if this is an issue or not because here after this Code Block, its like never-ending execution, I waited for more than an hour but the execution is not ending after this code block, for now, I put an eval: false on all code blocks after this!

@devmotion, is this a known issue?

shravanngoswamii commented 1 month ago

10-bayesian-differential-equations: I do not know if this is an issue or not because here after this Code Block, its like never-ending execution, I waited for more than an hour but the execution is not ending after this code block, for now, I put an eval: false on all code blocks after this!

@devmotion, is this a known issue?

I checked again, there is no error in that notebook because it did run fine in github actions, and in my laptop its like never ending!

it still have many warnings!

yebai commented 1 month ago

@shravanngoswamii the following warning message in bayesian-neural-networks, probabilistic-pca and gaussian-processes notebooks are due to the same reason: the function for setting autodiff backends is deprecated in favour of adtype=[AutoForwardDiff() | AutoReverseDiff()].

┌ Warning: `ADBACKEND` and `setbackend` are deprecated. Please specify the chunk size directly in the sampler constructor, e.g., `HMC(0.1, 5; adtype=AutoForwardDiff(; chunksize=0))`.
│  This function has no effects.
│   caller = ip:0x0
└ @ Core :-1
yebai commented 1 month ago

03-bayesian-neural-network: Almost all code blocks are giving warning - Preview and Code

@torfjelde @xukai92 can you take a look at the floating point precision warning in bayesian-neural-network tutorial, and see whether we can fix them?

shravanngoswamii commented 1 month ago

@yebai can you please have a look at

JasonPekos commented 1 month ago

@yebai can you please have a look at

Ok, for Bayesian differential equations, I think this may not be a super simple fix. Here is an unresolved issue with the same problem: https://github.com/TuringLang/Turing.jl/issues/1722 (actually this same broken tutorial is mentioned here). I think the first thing I'd try would be to swap out some of the truncated Normals to LogNormals, and maybe we won't get the same issues.

I don't actually know the logic behind the pretty tight truncation because I haven't done much SDEs — surely this isn't ideal? It's not surprising to me that there's weird gradient stuff happening here.

I will try fiddling around with the model to see if I can get something working 🧐 .