{"action":"opened","number":261,"pull_request":{"url":"https://api.github.com/repos/tensorflow/serving/pulls/261","id":95744373,"html_url":"https://github.com/tensorflow/serving/pull/261","diff_url":"https://github.com/tensorflow/serving/pull/261.diff","patch_url":"https://github.com/tensorflow/serving/pull/261.patch","issue_url":"https://api.github.com/repos/tensorflow/serving/issues/261","number":261,"state":"open","locked":false,"title":"Caffe support","user":{"login":"rayglover-ibm","id":19191468,"avatar_url":"https://avatars.githubusercontent.com/u/19191468?v=3","gravatar_id":"","url":"https://api.github.com/users/rayglover-ibm","html_url":"https://github.com/rayglover-ibm","followers_url":"https://api.github.com/users/rayglover-ibm/followers","following_url":"https://api.github.com/users/rayglover-ibm/following{/other_user}","gists_url":"https://api.github.com/users/rayglover-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/rayglover-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayglover-ibm/subscriptions","organizations_url":"https://api.github.com/users/rayglover-ibm/orgs","repos_url":"https://api.github.com/users/rayglover-ibm/repos","events_url":"https://api.github.com/users/rayglover-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/rayglover-ibm/received_events","type":"User","site_admin":false},"body":"This contains just the core implementation of the fork I've been maintaining [here](https://github.com/rayglover-ibm/serving-caffe) under `tensorflow_serving/servables/caffe/...` plus some refactoring of things under `tensorflow_serving/model_servers/...`, which I mentioned in #190 .\r\n\r\nThe idea from my perspective is to make it easier for teams using [Caffe](https://github.com/BVLC/caffe) in production to move to a more ML-platform agnostic serving framework; that seems to fit nicely with the aims of TensorFlow Serving!\r\n\r\n__Summary:__\r\n\r\n- The Caffe CMake build is driven by Bazel\r\n- Supports CUDA by adopting the TensorFlow CUDA configuration\r\n- Supports Python layers by python interpreter integration\r\n- The implementation tries to follow the TensorFlow integration; I think this has been a success even though other parts of Tensorflow Serving are fairly `Tensor` specific (e.g. the batching infrastructure)\r\n- Switching between forks of Caffe when building can be useful if you have multiple services each requiring different custom layers or optimizations within Caffe itself; there is a macro `caffe_pkg` in the build to make this easier.\r\n\r\n__Additional things I've included:__\r\n\r\n- A Dockerfile for creating Caffe dev-env (`tensorflow_serving/tools/docker/Dockerfile.caffe-devel`)\r\n- A fix to the CUDA crosstool I mentioned [here](https://github.com/tensorflow/serving/issues/186#issuecomment-251152755). Not sure what the status of this problem is.  \r\n\r\n__TODO / Caveats:__\r\n\r\n- As part of the mnist tutorial a pre-trained model is downloaded from `ibm.box.com`, it's probably worthwhile moving this elsewhere. Alternatively the model could be trained on the local machine but this would require a more thought-out approach.\r\n\r\n- I think the Python integration is good enough but hardly watertight; I can imagine issues arising here if one tries to serve more than one caffe net (with Python layers in each) simultaneously. Using sub-interpreters (one per net) should make this more robust.\r\n\r\n- The build isn't guaranteed to adopt the Python libs/includes set in the tensorflow configuration; instead cmake will attempt to find python itself. \r\n\r\n- There isn't any user documentation in this PR -- I'm looking for advice on this.\r\n\r\n__Things I've removed (but you might be interested to know about):__\r\n\r\n- There is an example object detector [here](https://github.com/rayglover-ibm/serving-caffe#example-object-detection) supporting _[Faster R-CNN](https://github.com/rbgirshick/py-faster-rcnn)_ and _[SSD: Single Multibox Detector](https://github.com/weiliu89/caffe/tree/ssd)_ object detection architectures; this demonstrates use of multiple Caffe forks and Python interpreter integration.","created_at":"2016-11-29T18:03:14Z","updated_at":"2016-11-29T18:03:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tensorflow/serving/pulls/261/commits","review_comments_url":"https://api.github.com/repos/tensorflow/serving/pulls/261/comments","review_comment_url":"https://api.github.com/repos/tensorflow/serving/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tensorflow/serving/issues/261/comments","statuses_url":"https://api.github.com/repos/tensorflow/serving/statuses/3cb921743490bc12445a360ad0cb37564e7d78f7","head":{"label":"rayglover-ibm:caffe-pr","ref":"caffe-pr","sha":"3cb921743490bc12445a360ad0cb37564e7d78f7","user":{"login":"rayglover-ibm","id":19191468,"avatar_url":"https://avatars.githubusercontent.com/u/19191468?v=3","gravatar_id":"","url":"https://api.github.com/users/rayglover-ibm","html_url":"https://github.com/rayglover-ibm","followers_url":"https://api.github.com/users/rayglover-ibm/followers","following_url":"https://api.github.com/users/rayglover-ibm/following{/other_user}","gists_url":"https://api.github.com/users/rayglover-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/rayglover-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayglover-ibm/subscriptions","organizations_url":"https://api.github.com/users/rayglover-ibm/orgs","repos_url":"https://api.github.com/users/rayglover-ibm/repos","events_url":"https://api.github.com/users/rayglover-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/rayglover-ibm/received_events","type":"User","site_admin":false},"repo":{"id":58066439,"name":"serving-caffe","full_name":"rayglover-ibm/serving-caffe","owner":{"login":"rayglover-ibm","id":19191468,"avatar_url":"https://avatars.githubusercontent.com/u/19191468?v=3","gravatar_id":"","url":"https://api.github.com/users/rayglover-ibm","html_url":"https://github.com/rayglover-ibm","followers_url":"https://api.github.com/users/rayglover-ibm/followers","following_url":"https://api.github.com/users/rayglover-ibm/following{/other_user}","gists_url":"https://api.github.com/users/rayglover-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/rayglover-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayglover-ibm/subscriptions","organizations_url":"https://api.github.com/users/rayglover-ibm/orgs","repos_url":"https://api.github.com/users/rayglover-ibm/repos","events_url":"https://api.github.com/users/rayglover-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/rayglover-ibm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rayglover-ibm/serving-caffe","description":"Tensorflow Serving with support for Caffe","fork":true,"url":"https://api.github.com/repos/rayglover-ibm/serving-caffe","forks_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/forks","keys_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/teams","hooks_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/hooks","issue_events_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/issues/events{/number}","events_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/events","assignees_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/assignees{/user}","branches_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/branches{/branch}","tags_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/tags","blobs_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/git/refs{/sha}","trees_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/statuses/{sha}","languages_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/languages","stargazers_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/stargazers","contributors_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/contributors","subscribers_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/subscribers","subscription_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/subscription","commits_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/commits{/sha}","git_commits_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/git/commits{/sha}","comments_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/comments{/number}","issue_comment_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/issues/comments{/number}","contents_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/contents/{+path}","compare_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/merges","archive_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/downloads","issues_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/issues{/number}","pulls_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/pulls{/number}","milestones_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/milestones{/number}","notifications_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/labels{/name}","releases_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/releases{/id}","deployments_url":"https://api.github.com/repos/rayglover-ibm/serving-caffe/deployments","created_at":"2016-05-04T16:17:14Z","updated_at":"2016-10-31T08:16:28Z","pushed_at":"2016-11-29T15:23:37Z","git_url":"git://github.com/rayglover-ibm/serving-caffe.git","ssh_url":"git@github.com:rayglover-ibm/serving-caffe.git","clone_url":"https://github.com/rayglover-ibm/serving-caffe.git","svn_url":"https://github.com/rayglover-ibm/serving-caffe","homepage":"","size":2011,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"caffe"}},"base":{"label":"tensorflow:master","ref":"master","sha":"e0a5f8b44afe19cce9b83673d98ce9937a5ee5e0","user":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars.githubusercontent.com/u/15658638?v=3","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":50461701,"name":"serving","full_name":"tensorflow/serving","owner":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars.githubusercontent.com/u/15658638?v=3","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/serving","description":"A flexible, high-performance serving system for machine learning models","fork":false,"url":"https://api.github.com/repos/tensorflow/serving","forks_url":"https://api.github.com/repos/tensorflow/serving/forks","keys_url":"https://api.github.com/repos/tensorflow/serving/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorflow/serving/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorflow/serving/teams","hooks_url":"https://api.github.com/repos/tensorflow/serving/hooks","issue_events_url":"https://api.github.com/repos/tensorflow/serving/issues/events{/number}","events_url":"https://api.github.com/repos/tensorflow/serving/events","assignees_url":"https://api.github.com/repos/tensorflow/serving/assignees{/user}","branches_url":"https://api.github.com/repos/tensorflow/serving/branches{/branch}","tags_url":"https://api.github.com/repos/tensorflow/serving/tags","blobs_url":"https://api.github.com/repos/tensorflow/serving/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorflow/serving/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorflow/serving/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorflow/serving/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorflow/serving/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorflow/serving/languages","stargazers_url":"https://api.github.com/repos/tensorflow/serving/stargazers","contributors_url":"https://api.github.com/repos/tensorflow/serving/contributors","subscribers_url":"https://api.github.com/repos/tensorflow/serving/subscribers","subscription_url":"https://api.github.com/repos/tensorflow/serving/subscription","commits_url":"https://api.github.com/repos/tensorflow/serving/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorflow/serving/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorflow/serving/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorflow/serving/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorflow/serving/contents/{+path}","compare_url":"https://api.github.com/repos/tensorflow/serving/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorflow/serving/merges","archive_url":"https://api.github.com/repos/tensorflow/serving/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorflow/serving/downloads","issues_url":"https://api.github.com/repos/tensorflow/serving/issues{/number}","pulls_url":"https://api.github.com/repos/tensorflow/serving/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorflow/serving/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorflow/serving/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorflow/serving/labels{/name}","releases_url":"https://api.github.com/repos/tensorflow/serving/releases{/id}","deployments_url":"https://api.github.com/repos/tensorflow/serving/deployments","created_at":"2016-01-26T21:48:20Z","updated_at":"2016-11-29T03:38:50Z","pushed_at":"2016-11-29T18:03:14Z","git_url":"git://github.com/tensorflow/serving.git","ssh_url":"git@github.com:tensorflow/serving.git","clone_url":"https://github.com/tensorflow/serving.git","svn_url":"https://github.com/tensorflow/serving","homepage":"https://tensorflow.github.io/serving","size":1645,"stargazers_count":758,"watchers_count":758,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":226,"mirror_url":null,"open_issues_count":34,"forks":226,"open_issues":34,"watchers":758,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tensorflow/serving/pulls/261"},"html":{"href":"https://github.com/tensorflow/serving/pull/261"},"issue":{"href":"https://api.github.com/repos/tensorflow/serving/issues/261"},"comments":{"href":"https://api.github.com/repos/tensorflow/serving/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/tensorflow/serving/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/tensorflow/serving/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tensorflow/serving/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/tensorflow/serving/statuses/3cb921743490bc12445a360ad0cb37564e7d78f7"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":3626,"deletions":94,"changed_files":46}}
{"actor":{"display_login":"rayglover-ibm"}}