{"action":"created","issue":{"url":"https://api.github.com/repos/apache/mahout/issues/185","repository_url":"https://api.github.com/repos/apache/mahout","labels_url":"https://api.github.com/repos/apache/mahout/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/apache/mahout/issues/185/comments","events_url":"https://api.github.com/repos/apache/mahout/issues/185/events","html_url":"https://github.com/apache/mahout/pull/185","id":139430233,"number":185,"title":"MAHOUT-1802: Capture attached checkpoints (if cached)","user":{"login":"andrewpalumbo","id":7681565,"avatar_url":"https://avatars.githubusercontent.com/u/7681565?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewpalumbo","html_url":"https://github.com/andrewpalumbo","followers_url":"https://api.github.com/users/andrewpalumbo/followers","following_url":"https://api.github.com/users/andrewpalumbo/following{/other_user}","gists_url":"https://api.github.com/users/andrewpalumbo/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpalumbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpalumbo/subscriptions","organizations_url":"https://api.github.com/users/andrewpalumbo/orgs","repos_url":"https://api.github.com/users/andrewpalumbo/repos","events_url":"https://api.github.com/users/andrewpalumbo/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpalumbo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-08T23:52:16Z","updated_at":"2016-03-08T23:58:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/mahout/pulls/185","html_url":"https://github.com/apache/mahout/pull/185","diff_url":"https://github.com/apache/mahout/pull/185.diff","patch_url":"https://github.com/apache/mahout/pull/185.patch"},"body":"Currently, the optimizer generates checkpoints and attaches them to actual logical elements of the DAG via CheckpointAction$cp. \r\n\r\nie:\r\n\r\n\r\n```\r\ndrmC = drmA+ drmB\r\n\r\nval cp1 = drmC.checkpoint() // checkpoint\r\nval cp2 = drmC.checkpoint() // cp2 == cp1\r\n\r\ndrmD = cp1 + drmE // cp1 + drmE\r\n```\r\n\r\nbut, in:\r\n`\r\ndrmD = drmC + drmE // computes drmA + drmB + drmC all over`\r\n\r\n`drmC` already has` cp1` attached to it so we should assume the common computational path is the intent here regardless and should be used, instead of building plans that recompute it. That is,\r\n\r\n`drmD = drmC + drmE` should imply `cp1 + drmE `as well even if checkpoint is not used explicitly.\r\n\r\n\r\nThis PR allows us to avoid excessive declarations like \r\n\r\n```\r\ndrmAcp = drmA.checkpoint\r\n\r\ndrmB = drmAcp %*%... \r\n```\r\n\r\nand instead just use \r\n\r\n```\r\ndrmA.checkpoint()\r\n\r\ndrmB = drmA %*% ....\r\n```"},"comment":{"url":"https://api.github.com/repos/apache/mahout/issues/comments/194029878","html_url":"https://github.com/apache/mahout/pull/185#issuecomment-194029878","issue_url":"https://api.github.com/repos/apache/mahout/issues/185","id":194029878,"user":{"login":"smarthi","id":3137442,"avatar_url":"https://avatars.githubusercontent.com/u/3137442?v=3","gravatar_id":"","url":"https://api.github.com/users/smarthi","html_url":"https://github.com/smarthi","followers_url":"https://api.github.com/users/smarthi/followers","following_url":"https://api.github.com/users/smarthi/following{/other_user}","gists_url":"https://api.github.com/users/smarthi/gists{/gist_id}","starred_url":"https://api.github.com/users/smarthi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarthi/subscriptions","organizations_url":"https://api.github.com/users/smarthi/orgs","repos_url":"https://api.github.com/users/smarthi/repos","events_url":"https://api.github.com/users/smarthi/events{/privacy}","received_events_url":"https://api.github.com/users/smarthi/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T23:58:16Z","updated_at":"2016-03-08T23:58:16Z","body":"LGTM "}}