{"action":"created","comment":{"url":"https://api.github.com/repos/ray-project/ray/pulls/comments/234421113","pull_request_review_id":176067439,"id":234421113,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQyMTExMw==","diff_hunk":"@@ -987,7 +987,7 @@ def check_intervals_non_overlapping(list_of_intervals):\n     @ray.remote(num_gpus=1)\n     def f1():\n         t1 = time.monotonic()\n-        time.sleep(0.1)\n+        time.sleep(0.2)","path":"test/actor_test.py","position":5,"original_position":5,"commit_id":"ae903ec3bcb79309ab83fe6d060bd39ea885ea56","original_commit_id":"06c37646034d19c4cefa67f20d8316585eda083f","user":{"login":"pcmoritz","id":113316,"node_id":"MDQ6VXNlcjExMzMxNg==","avatar_url":"https://avatars1.githubusercontent.com/u/113316?v=4","gravatar_id":"","url":"https://api.github.com/users/pcmoritz","html_url":"https://github.com/pcmoritz","followers_url":"https://api.github.com/users/pcmoritz/followers","following_url":"https://api.github.com/users/pcmoritz/following{/other_user}","gists_url":"https://api.github.com/users/pcmoritz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcmoritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcmoritz/subscriptions","organizations_url":"https://api.github.com/users/pcmoritz/orgs","repos_url":"https://api.github.com/users/pcmoritz/repos","events_url":"https://api.github.com/users/pcmoritz/events{/privacy}","received_events_url":"https://api.github.com/users/pcmoritz/received_events","type":"User","site_admin":false},"body":"While tasks were spread out between nodes, multiple tasks used the same workers.","created_at":"2018-11-17T20:55:09Z","updated_at":"2018-11-17T20:55:09Z","html_url":"https://github.com/ray-project/ray/pull/3324#discussion_r234421113","pull_request_url":"https://api.github.com/repos/ray-project/ray/pulls/3324","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments/234421113"},"html":{"href":"https://github.com/ray-project/ray/pull/3324#discussion_r234421113"},"pull_request":{"href":"https://api.github.com/repos/ray-project/ray/pulls/3324"}},"in_reply_to_id":234421025},"pull_request":{"url":"https://api.github.com/repos/ray-project/ray/pulls/3324","id":231028195,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMDI4MTk1","html_url":"https://github.com/ray-project/ray/pull/3324","diff_url":"https://github.com/ray-project/ray/pull/3324.diff","patch_url":"https://github.com/ray-project/ray/pull/3324.patch","issue_url":"https://api.github.com/repos/ray-project/ray/issues/3324","number":3324,"state":"open","locked":false,"title":"Ready queue refactor to make Dispatching tasks more efficient","user":{"login":"pcmoritz","id":113316,"node_id":"MDQ6VXNlcjExMzMxNg==","avatar_url":"https://avatars1.githubusercontent.com/u/113316?v=4","gravatar_id":"","url":"https://api.github.com/users/pcmoritz","html_url":"https://github.com/pcmoritz","followers_url":"https://api.github.com/users/pcmoritz/followers","following_url":"https://api.github.com/users/pcmoritz/following{/other_user}","gists_url":"https://api.github.com/users/pcmoritz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcmoritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcmoritz/subscriptions","organizations_url":"https://api.github.com/users/pcmoritz/orgs","repos_url":"https://api.github.com/users/pcmoritz/repos","events_url":"https://api.github.com/users/pcmoritz/events{/privacy}","received_events_url":"https://api.github.com/users/pcmoritz/received_events","type":"User","site_admin":false},"body":"This fixes the same problem as https://github.com/ray-project/ray/pull/3310 but in a slightly different way: Instead of maintaining the minimum resources needed by tasks in the ready queue and skipping going over the tasks there, it keeps an index on which resource shape a task is from, which makes it fast to determine which tasks are of a given resource shape.\r\n\r\nThis PR implements the simplest version of this idea and there is a number of refinements that could be applied (avoiding the task copies, implementing a more clever strategy to avoid head-of-line blocking).\r\n\r\nIt has the advantage over https://github.com/ray-project/ray/pull/3310 int that the datastructure allows O(1) in determining which tasks to dispatch (although it currently is more expensive than that, but cheaper than in the master, and also cheaper than in the other PR; the strategy there would break down if the ready queue contains zero-resource tasks). It can also facilitate smarter head-of-line blocking avoidance in the future. It has the disadvantage that it doesn't preserve approximate FIFO order like the other PR does.","created_at":"2018-11-15T00:23:44Z","updated_at":"2018-11-17T20:55:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ec525cd6ff68ca09b42b09319fcf81bad97cbaf","assignee":{"login":"stephanie-wang","id":2560516,"node_id":"MDQ6VXNlcjI1NjA1MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2560516?v=4","gravatar_id":"","url":"https://api.github.com/users/stephanie-wang","html_url":"https://github.com/stephanie-wang","followers_url":"https://api.github.com/users/stephanie-wang/followers","following_url":"https://api.github.com/users/stephanie-wang/following{/other_user}","gists_url":"https://api.github.com/users/stephanie-wang/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanie-wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanie-wang/subscriptions","organizations_url":"https://api.github.com/users/stephanie-wang/orgs","repos_url":"https://api.github.com/users/stephanie-wang/repos","events_url":"https://api.github.com/users/stephanie-wang/events{/privacy}","received_events_url":"https://api.github.com/users/stephanie-wang/received_events","type":"User","site_admin":false},"assignees":[{"login":"stephanie-wang","id":2560516,"node_id":"MDQ6VXNlcjI1NjA1MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2560516?v=4","gravatar_id":"","url":"https://api.github.com/users/stephanie-wang","html_url":"https://github.com/stephanie-wang","followers_url":"https://api.github.com/users/stephanie-wang/followers","following_url":"https://api.github.com/users/stephanie-wang/following{/other_user}","gists_url":"https://api.github.com/users/stephanie-wang/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanie-wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanie-wang/subscriptions","organizations_url":"https://api.github.com/users/stephanie-wang/orgs","repos_url":"https://api.github.com/users/stephanie-wang/repos","events_url":"https://api.github.com/users/stephanie-wang/events{/privacy}","received_events_url":"https://api.github.com/users/stephanie-wang/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"atumanov","id":1316372,"node_id":"MDQ6VXNlcjEzMTYzNzI=","avatar_url":"https://avatars1.githubusercontent.com/u/1316372?v=4","gravatar_id":"","url":"https://api.github.com/users/atumanov","html_url":"https://github.com/atumanov","followers_url":"https://api.github.com/users/atumanov/followers","following_url":"https://api.github.com/users/atumanov/following{/other_user}","gists_url":"https://api.github.com/users/atumanov/gists{/gist_id}","starred_url":"https://api.github.com/users/atumanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atumanov/subscriptions","organizations_url":"https://api.github.com/users/atumanov/orgs","repos_url":"https://api.github.com/users/atumanov/repos","events_url":"https://api.github.com/users/atumanov/events{/privacy}","received_events_url":"https://api.github.com/users/atumanov/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ray-project/ray/pulls/3324/commits","review_comments_url":"https://api.github.com/repos/ray-project/ray/pulls/3324/comments","review_comment_url":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ray-project/ray/issues/3324/comments","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/ae903ec3bcb79309ab83fe6d060bd39ea885ea56","head":{"label":"pcmoritz:queue-refactor","ref":"queue-refactor","sha":"ae903ec3bcb79309ab83fe6d060bd39ea885ea56","user":{"login":"pcmoritz","id":113316,"node_id":"MDQ6VXNlcjExMzMxNg==","avatar_url":"https://avatars1.githubusercontent.com/u/113316?v=4","gravatar_id":"","url":"https://api.github.com/users/pcmoritz","html_url":"https://github.com/pcmoritz","followers_url":"https://api.github.com/users/pcmoritz/followers","following_url":"https://api.github.com/users/pcmoritz/following{/other_user}","gists_url":"https://api.github.com/users/pcmoritz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcmoritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcmoritz/subscriptions","organizations_url":"https://api.github.com/users/pcmoritz/orgs","repos_url":"https://api.github.com/users/pcmoritz/repos","events_url":"https://api.github.com/users/pcmoritz/events{/privacy}","received_events_url":"https://api.github.com/users/pcmoritz/received_events","type":"User","site_admin":false},"repo":{"id":77173450,"node_id":"MDEwOlJlcG9zaXRvcnk3NzE3MzQ1MA==","name":"ray-1","full_name":"pcmoritz/ray-1","private":false,"owner":{"login":"pcmoritz","id":113316,"node_id":"MDQ6VXNlcjExMzMxNg==","avatar_url":"https://avatars1.githubusercontent.com/u/113316?v=4","gravatar_id":"","url":"https://api.github.com/users/pcmoritz","html_url":"https://github.com/pcmoritz","followers_url":"https://api.github.com/users/pcmoritz/followers","following_url":"https://api.github.com/users/pcmoritz/following{/other_user}","gists_url":"https://api.github.com/users/pcmoritz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcmoritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcmoritz/subscriptions","organizations_url":"https://api.github.com/users/pcmoritz/orgs","repos_url":"https://api.github.com/users/pcmoritz/repos","events_url":"https://api.github.com/users/pcmoritz/events{/privacy}","received_events_url":"https://api.github.com/users/pcmoritz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pcmoritz/ray-1","description":"An experimental distributed execution engine","fork":true,"url":"https://api.github.com/repos/pcmoritz/ray-1","forks_url":"https://api.github.com/repos/pcmoritz/ray-1/forks","keys_url":"https://api.github.com/repos/pcmoritz/ray-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcmoritz/ray-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcmoritz/ray-1/teams","hooks_url":"https://api.github.com/repos/pcmoritz/ray-1/hooks","issue_events_url":"https://api.github.com/repos/pcmoritz/ray-1/issues/events{/number}","events_url":"https://api.github.com/repos/pcmoritz/ray-1/events","assignees_url":"https://api.github.com/repos/pcmoritz/ray-1/assignees{/user}","branches_url":"https://api.github.com/repos/pcmoritz/ray-1/branches{/branch}","tags_url":"https://api.github.com/repos/pcmoritz/ray-1/tags","blobs_url":"https://api.github.com/repos/pcmoritz/ray-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcmoritz/ray-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcmoritz/ray-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcmoritz/ray-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcmoritz/ray-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pcmoritz/ray-1/languages","stargazers_url":"https://api.github.com/repos/pcmoritz/ray-1/stargazers","contributors_url":"https://api.github.com/repos/pcmoritz/ray-1/contributors","subscribers_url":"https://api.github.com/repos/pcmoritz/ray-1/subscribers","subscription_url":"https://api.github.com/repos/pcmoritz/ray-1/subscription","commits_url":"https://api.github.com/repos/pcmoritz/ray-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcmoritz/ray-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcmoritz/ray-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcmoritz/ray-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcmoritz/ray-1/contents/{+path}","compare_url":"https://api.github.com/repos/pcmoritz/ray-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcmoritz/ray-1/merges","archive_url":"https://api.github.com/repos/pcmoritz/ray-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcmoritz/ray-1/downloads","issues_url":"https://api.github.com/repos/pcmoritz/ray-1/issues{/number}","pulls_url":"https://api.github.com/repos/pcmoritz/ray-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pcmoritz/ray-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pcmoritz/ray-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcmoritz/ray-1/labels{/name}","releases_url":"https://api.github.com/repos/pcmoritz/ray-1/releases{/id}","deployments_url":"https://api.github.com/repos/pcmoritz/ray-1/deployments","created_at":"2016-12-22T20:21:46Z","updated_at":"2017-09-30T22:06:30Z","pushed_at":"2018-11-17T20:54:04Z","git_url":"git://github.com/pcmoritz/ray-1.git","ssh_url":"git@github.com:pcmoritz/ray-1.git","clone_url":"https://github.com/pcmoritz/ray-1.git","svn_url":"https://github.com/pcmoritz/ray-1","homepage":"","size":18748,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"ray-project:master","ref":"master","sha":"60b22d9a722984e231db9d56b88512b30bdc0bd3","user":{"login":"ray-project","id":22125274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTI1Mjc0","avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"repo":{"id":71932349,"node_id":"MDEwOlJlcG9zaXRvcnk3MTkzMjM0OQ==","name":"ray","full_name":"ray-project/ray","private":false,"owner":{"login":"ray-project","id":22125274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTI1Mjc0","avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ray-project/ray","description":"A system for parallel and distributed Python that unifies the ML ecosystem.","fork":false,"url":"https://api.github.com/repos/ray-project/ray","forks_url":"https://api.github.com/repos/ray-project/ray/forks","keys_url":"https://api.github.com/repos/ray-project/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ray-project/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ray-project/ray/teams","hooks_url":"https://api.github.com/repos/ray-project/ray/hooks","issue_events_url":"https://api.github.com/repos/ray-project/ray/issues/events{/number}","events_url":"https://api.github.com/repos/ray-project/ray/events","assignees_url":"https://api.github.com/repos/ray-project/ray/assignees{/user}","branches_url":"https://api.github.com/repos/ray-project/ray/branches{/branch}","tags_url":"https://api.github.com/repos/ray-project/ray/tags","blobs_url":"https://api.github.com/repos/ray-project/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ray-project/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ray-project/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/ray-project/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/ray-project/ray/languages","stargazers_url":"https://api.github.com/repos/ray-project/ray/stargazers","contributors_url":"https://api.github.com/repos/ray-project/ray/contributors","subscribers_url":"https://api.github.com/repos/ray-project/ray/subscribers","subscription_url":"https://api.github.com/repos/ray-project/ray/subscription","commits_url":"https://api.github.com/repos/ray-project/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/ray-project/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/ray-project/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/ray-project/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/ray-project/ray/contents/{+path}","compare_url":"https://api.github.com/repos/ray-project/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ray-project/ray/merges","archive_url":"https://api.github.com/repos/ray-project/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ray-project/ray/downloads","issues_url":"https://api.github.com/repos/ray-project/ray/issues{/number}","pulls_url":"https://api.github.com/repos/ray-project/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/ray-project/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/ray-project/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ray-project/ray/labels{/name}","releases_url":"https://api.github.com/repos/ray-project/ray/releases{/id}","deployments_url":"https://api.github.com/repos/ray-project/ray/deployments","created_at":"2016-10-25T19:38:30Z","updated_at":"2018-11-17T19:22:41Z","pushed_at":"2018-11-17T20:54:06Z","git_url":"git://github.com/ray-project/ray.git","ssh_url":"git@github.com:ray-project/ray.git","clone_url":"https://github.com/ray-project/ray.git","svn_url":"https://github.com/ray-project/ray","homepage":"https://ray.readthedocs.io/en/latest/","size":16525,"stargazers_count":4769,"watchers_count":4769,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":643,"mirror_url":null,"archived":false,"open_issues_count":480,"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":643,"open_issues":480,"watchers":4769,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/3324"},"html":{"href":"https://github.com/ray-project/ray/pull/3324"},"issue":{"href":"https://api.github.com/repos/ray-project/ray/issues/3324"},"comments":{"href":"https://api.github.com/repos/ray-project/ray/issues/3324/comments"},"review_comments":{"href":"https://api.github.com/repos/ray-project/ray/pulls/3324/comments"},"review_comment":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ray-project/ray/pulls/3324/commits"},"statuses":{"href":"https://api.github.com/repos/ray-project/ray/statuses/ae903ec3bcb79309ab83fe6d060bd39ea885ea56"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pcmoritz"}}