Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor SVI tutorial code from MD code blocks into code cells #2714

Open
ab-10 opened this issue Dec 15, 2020 · 4 comments
Open

Refactor SVI tutorial code from MD code blocks into code cells #2714

ab-10 opened this issue Dec 15, 2020 · 4 comments
Labels
Examples good first issue help wanted Issues suitable for, and inviting external contributions

Comments

@ab-10
Copy link

ab-10 commented Dec 15, 2020

As it stands, a significant portion of the SVI tutorial code is written in markdown code blocks, rather than standalone Jupyter cells. When formatted this way, the tutorial's notebook cannot be excecuted and experimented with by the reader. I suggest that the markdown code blocks should be refactored into Jupyter code cells.

@eb8680 eb8680 added Examples good first issue help wanted Issues suitable for, and inviting external contributions labels Dec 17, 2020
@Padarn
Copy link

Padarn commented Dec 24, 2020

Hey I'd be happy to do this.. but I noticed a lot of the code in markdown is actually pseudocode. For example:

def model():
    pyro.sample("z_1", ...)

Would you think it best to make this code runnable too?

While we're on the above example, I think it would be best to add return statements to models and guides in the tutorial: The fact they are sometimes missing is a bit confusing for a newcomer.

@ab-10
Copy link
Author

ab-10 commented Dec 24, 2020

Hey @Padarn, good point. I think converting pseudocode to python throughout the notebook would increase clarity.

@Padarn
Copy link

Padarn commented Dec 24, 2020 via email

@Padarn
Copy link

Padarn commented Dec 25, 2020

I've created a PR here: #2723

Few uncertainties around the best way to do this. The tutorial isn't really setup to be interactive, so I made a few modifications.

Let me know what you think, I can continue with the others if we're broadly aligned. If you think the tutorials need more of a rework than this, I could be the wrong person :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Examples good first issue help wanted Issues suitable for, and inviting external contributions
Projects
None yet
Development

No branches or pull requests

3 participants