{"action":"created","issue":{"url":"https://api.github.com/repos/pymc-devs/pymc3/issues/3214","repository_url":"https://api.github.com/repos/pymc-devs/pymc3","labels_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/3214/labels{/name}","comments_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/3214/comments","events_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/3214/events","html_url":"https://github.com/pymc-devs/pymc3/pull/3214","id":363863010,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MTkyNTAy","number":3214,"title":"Make draw_values draw from the joint distribution","user":{"login":"lucianopaz","id":5230109,"node_id":"MDQ6VXNlcjUyMzAxMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/5230109?v=4","gravatar_id":"","url":"https://api.github.com/users/lucianopaz","html_url":"https://github.com/lucianopaz","followers_url":"https://api.github.com/users/lucianopaz/followers","following_url":"https://api.github.com/users/lucianopaz/following{/other_user}","gists_url":"https://api.github.com/users/lucianopaz/gists{/gist_id}","starred_url":"https://api.github.com/users/lucianopaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucianopaz/subscriptions","organizations_url":"https://api.github.com/users/lucianopaz/orgs","repos_url":"https://api.github.com/users/lucianopaz/repos","events_url":"https://api.github.com/users/lucianopaz/events{/privacy}","received_events_url":"https://api.github.com/users/lucianopaz/received_events","type":"User","site_admin":false},"labels":[{"id":818212053,"node_id":"MDU6TGFiZWw4MTgyMTIwNTM=","url":"https://api.github.com/repos/pymc-devs/pymc3/labels/request_review/discussion","name":"request_review/discussion","color":"dbef5b","default":false}],"state":"open","locked":false,"assignee":{"login":"fonnesbeck","id":81476,"node_id":"MDQ6VXNlcjgxNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/81476?v=4","gravatar_id":"","url":"https://api.github.com/users/fonnesbeck","html_url":"https://github.com/fonnesbeck","followers_url":"https://api.github.com/users/fonnesbeck/followers","following_url":"https://api.github.com/users/fonnesbeck/following{/other_user}","gists_url":"https://api.github.com/users/fonnesbeck/gists{/gist_id}","starred_url":"https://api.github.com/users/fonnesbeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fonnesbeck/subscriptions","organizations_url":"https://api.github.com/users/fonnesbeck/orgs","repos_url":"https://api.github.com/users/fonnesbeck/repos","events_url":"https://api.github.com/users/fonnesbeck/events{/privacy}","received_events_url":"https://api.github.com/users/fonnesbeck/received_events","type":"User","site_admin":false},"assignees":[{"login":"fonnesbeck","id":81476,"node_id":"MDQ6VXNlcjgxNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/81476?v=4","gravatar_id":"","url":"https://api.github.com/users/fonnesbeck","html_url":"https://github.com/fonnesbeck","followers_url":"https://api.github.com/users/fonnesbeck/followers","following_url":"https://api.github.com/users/fonnesbeck/following{/other_user}","gists_url":"https://api.github.com/users/fonnesbeck/gists{/gist_id}","starred_url":"https://api.github.com/users/fonnesbeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fonnesbeck/subscriptions","organizations_url":"https://api.github.com/users/fonnesbeck/orgs","repos_url":"https://api.github.com/users/fonnesbeck/repos","events_url":"https://api.github.com/users/fonnesbeck/events{/privacy}","received_events_url":"https://api.github.com/users/fonnesbeck/received_events","type":"User","site_admin":false},{"login":"ColCarroll","id":2295568,"node_id":"MDQ6VXNlcjIyOTU1Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/2295568?v=4","gravatar_id":"","url":"https://api.github.com/users/ColCarroll","html_url":"https://github.com/ColCarroll","followers_url":"https://api.github.com/users/ColCarroll/followers","following_url":"https://api.github.com/users/ColCarroll/following{/other_user}","gists_url":"https://api.github.com/users/ColCarroll/gists{/gist_id}","starred_url":"https://api.github.com/users/ColCarroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColCarroll/subscriptions","organizations_url":"https://api.github.com/users/ColCarroll/orgs","repos_url":"https://api.github.com/users/ColCarroll/repos","events_url":"https://api.github.com/users/ColCarroll/events{/privacy}","received_events_url":"https://api.github.com/users/ColCarroll/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2018-09-26T05:25:12Z","updated_at":"2018-10-22T10:41:18Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pymc-devs/pymc3/pulls/3214","html_url":"https://github.com/pymc-devs/pymc3/pull/3214","diff_url":"https://github.com/pymc-devs/pymc3/pull/3214.diff","patch_url":"https://github.com/pymc-devs/pymc3/pull/3214.patch"},"body":"This is a fix I worked on for #3210. The idea is what I discussed in that issue's thread.\r\n\r\nSorry that the commit history is a mess. I had mistakenly thought I had fetched the remote upstream, and did my changes on a really old commit, and had a bit of trouble with the merge process.\r\n\r\nWith the proposed mechanics for building the variable dependency DAG `draw_values` is now able to draw from the joint probability distribution.\r\n\r\nWith the issue's example code, the expected joint distribution is:\r\n\r\n![expected_output](https://user-images.githubusercontent.com/5230109/46058901-29128900-c15d-11e8-94f9-5dd5ef8297b4.png)\r\n\r\nand now the result from draw_values is:\r\n\r\n![draw_values_output](https://user-images.githubusercontent.com/5230109/46058902-29128900-c15d-11e8-87bf-ae887fc79837.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pymc-devs/pymc3/issues/comments/431799467","html_url":"https://github.com/pymc-devs/pymc3/pull/3214#issuecomment-431799467","issue_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/3214","id":431799467,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTc5OTQ2Nw==","user":{"login":"lucianopaz","id":5230109,"node_id":"MDQ6VXNlcjUyMzAxMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/5230109?v=4","gravatar_id":"","url":"https://api.github.com/users/lucianopaz","html_url":"https://github.com/lucianopaz","followers_url":"https://api.github.com/users/lucianopaz/followers","following_url":"https://api.github.com/users/lucianopaz/following{/other_user}","gists_url":"https://api.github.com/users/lucianopaz/gists{/gist_id}","starred_url":"https://api.github.com/users/lucianopaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucianopaz/subscriptions","organizations_url":"https://api.github.com/users/lucianopaz/orgs","repos_url":"https://api.github.com/users/lucianopaz/repos","events_url":"https://api.github.com/users/lucianopaz/events{/privacy}","received_events_url":"https://api.github.com/users/lucianopaz/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T10:41:18Z","updated_at":"2018-10-22T10:41:18Z","author_association":"CONTRIBUTOR","body":"@twiecki, @aseyboldt, I don't think that we can require `draw_values` to be called from inside a model's context. In the current implementation of `draw_values`, between lines 237 and 241 I try to get the model from the context and, if that fails, I create an empty `DiGraph`. To force the model to be present, we would just have to remove the try statement. By just doing that, and running the tests on my machine, I get 760 failed, 1547 passed, 14 skipped, 286 warnings. All of the failures happen on tests that call `draw_values` from outside a model's context. Furthermore, we cannot be sure how other users may be handling `draw_values`, and to remain backwards compatible, the modified function should also be callable from outside model contexts.\r\n\r\nIn the end, I think that we cannot simplify the implementation by using information stored in the model, and we are also forced to compute the entire dag to sample correctly from hierarchical models."}}
{"actor":{"display_login":"lucianopaz"}}