{"action":"created","comment":{"url":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/comments/277129254","pull_request_review_id":228192032,"id":277129254,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3NzEyOTI1NA==","diff_hunk":"@@ -418,9 +418,73 @@ def make_const(self, name, np_val, skip_conversion=False, raw=True):\n         self.set_dtype(name, utils.map_numpy_to_onnx_dtype(np_val.dtype))\n         return node\n \n+    def make_slice_node(self, inputs_map, name=None, op_name_scope=None,\n+                        outputs=None, shapes=None, dtypes=None, domain=None):\n+        \"\"\"\n+        slice changes its schema at opset 10: it treats some attributes as dynamic input\n+        so this function has to process inputs_map according to graph's opset version\n+        to get \"inputs\" and \"attr\" to feed \"_make_node\"\n+        \"\"\"\n+        inputs = []\n+        attr = {}\n+        if self.opset < 10:\n+            # \"data\" is string\n+            # \"starts\", \"ends\" and \"axes\" are attributes, and \"axes\" is optional.\n+            possible_keys = [\n+                sorted([\"data\", \"starts\", \"ends\"]),\n+                sorted([\"data\", \"starts\", \"ends\", \"axes\"])\n+            ]\n+            utils.make_sure(sorted(inputs_map.keys()) in possible_keys,\n+                            \"slice before 10 has 3 required inputs and 1 optional input\")","path":"tf2onnx/graph.py","position":21,"original_position":21,"commit_id":"0851e1858337924e462ca9710e2f327cef504837","original_commit_id":"0851e1858337924e462ca9710e2f327cef504837","user":{"login":"nbcsm","id":32868157,"node_id":"MDQ6VXNlcjMyODY4MTU3","avatar_url":"https://avatars1.githubusercontent.com/u/32868157?v=4","gravatar_id":"","url":"https://api.github.com/users/nbcsm","html_url":"https://github.com/nbcsm","followers_url":"https://api.github.com/users/nbcsm/followers","following_url":"https://api.github.com/users/nbcsm/following{/other_user}","gists_url":"https://api.github.com/users/nbcsm/gists{/gist_id}","starred_url":"https://api.github.com/users/nbcsm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbcsm/subscriptions","organizations_url":"https://api.github.com/users/nbcsm/orgs","repos_url":"https://api.github.com/users/nbcsm/repos","events_url":"https://api.github.com/users/nbcsm/events{/privacy}","received_events_url":"https://api.github.com/users/nbcsm/received_events","type":"User","site_admin":false},"body":"it is clearer to have things like:\r\n```\r\ndata=kwargs[\"data\"]\r\nstarts = kwargs.get(\"starts\")\r\nif starts is not None:\r\n  blablabla\r\n```","created_at":"2019-04-20T09:12:31Z","updated_at":"2019-04-20T09:26:39Z","html_url":"https://github.com/onnx/tensorflow-onnx/pull/464#discussion_r277129254","pull_request_url":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/comments/277129254"},"html":{"href":"https://github.com/onnx/tensorflow-onnx/pull/464#discussion_r277129254"},"pull_request":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464"}},"in_reply_to_id":277127679},"pull_request":{"url":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464","id":271591053,"node_id":"MDExOlB1bGxSZXF1ZXN0MjcxNTkxMDUz","html_url":"https://github.com/onnx/tensorflow-onnx/pull/464","diff_url":"https://github.com/onnx/tensorflow-onnx/pull/464.diff","patch_url":"https://github.com/onnx/tensorflow-onnx/pull/464.patch","issue_url":"https://api.github.com/repos/onnx/tensorflow-onnx/issues/464","number":464,"state":"open","locked":false,"title":"[draft] support slice-10","user":{"login":"zhijxu-MS","id":43435212,"node_id":"MDQ6VXNlcjQzNDM1MjEy","avatar_url":"https://avatars1.githubusercontent.com/u/43435212?v=4","gravatar_id":"","url":"https://api.github.com/users/zhijxu-MS","html_url":"https://github.com/zhijxu-MS","followers_url":"https://api.github.com/users/zhijxu-MS/followers","following_url":"https://api.github.com/users/zhijxu-MS/following{/other_user}","gists_url":"https://api.github.com/users/zhijxu-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/zhijxu-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhijxu-MS/subscriptions","organizations_url":"https://api.github.com/users/zhijxu-MS/orgs","repos_url":"https://api.github.com/users/zhijxu-MS/repos","events_url":"https://api.github.com/users/zhijxu-MS/events{/privacy}","received_events_url":"https://api.github.com/users/zhijxu-MS/received_events","type":"User","site_admin":false},"body":"1 add slice-10 conversion logic and related tests\r\n2 modify other ops' conversion logic when slice is used.\r\n3 add a new target \"onnxruntime\", this target only guarantees the newest onnxrtuntime work.","created_at":"2019-04-18T08:13:00Z","updated_at":"2019-04-20T09:26:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd71a678c782e080f9a79bc5bb415163b1af2116","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464/commits","review_comments_url":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464/comments","review_comment_url":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/onnx/tensorflow-onnx/issues/464/comments","statuses_url":"https://api.github.com/repos/onnx/tensorflow-onnx/statuses/0851e1858337924e462ca9710e2f327cef504837","head":{"label":"zhijxu-MS:push_branch","ref":"push_branch","sha":"0851e1858337924e462ca9710e2f327cef504837","user":{"login":"zhijxu-MS","id":43435212,"node_id":"MDQ6VXNlcjQzNDM1MjEy","avatar_url":"https://avatars1.githubusercontent.com/u/43435212?v=4","gravatar_id":"","url":"https://api.github.com/users/zhijxu-MS","html_url":"https://github.com/zhijxu-MS","followers_url":"https://api.github.com/users/zhijxu-MS/followers","following_url":"https://api.github.com/users/zhijxu-MS/following{/other_user}","gists_url":"https://api.github.com/users/zhijxu-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/zhijxu-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhijxu-MS/subscriptions","organizations_url":"https://api.github.com/users/zhijxu-MS/orgs","repos_url":"https://api.github.com/users/zhijxu-MS/repos","events_url":"https://api.github.com/users/zhijxu-MS/events{/privacy}","received_events_url":"https://api.github.com/users/zhijxu-MS/received_events","type":"User","site_admin":false},"repo":{"id":152215829,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIyMTU4Mjk=","name":"tensorflow-onnx","full_name":"zhijxu-MS/tensorflow-onnx","private":false,"owner":{"login":"zhijxu-MS","id":43435212,"node_id":"MDQ6VXNlcjQzNDM1MjEy","avatar_url":"https://avatars1.githubusercontent.com/u/43435212?v=4","gravatar_id":"","url":"https://api.github.com/users/zhijxu-MS","html_url":"https://github.com/zhijxu-MS","followers_url":"https://api.github.com/users/zhijxu-MS/followers","following_url":"https://api.github.com/users/zhijxu-MS/following{/other_user}","gists_url":"https://api.github.com/users/zhijxu-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/zhijxu-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhijxu-MS/subscriptions","organizations_url":"https://api.github.com/users/zhijxu-MS/orgs","repos_url":"https://api.github.com/users/zhijxu-MS/repos","events_url":"https://api.github.com/users/zhijxu-MS/events{/privacy}","received_events_url":"https://api.github.com/users/zhijxu-MS/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhijxu-MS/tensorflow-onnx","description":"Convert TensorFlow models to ONNX","fork":true,"url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx","forks_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/forks","keys_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/teams","hooks_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/hooks","issue_events_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/issues/events{/number}","events_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/events","assignees_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/assignees{/user}","branches_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/branches{/branch}","tags_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/tags","blobs_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/statuses/{sha}","languages_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/languages","stargazers_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/stargazers","contributors_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/contributors","subscribers_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/subscribers","subscription_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/subscription","commits_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/contents/{+path}","compare_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/merges","archive_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/downloads","issues_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/issues{/number}","pulls_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/pulls{/number}","milestones_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/milestones{/number}","notifications_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/labels{/name}","releases_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/releases{/id}","deployments_url":"https://api.github.com/repos/zhijxu-MS/tensorflow-onnx/deployments","created_at":"2018-10-09T08:30:52Z","updated_at":"2018-12-03T04:47:28Z","pushed_at":"2019-04-19T02:01:16Z","git_url":"git://github.com/zhijxu-MS/tensorflow-onnx.git","ssh_url":"git@github.com:zhijxu-MS/tensorflow-onnx.git","clone_url":"https://github.com/zhijxu-MS/tensorflow-onnx.git","svn_url":"https://github.com/zhijxu-MS/tensorflow-onnx","homepage":null,"size":16578,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"onnx:master","ref":"master","sha":"db8083ff6d75431822b8c95c3fc1986da560ac27","user":{"login":"onnx","id":31675368,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjc1MzY4","avatar_url":"https://avatars3.githubusercontent.com/u/31675368?v=4","gravatar_id":"","url":"https://api.github.com/users/onnx","html_url":"https://github.com/onnx","followers_url":"https://api.github.com/users/onnx/followers","following_url":"https://api.github.com/users/onnx/following{/other_user}","gists_url":"https://api.github.com/users/onnx/gists{/gist_id}","starred_url":"https://api.github.com/users/onnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onnx/subscriptions","organizations_url":"https://api.github.com/users/onnx/orgs","repos_url":"https://api.github.com/users/onnx/repos","events_url":"https://api.github.com/users/onnx/events{/privacy}","received_events_url":"https://api.github.com/users/onnx/received_events","type":"Organization","site_admin":false},"repo":{"id":125098252,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUwOTgyNTI=","name":"tensorflow-onnx","full_name":"onnx/tensorflow-onnx","private":false,"owner":{"login":"onnx","id":31675368,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjc1MzY4","avatar_url":"https://avatars3.githubusercontent.com/u/31675368?v=4","gravatar_id":"","url":"https://api.github.com/users/onnx","html_url":"https://github.com/onnx","followers_url":"https://api.github.com/users/onnx/followers","following_url":"https://api.github.com/users/onnx/following{/other_user}","gists_url":"https://api.github.com/users/onnx/gists{/gist_id}","starred_url":"https://api.github.com/users/onnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onnx/subscriptions","organizations_url":"https://api.github.com/users/onnx/orgs","repos_url":"https://api.github.com/users/onnx/repos","events_url":"https://api.github.com/users/onnx/events{/privacy}","received_events_url":"https://api.github.com/users/onnx/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/onnx/tensorflow-onnx","description":"Convert TensorFlow models to ONNX","fork":false,"url":"https://api.github.com/repos/onnx/tensorflow-onnx","forks_url":"https://api.github.com/repos/onnx/tensorflow-onnx/forks","keys_url":"https://api.github.com/repos/onnx/tensorflow-onnx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onnx/tensorflow-onnx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onnx/tensorflow-onnx/teams","hooks_url":"https://api.github.com/repos/onnx/tensorflow-onnx/hooks","issue_events_url":"https://api.github.com/repos/onnx/tensorflow-onnx/issues/events{/number}","events_url":"https://api.github.com/repos/onnx/tensorflow-onnx/events","assignees_url":"https://api.github.com/repos/onnx/tensorflow-onnx/assignees{/user}","branches_url":"https://api.github.com/repos/onnx/tensorflow-onnx/branches{/branch}","tags_url":"https://api.github.com/repos/onnx/tensorflow-onnx/tags","blobs_url":"https://api.github.com/repos/onnx/tensorflow-onnx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onnx/tensorflow-onnx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onnx/tensorflow-onnx/git/refs{/sha}","trees_url":"https://api.github.com/repos/onnx/tensorflow-onnx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onnx/tensorflow-onnx/statuses/{sha}","languages_url":"https://api.github.com/repos/onnx/tensorflow-onnx/languages","stargazers_url":"https://api.github.com/repos/onnx/tensorflow-onnx/stargazers","contributors_url":"https://api.github.com/repos/onnx/tensorflow-onnx/contributors","subscribers_url":"https://api.github.com/repos/onnx/tensorflow-onnx/subscribers","subscription_url":"https://api.github.com/repos/onnx/tensorflow-onnx/subscription","commits_url":"https://api.github.com/repos/onnx/tensorflow-onnx/commits{/sha}","git_commits_url":"https://api.github.com/repos/onnx/tensorflow-onnx/git/commits{/sha}","comments_url":"https://api.github.com/repos/onnx/tensorflow-onnx/comments{/number}","issue_comment_url":"https://api.github.com/repos/onnx/tensorflow-onnx/issues/comments{/number}","contents_url":"https://api.github.com/repos/onnx/tensorflow-onnx/contents/{+path}","compare_url":"https://api.github.com/repos/onnx/tensorflow-onnx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onnx/tensorflow-onnx/merges","archive_url":"https://api.github.com/repos/onnx/tensorflow-onnx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onnx/tensorflow-onnx/downloads","issues_url":"https://api.github.com/repos/onnx/tensorflow-onnx/issues{/number}","pulls_url":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls{/number}","milestones_url":"https://api.github.com/repos/onnx/tensorflow-onnx/milestones{/number}","notifications_url":"https://api.github.com/repos/onnx/tensorflow-onnx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onnx/tensorflow-onnx/labels{/name}","releases_url":"https://api.github.com/repos/onnx/tensorflow-onnx/releases{/id}","deployments_url":"https://api.github.com/repos/onnx/tensorflow-onnx/deployments","created_at":"2018-03-13T18:39:56Z","updated_at":"2019-04-19T14:35:26Z","pushed_at":"2019-04-19T21:55:18Z","git_url":"git://github.com/onnx/tensorflow-onnx.git","ssh_url":"git@github.com:onnx/tensorflow-onnx.git","clone_url":"https://github.com/onnx/tensorflow-onnx.git","svn_url":"https://github.com/onnx/tensorflow-onnx","homepage":null,"size":16459,"stargazers_count":170,"watchers_count":170,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":44,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":57,"open_issues":44,"watchers":170,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464"},"html":{"href":"https://github.com/onnx/tensorflow-onnx/pull/464"},"issue":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/issues/464"},"comments":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/issues/464/comments"},"review_comments":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464/comments"},"review_comment":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/pulls/464/commits"},"statuses":{"href":"https://api.github.com/repos/onnx/tensorflow-onnx/statuses/0851e1858337924e462ca9710e2f327cef504837"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nbcsm"}}