{"action":"created","comment":{"url":"https://api.github.com/repos/uber/pyro/pulls/comments/187124705","pull_request_review_id":118841780,"id":187124705,"diff_hunk":"@@ -266,6 +317,44 @@ def __call__(self, *args, **kwargs):\n \n         return result\n \n+    def _loc_scale(self, *args, **kwargs):\n+        \"\"\"\n+        :returns: a tuple ``(loc, scale)`` used by :meth:`median` and\n+            :meth:`quantiles`\n+        \"\"\"\n+        raise NotImplementedError\n+\n+    def median(self, *args, **kwargs):\n+        \"\"\"\n+        Returns the posterior median value of each latent variable.\n+\n+        :return: A dict mapping sample site name to median tensor.\n+        :rtype: dict\n+        \"\"\"\n+        loc, scale = self._loc_scale(*args, **kwargs)\n+        return {site[\"name\"]: biject_to(site[\"fn\"].support)(unconstrained_value)\n+                for site, unconstrained_value in self._unpack_latent(loc)}\n+\n+    def quantiles(self, quantiles, *args, **kwargs):","path":"pyro/contrib/autoguide/__init__.py","position":194,"original_position":194,"commit_id":"035885547b53b278bb77d009a4ae674f0ce60e73","original_commit_id":"035885547b53b278bb77d009a4ae674f0ce60e73","user":{"login":"fritzo","id":648532,"avatar_url":"https://avatars0.githubusercontent.com/u/648532?v=4","gravatar_id":"","url":"https://api.github.com/users/fritzo","html_url":"https://github.com/fritzo","followers_url":"https://api.github.com/users/fritzo/followers","following_url":"https://api.github.com/users/fritzo/following{/other_user}","gists_url":"https://api.github.com/users/fritzo/gists{/gist_id}","starred_url":"https://api.github.com/users/fritzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritzo/subscriptions","organizations_url":"https://api.github.com/users/fritzo/orgs","repos_url":"https://api.github.com/users/fritzo/repos","events_url":"https://api.github.com/users/fritzo/events{/privacy}","received_events_url":"https://api.github.com/users/fritzo/received_events","type":"User","site_admin":false},"body":"This code was moved from `AutoMultivariateNormal`","created_at":"2018-05-09T17:57:27Z","updated_at":"2018-05-09T17:57:27Z","html_url":"https://github.com/uber/pyro/pull/1134#discussion_r187124705","pull_request_url":"https://api.github.com/repos/uber/pyro/pulls/1134","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/uber/pyro/pulls/comments/187124705"},"html":{"href":"https://github.com/uber/pyro/pull/1134#discussion_r187124705"},"pull_request":{"href":"https://api.github.com/repos/uber/pyro/pulls/1134"}}},"pull_request":{"url":"https://api.github.com/repos/uber/pyro/pulls/1134","id":186994256,"html_url":"https://github.com/uber/pyro/pull/1134","diff_url":"https://github.com/uber/pyro/pull/1134.diff","patch_url":"https://github.com/uber/pyro/pull/1134.patch","issue_url":"https://api.github.com/repos/uber/pyro/issues/1134","number":1134,"state":"open","locked":false,"title":"Implement AutoDelta and AutoLowRankMultivariateNormal","user":{"login":"fritzo","id":648532,"avatar_url":"https://avatars0.githubusercontent.com/u/648532?v=4","gravatar_id":"","url":"https://api.github.com/users/fritzo","html_url":"https://github.com/fritzo","followers_url":"https://api.github.com/users/fritzo/followers","following_url":"https://api.github.com/users/fritzo/following{/other_user}","gists_url":"https://api.github.com/users/fritzo/gists{/gist_id}","starred_url":"https://api.github.com/users/fritzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritzo/subscriptions","organizations_url":"https://api.github.com/users/fritzo/orgs","repos_url":"https://api.github.com/users/fritzo/repos","events_url":"https://api.github.com/users/fritzo/events{/privacy}","received_events_url":"https://api.github.com/users/fritzo/received_events","type":"User","site_admin":false},"body":"Resolves #570 \r\n\r\nThis implements two new automatic guides.\r\n\r\n## `AutoDelta` for MAP inference\r\n\r\nThis is especially convenient for e.g. combining MAP estimation of global parameters with `Auto*Normal` estimation of local parameters.\r\n\r\n## `AutoLowRankMultivariateNormal`\r\n\r\n`AutoLowRankMultivariateNormal` has mid-range capacity, between `AutoDiagonalNormal` and `AutoMultivariateNormal`. As a design choice, I've initialized `D` and `W` similarly to the initialization of the `Coregionalize` kernel. This allows us to closely compare two types of models: Hierarchical generative models with ADVI guides -versus- GP models with Coregionalize kernels. I'm attempting to compare these two model classes on multiple-time-series forecasting.\r\n\r\n## Tested\r\n\r\n- added both classes to existing parametrized tests","created_at":"2018-05-09T17:52:33Z","updated_at":"2018-05-09T17:57:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8a57ab0612431afbc9e24741b6f091487bde5b7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jpchen","id":1869641,"avatar_url":"https://avatars2.githubusercontent.com/u/1869641?v=4","gravatar_id":"","url":"https://api.github.com/users/jpchen","html_url":"https://github.com/jpchen","followers_url":"https://api.github.com/users/jpchen/followers","following_url":"https://api.github.com/users/jpchen/following{/other_user}","gists_url":"https://api.github.com/users/jpchen/gists{/gist_id}","starred_url":"https://api.github.com/users/jpchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpchen/subscriptions","organizations_url":"https://api.github.com/users/jpchen/orgs","repos_url":"https://api.github.com/users/jpchen/repos","events_url":"https://api.github.com/users/jpchen/events{/privacy}","received_events_url":"https://api.github.com/users/jpchen/received_events","type":"User","site_admin":false},{"login":"fehiepsi","id":4736342,"avatar_url":"https://avatars1.githubusercontent.com/u/4736342?v=4","gravatar_id":"","url":"https://api.github.com/users/fehiepsi","html_url":"https://github.com/fehiepsi","followers_url":"https://api.github.com/users/fehiepsi/followers","following_url":"https://api.github.com/users/fehiepsi/following{/other_user}","gists_url":"https://api.github.com/users/fehiepsi/gists{/gist_id}","starred_url":"https://api.github.com/users/fehiepsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehiepsi/subscriptions","organizations_url":"https://api.github.com/users/fehiepsi/orgs","repos_url":"https://api.github.com/users/fehiepsi/repos","events_url":"https://api.github.com/users/fehiepsi/events{/privacy}","received_events_url":"https://api.github.com/users/fehiepsi/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":704871691,"url":"https://api.github.com/repos/uber/pyro/labels/awaiting%20review","name":"awaiting review","color":"fbca04","default":false},{"id":627803347,"url":"https://api.github.com/repos/uber/pyro/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/uber/pyro/pulls/1134/commits","review_comments_url":"https://api.github.com/repos/uber/pyro/pulls/1134/comments","review_comment_url":"https://api.github.com/repos/uber/pyro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/pyro/issues/1134/comments","statuses_url":"https://api.github.com/repos/uber/pyro/statuses/035885547b53b278bb77d009a4ae674f0ce60e73","head":{"label":"uber:auto-delta-and-lowrank","ref":"auto-delta-and-lowrank","sha":"035885547b53b278bb77d009a4ae674f0ce60e73","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-05-09T15:34:12Z","pushed_at":"2018-05-09T17:54:19Z","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":58021,"stargazers_count":3416,"watchers_count":3416,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":343,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":343,"open_issues":47,"watchers":3416,"default_branch":"dev"}},"base":{"label":"uber:dev","ref":"dev","sha":"413e2f253e1063df623f6c9698ac1b4dbe55f0f7","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-05-09T15:34:12Z","pushed_at":"2018-05-09T17:54:19Z","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":58021,"stargazers_count":3416,"watchers_count":3416,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":343,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":343,"open_issues":47,"watchers":3416,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/pyro/pulls/1134"},"html":{"href":"https://github.com/uber/pyro/pull/1134"},"issue":{"href":"https://api.github.com/repos/uber/pyro/issues/1134"},"comments":{"href":"https://api.github.com/repos/uber/pyro/issues/1134/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/pyro/pulls/1134/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/pyro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/pyro/pulls/1134/commits"},"statuses":{"href":"https://api.github.com/repos/uber/pyro/statuses/035885547b53b278bb77d009a4ae674f0ce60e73"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"fritzo"}}