{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments/242785201","pull_request_review_id":186380008,"id":242785201,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mjc4NTIwMQ==","diff_hunk":"@@ -6845,30 +6845,32 @@ def test_context_num_gpus():\n \n @with_seed()\n def test_op_roi_align():\n-    # Adapted from https://github.com/wkcn/MobulaOP/blob/master/tests/test_roi_align_op.py\n+    # Adapted from https://github.com/wkcn/MobulaOP/blob/master/tests/test_op/test_roi_align_op.py\n+    T = np.float32\n+\n     def bilinear_interpolate(bottom, height, width, y, x):\n         if y < -1.0 or y > height or x < -1.0 or x > width:\n-            return 0.0, []\n-        x = max(0.0, x)\n-        y = max(0.0, y)\n+            return T(0.0), []\n+        x = T(max(0.0, x))\n+        y = T(max(0.0, y))\n         x_low = int(x)","path":"tests/python/unittest/test_operator.py","position":16,"original_position":16,"commit_id":"aaa9d39093ff51a57513ba68a46d7479b63c0766","original_commit_id":"aaa9d39093ff51a57513ba68a46d7479b63c0766","user":{"login":"wkcn","id":3415417,"node_id":"MDQ6VXNlcjM0MTU0MTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3415417?v=4","gravatar_id":"","url":"https://api.github.com/users/wkcn","html_url":"https://github.com/wkcn","followers_url":"https://api.github.com/users/wkcn/followers","following_url":"https://api.github.com/users/wkcn/following{/other_user}","gists_url":"https://api.github.com/users/wkcn/gists{/gist_id}","starred_url":"https://api.github.com/users/wkcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkcn/subscriptions","organizations_url":"https://api.github.com/users/wkcn/orgs","repos_url":"https://api.github.com/users/wkcn/repos","events_url":"https://api.github.com/users/wkcn/events{/privacy}","received_events_url":"https://api.github.com/users/wkcn/received_events","type":"User","site_admin":false},"body":"The type of x_low is `int` in [the C implementation](https://github.com/apache/incubator-mxnet/blob/master/src/operator/contrib/roi_align.cu).\r\n\r\nIn Python, the default type of float is `float64`, however the float type in the C implementation is `float32`.\r\nIf the types are not consistent, there will be calculation error.\r\n\r\nSo I use `T` to typecast some variables to `np.float32` to keep the type consistency between C and Python unittest.","created_at":"2018-12-19T03:58:31Z","updated_at":"2018-12-19T03:58:31Z","html_url":"https://github.com/apache/incubator-mxnet/pull/13609#discussion_r242785201","pull_request_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments/242785201"},"html":{"href":"https://github.com/apache/incubator-mxnet/pull/13609#discussion_r242785201"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609"}},"in_reply_to_id":242773214},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609","id":237538610,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NTM4NjEw","html_url":"https://github.com/apache/incubator-mxnet/pull/13609","diff_url":"https://github.com/apache/incubator-mxnet/pull/13609.diff","patch_url":"https://github.com/apache/incubator-mxnet/pull/13609.patch","issue_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/13609","number":13609,"state":"open","locked":false,"title":"[MXNET-1258]fix unittest for ROIAlign Operator","user":{"login":"wkcn","id":3415417,"node_id":"MDQ6VXNlcjM0MTU0MTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3415417?v=4","gravatar_id":"","url":"https://api.github.com/users/wkcn","html_url":"https://github.com/wkcn","followers_url":"https://api.github.com/users/wkcn/followers","following_url":"https://api.github.com/users/wkcn/following{/other_user}","gists_url":"https://api.github.com/users/wkcn/gists{/gist_id}","starred_url":"https://api.github.com/users/wkcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkcn/subscriptions","organizations_url":"https://api.github.com/users/wkcn/orgs","repos_url":"https://api.github.com/users/wkcn/repos","events_url":"https://api.github.com/users/wkcn/events{/privacy}","received_events_url":"https://api.github.com/users/wkcn/received_events","type":"User","site_admin":false},"body":"## Description ##\r\nFix ROIAlign unittest #11064 \r\nIt passes the test whose `MXNET_TEST_SEED=35650200`. \r\n\r\nThe old unittest for ROIAlign computes in `float64`, so there is some float precision problem.\r\n\r\n## Checklist ##\r\n### Essentials ###\r\nPlease feel free to remove inapplicable items for your PR.\r\n- [x] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)\r\n- [x] Changes are complete (i.e. I finished coding on this PR)\r\n- [x] All changes have test coverage:\r\n- Unit tests are added for small changes to verify correctness (e.g. adding a new operator)\r\n- Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)\r\n- Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)\r\n- [x] Code is well-documented: \r\n- For user-facing API changes, API doc string has been updated. \r\n- For new C++ functions in header files, their functionalities and arguments are documented. \r\n- For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable\r\n- Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html\r\n- [x] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change\r\n\r\n### Changes ###\r\n- [x] use `float32` in the unittest for ROIAlign OP\r\n- [x] set `atol` to `1e-5` in the unittest for ROIAlign OP\r\n\r\n## Comments ##\r\n- If this change is a backward incompatible change, why must this change be made.\r\n- Interesting edge cases to note here\r\n","created_at":"2018-12-11T03:22:31Z","updated_at":"2018-12-19T03:58:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"241c1fd970ee68e08805f7e4eac024790eb50469","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":823354603,"node_id":"MDU6TGFiZWw4MjMzNTQ2MDM=","url":"https://api.github.com/repos/apache/incubator-mxnet/labels/CI","name":"CI","color":"fbca04","default":false},{"id":721783588,"node_id":"MDU6TGFiZWw3MjE3ODM1ODg=","url":"https://api.github.com/repos/apache/incubator-mxnet/labels/Flaky","name":"Flaky","color":"fc2929","default":false},{"id":1018798522,"node_id":"MDU6TGFiZWwxMDE4Nzk4NTIy","url":"https://api.github.com/repos/apache/incubator-mxnet/labels/pr-awaiting-review","name":"pr-awaiting-review","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/13609/comments","statuses_url":"https://api.github.com/repos/apache/incubator-mxnet/statuses/aaa9d39093ff51a57513ba68a46d7479b63c0766","head":{"label":"wkcn:fix_roi_align_test","ref":"fix_roi_align_test","sha":"aaa9d39093ff51a57513ba68a46d7479b63c0766","user":{"login":"wkcn","id":3415417,"node_id":"MDQ6VXNlcjM0MTU0MTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3415417?v=4","gravatar_id":"","url":"https://api.github.com/users/wkcn","html_url":"https://github.com/wkcn","followers_url":"https://api.github.com/users/wkcn/followers","following_url":"https://api.github.com/users/wkcn/following{/other_user}","gists_url":"https://api.github.com/users/wkcn/gists{/gist_id}","starred_url":"https://api.github.com/users/wkcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkcn/subscriptions","organizations_url":"https://api.github.com/users/wkcn/orgs","repos_url":"https://api.github.com/users/wkcn/repos","events_url":"https://api.github.com/users/wkcn/events{/privacy}","received_events_url":"https://api.github.com/users/wkcn/received_events","type":"User","site_admin":false},"repo":{"id":115596906,"node_id":"MDEwOlJlcG9zaXRvcnkxMTU1OTY5MDY=","name":"incubator-mxnet","full_name":"wkcn/incubator-mxnet","private":false,"owner":{"login":"wkcn","id":3415417,"node_id":"MDQ6VXNlcjM0MTU0MTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3415417?v=4","gravatar_id":"","url":"https://api.github.com/users/wkcn","html_url":"https://github.com/wkcn","followers_url":"https://api.github.com/users/wkcn/followers","following_url":"https://api.github.com/users/wkcn/following{/other_user}","gists_url":"https://api.github.com/users/wkcn/gists{/gist_id}","starred_url":"https://api.github.com/users/wkcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkcn/subscriptions","organizations_url":"https://api.github.com/users/wkcn/orgs","repos_url":"https://api.github.com/users/wkcn/repos","events_url":"https://api.github.com/users/wkcn/events{/privacy}","received_events_url":"https://api.github.com/users/wkcn/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wkcn/incubator-mxnet","description":"Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more","fork":true,"url":"https://api.github.com/repos/wkcn/incubator-mxnet","forks_url":"https://api.github.com/repos/wkcn/incubator-mxnet/forks","keys_url":"https://api.github.com/repos/wkcn/incubator-mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wkcn/incubator-mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wkcn/incubator-mxnet/teams","hooks_url":"https://api.github.com/repos/wkcn/incubator-mxnet/hooks","issue_events_url":"https://api.github.com/repos/wkcn/incubator-mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/wkcn/incubator-mxnet/events","assignees_url":"https://api.github.com/repos/wkcn/incubator-mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/wkcn/incubator-mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/wkcn/incubator-mxnet/tags","blobs_url":"https://api.github.com/repos/wkcn/incubator-mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wkcn/incubator-mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wkcn/incubator-mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/wkcn/incubator-mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wkcn/incubator-mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/wkcn/incubator-mxnet/languages","stargazers_url":"https://api.github.com/repos/wkcn/incubator-mxnet/stargazers","contributors_url":"https://api.github.com/repos/wkcn/incubator-mxnet/contributors","subscribers_url":"https://api.github.com/repos/wkcn/incubator-mxnet/subscribers","subscription_url":"https://api.github.com/repos/wkcn/incubator-mxnet/subscription","commits_url":"https://api.github.com/repos/wkcn/incubator-mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/wkcn/incubator-mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/wkcn/incubator-mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/wkcn/incubator-mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/wkcn/incubator-mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/wkcn/incubator-mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wkcn/incubator-mxnet/merges","archive_url":"https://api.github.com/repos/wkcn/incubator-mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wkcn/incubator-mxnet/downloads","issues_url":"https://api.github.com/repos/wkcn/incubator-mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/wkcn/incubator-mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/wkcn/incubator-mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/wkcn/incubator-mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wkcn/incubator-mxnet/labels{/name}","releases_url":"https://api.github.com/repos/wkcn/incubator-mxnet/releases{/id}","deployments_url":"https://api.github.com/repos/wkcn/incubator-mxnet/deployments","created_at":"2017-12-28T07:20:42Z","updated_at":"2017-12-28T07:20:51Z","pushed_at":"2018-12-18T02:54:48Z","git_url":"git://github.com/wkcn/incubator-mxnet.git","ssh_url":"git@github.com:wkcn/incubator-mxnet.git","clone_url":"https://github.com/wkcn/incubator-mxnet.git","svn_url":"https://github.com/wkcn/incubator-mxnet","homepage":"http://mxnet.io","size":50451,"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,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"46a29903c7d1ed84fec2d8e276c44200ec9f9f3a","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":34864402,"node_id":"MDEwOlJlcG9zaXRvcnkzNDg2NDQwMg==","name":"incubator-mxnet","full_name":"apache/incubator-mxnet","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/incubator-mxnet","description":"Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more","fork":false,"url":"https://api.github.com/repos/apache/incubator-mxnet","forks_url":"https://api.github.com/repos/apache/incubator-mxnet/forks","keys_url":"https://api.github.com/repos/apache/incubator-mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-mxnet/teams","hooks_url":"https://api.github.com/repos/apache/incubator-mxnet/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-mxnet/events","assignees_url":"https://api.github.com/repos/apache/incubator-mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-mxnet/tags","blobs_url":"https://api.github.com/repos/apache/incubator-mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-mxnet/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-mxnet/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-mxnet/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-mxnet/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-mxnet/subscription","commits_url":"https://api.github.com/repos/apache/incubator-mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-mxnet/merges","archive_url":"https://api.github.com/repos/apache/incubator-mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-mxnet/downloads","issues_url":"https://api.github.com/repos/apache/incubator-mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-mxnet/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-mxnet/deployments","created_at":"2015-04-30T16:21:15Z","updated_at":"2018-12-19T02:26:21Z","pushed_at":"2018-12-19T03:53:21Z","git_url":"git://github.com/apache/incubator-mxnet.git","ssh_url":"git@github.com:apache/incubator-mxnet.git","clone_url":"https://github.com/apache/incubator-mxnet.git","svn_url":"https://github.com/apache/incubator-mxnet","homepage":"https://mxnet.apache.org","size":50593,"stargazers_count":15824,"watchers_count":15824,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5738,"mirror_url":null,"archived":false,"open_issues_count":997,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5738,"open_issues":997,"watchers":15824,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609"},"html":{"href":"https://github.com/apache/incubator-mxnet/pull/13609"},"issue":{"href":"https://api.github.com/repos/apache/incubator-mxnet/issues/13609"},"comments":{"href":"https://api.github.com/repos/apache/incubator-mxnet/issues/13609/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/13609/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-mxnet/statuses/aaa9d39093ff51a57513ba68a46d7479b63c0766"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wkcn"}}