Skip to content

Test tutorials on travis#678

Merged
neerajprad merged 5 commits intodevfrom
test-tutorials
Jan 20, 2018
Merged

Test tutorials on travis#678
neerajprad merged 5 commits intodevfrom
test-tutorials

Conversation

@fritzo
Copy link
Copy Markdown
Member

@fritzo fritzo commented Jan 13, 2018

This adds support for testing some of our tutorials on travis.

Why?

We're changing Pyro and we want to avoid bit rot of tutorials.

How?

This uses a kludgey mechanism of defining a boolean smoke_test = 'CI' in os.environ in each tutorial. This is a little ugly, so we might something cleaner before Pyro 0.2 release, e.g. replacing all strings of the form num_iters = [0-9]* with the string num_iters = 1.

@fritzo
Copy link
Copy Markdown
Member Author

fritzo commented Jan 13, 2018

@neerajprad looks like build is failing due to wheel issues

@neerajprad
Copy link
Copy Markdown
Member

@fritzo - I had updated the wheel files for Multinomial, but forgot to overrride the permissions to public. Restarted the tests, it should work now.

Comment thread tutorial/source/gmm.ipynb
"from pyro.distributions import categorical, normal\n",
"softmax = Softmax(dim=-1)"
"softmax = Softmax(dim=-1)\n",
"smoke_test = ('CI' in os.environ)"
Copy link
Copy Markdown
Member

@neerajprad neerajprad Jan 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were the other changes (results and plots) in this file due to just running the nbval command?

@neerajprad
Copy link
Copy Markdown
Member

I think this is a great solution for now! Thanks for fixing this. Could we add the smoke_test flag to bayesian_regression.ipynb, as it should be able to run as is? It seems like we may need to add some dependencies in a before_install step to run the tutorials (or add to our test dependencies if these are not too big).

@null-a
Copy link
Copy Markdown
Collaborator

null-a commented Jan 15, 2018

This seems reasonable to me. Once #680 is merged the AIR tutorial should be working again and could be added to these smoke tests. I could do this as a follow-up PR if you like.

@fritzo
Copy link
Copy Markdown
Member Author

fritzo commented Jan 20, 2018

@neerajprad sorry it took me so long to fix this PR. We'll need this before The Big Refactoring next week.

@neerajprad neerajprad merged commit f479310 into dev Jan 20, 2018
@fritzo fritzo deleted the test-tutorials branch February 3, 2018 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants