{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/3601","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/3601/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/3601/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/3601/events","html_url":"https://github.com/fchollet/keras/issues/3601","id":173557106,"number":3601,"title":"Generator Race Condition in master","user":{"login":"kuza55","id":387986,"avatar_url":"https://avatars.githubusercontent.com/u/387986?v=3","gravatar_id":"","url":"https://api.github.com/users/kuza55","html_url":"https://github.com/kuza55","followers_url":"https://api.github.com/users/kuza55/followers","following_url":"https://api.github.com/users/kuza55/following{/other_user}","gists_url":"https://api.github.com/users/kuza55/gists{/gist_id}","starred_url":"https://api.github.com/users/kuza55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuza55/subscriptions","organizations_url":"https://api.github.com/users/kuza55/orgs","repos_url":"https://api.github.com/users/kuza55/repos","events_url":"https://api.github.com/users/kuza55/events{/privacy}","received_events_url":"https://api.github.com/users/kuza55/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-26T22:40:37Z","updated_at":"2016-09-29T17:17:09Z","closed_at":null,"body":"I don't really know what's causing this atm, but there is some sort of multithreading issue with generators in the master branch causing me to get exceptions in my generator.\r\n\r\nReverting to what is currently in pip solves the issue, so it's probably something that has changed wrt generators since a release.\r\n\r\n```\r\nTraceback (most recent call last):                                                                                                              \r\n  File \"/usr/lib/python2.7/threading.py\", line 810, in __bootstrap_inner                                                                        \r\n    self.run()                                                                                                                                  \r\n  File \"/usr/lib/python2.7/threading.py\", line 763, in run                                                                                      \r\n    self.__target(*self.__args, **self.__kwargs)                                                                                                \r\n  File \"/home/ubuntu/virtualenv/local/lib/python2.7/site-packages/keras/engine/training.py\", line 425, in data_generator_task                   \r\n    generator_output = next(generator)                                                                                                          \r\nValueError: generator already executing                                                                                                         \r\n                                                                                                                                                \r\nTraceback (most recent call last):                                                                                                              \r\n  File \"run.py\", line 18, in <module>                                                                                                           \r\n    validation_data=vgen, nb_val_samples=5120)                                                                                                  \r\n  File \"/home/ubuntu/virtualenv/local/lib/python2.7/site-packages/keras/engine/training.py\", line 1469, in fit_generator                        \r\n    max_q_size=max_q_size)                                                                                                                      \r\n  File \"/home/ubuntu/virtualenv/local/lib/python2.7/site-packages/keras/engine/training.py\", line 1539, in evaluate_generator                   \r\n    'or (x, y). Found: ' + str(generator_output))                                                                                               \r\nException: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None                                                   \r\nException in thread Thread-36:                                                                                                                  \r\nTraceback (most recent call last):                                                                                                              \r\n  File \"/usr/lib/python2.7/threading.py\", line 810, in __bootstrap_inner                                                                        \r\n    self.run()                                                                                                                                  \r\n  File \"/usr/lib/python2.7/threading.py\", line 763, in run                                                                                      \r\n    self.__target(*self.__args, **self.__kwargs)                                                                                                \r\n  File \"/home/ubuntu/virtualenv/local/lib/python2.7/site-packages/keras/engine/training.py\", line 425, in data_generator_task                   \r\n    generator_output = next(generator)                                                                                                          \r\n  File \"/mnt/bosch/data.py\", line 135, in generate_batch                                                                                        \r\n    (x_arr, y_arr) = next(gen)                                                                                                                  \r\n  File \"/mnt/bosch/data.py\", line 206, in new_gen                                                                                               \r\n    yield ([np.array(num_arr).reshape((968)), np.array(num_mask).reshape((968)),                                                                \r\nAttributeError: 'NoneType' object has no attribute 'array'                                                                                      \r\n                                                                                                                                                \r\nException in thread Thread-37:                                                                                                                  \r\nTraceback (most recent call last):                                                                                                              \r\n  File \"/usr/lib/python2.7/threading.py\", line 810, in __bootstrap_inner                                                                        \r\n    self.run()                                                                                                                                  \r\n  File \"/usr/lib/python2.7/threading.py\", line 763, in run                                                                                      \r\n    self.__target(*self.__args, **self.__kwargs)                                                                                                \r\n  File \"/home/ubuntu/virtualenv/local/lib/python2.7/site-packages/keras/engine/training.py\", line 425, in data_generator_task                   \r\n    generator_output = next(generator)                                                                                                          \r\n  File \"/mnt/bosch/data.py\", line 135, in generate_batch                                                                                        \r\n    (x_arr, y_arr) = next(gen)                                                                                                                  \r\n  File \"/mnt/bosch/data.py\", line 206, in new_gen                                                                                               \r\n    yield ([np.array(num_arr).reshape((968)), np.array(num_mask).reshape((968)),                                                                \r\nAttributeError: 'NoneType' object has no attribute 'array'                              \r\n```"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/250532190","html_url":"https://github.com/fchollet/keras/issues/3601#issuecomment-250532190","issue_url":"https://api.github.com/repos/fchollet/keras/issues/3601","id":250532190,"user":{"login":"sergeyf","id":1874668,"avatar_url":"https://avatars.githubusercontent.com/u/1874668?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeyf","html_url":"https://github.com/sergeyf","followers_url":"https://api.github.com/users/sergeyf/followers","following_url":"https://api.github.com/users/sergeyf/following{/other_user}","gists_url":"https://api.github.com/users/sergeyf/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeyf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeyf/subscriptions","organizations_url":"https://api.github.com/users/sergeyf/orgs","repos_url":"https://api.github.com/users/sergeyf/repos","events_url":"https://api.github.com/users/sergeyf/events{/privacy}","received_events_url":"https://api.github.com/users/sergeyf/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T17:17:09Z","updated_at":"2016-09-29T17:17:09Z","body":"I am having this issue as well.\r\n"}}
{"actor":{"display_login":"sergeyf"}}