{"action":"created","comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments/153293766","pull_request_review_id":79278834,"id":153293766,"diff_hunk":"@@ -50,6 +56,117 @@\n   private static final String TAG = \"TensorFlowInferenceInterface\";\n   private static final String ASSET_FILE_PREFIX = \"file:///android_asset/\";\n \n+  /**\n+   * Copies resource to a cache file.\n+   * @param  context context The context that contains the files\n+   * @param  String filename  Filename--take note that it checks for .pb in asset case\n+   * @param  boolean res Is it from res/raw\n+   *\n+   * @return File reference to cache file.\n+   */\n+  private File createCacheFile(Context context, String filename, boolean res)\n+      throws IOException {\n+    InputStream inputStream = null;\n+    if (res) {\n+      int resourceId = context.getResources().getIdentifier(filename, \"raw\", context.getPackageName());\n+      if (resourceId == 0) {\n+        return null;\n+      }\n+      inputStream = context.getResources().openRawResource(resourceId);\n+    } else {\n+      if (!filename.endsWith(\".pb\")) {\n+        filename += \".pb\";","path":"tensorflow/contrib/android/java/org/tensorflow/contrib/android/TensorFlowInferenceInterface.java","position":50,"original_position":50,"commit_id":"4ebc68050fdde62f54047bb1974dd6e00fe24ded","original_commit_id":"4ebc68050fdde62f54047bb1974dd6e00fe24ded","user":{"login":"andrewharp","id":3376817,"avatar_url":"https://avatars1.githubusercontent.com/u/3376817?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewharp","html_url":"https://github.com/andrewharp","followers_url":"https://api.github.com/users/andrewharp/followers","following_url":"https://api.github.com/users/andrewharp/following{/other_user}","gists_url":"https://api.github.com/users/andrewharp/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewharp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewharp/subscriptions","organizations_url":"https://api.github.com/users/andrewharp/orgs","repos_url":"https://api.github.com/users/andrewharp/repos","events_url":"https://api.github.com/users/andrewharp/events{/privacy}","received_events_url":"https://api.github.com/users/andrewharp/received_events","type":"User","site_admin":false},"body":"Yes, please remove the forced file extension and address the other comments and I think this is good to go.","created_at":"2017-11-27T19:13:50Z","updated_at":"2017-11-27T19:13:50Z","html_url":"https://github.com/tensorflow/tensorflow/pull/14351#discussion_r153293766","pull_request_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments/153293766"},"html":{"href":"https://github.com/tensorflow/tensorflow/pull/14351#discussion_r153293766"},"pull_request":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351"}},"in_reply_to_id":151796965},"pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351","id":151315650,"html_url":"https://github.com/tensorflow/tensorflow/pull/14351","diff_url":"https://github.com/tensorflow/tensorflow/pull/14351.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/14351.patch","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/14351","number":14351,"state":"open","locked":false,"title":"memmap changes","user":{"login":"cloudbank","id":2288294,"avatar_url":"https://avatars3.githubusercontent.com/u/2288294?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudbank","html_url":"https://github.com/cloudbank","followers_url":"https://api.github.com/users/cloudbank/followers","following_url":"https://api.github.com/users/cloudbank/following{/other_user}","gists_url":"https://api.github.com/users/cloudbank/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudbank/subscriptions","organizations_url":"https://api.github.com/users/cloudbank/orgs","repos_url":"https://api.github.com/users/cloudbank/repos","events_url":"https://api.github.com/users/cloudbank/events{/privacy}","received_events_url":"https://api.github.com/users/cloudbank/received_events","type":"User","site_admin":false},"body":"@andrewharp  @martinwicke \r\nHere is the new PR with changes as discussed in 12922\r\n","created_at":"2017-11-08T08:02:15Z","updated_at":"2017-11-27T19:13:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b6957bad102a5b22cc619af0b59affd6b496c52","assignee":{"login":"jhseu","id":170179,"avatar_url":"https://avatars1.githubusercontent.com/u/170179?v=4","gravatar_id":"","url":"https://api.github.com/users/jhseu","html_url":"https://github.com/jhseu","followers_url":"https://api.github.com/users/jhseu/followers","following_url":"https://api.github.com/users/jhseu/following{/other_user}","gists_url":"https://api.github.com/users/jhseu/gists{/gist_id}","starred_url":"https://api.github.com/users/jhseu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhseu/subscriptions","organizations_url":"https://api.github.com/users/jhseu/orgs","repos_url":"https://api.github.com/users/jhseu/repos","events_url":"https://api.github.com/users/jhseu/events{/privacy}","received_events_url":"https://api.github.com/users/jhseu/received_events","type":"User","site_admin":false},"assignees":[{"login":"jhseu","id":170179,"avatar_url":"https://avatars1.githubusercontent.com/u/170179?v=4","gravatar_id":"","url":"https://api.github.com/users/jhseu","html_url":"https://github.com/jhseu","followers_url":"https://api.github.com/users/jhseu/followers","following_url":"https://api.github.com/users/jhseu/following{/other_user}","gists_url":"https://api.github.com/users/jhseu/gists{/gist_id}","starred_url":"https://api.github.com/users/jhseu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhseu/subscriptions","organizations_url":"https://api.github.com/users/jhseu/orgs","repos_url":"https://api.github.com/users/jhseu/repos","events_url":"https://api.github.com/users/jhseu/events{/privacy}","received_events_url":"https://api.github.com/users/jhseu/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"petewarden","id":161459,"avatar_url":"https://avatars0.githubusercontent.com/u/161459?v=4","gravatar_id":"","url":"https://api.github.com/users/petewarden","html_url":"https://github.com/petewarden","followers_url":"https://api.github.com/users/petewarden/followers","following_url":"https://api.github.com/users/petewarden/following{/other_user}","gists_url":"https://api.github.com/users/petewarden/gists{/gist_id}","starred_url":"https://api.github.com/users/petewarden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petewarden/subscriptions","organizations_url":"https://api.github.com/users/petewarden/orgs","repos_url":"https://api.github.com/users/petewarden/repos","events_url":"https://api.github.com/users/petewarden/events{/privacy}","received_events_url":"https://api.github.com/users/petewarden/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351/commits","review_comments_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351/comments","review_comment_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/14351/comments","statuses_url":"https://api.github.com/repos/tensorflow/tensorflow/statuses/4ebc68050fdde62f54047bb1974dd6e00fe24ded","head":{"label":"cloudbank:memmap","ref":"memmap","sha":"4ebc68050fdde62f54047bb1974dd6e00fe24ded","user":{"login":"cloudbank","id":2288294,"avatar_url":"https://avatars3.githubusercontent.com/u/2288294?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudbank","html_url":"https://github.com/cloudbank","followers_url":"https://api.github.com/users/cloudbank/followers","following_url":"https://api.github.com/users/cloudbank/following{/other_user}","gists_url":"https://api.github.com/users/cloudbank/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudbank/subscriptions","organizations_url":"https://api.github.com/users/cloudbank/orgs","repos_url":"https://api.github.com/users/cloudbank/repos","events_url":"https://api.github.com/users/cloudbank/events{/privacy}","received_events_url":"https://api.github.com/users/cloudbank/received_events","type":"User","site_admin":false},"repo":{"id":109922823,"name":"tensorflow","full_name":"cloudbank/tensorflow","owner":{"login":"cloudbank","id":2288294,"avatar_url":"https://avatars3.githubusercontent.com/u/2288294?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudbank","html_url":"https://github.com/cloudbank","followers_url":"https://api.github.com/users/cloudbank/followers","following_url":"https://api.github.com/users/cloudbank/following{/other_user}","gists_url":"https://api.github.com/users/cloudbank/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudbank/subscriptions","organizations_url":"https://api.github.com/users/cloudbank/orgs","repos_url":"https://api.github.com/users/cloudbank/repos","events_url":"https://api.github.com/users/cloudbank/events{/privacy}","received_events_url":"https://api.github.com/users/cloudbank/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cloudbank/tensorflow","description":"Computation using data flow graphs for scalable machine learning","fork":true,"url":"https://api.github.com/repos/cloudbank/tensorflow","forks_url":"https://api.github.com/repos/cloudbank/tensorflow/forks","keys_url":"https://api.github.com/repos/cloudbank/tensorflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudbank/tensorflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudbank/tensorflow/teams","hooks_url":"https://api.github.com/repos/cloudbank/tensorflow/hooks","issue_events_url":"https://api.github.com/repos/cloudbank/tensorflow/issues/events{/number}","events_url":"https://api.github.com/repos/cloudbank/tensorflow/events","assignees_url":"https://api.github.com/repos/cloudbank/tensorflow/assignees{/user}","branches_url":"https://api.github.com/repos/cloudbank/tensorflow/branches{/branch}","tags_url":"https://api.github.com/repos/cloudbank/tensorflow/tags","blobs_url":"https://api.github.com/repos/cloudbank/tensorflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudbank/tensorflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudbank/tensorflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudbank/tensorflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudbank/tensorflow/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudbank/tensorflow/languages","stargazers_url":"https://api.github.com/repos/cloudbank/tensorflow/stargazers","contributors_url":"https://api.github.com/repos/cloudbank/tensorflow/contributors","subscribers_url":"https://api.github.com/repos/cloudbank/tensorflow/subscribers","subscription_url":"https://api.github.com/repos/cloudbank/tensorflow/subscription","commits_url":"https://api.github.com/repos/cloudbank/tensorflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudbank/tensorflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudbank/tensorflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudbank/tensorflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudbank/tensorflow/contents/{+path}","compare_url":"https://api.github.com/repos/cloudbank/tensorflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudbank/tensorflow/merges","archive_url":"https://api.github.com/repos/cloudbank/tensorflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudbank/tensorflow/downloads","issues_url":"https://api.github.com/repos/cloudbank/tensorflow/issues{/number}","pulls_url":"https://api.github.com/repos/cloudbank/tensorflow/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudbank/tensorflow/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudbank/tensorflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudbank/tensorflow/labels{/name}","releases_url":"https://api.github.com/repos/cloudbank/tensorflow/releases{/id}","deployments_url":"https://api.github.com/repos/cloudbank/tensorflow/deployments","created_at":"2017-11-08T03:25:44Z","updated_at":"2017-11-08T03:26:18Z","pushed_at":"2017-11-08T04:14:35Z","git_url":"git://github.com/cloudbank/tensorflow.git","ssh_url":"git@github.com:cloudbank/tensorflow.git","clone_url":"https://github.com/cloudbank/tensorflow.git","svn_url":"https://github.com/cloudbank/tensorflow","homepage":"http://tensorflow.org","size":132691,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tensorflow:master","ref":"master","sha":"8af1964d7b07fedcbfcd43d2ba13c97aad51daa8","user":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars1.githubusercontent.com/u/15658638?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"repo":{"id":45717250,"name":"tensorflow","full_name":"tensorflow/tensorflow","owner":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars1.githubusercontent.com/u/15658638?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorflow/tensorflow","description":"Computation using data flow graphs for scalable machine learning","fork":false,"url":"https://api.github.com/repos/tensorflow/tensorflow","forks_url":"https://api.github.com/repos/tensorflow/tensorflow/forks","keys_url":"https://api.github.com/repos/tensorflow/tensorflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorflow/tensorflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorflow/tensorflow/teams","hooks_url":"https://api.github.com/repos/tensorflow/tensorflow/hooks","issue_events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/events{/number}","events_url":"https://api.github.com/repos/tensorflow/tensorflow/events","assignees_url":"https://api.github.com/repos/tensorflow/tensorflow/assignees{/user}","branches_url":"https://api.github.com/repos/tensorflow/tensorflow/branches{/branch}","tags_url":"https://api.github.com/repos/tensorflow/tensorflow/tags","blobs_url":"https://api.github.com/repos/tensorflow/tensorflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorflow/tensorflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorflow/tensorflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorflow/tensorflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorflow/tensorflow/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorflow/tensorflow/languages","stargazers_url":"https://api.github.com/repos/tensorflow/tensorflow/stargazers","contributors_url":"https://api.github.com/repos/tensorflow/tensorflow/contributors","subscribers_url":"https://api.github.com/repos/tensorflow/tensorflow/subscribers","subscription_url":"https://api.github.com/repos/tensorflow/tensorflow/subscription","commits_url":"https://api.github.com/repos/tensorflow/tensorflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorflow/tensorflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorflow/tensorflow/contents/{+path}","compare_url":"https://api.github.com/repos/tensorflow/tensorflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorflow/tensorflow/merges","archive_url":"https://api.github.com/repos/tensorflow/tensorflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorflow/tensorflow/downloads","issues_url":"https://api.github.com/repos/tensorflow/tensorflow/issues{/number}","pulls_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorflow/tensorflow/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorflow/tensorflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/labels{/name}","releases_url":"https://api.github.com/repos/tensorflow/tensorflow/releases{/id}","deployments_url":"https://api.github.com/repos/tensorflow/tensorflow/deployments","created_at":"2015-11-07T01:19:20Z","updated_at":"2017-11-27T18:38:10Z","pushed_at":"2017-11-27T18:33:06Z","git_url":"git://github.com/tensorflow/tensorflow.git","ssh_url":"git@github.com:tensorflow/tensorflow.git","clone_url":"https://github.com/tensorflow/tensorflow.git","svn_url":"https://github.com/tensorflow/tensorflow","homepage":"http://tensorflow.org","size":137375,"stargazers_count":79456,"watchers_count":79456,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":38995,"mirror_url":null,"archived":false,"open_issues_count":1527,"forks":38995,"open_issues":1527,"watchers":79456,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351"},"html":{"href":"https://github.com/tensorflow/tensorflow/pull/14351"},"issue":{"href":"https://api.github.com/repos/tensorflow/tensorflow/issues/14351"},"comments":{"href":"https://api.github.com/repos/tensorflow/tensorflow/issues/14351/comments"},"review_comments":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351/comments"},"review_comment":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/14351/commits"},"statuses":{"href":"https://api.github.com/repos/tensorflow/tensorflow/statuses/4ebc68050fdde62f54047bb1974dd6e00fe24ded"}},"author_association":"NONE"}}
{"actor":{"display_login":"andrewharp"}}