{"action":"created","comment":{"url":"https://api.github.com/repos/improbable-research/keanu/pulls/comments/219873981","pull_request_review_id":158152090,"id":219873981,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTg3Mzk4MQ==","diff_hunk":"@@ -0,0 +1,231 @@\n+package io.improbable.keanu.vertices.dbl.nonprobabilistic.operators.multiple;\n+\n+import io.improbable.keanu.algorithms.NetworkSamples;\n+import io.improbable.keanu.algorithms.mcmc.MetropolisHastings;\n+import io.improbable.keanu.algorithms.variational.optimizer.nongradient.NonGradientOptimizer;\n+import io.improbable.keanu.network.BayesianNetwork;\n+import io.improbable.keanu.tensor.Tensor;\n+import io.improbable.keanu.tensor.bool.BooleanTensor;\n+import io.improbable.keanu.tensor.dbl.DoubleTensor;\n+import io.improbable.keanu.tensor.intgr.IntegerTensor;\n+import io.improbable.keanu.vertices.Vertex;\n+import io.improbable.keanu.vertices.VertexLabel;\n+import io.improbable.keanu.vertices.bool.BoolVertex;\n+import io.improbable.keanu.vertices.dbl.DoubleVertex;\n+import io.improbable.keanu.vertices.dbl.KeanuRandom;\n+import io.improbable.keanu.vertices.dbl.nonprobabilistic.ConstantDoubleVertex;\n+import io.improbable.keanu.vertices.dbl.probabilistic.GaussianVertex;\n+import io.improbable.keanu.vertices.intgr.IntegerVertex;\n+import io.improbable.keanu.vertices.model.LambdaModelVertex;\n+import io.improbable.keanu.vertices.model.ModelVertex;\n+import org.apache.commons.io.FileUtils;\n+import org.junit.Assert;\n+import org.junit.Before;\n+import org.junit.Test;\n+\n+import java.io.File;\n+import java.io.IOException;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+public class LambdaModelVertexTest {\n+\n+    /*\n+    The model we are mimicking here lives inside a Java function, modelExecution.\n+\n+    It takes one input, Temperature, and produces two outputs of type double, Chance of Rain & Humidity. These outputs\n+    are written to file.\n+\n+    It also produces one integer output and one boolean output. Suggested Factor of Suncream and 'is it sunny'. These\n+    are also written to file.\n+     */\n+\n+    private KeanuRandom random;\n+    private DoubleVertex inputToModel = new ConstantDoubleVertex(50.);","path":"keanu-project/src/test/java/io/improbable/keanu/vertices/dbl/nonprobabilistic/operators/multiple/LambdaModelVertexTest.java","position":44,"original_position":44,"commit_id":"4d636debc52958c138fccfbc769ef77be545385f","original_commit_id":"4d636debc52958c138fccfbc769ef77be545385f","user":{"login":"GeorgeNash","id":5854544,"node_id":"MDQ6VXNlcjU4NTQ1NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5854544?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgeNash","html_url":"https://github.com/GeorgeNash","followers_url":"https://api.github.com/users/GeorgeNash/followers","following_url":"https://api.github.com/users/GeorgeNash/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeNash/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeNash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeNash/subscriptions","organizations_url":"https://api.github.com/users/GeorgeNash/orgs","repos_url":"https://api.github.com/users/GeorgeNash/repos","events_url":"https://api.github.com/users/GeorgeNash/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeNash/received_events","type":"User","site_admin":false},"body":"Nice! Updated this","created_at":"2018-09-24T15:10:47Z","updated_at":"2018-09-24T15:10:47Z","html_url":"https://github.com/improbable-research/keanu/pull/241#discussion_r219873981","pull_request_url":"https://api.github.com/repos/improbable-research/keanu/pulls/241","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/comments/219873981"},"html":{"href":"https://github.com/improbable-research/keanu/pull/241#discussion_r219873981"},"pull_request":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/241"}},"in_reply_to_id":219850213},"pull_request":{"url":"https://api.github.com/repos/improbable-research/keanu/pulls/241","id":215556957,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NTU2OTU3","html_url":"https://github.com/improbable-research/keanu/pull/241","diff_url":"https://github.com/improbable-research/keanu/pull/241.diff","patch_url":"https://github.com/improbable-research/keanu/pull/241.patch","issue_url":"https://api.github.com/repos/improbable-research/keanu/issues/241","number":241,"state":"open","locked":false,"title":"Feature/black box","user":{"login":"GeorgeNash","id":5854544,"node_id":"MDQ6VXNlcjU4NTQ1NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5854544?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgeNash","html_url":"https://github.com/GeorgeNash","followers_url":"https://api.github.com/users/GeorgeNash/followers","following_url":"https://api.github.com/users/GeorgeNash/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeNash/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeNash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeNash/subscriptions","organizations_url":"https://api.github.com/users/GeorgeNash/orgs","repos_url":"https://api.github.com/users/GeorgeNash/repos","events_url":"https://api.github.com/users/GeorgeNash/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeNash/received_events","type":"User","site_admin":false},"body":"- The concept of a black box inside a vertex\r\n- There are currently two implementations\r\n-- A very sweeping / generic lambda implementation that lets the user execute anything. Java code, calls to a web server etc.\r\n-- A more specific process vertex that's geared towards executing something on the command line\r\n\r\nI thought we'd get these two in and then we could begin adding more specific http models etc\r\n\r\nThings I'm not happy with right now:\r\n- What value should be on these Model vertex's? Right now they have a hidden map that `ModelResultVertex`'s know to extract values from. The value on the model vertex itself should never be looked at, so for now I've just put it as zero. This feels horrendous.\r\n- Having to call separate methods on the `ModelVertex` for different types of value ","created_at":"2018-09-14T10:55:53Z","updated_at":"2018-09-24T15:10:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad48e38684d18ea8304d3a2aabd2d3bdb50f117b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/improbable-research/keanu/pulls/241/commits","review_comments_url":"https://api.github.com/repos/improbable-research/keanu/pulls/241/comments","review_comment_url":"https://api.github.com/repos/improbable-research/keanu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/improbable-research/keanu/issues/241/comments","statuses_url":"https://api.github.com/repos/improbable-research/keanu/statuses/4d636debc52958c138fccfbc769ef77be545385f","head":{"label":"improbable-research:feature/blackBox","ref":"feature/blackBox","sha":"4d636debc52958c138fccfbc769ef77be545385f","user":{"login":"improbable-research","id":37903994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTAzOTk0","avatar_url":"https://avatars1.githubusercontent.com/u/37903994?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-research","html_url":"https://github.com/improbable-research","followers_url":"https://api.github.com/users/improbable-research/followers","following_url":"https://api.github.com/users/improbable-research/following{/other_user}","gists_url":"https://api.github.com/users/improbable-research/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-research/subscriptions","organizations_url":"https://api.github.com/users/improbable-research/orgs","repos_url":"https://api.github.com/users/improbable-research/repos","events_url":"https://api.github.com/users/improbable-research/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-research/received_events","type":"Organization","site_admin":false},"repo":{"id":128393918,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgzOTM5MTg=","name":"keanu","full_name":"improbable-research/keanu","private":false,"owner":{"login":"improbable-research","id":37903994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTAzOTk0","avatar_url":"https://avatars1.githubusercontent.com/u/37903994?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-research","html_url":"https://github.com/improbable-research","followers_url":"https://api.github.com/users/improbable-research/followers","following_url":"https://api.github.com/users/improbable-research/following{/other_user}","gists_url":"https://api.github.com/users/improbable-research/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-research/subscriptions","organizations_url":"https://api.github.com/users/improbable-research/orgs","repos_url":"https://api.github.com/users/improbable-research/repos","events_url":"https://api.github.com/users/improbable-research/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-research/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/improbable-research/keanu","description":"A probabilistic approach from an Improbabilistic company","fork":false,"url":"https://api.github.com/repos/improbable-research/keanu","forks_url":"https://api.github.com/repos/improbable-research/keanu/forks","keys_url":"https://api.github.com/repos/improbable-research/keanu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/improbable-research/keanu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/improbable-research/keanu/teams","hooks_url":"https://api.github.com/repos/improbable-research/keanu/hooks","issue_events_url":"https://api.github.com/repos/improbable-research/keanu/issues/events{/number}","events_url":"https://api.github.com/repos/improbable-research/keanu/events","assignees_url":"https://api.github.com/repos/improbable-research/keanu/assignees{/user}","branches_url":"https://api.github.com/repos/improbable-research/keanu/branches{/branch}","tags_url":"https://api.github.com/repos/improbable-research/keanu/tags","blobs_url":"https://api.github.com/repos/improbable-research/keanu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/improbable-research/keanu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/improbable-research/keanu/git/refs{/sha}","trees_url":"https://api.github.com/repos/improbable-research/keanu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/improbable-research/keanu/statuses/{sha}","languages_url":"https://api.github.com/repos/improbable-research/keanu/languages","stargazers_url":"https://api.github.com/repos/improbable-research/keanu/stargazers","contributors_url":"https://api.github.com/repos/improbable-research/keanu/contributors","subscribers_url":"https://api.github.com/repos/improbable-research/keanu/subscribers","subscription_url":"https://api.github.com/repos/improbable-research/keanu/subscription","commits_url":"https://api.github.com/repos/improbable-research/keanu/commits{/sha}","git_commits_url":"https://api.github.com/repos/improbable-research/keanu/git/commits{/sha}","comments_url":"https://api.github.com/repos/improbable-research/keanu/comments{/number}","issue_comment_url":"https://api.github.com/repos/improbable-research/keanu/issues/comments{/number}","contents_url":"https://api.github.com/repos/improbable-research/keanu/contents/{+path}","compare_url":"https://api.github.com/repos/improbable-research/keanu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/improbable-research/keanu/merges","archive_url":"https://api.github.com/repos/improbable-research/keanu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/improbable-research/keanu/downloads","issues_url":"https://api.github.com/repos/improbable-research/keanu/issues{/number}","pulls_url":"https://api.github.com/repos/improbable-research/keanu/pulls{/number}","milestones_url":"https://api.github.com/repos/improbable-research/keanu/milestones{/number}","notifications_url":"https://api.github.com/repos/improbable-research/keanu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/improbable-research/keanu/labels{/name}","releases_url":"https://api.github.com/repos/improbable-research/keanu/releases{/id}","deployments_url":"https://api.github.com/repos/improbable-research/keanu/deployments","created_at":"2018-04-06T12:48:36Z","updated_at":"2018-09-23T07:07:47Z","pushed_at":"2018-09-24T15:07:16Z","git_url":"git://github.com/improbable-research/keanu.git","ssh_url":"git@github.com:improbable-research/keanu.git","clone_url":"https://github.com/improbable-research/keanu.git","svn_url":"https://github.com/improbable-research/keanu","homepage":"","size":5491,"stargazers_count":89,"watchers_count":89,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":20,"open_issues":18,"watchers":89,"default_branch":"develop"}},"base":{"label":"improbable-research:develop","ref":"develop","sha":"dce11786fb95c8cae52bf02709a1d47b69bb84c3","user":{"login":"improbable-research","id":37903994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTAzOTk0","avatar_url":"https://avatars1.githubusercontent.com/u/37903994?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-research","html_url":"https://github.com/improbable-research","followers_url":"https://api.github.com/users/improbable-research/followers","following_url":"https://api.github.com/users/improbable-research/following{/other_user}","gists_url":"https://api.github.com/users/improbable-research/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-research/subscriptions","organizations_url":"https://api.github.com/users/improbable-research/orgs","repos_url":"https://api.github.com/users/improbable-research/repos","events_url":"https://api.github.com/users/improbable-research/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-research/received_events","type":"Organization","site_admin":false},"repo":{"id":128393918,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgzOTM5MTg=","name":"keanu","full_name":"improbable-research/keanu","private":false,"owner":{"login":"improbable-research","id":37903994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTAzOTk0","avatar_url":"https://avatars1.githubusercontent.com/u/37903994?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-research","html_url":"https://github.com/improbable-research","followers_url":"https://api.github.com/users/improbable-research/followers","following_url":"https://api.github.com/users/improbable-research/following{/other_user}","gists_url":"https://api.github.com/users/improbable-research/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-research/subscriptions","organizations_url":"https://api.github.com/users/improbable-research/orgs","repos_url":"https://api.github.com/users/improbable-research/repos","events_url":"https://api.github.com/users/improbable-research/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-research/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/improbable-research/keanu","description":"A probabilistic approach from an Improbabilistic company","fork":false,"url":"https://api.github.com/repos/improbable-research/keanu","forks_url":"https://api.github.com/repos/improbable-research/keanu/forks","keys_url":"https://api.github.com/repos/improbable-research/keanu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/improbable-research/keanu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/improbable-research/keanu/teams","hooks_url":"https://api.github.com/repos/improbable-research/keanu/hooks","issue_events_url":"https://api.github.com/repos/improbable-research/keanu/issues/events{/number}","events_url":"https://api.github.com/repos/improbable-research/keanu/events","assignees_url":"https://api.github.com/repos/improbable-research/keanu/assignees{/user}","branches_url":"https://api.github.com/repos/improbable-research/keanu/branches{/branch}","tags_url":"https://api.github.com/repos/improbable-research/keanu/tags","blobs_url":"https://api.github.com/repos/improbable-research/keanu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/improbable-research/keanu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/improbable-research/keanu/git/refs{/sha}","trees_url":"https://api.github.com/repos/improbable-research/keanu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/improbable-research/keanu/statuses/{sha}","languages_url":"https://api.github.com/repos/improbable-research/keanu/languages","stargazers_url":"https://api.github.com/repos/improbable-research/keanu/stargazers","contributors_url":"https://api.github.com/repos/improbable-research/keanu/contributors","subscribers_url":"https://api.github.com/repos/improbable-research/keanu/subscribers","subscription_url":"https://api.github.com/repos/improbable-research/keanu/subscription","commits_url":"https://api.github.com/repos/improbable-research/keanu/commits{/sha}","git_commits_url":"https://api.github.com/repos/improbable-research/keanu/git/commits{/sha}","comments_url":"https://api.github.com/repos/improbable-research/keanu/comments{/number}","issue_comment_url":"https://api.github.com/repos/improbable-research/keanu/issues/comments{/number}","contents_url":"https://api.github.com/repos/improbable-research/keanu/contents/{+path}","compare_url":"https://api.github.com/repos/improbable-research/keanu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/improbable-research/keanu/merges","archive_url":"https://api.github.com/repos/improbable-research/keanu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/improbable-research/keanu/downloads","issues_url":"https://api.github.com/repos/improbable-research/keanu/issues{/number}","pulls_url":"https://api.github.com/repos/improbable-research/keanu/pulls{/number}","milestones_url":"https://api.github.com/repos/improbable-research/keanu/milestones{/number}","notifications_url":"https://api.github.com/repos/improbable-research/keanu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/improbable-research/keanu/labels{/name}","releases_url":"https://api.github.com/repos/improbable-research/keanu/releases{/id}","deployments_url":"https://api.github.com/repos/improbable-research/keanu/deployments","created_at":"2018-04-06T12:48:36Z","updated_at":"2018-09-23T07:07:47Z","pushed_at":"2018-09-24T15:07:16Z","git_url":"git://github.com/improbable-research/keanu.git","ssh_url":"git@github.com:improbable-research/keanu.git","clone_url":"https://github.com/improbable-research/keanu.git","svn_url":"https://github.com/improbable-research/keanu","homepage":"","size":5491,"stargazers_count":89,"watchers_count":89,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":20,"open_issues":18,"watchers":89,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/241"},"html":{"href":"https://github.com/improbable-research/keanu/pull/241"},"issue":{"href":"https://api.github.com/repos/improbable-research/keanu/issues/241"},"comments":{"href":"https://api.github.com/repos/improbable-research/keanu/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/improbable-research/keanu/statuses/4d636debc52958c138fccfbc769ef77be545385f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"GeorgeNash"}}