add docstrings to random variables #394

Merged
merged 2 commits into from Jan 12, 2017

Projects

None yet

2 participants

@jkerfs
Contributor
jkerfs commented Jan 9, 2017

Resolution for Issue #390.

Reuse the docstrings from the classes in tensorflow.contrib.distributions as docstrings for the RandomVariable classes in Edward. Now calling help() on a RandomVariable class will show information about the distribution and the required parameters.

@jkerfs jkerfs add docstrings to random variables
cbbf8c1
@dustinvtran
Member
dustinvtran commented Jan 11, 2017 edited

nice implementation! i hadn't thought of using type() here. could you add a unit test for one distribution, say, Bernoulli or Normal? for example, you can just check if the string Bernoulli.__doc__ is non-empty.

@jkerfs jkerfs unit tests for randomvariable docstrings
417d1d4
@dustinvtran
Member

thanks!

@dustinvtran dustinvtran merged commit 9f53d0c into blei-lab:master Jan 12, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.008%) to 81.82%
Details
@dustinvtran dustinvtran referenced this pull request Jan 12, 2017
Closed

Docstring for Models #390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment