{"action":"created","issue":{"url":"https://api.github.com/repos/mila-udem/fuel/issues/201","labels_url":"https://api.github.com/repos/mila-udem/fuel/issues/201/labels{/name}","comments_url":"https://api.github.com/repos/mila-udem/fuel/issues/201/comments","events_url":"https://api.github.com/repos/mila-udem/fuel/issues/201/events","html_url":"https://github.com/mila-udem/fuel/issues/201","id":97119059,"number":201,"title":"Merge does not work with Batches","user":{"login":"ejls","id":10982331,"avatar_url":"https://avatars.githubusercontent.com/u/10982331?v=3","gravatar_id":"","url":"https://api.github.com/users/ejls","html_url":"https://github.com/ejls","followers_url":"https://api.github.com/users/ejls/followers","following_url":"https://api.github.com/users/ejls/following{/other_user}","gists_url":"https://api.github.com/users/ejls/gists{/gist_id}","starred_url":"https://api.github.com/users/ejls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejls/subscriptions","organizations_url":"https://api.github.com/users/ejls/orgs","repos_url":"https://api.github.com/users/ejls/repos","events_url":"https://api.github.com/users/ejls/events{/privacy}","received_events_url":"https://api.github.com/users/ejls/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-24T19:05:17Z","updated_at":"2015-07-24T19:17:04Z","closed_at":null,"body":"We get a backtrace when running the example code of Merge with an added Batch :\r\n\r\n```python\r\nfrom fuel.datasets import IterableDataset\r\nenglish = IterableDataset(['Hello world!'])\r\nfrench = IterableDataset(['Bonjour le monde!'])\r\nfrom fuel.streams import DataStream\r\nstreams = (DataStream(english), DataStream(french))\r\nfrom fuel.transformers import Batch, Merge\r\nfrom fuel.schemes import ConstantScheme\r\nstreams = tuple(Batch(stream, ConstantScheme(1)) for stream in streams) # <-- XXX\r\nmerged_stream = Merge(streams, ('english', 'french'))\r\nnext(merged_stream.get_epoch_iterator())\r\n```"},"comment":{"url":"https://api.github.com/repos/mila-udem/fuel/issues/comments/124651382","html_url":"https://github.com/mila-udem/fuel/issues/201#issuecomment-124651382","issue_url":"https://api.github.com/repos/mila-udem/fuel/issues/201","id":124651382,"user":{"login":"dwf","id":60206,"avatar_url":"https://avatars.githubusercontent.com/u/60206?v=3","gravatar_id":"","url":"https://api.github.com/users/dwf","html_url":"https://github.com/dwf","followers_url":"https://api.github.com/users/dwf/followers","following_url":"https://api.github.com/users/dwf/following{/other_user}","gists_url":"https://api.github.com/users/dwf/gists{/gist_id}","starred_url":"https://api.github.com/users/dwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwf/subscriptions","organizations_url":"https://api.github.com/users/dwf/orgs","repos_url":"https://api.github.com/users/dwf/repos","events_url":"https://api.github.com/users/dwf/events{/privacy}","received_events_url":"https://api.github.com/users/dwf/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T19:17:04Z","updated_at":"2015-07-24T19:17:04Z","body":"The plot thickens...\r\n\r\n```python\r\nIn [62]: streams = (DataStream(english, iteration_scheme=SequentialScheme(batch_size=1, examples=1)), DataStream(french, iteration_scheme=SequentialScheme(batch_size=1, examples=1)))\r\n\r\nIn [63]: merged_stream = Merge(streams, ('english', 'french'))\r\n\r\nIn [64]: next(merged_stream.get_epoch_iterator())\r\nOut[64]: ('Hello world!', 'Bonjour le monde!')\r\n\r\nIn [65]: next(merged_stream.get_epoch_iterator())\r\nOut[65]: ()\r\n```\r\n\r\nSo that doesn't throw a traceback but it is puzzlingly not terminating the iterator when it should. I don't know much about `Merge` and `Batch` (those are kind of @rizar's thing I think) but it looks like something is rotten in Denmark."}}