aesara icon indicating copy to clipboard operation
aesara copied to clipboard

Update Scan Gibbs sampling example

Open LegrandNico opened this issue 3 years ago • 8 comments

This PR tries to fix #890.

The example is now working with the last version of Aesara.

LegrandNico avatar Sep 16 '22 09:09 LegrandNico

Thank you for contributing. I tried to make it run on my machine (with matrix and vectors instead of shared variables), and the comments are left are the took things that prevented it from running.

rlouf avatar Sep 16 '22 13:09 rlouf

N.B. We really should find a way to run black on our code snippets in the documentation.

And run the examples in the CI! For instance this one is not going to compile because of the use of shared variables (which are not necessary).

rlouf avatar Sep 16 '22 16:09 rlouf

Just some formatting changes to match the rest of the library.

N.B. We really should find a way to run black on our code snippets in the documentation.

Have you tried using blacken-docs?

LegrandNico avatar Sep 16 '22 18:09 LegrandNico

N.B. We really should find a way to run black on our code snippets in the documentation.

And run the examples in the CI! For instance this one is not going to compile because of the use of shared variables (which are not necessary).

Why shouldn't it compile and/or run?

brandonwillard avatar Sep 16 '22 18:09 brandonwillard

Unless I missed something the values of the shared variables were not specified.

rlouf avatar Sep 16 '22 21:09 rlouf

Unless I missed something the values of the shared variables were not specified.

They're defined, I believe, just not in the same code block.

brandonwillard avatar Sep 16 '22 21:09 brandonwillard

Unless I missed something the values of the shared variables were not specified. They're defined, I believe, just not in the same code block.

I think this is making the example a bit confusing as the creation of the input variables is hidden from the user, and then the code is commented to mention you should presume the variables already exist. It would probably be easier for the understanding to have everything in the same block.

LegrandNico avatar Sep 17 '22 09:09 LegrandNico

It would probably be easier for the understanding to have everything in the same block.

Indeed I always like to copy/paste examples from the documentation when I start playing with a library. I'm sure I'm not the only one.

rlouf avatar Sep 17 '22 10:09 rlouf