{"action":"closed","issue":{"url":"https://api.github.com/repos/vlukiyanov/pt-sdae/issues/2","repository_url":"https://api.github.com/repos/vlukiyanov/pt-sdae","labels_url":"https://api.github.com/repos/vlukiyanov/pt-sdae/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/vlukiyanov/pt-sdae/issues/2/comments","events_url":"https://api.github.com/repos/vlukiyanov/pt-sdae/issues/2/events","html_url":"https://github.com/vlukiyanov/pt-sdae/issues/2","id":390040982,"node_id":"MDU6SXNzdWUzOTAwNDA5ODI=","number":2,"title":"model.py:pretrain crashes with validation=None","user":{"login":"ForrestCKoch","id":13082844,"node_id":"MDQ6VXNlcjEzMDgyODQ0","avatar_url":"https://avatars2.githubusercontent.com/u/13082844?v=4","gravatar_id":"","url":"https://api.github.com/users/ForrestCKoch","html_url":"https://github.com/ForrestCKoch","followers_url":"https://api.github.com/users/ForrestCKoch/followers","following_url":"https://api.github.com/users/ForrestCKoch/following{/other_user}","gists_url":"https://api.github.com/users/ForrestCKoch/gists{/gist_id}","starred_url":"https://api.github.com/users/ForrestCKoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForrestCKoch/subscriptions","organizations_url":"https://api.github.com/users/ForrestCKoch/orgs","repos_url":"https://api.github.com/users/ForrestCKoch/repos","events_url":"https://api.github.com/users/ForrestCKoch/events{/privacy}","received_events_url":"https://api.github.com/users/ForrestCKoch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-12T02:41:59Z","updated_at":"2018-12-17T21:50:30Z","closed_at":"2018-12-17T21:50:30Z","author_association":"NONE","body":"Hi,\r\n\r\nIt seems that the pretrain function will crash if no argument is supplied to the validation argument:\r\n\r\n```\r\n  File \"train.py\", line 33, in <module>\r\n    lr = 0.01, momentum=0.9), cuda=False)\r\n  File \"/share/apps/python/3.6.6/lib/python3.6/site-packages/ptsdae-1.0-py3.6.egg/ptsdae/model.py\", line 241, in pretrain\r\n  File \"/share/apps/python/3.6.6/lib/python3.6/site-packages/ptsdae-1.0-py3.6.egg/ptsdae/model.py\", line 283, in predict\r\n  File \"/share/apps/python/3.6.6/lib/python3.6/site-packages/tqdm-4.28.1-py3.6.egg/tqdm/_tqdm.py\", line 979, in __iter__\r\n    for obj in iterable:\r\n  File \"/share/apps/python/3.6.6/lib/python3.6/site-packages/torch/utils/data/dataloader.py\", line 614, in __next__\r\n    indices = next(self.sample_iter)  # may raise StopIteration\r\n  File \"/share/apps/python/3.6.6/lib/python3.6/site-packages/torch/utils/data/sampler.py\", line 160, in __iter__\r\n    for idx in self.sampler:\r\n  File \"/share/apps/python/3.6.6/lib/python3.6/site-packages/torch/utils/data/sampler.py\", line 34, in __iter__\r\n    return iter(range(len(self.data_source)))\r\nTypeError: object of type 'NoneType' has no len()\r\n```\r\n\r\nHowever, the code runs fine if I supply my training set as the validation set.\r\n\r\nAs a side note (although this probably belongs in a separate issue),  the code will also crash if the provided dataset does not contain labels.  My current workaround is to use the input as the labels, as it appears you just throw them out anyways.\r\n\r\nThanks again for providing your implementation, it's been very helpful!\r\n\r\nForrest"}}
{"actor":{"display_login":"ForrestCKoch"}}