{"action":"created","comment":{"url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments/239989469","pull_request_review_id":182927643,"id":239989469,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTk4OTQ2OQ==","diff_hunk":"@@ -262,7 +262,7 @@ def test_complete(self):\n         simple_generator = SimpleGenerator(input_bboxes_group, input_labels_group, image=input_image, num_classes=6)\n         # expect a UserWarning\n         with pytest.warns(UserWarning):\n-            _, [_, labels_batch] = simple_generator.next()\n+            _, [_, labels_batch] = simple_generator.__getitem__(0)","path":"tests/preprocessing/test_generator.py","position":5,"original_position":5,"commit_id":"0bab4b2bf1e8e78a147d96169e211e120ab6041b","original_commit_id":"0bab4b2bf1e8e78a147d96169e211e120ab6041b","user":{"login":"de-vri-es","id":786213,"node_id":"MDQ6VXNlcjc4NjIxMw==","avatar_url":"https://avatars1.githubusercontent.com/u/786213?v=4","gravatar_id":"","url":"https://api.github.com/users/de-vri-es","html_url":"https://github.com/de-vri-es","followers_url":"https://api.github.com/users/de-vri-es/followers","following_url":"https://api.github.com/users/de-vri-es/following{/other_user}","gists_url":"https://api.github.com/users/de-vri-es/gists{/gist_id}","starred_url":"https://api.github.com/users/de-vri-es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/de-vri-es/subscriptions","organizations_url":"https://api.github.com/users/de-vri-es/orgs","repos_url":"https://api.github.com/users/de-vri-es/repos","events_url":"https://api.github.com/users/de-vri-es/events{/privacy}","received_events_url":"https://api.github.com/users/de-vri-es/received_events","type":"User","site_admin":false},"body":"Shouldn't this just be `simple_generator[0]`?","created_at":"2018-12-08T02:12:08Z","updated_at":"2018-12-08T02:12:09Z","html_url":"https://github.com/fizyr/keras-retinanet/pull/824#discussion_r239989469","pull_request_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments/239989469"},"html":{"href":"https://github.com/fizyr/keras-retinanet/pull/824#discussion_r239989469"},"pull_request":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824"}}},"pull_request":{"url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824","id":236284801,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2Mjg0ODAx","html_url":"https://github.com/fizyr/keras-retinanet/pull/824","diff_url":"https://github.com/fizyr/keras-retinanet/pull/824.diff","patch_url":"https://github.com/fizyr/keras-retinanet/pull/824.patch","issue_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/824","number":824,"state":"open","locked":false,"title":"keras sequence methods for generator","user":{"login":"bw4sz","id":1208492,"node_id":"MDQ6VXNlcjEyMDg0OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1208492?v=4","gravatar_id":"","url":"https://api.github.com/users/bw4sz","html_url":"https://github.com/bw4sz","followers_url":"https://api.github.com/users/bw4sz/followers","following_url":"https://api.github.com/users/bw4sz/following{/other_user}","gists_url":"https://api.github.com/users/bw4sz/gists{/gist_id}","starred_url":"https://api.github.com/users/bw4sz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bw4sz/subscriptions","organizations_url":"https://api.github.com/users/bw4sz/orgs","repos_url":"https://api.github.com/users/bw4sz/repos","events_url":"https://api.github.com/users/bw4sz/events{/privacy}","received_events_url":"https://api.github.com/users/bw4sz/received_events","type":"User","site_admin":false},"body":"The goal of this PR is to introduce the keras sequence method (https://keras.io/models/sequential/) to the default generator class.\r\n\r\nGoals \r\n\r\n1. Improve parallelization and thread-safe generators. Keras docs state:\r\n\r\n\"The use of keras.utils.Sequence guarantees the ordering and guarantees the single use of every input per epoch when using use_multiprocessing=True.\"\r\n\r\n2. Implemented a __getitem__ and __len__ method.\r\n\r\n3. Remove threading and locks.\r\n\r\n4. Move group shuffling to explicit on_epoch_end method\r\n\r\n5. Added command line arguments for the fit_generator method.\r\n\r\nI cloned the master, built a new conda env, and ran the generator and generator csv tests. \r\n\r\n*Potential Drawbacks*\r\n\r\nA number of windows users have complained about multiprocessing in keras. I found that multiprocessing was only useful when\r\n\r\n1. Generator performs alot of processing. This could happen when files are very large and reading is the bottleneck. Or when the user creates a custom generator method (as I've done in my fork).\r\n\r\n2. When there is sufficient memory to fill the queue. \r\n\r\nMy production environment:\r\n\r\nI am running linux on a large multi-node cluster, feeding in > 20,000 images during training in batches of 6. I found a huge performance boosts from using the sequence method and multiprocessing, but the overhead is probably too much for the csv generator method in most cases.\r\n","created_at":"2018-12-05T18:53:48Z","updated_at":"2018-12-08T02:12:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72bda7fbfba9f48fa06e4ba74c7f1eea023a8de4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824/commits","review_comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824/comments","review_comment_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/824/comments","statuses_url":"https://api.github.com/repos/fizyr/keras-retinanet/statuses/0bab4b2bf1e8e78a147d96169e211e120ab6041b","head":{"label":"bw4sz:keras_sequence","ref":"keras_sequence","sha":"0bab4b2bf1e8e78a147d96169e211e120ab6041b","user":{"login":"bw4sz","id":1208492,"node_id":"MDQ6VXNlcjEyMDg0OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1208492?v=4","gravatar_id":"","url":"https://api.github.com/users/bw4sz","html_url":"https://github.com/bw4sz","followers_url":"https://api.github.com/users/bw4sz/followers","following_url":"https://api.github.com/users/bw4sz/following{/other_user}","gists_url":"https://api.github.com/users/bw4sz/gists{/gist_id}","starred_url":"https://api.github.com/users/bw4sz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bw4sz/subscriptions","organizations_url":"https://api.github.com/users/bw4sz/orgs","repos_url":"https://api.github.com/users/bw4sz/repos","events_url":"https://api.github.com/users/bw4sz/events{/privacy}","received_events_url":"https://api.github.com/users/bw4sz/received_events","type":"User","site_admin":false},"repo":{"id":137510447,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc1MTA0NDc=","name":"keras-retinanet","full_name":"bw4sz/keras-retinanet","private":false,"owner":{"login":"bw4sz","id":1208492,"node_id":"MDQ6VXNlcjEyMDg0OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1208492?v=4","gravatar_id":"","url":"https://api.github.com/users/bw4sz","html_url":"https://github.com/bw4sz","followers_url":"https://api.github.com/users/bw4sz/followers","following_url":"https://api.github.com/users/bw4sz/following{/other_user}","gists_url":"https://api.github.com/users/bw4sz/gists{/gist_id}","starred_url":"https://api.github.com/users/bw4sz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bw4sz/subscriptions","organizations_url":"https://api.github.com/users/bw4sz/orgs","repos_url":"https://api.github.com/users/bw4sz/repos","events_url":"https://api.github.com/users/bw4sz/events{/privacy}","received_events_url":"https://api.github.com/users/bw4sz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bw4sz/keras-retinanet","description":"Keras implementation of RetinaNet object detection.","fork":true,"url":"https://api.github.com/repos/bw4sz/keras-retinanet","forks_url":"https://api.github.com/repos/bw4sz/keras-retinanet/forks","keys_url":"https://api.github.com/repos/bw4sz/keras-retinanet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bw4sz/keras-retinanet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bw4sz/keras-retinanet/teams","hooks_url":"https://api.github.com/repos/bw4sz/keras-retinanet/hooks","issue_events_url":"https://api.github.com/repos/bw4sz/keras-retinanet/issues/events{/number}","events_url":"https://api.github.com/repos/bw4sz/keras-retinanet/events","assignees_url":"https://api.github.com/repos/bw4sz/keras-retinanet/assignees{/user}","branches_url":"https://api.github.com/repos/bw4sz/keras-retinanet/branches{/branch}","tags_url":"https://api.github.com/repos/bw4sz/keras-retinanet/tags","blobs_url":"https://api.github.com/repos/bw4sz/keras-retinanet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bw4sz/keras-retinanet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bw4sz/keras-retinanet/git/refs{/sha}","trees_url":"https://api.github.com/repos/bw4sz/keras-retinanet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bw4sz/keras-retinanet/statuses/{sha}","languages_url":"https://api.github.com/repos/bw4sz/keras-retinanet/languages","stargazers_url":"https://api.github.com/repos/bw4sz/keras-retinanet/stargazers","contributors_url":"https://api.github.com/repos/bw4sz/keras-retinanet/contributors","subscribers_url":"https://api.github.com/repos/bw4sz/keras-retinanet/subscribers","subscription_url":"https://api.github.com/repos/bw4sz/keras-retinanet/subscription","commits_url":"https://api.github.com/repos/bw4sz/keras-retinanet/commits{/sha}","git_commits_url":"https://api.github.com/repos/bw4sz/keras-retinanet/git/commits{/sha}","comments_url":"https://api.github.com/repos/bw4sz/keras-retinanet/comments{/number}","issue_comment_url":"https://api.github.com/repos/bw4sz/keras-retinanet/issues/comments{/number}","contents_url":"https://api.github.com/repos/bw4sz/keras-retinanet/contents/{+path}","compare_url":"https://api.github.com/repos/bw4sz/keras-retinanet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bw4sz/keras-retinanet/merges","archive_url":"https://api.github.com/repos/bw4sz/keras-retinanet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bw4sz/keras-retinanet/downloads","issues_url":"https://api.github.com/repos/bw4sz/keras-retinanet/issues{/number}","pulls_url":"https://api.github.com/repos/bw4sz/keras-retinanet/pulls{/number}","milestones_url":"https://api.github.com/repos/bw4sz/keras-retinanet/milestones{/number}","notifications_url":"https://api.github.com/repos/bw4sz/keras-retinanet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bw4sz/keras-retinanet/labels{/name}","releases_url":"https://api.github.com/repos/bw4sz/keras-retinanet/releases{/id}","deployments_url":"https://api.github.com/repos/bw4sz/keras-retinanet/deployments","created_at":"2018-06-15T16:35:07Z","updated_at":"2018-12-05T17:48:27Z","pushed_at":"2018-12-06T17:20:52Z","git_url":"git://github.com/bw4sz/keras-retinanet.git","ssh_url":"git@github.com:bw4sz/keras-retinanet.git","clone_url":"https://github.com/bw4sz/keras-retinanet.git","svn_url":"https://github.com/bw4sz/keras-retinanet","homepage":null,"size":13411,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"fizyr:master","ref":"master","sha":"9b593752e7cf0d5b5ee155f70915b3753b7d816f","user":{"login":"fizyr","id":14974733,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTc0NzMz","avatar_url":"https://avatars0.githubusercontent.com/u/14974733?v=4","gravatar_id":"","url":"https://api.github.com/users/fizyr","html_url":"https://github.com/fizyr","followers_url":"https://api.github.com/users/fizyr/followers","following_url":"https://api.github.com/users/fizyr/following{/other_user}","gists_url":"https://api.github.com/users/fizyr/gists{/gist_id}","starred_url":"https://api.github.com/users/fizyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fizyr/subscriptions","organizations_url":"https://api.github.com/users/fizyr/orgs","repos_url":"https://api.github.com/users/fizyr/repos","events_url":"https://api.github.com/users/fizyr/events{/privacy}","received_events_url":"https://api.github.com/users/fizyr/received_events","type":"Organization","site_admin":false},"repo":{"id":100249425,"node_id":"MDEwOlJlcG9zaXRvcnkxMDAyNDk0MjU=","name":"keras-retinanet","full_name":"fizyr/keras-retinanet","private":false,"owner":{"login":"fizyr","id":14974733,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTc0NzMz","avatar_url":"https://avatars0.githubusercontent.com/u/14974733?v=4","gravatar_id":"","url":"https://api.github.com/users/fizyr","html_url":"https://github.com/fizyr","followers_url":"https://api.github.com/users/fizyr/followers","following_url":"https://api.github.com/users/fizyr/following{/other_user}","gists_url":"https://api.github.com/users/fizyr/gists{/gist_id}","starred_url":"https://api.github.com/users/fizyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fizyr/subscriptions","organizations_url":"https://api.github.com/users/fizyr/orgs","repos_url":"https://api.github.com/users/fizyr/repos","events_url":"https://api.github.com/users/fizyr/events{/privacy}","received_events_url":"https://api.github.com/users/fizyr/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fizyr/keras-retinanet","description":"Keras implementation of RetinaNet object detection.","fork":false,"url":"https://api.github.com/repos/fizyr/keras-retinanet","forks_url":"https://api.github.com/repos/fizyr/keras-retinanet/forks","keys_url":"https://api.github.com/repos/fizyr/keras-retinanet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fizyr/keras-retinanet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fizyr/keras-retinanet/teams","hooks_url":"https://api.github.com/repos/fizyr/keras-retinanet/hooks","issue_events_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/events{/number}","events_url":"https://api.github.com/repos/fizyr/keras-retinanet/events","assignees_url":"https://api.github.com/repos/fizyr/keras-retinanet/assignees{/user}","branches_url":"https://api.github.com/repos/fizyr/keras-retinanet/branches{/branch}","tags_url":"https://api.github.com/repos/fizyr/keras-retinanet/tags","blobs_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/refs{/sha}","trees_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fizyr/keras-retinanet/statuses/{sha}","languages_url":"https://api.github.com/repos/fizyr/keras-retinanet/languages","stargazers_url":"https://api.github.com/repos/fizyr/keras-retinanet/stargazers","contributors_url":"https://api.github.com/repos/fizyr/keras-retinanet/contributors","subscribers_url":"https://api.github.com/repos/fizyr/keras-retinanet/subscribers","subscription_url":"https://api.github.com/repos/fizyr/keras-retinanet/subscription","commits_url":"https://api.github.com/repos/fizyr/keras-retinanet/commits{/sha}","git_commits_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/commits{/sha}","comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/comments{/number}","issue_comment_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/comments{/number}","contents_url":"https://api.github.com/repos/fizyr/keras-retinanet/contents/{+path}","compare_url":"https://api.github.com/repos/fizyr/keras-retinanet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fizyr/keras-retinanet/merges","archive_url":"https://api.github.com/repos/fizyr/keras-retinanet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fizyr/keras-retinanet/downloads","issues_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues{/number}","pulls_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls{/number}","milestones_url":"https://api.github.com/repos/fizyr/keras-retinanet/milestones{/number}","notifications_url":"https://api.github.com/repos/fizyr/keras-retinanet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fizyr/keras-retinanet/labels{/name}","releases_url":"https://api.github.com/repos/fizyr/keras-retinanet/releases{/id}","deployments_url":"https://api.github.com/repos/fizyr/keras-retinanet/deployments","created_at":"2017-08-14T09:14:29Z","updated_at":"2018-12-07T14:02:22Z","pushed_at":"2018-12-07T09:49:19Z","git_url":"git://github.com/fizyr/keras-retinanet.git","ssh_url":"git@github.com:fizyr/keras-retinanet.git","clone_url":"https://github.com/fizyr/keras-retinanet.git","svn_url":"https://github.com/fizyr/keras-retinanet","homepage":null,"size":12982,"stargazers_count":1984,"watchers_count":1984,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":845,"mirror_url":null,"archived":false,"open_issues_count":19,"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":845,"open_issues":19,"watchers":1984,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824"},"html":{"href":"https://github.com/fizyr/keras-retinanet/pull/824"},"issue":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/issues/824"},"comments":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/issues/824/comments"},"review_comments":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824/comments"},"review_comment":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/824/commits"},"statuses":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/statuses/0bab4b2bf1e8e78a147d96169e211e120ab6041b"}},"author_association":"NONE"}}
{"actor":{"display_login":"de-vri-es"}}