{"action":"created","comment":{"url":"https://api.github.com/repos/uber/pyro/pulls/comments/183833148","pull_request_review_id":114907757,"id":183833148,"diff_hunk":"@@ -58,6 +64,10 @@ def _traces(self, *args, **kwargs):\n         \"\"\"\n         raise NotImplementedError(\"inference algorithm must implement _traces\")\n \n+    def __call__(self, *args, **kwargs):\n+        random_idx = self._categorical.sample()\n+        return self.exec_traces[random_idx].copy()","path":"pyro/infer/abstract_infer.py","position":47,"original_position":47,"commit_id":"c987362161eeafb69b02916134c1cdc9e2406ecc","original_commit_id":"c987362161eeafb69b02916134c1cdc9e2406ecc","user":{"login":"eb8680","id":2032320,"avatar_url":"https://avatars0.githubusercontent.com/u/2032320?v=4","gravatar_id":"","url":"https://api.github.com/users/eb8680","html_url":"https://github.com/eb8680","followers_url":"https://api.github.com/users/eb8680/followers","following_url":"https://api.github.com/users/eb8680/following{/other_user}","gists_url":"https://api.github.com/users/eb8680/gists{/gist_id}","starred_url":"https://api.github.com/users/eb8680/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eb8680/subscriptions","organizations_url":"https://api.github.com/users/eb8680/orgs","repos_url":"https://api.github.com/users/eb8680/repos","events_url":"https://api.github.com/users/eb8680/events{/privacy}","received_events_url":"https://api.github.com/users/eb8680/received_events","type":"User","site_admin":false},"body":"It should be fine to prune observe sites here rather than in `TracePredictive`","created_at":"2018-04-24T18:20:11Z","updated_at":"2018-04-24T18:26:33Z","html_url":"https://github.com/uber/pyro/pull/1079#discussion_r183833148","pull_request_url":"https://api.github.com/repos/uber/pyro/pulls/1079","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/uber/pyro/pulls/comments/183833148"},"html":{"href":"https://github.com/uber/pyro/pull/1079#discussion_r183833148"},"pull_request":{"href":"https://api.github.com/repos/uber/pyro/pulls/1079"}}},"pull_request":{"url":"https://api.github.com/repos/uber/pyro/pulls/1079","id":183616683,"html_url":"https://github.com/uber/pyro/pull/1079","diff_url":"https://github.com/uber/pyro/pull/1079.diff","patch_url":"https://github.com/uber/pyro/pull/1079.patch","issue_url":"https://api.github.com/repos/uber/pyro/issues/1079","number":1079,"state":"open","locked":false,"title":"Add posterior predictive class to AbstractInfer","user":{"login":"neerajprad","id":1762463,"avatar_url":"https://avatars3.githubusercontent.com/u/1762463?v=4","gravatar_id":"","url":"https://api.github.com/users/neerajprad","html_url":"https://github.com/neerajprad","followers_url":"https://api.github.com/users/neerajprad/followers","following_url":"https://api.github.com/users/neerajprad/following{/other_user}","gists_url":"https://api.github.com/users/neerajprad/gists{/gist_id}","starred_url":"https://api.github.com/users/neerajprad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neerajprad/subscriptions","organizations_url":"https://api.github.com/users/neerajprad/orgs","repos_url":"https://api.github.com/users/neerajprad/repos","events_url":"https://api.github.com/users/neerajprad/events{/privacy}","received_events_url":"https://api.github.com/users/neerajprad/received_events","type":"User","site_admin":false},"body":"Adds a posterior predictive class that allows us to generate posterior predictive samples given model execution traces and new/old data. These can be wrapped inside marginal to provide an empirical distribution over samples from the posterior predictive distribution.\r\n","created_at":"2018-04-24T04:16:07Z","updated_at":"2018-04-24T18:26:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"257b3136a1d0f0aad484505b2eb95204cac591fe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":704871691,"url":"https://api.github.com/repos/uber/pyro/labels/awaiting%20review","name":"awaiting review","color":"fbca04","default":false}],"milestone":{"url":"https://api.github.com/repos/uber/pyro/milestones/3","html_url":"https://github.com/uber/pyro/milestone/3","labels_url":"https://api.github.com/repos/uber/pyro/milestones/3/labels","id":2920331,"number":3,"title":"0.2.0 release","description":"Pyro 0.2.0 will make major breaking changes:\r\n- PyTorch distributions\r\n- multiple batch dimensions","creator":{"login":"ngoodman","id":461193,"avatar_url":"https://avatars1.githubusercontent.com/u/461193?v=4","gravatar_id":"","url":"https://api.github.com/users/ngoodman","html_url":"https://github.com/ngoodman","followers_url":"https://api.github.com/users/ngoodman/followers","following_url":"https://api.github.com/users/ngoodman/following{/other_user}","gists_url":"https://api.github.com/users/ngoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoodman/subscriptions","organizations_url":"https://api.github.com/users/ngoodman/orgs","repos_url":"https://api.github.com/users/ngoodman/repos","events_url":"https://api.github.com/users/ngoodman/events{/privacy}","received_events_url":"https://api.github.com/users/ngoodman/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":52,"state":"open","created_at":"2017-11-17T17:45:46Z","updated_at":"2018-04-24T18:15:43Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/uber/pyro/pulls/1079/commits","review_comments_url":"https://api.github.com/repos/uber/pyro/pulls/1079/comments","review_comment_url":"https://api.github.com/repos/uber/pyro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/pyro/issues/1079/comments","statuses_url":"https://api.github.com/repos/uber/pyro/statuses/c987362161eeafb69b02916134c1cdc9e2406ecc","head":{"label":"neerajprad:posterior-pred","ref":"posterior-pred","sha":"c987362161eeafb69b02916134c1cdc9e2406ecc","user":{"login":"neerajprad","id":1762463,"avatar_url":"https://avatars3.githubusercontent.com/u/1762463?v=4","gravatar_id":"","url":"https://api.github.com/users/neerajprad","html_url":"https://github.com/neerajprad","followers_url":"https://api.github.com/users/neerajprad/followers","following_url":"https://api.github.com/users/neerajprad/following{/other_user}","gists_url":"https://api.github.com/users/neerajprad/gists{/gist_id}","starred_url":"https://api.github.com/users/neerajprad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neerajprad/subscriptions","organizations_url":"https://api.github.com/users/neerajprad/orgs","repos_url":"https://api.github.com/users/neerajprad/repos","events_url":"https://api.github.com/users/neerajprad/events{/privacy}","received_events_url":"https://api.github.com/users/neerajprad/received_events","type":"User","site_admin":false},"repo":{"id":109438492,"name":"pyro","full_name":"neerajprad/pyro","owner":{"login":"neerajprad","id":1762463,"avatar_url":"https://avatars3.githubusercontent.com/u/1762463?v=4","gravatar_id":"","url":"https://api.github.com/users/neerajprad","html_url":"https://github.com/neerajprad","followers_url":"https://api.github.com/users/neerajprad/followers","following_url":"https://api.github.com/users/neerajprad/following{/other_user}","gists_url":"https://api.github.com/users/neerajprad/gists{/gist_id}","starred_url":"https://api.github.com/users/neerajprad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neerajprad/subscriptions","organizations_url":"https://api.github.com/users/neerajprad/orgs","repos_url":"https://api.github.com/users/neerajprad/repos","events_url":"https://api.github.com/users/neerajprad/events{/privacy}","received_events_url":"https://api.github.com/users/neerajprad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neerajprad/pyro","description":"Deep universal probabilistic programming with Python and PyTorch","fork":true,"url":"https://api.github.com/repos/neerajprad/pyro","forks_url":"https://api.github.com/repos/neerajprad/pyro/forks","keys_url":"https://api.github.com/repos/neerajprad/pyro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neerajprad/pyro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neerajprad/pyro/teams","hooks_url":"https://api.github.com/repos/neerajprad/pyro/hooks","issue_events_url":"https://api.github.com/repos/neerajprad/pyro/issues/events{/number}","events_url":"https://api.github.com/repos/neerajprad/pyro/events","assignees_url":"https://api.github.com/repos/neerajprad/pyro/assignees{/user}","branches_url":"https://api.github.com/repos/neerajprad/pyro/branches{/branch}","tags_url":"https://api.github.com/repos/neerajprad/pyro/tags","blobs_url":"https://api.github.com/repos/neerajprad/pyro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neerajprad/pyro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neerajprad/pyro/git/refs{/sha}","trees_url":"https://api.github.com/repos/neerajprad/pyro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neerajprad/pyro/statuses/{sha}","languages_url":"https://api.github.com/repos/neerajprad/pyro/languages","stargazers_url":"https://api.github.com/repos/neerajprad/pyro/stargazers","contributors_url":"https://api.github.com/repos/neerajprad/pyro/contributors","subscribers_url":"https://api.github.com/repos/neerajprad/pyro/subscribers","subscription_url":"https://api.github.com/repos/neerajprad/pyro/subscription","commits_url":"https://api.github.com/repos/neerajprad/pyro/commits{/sha}","git_commits_url":"https://api.github.com/repos/neerajprad/pyro/git/commits{/sha}","comments_url":"https://api.github.com/repos/neerajprad/pyro/comments{/number}","issue_comment_url":"https://api.github.com/repos/neerajprad/pyro/issues/comments{/number}","contents_url":"https://api.github.com/repos/neerajprad/pyro/contents/{+path}","compare_url":"https://api.github.com/repos/neerajprad/pyro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neerajprad/pyro/merges","archive_url":"https://api.github.com/repos/neerajprad/pyro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neerajprad/pyro/downloads","issues_url":"https://api.github.com/repos/neerajprad/pyro/issues{/number}","pulls_url":"https://api.github.com/repos/neerajprad/pyro/pulls{/number}","milestones_url":"https://api.github.com/repos/neerajprad/pyro/milestones{/number}","notifications_url":"https://api.github.com/repos/neerajprad/pyro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neerajprad/pyro/labels{/name}","releases_url":"https://api.github.com/repos/neerajprad/pyro/releases{/id}","deployments_url":"https://api.github.com/repos/neerajprad/pyro/deployments","created_at":"2017-11-03T20:11:21Z","updated_at":"2018-03-20T18:47:29Z","pushed_at":"2018-04-24T18:15:08Z","git_url":"git://github.com/neerajprad/pyro.git","ssh_url":"git@github.com:neerajprad/pyro.git","clone_url":"https://github.com/neerajprad/pyro.git","svn_url":"https://github.com/neerajprad/pyro","homepage":"http://pyro.ai","size":33140,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"uber:dev","ref":"dev","sha":"05e83add8a12b6ebc4bd4ef5846ffd6eb1a326d8","user":{"login":"uber","id":538264,"avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":94506832,"name":"pyro","full_name":"uber/pyro","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/pyro","description":"Deep universal probabilistic programming with Python and PyTorch","fork":false,"url":"https://api.github.com/repos/uber/pyro","forks_url":"https://api.github.com/repos/uber/pyro/forks","keys_url":"https://api.github.com/repos/uber/pyro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/pyro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/pyro/teams","hooks_url":"https://api.github.com/repos/uber/pyro/hooks","issue_events_url":"https://api.github.com/repos/uber/pyro/issues/events{/number}","events_url":"https://api.github.com/repos/uber/pyro/events","assignees_url":"https://api.github.com/repos/uber/pyro/assignees{/user}","branches_url":"https://api.github.com/repos/uber/pyro/branches{/branch}","tags_url":"https://api.github.com/repos/uber/pyro/tags","blobs_url":"https://api.github.com/repos/uber/pyro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/pyro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/pyro/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/pyro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/pyro/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/pyro/languages","stargazers_url":"https://api.github.com/repos/uber/pyro/stargazers","contributors_url":"https://api.github.com/repos/uber/pyro/contributors","subscribers_url":"https://api.github.com/repos/uber/pyro/subscribers","subscription_url":"https://api.github.com/repos/uber/pyro/subscription","commits_url":"https://api.github.com/repos/uber/pyro/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/pyro/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/pyro/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/pyro/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/pyro/contents/{+path}","compare_url":"https://api.github.com/repos/uber/pyro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/pyro/merges","archive_url":"https://api.github.com/repos/uber/pyro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/pyro/downloads","issues_url":"https://api.github.com/repos/uber/pyro/issues{/number}","pulls_url":"https://api.github.com/repos/uber/pyro/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/pyro/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/pyro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/pyro/labels{/name}","releases_url":"https://api.github.com/repos/uber/pyro/releases{/id}","deployments_url":"https://api.github.com/repos/uber/pyro/deployments","created_at":"2017-06-16T05:03:47Z","updated_at":"2018-04-24T18:15:45Z","pushed_at":"2018-04-24T18:15:43Z","git_url":"git://github.com/uber/pyro.git","ssh_url":"git@github.com:uber/pyro.git","clone_url":"https://github.com/uber/pyro.git","svn_url":"https://github.com/uber/pyro","homepage":"http://pyro.ai","size":57098,"stargazers_count":3290,"watchers_count":3290,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":334,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":334,"open_issues":47,"watchers":3290,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/pyro/pulls/1079"},"html":{"href":"https://github.com/uber/pyro/pull/1079"},"issue":{"href":"https://api.github.com/repos/uber/pyro/issues/1079"},"comments":{"href":"https://api.github.com/repos/uber/pyro/issues/1079/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/pyro/pulls/1079/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/pyro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/pyro/pulls/1079/commits"},"statuses":{"href":"https://api.github.com/repos/uber/pyro/statuses/c987362161eeafb69b02916134c1cdc9e2406ecc"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"eb8680"}}