{"action":"created","comment":{"url":"https://api.github.com/repos/dnouri/skorch/pulls/comments/150195694","pull_request_review_id":74738899,"id":150195694,"diff_hunk":"@@ -477,32 +649,36 @@ def test_args_passed_to_tabulate(self, history):\n             assert tab.call_args_list[0][1]['floatfmt'] == '.9f'\n \n     def test_with_additional_key(self, history, print_log_cls):\n-        keys_ignored = ['batches']  # 'text' and 'dur' no longer ignored\n+        keys_ignored = ['batches']  # 'dur' no longer ignored\n         print_log = print_log_cls(\n             sink=Mock(), keys_ignored=keys_ignored).initialize()\n         # does not raise\n         print_log.on_epoch_end(Mock(history=history))\n \n         header = print_log.sink.call_args_list[0][0][0]\n         columns = header.split()\n-        expected = ['epoch', 'text', 'train_loss', 'valid_loss', 'dur']\n+        expected = ['epoch', 'nmse', 'train_loss', 'valid_loss', 'dur']\n         assert columns == expected\n \n     def test_keys_ignored_as_str(self, print_log_cls):\n         print_log = print_log_cls(keys_ignored='a-key')\n         assert print_log.keys_ignored == ['a-key']\n \n-    def test_no_valid(self, train_loss, valid_loss, print_log, ansi):\n-        get_history(train_loss, valid_loss, print_log, with_valid=False)\n+    def test_witout_valid_data(\n+            self, net_cls, module_cls, mse_scoring, print_log, data):\n+        net = net_cls(\n+            module_cls, batch_size=1, train_split=None,\n+            callbacks=[mse_scoring], max_epochs=2)\n+        net.initialize()\n+        # replace default PrintLog with test PrintLog\n+        net.callbacks_[-1] = ('print_log', print_log)\n+        net.partial_fit(*data)\n+\n         sink = print_log.sink\n         row = sink.call_args_list[2][0][0]\n         items = row.split()\n \n-        assert len(items) == 2  # no valid\n-        # epoch\n-        assert items[0] == '1'\n-        # color 1 used for item 1\n-        assert items[1] == list(ansi)[1].value + '0.2500' + ansi.ENDC.value","path":"skorch/tests/test_callbacks.py","position":865,"original_position":865,"commit_id":"f009eb7824e2128baf614f40330803faabe615d8","original_commit_id":"f009eb7824e2128baf614f40330803faabe615d8","user":{"login":"ottonemo","id":29305596,"avatar_url":"https://avatars2.githubusercontent.com/u/29305596?v=4","gravatar_id":"","url":"https://api.github.com/users/ottonemo","html_url":"https://github.com/ottonemo","followers_url":"https://api.github.com/users/ottonemo/followers","following_url":"https://api.github.com/users/ottonemo/following{/other_user}","gists_url":"https://api.github.com/users/ottonemo/gists{/gist_id}","starred_url":"https://api.github.com/users/ottonemo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ottonemo/subscriptions","organizations_url":"https://api.github.com/users/ottonemo/orgs","repos_url":"https://api.github.com/users/ottonemo/repos","events_url":"https://api.github.com/users/ottonemo/events{/privacy}","received_events_url":"https://api.github.com/users/ottonemo/received_events","type":"User","site_admin":false},"body":"The code is gone now it for the future I would suggest not to test side effects like this but to refactor the coloring function and test it separately in a parametrised test","created_at":"2017-11-10T10:04:53Z","updated_at":"2017-11-10T10:05:12Z","html_url":"https://github.com/dnouri/skorch/pull/106#discussion_r150195694","pull_request_url":"https://api.github.com/repos/dnouri/skorch/pulls/106","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/dnouri/skorch/pulls/comments/150195694"},"html":{"href":"https://github.com/dnouri/skorch/pull/106#discussion_r150195694"},"pull_request":{"href":"https://api.github.com/repos/dnouri/skorch/pulls/106"}}},"pull_request":{"url":"https://api.github.com/repos/dnouri/skorch/pulls/106","id":150035893,"html_url":"https://github.com/dnouri/skorch/pull/106","diff_url":"https://github.com/dnouri/skorch/pull/106.diff","patch_url":"https://github.com/dnouri/skorch/pull/106.patch","issue_url":"https://api.github.com/repos/dnouri/skorch/issues/106","number":106,"state":"open","locked":false,"title":"Refactor Scoring into 2 different Scoring callbacks.","user":{"login":"benjamin-work","id":29862381,"avatar_url":"https://avatars1.githubusercontent.com/u/29862381?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamin-work","html_url":"https://github.com/benjamin-work","followers_url":"https://api.github.com/users/benjamin-work/followers","following_url":"https://api.github.com/users/benjamin-work/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-work/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-work/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-work/subscriptions","organizations_url":"https://api.github.com/users/benjamin-work/orgs","repos_url":"https://api.github.com/users/benjamin-work/repos","events_url":"https://api.github.com/users/benjamin-work/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-work/received_events","type":"User","site_admin":false},"body":"There is now a scoring callback BatchScoring that determines the score\r\nafter each batch and then averages (similar to previous Scoring), and\r\na new EpochScoring, that only determines scores after each epoch (more\r\ncorrect values).\r\n\r\nThese callbacks share a lot of common code, which is why there is a\r\nScoringBase now. Tests were also refactored, should be much more\r\ntransparent now since we don't mock the fit loop anymore (formerly\r\nin conftest.py).\r\n\r\nWe use some sklearn internals to make this work, which revealed some\r\nproblems (passing initialized dataset has unexpected behavior).\r\n\r\nAddresses #55 ","created_at":"2017-11-01T13:15:10Z","updated_at":"2017-11-10T10:05:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cda337f301f88e6cf8bd39eba17f9534c2d9ee94","assignee":{"login":"benjamin-work","id":29862381,"avatar_url":"https://avatars1.githubusercontent.com/u/29862381?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamin-work","html_url":"https://github.com/benjamin-work","followers_url":"https://api.github.com/users/benjamin-work/followers","following_url":"https://api.github.com/users/benjamin-work/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-work/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-work/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-work/subscriptions","organizations_url":"https://api.github.com/users/benjamin-work/orgs","repos_url":"https://api.github.com/users/benjamin-work/repos","events_url":"https://api.github.com/users/benjamin-work/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-work/received_events","type":"User","site_admin":false},"assignees":[{"login":"benjamin-work","id":29862381,"avatar_url":"https://avatars1.githubusercontent.com/u/29862381?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamin-work","html_url":"https://github.com/benjamin-work","followers_url":"https://api.github.com/users/benjamin-work/followers","following_url":"https://api.github.com/users/benjamin-work/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-work/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-work/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-work/subscriptions","organizations_url":"https://api.github.com/users/benjamin-work/orgs","repos_url":"https://api.github.com/users/benjamin-work/repos","events_url":"https://api.github.com/users/benjamin-work/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-work/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dnouri/skorch/pulls/106/commits","review_comments_url":"https://api.github.com/repos/dnouri/skorch/pulls/106/comments","review_comment_url":"https://api.github.com/repos/dnouri/skorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dnouri/skorch/issues/106/comments","statuses_url":"https://api.github.com/repos/dnouri/skorch/statuses/f009eb7824e2128baf614f40330803faabe615d8","head":{"label":"dnouri:issue/55","ref":"issue/55","sha":"f009eb7824e2128baf614f40330803faabe615d8","user":{"login":"dnouri","id":56370,"avatar_url":"https://avatars3.githubusercontent.com/u/56370?v=4","gravatar_id":"","url":"https://api.github.com/users/dnouri","html_url":"https://github.com/dnouri","followers_url":"https://api.github.com/users/dnouri/followers","following_url":"https://api.github.com/users/dnouri/following{/other_user}","gists_url":"https://api.github.com/users/dnouri/gists{/gist_id}","starred_url":"https://api.github.com/users/dnouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnouri/subscriptions","organizations_url":"https://api.github.com/users/dnouri/orgs","repos_url":"https://api.github.com/users/dnouri/repos","events_url":"https://api.github.com/users/dnouri/events{/privacy}","received_events_url":"https://api.github.com/users/dnouri/received_events","type":"User","site_admin":false},"repo":{"id":97533515,"name":"skorch","full_name":"dnouri/skorch","owner":{"login":"dnouri","id":56370,"avatar_url":"https://avatars3.githubusercontent.com/u/56370?v=4","gravatar_id":"","url":"https://api.github.com/users/dnouri","html_url":"https://github.com/dnouri","followers_url":"https://api.github.com/users/dnouri/followers","following_url":"https://api.github.com/users/dnouri/following{/other_user}","gists_url":"https://api.github.com/users/dnouri/gists{/gist_id}","starred_url":"https://api.github.com/users/dnouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnouri/subscriptions","organizations_url":"https://api.github.com/users/dnouri/orgs","repos_url":"https://api.github.com/users/dnouri/repos","events_url":"https://api.github.com/users/dnouri/events{/privacy}","received_events_url":"https://api.github.com/users/dnouri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dnouri/skorch","description":"A scikit-learn compatible neural network library that wraps pytorch","fork":false,"url":"https://api.github.com/repos/dnouri/skorch","forks_url":"https://api.github.com/repos/dnouri/skorch/forks","keys_url":"https://api.github.com/repos/dnouri/skorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnouri/skorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnouri/skorch/teams","hooks_url":"https://api.github.com/repos/dnouri/skorch/hooks","issue_events_url":"https://api.github.com/repos/dnouri/skorch/issues/events{/number}","events_url":"https://api.github.com/repos/dnouri/skorch/events","assignees_url":"https://api.github.com/repos/dnouri/skorch/assignees{/user}","branches_url":"https://api.github.com/repos/dnouri/skorch/branches{/branch}","tags_url":"https://api.github.com/repos/dnouri/skorch/tags","blobs_url":"https://api.github.com/repos/dnouri/skorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnouri/skorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnouri/skorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnouri/skorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnouri/skorch/statuses/{sha}","languages_url":"https://api.github.com/repos/dnouri/skorch/languages","stargazers_url":"https://api.github.com/repos/dnouri/skorch/stargazers","contributors_url":"https://api.github.com/repos/dnouri/skorch/contributors","subscribers_url":"https://api.github.com/repos/dnouri/skorch/subscribers","subscription_url":"https://api.github.com/repos/dnouri/skorch/subscription","commits_url":"https://api.github.com/repos/dnouri/skorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnouri/skorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnouri/skorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnouri/skorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnouri/skorch/contents/{+path}","compare_url":"https://api.github.com/repos/dnouri/skorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnouri/skorch/merges","archive_url":"https://api.github.com/repos/dnouri/skorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnouri/skorch/downloads","issues_url":"https://api.github.com/repos/dnouri/skorch/issues{/number}","pulls_url":"https://api.github.com/repos/dnouri/skorch/pulls{/number}","milestones_url":"https://api.github.com/repos/dnouri/skorch/milestones{/number}","notifications_url":"https://api.github.com/repos/dnouri/skorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnouri/skorch/labels{/name}","releases_url":"https://api.github.com/repos/dnouri/skorch/releases{/id}","deployments_url":"https://api.github.com/repos/dnouri/skorch/deployments","created_at":"2017-07-18T00:13:54Z","updated_at":"2017-11-06T00:31:20Z","pushed_at":"2017-11-03T16:49:48Z","git_url":"git://github.com/dnouri/skorch.git","ssh_url":"git@github.com:dnouri/skorch.git","clone_url":"https://github.com/dnouri/skorch.git","svn_url":"https://github.com/dnouri/skorch","homepage":"","size":2370,"stargazers_count":52,"watchers_count":52,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"forks":5,"open_issues":19,"watchers":52,"default_branch":"master"}},"base":{"label":"dnouri:master","ref":"master","sha":"c3b40a7dcecab82d46a58afad37ac0a848fd12a7","user":{"login":"dnouri","id":56370,"avatar_url":"https://avatars3.githubusercontent.com/u/56370?v=4","gravatar_id":"","url":"https://api.github.com/users/dnouri","html_url":"https://github.com/dnouri","followers_url":"https://api.github.com/users/dnouri/followers","following_url":"https://api.github.com/users/dnouri/following{/other_user}","gists_url":"https://api.github.com/users/dnouri/gists{/gist_id}","starred_url":"https://api.github.com/users/dnouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnouri/subscriptions","organizations_url":"https://api.github.com/users/dnouri/orgs","repos_url":"https://api.github.com/users/dnouri/repos","events_url":"https://api.github.com/users/dnouri/events{/privacy}","received_events_url":"https://api.github.com/users/dnouri/received_events","type":"User","site_admin":false},"repo":{"id":97533515,"name":"skorch","full_name":"dnouri/skorch","owner":{"login":"dnouri","id":56370,"avatar_url":"https://avatars3.githubusercontent.com/u/56370?v=4","gravatar_id":"","url":"https://api.github.com/users/dnouri","html_url":"https://github.com/dnouri","followers_url":"https://api.github.com/users/dnouri/followers","following_url":"https://api.github.com/users/dnouri/following{/other_user}","gists_url":"https://api.github.com/users/dnouri/gists{/gist_id}","starred_url":"https://api.github.com/users/dnouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnouri/subscriptions","organizations_url":"https://api.github.com/users/dnouri/orgs","repos_url":"https://api.github.com/users/dnouri/repos","events_url":"https://api.github.com/users/dnouri/events{/privacy}","received_events_url":"https://api.github.com/users/dnouri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dnouri/skorch","description":"A scikit-learn compatible neural network library that wraps pytorch","fork":false,"url":"https://api.github.com/repos/dnouri/skorch","forks_url":"https://api.github.com/repos/dnouri/skorch/forks","keys_url":"https://api.github.com/repos/dnouri/skorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnouri/skorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnouri/skorch/teams","hooks_url":"https://api.github.com/repos/dnouri/skorch/hooks","issue_events_url":"https://api.github.com/repos/dnouri/skorch/issues/events{/number}","events_url":"https://api.github.com/repos/dnouri/skorch/events","assignees_url":"https://api.github.com/repos/dnouri/skorch/assignees{/user}","branches_url":"https://api.github.com/repos/dnouri/skorch/branches{/branch}","tags_url":"https://api.github.com/repos/dnouri/skorch/tags","blobs_url":"https://api.github.com/repos/dnouri/skorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnouri/skorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnouri/skorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnouri/skorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnouri/skorch/statuses/{sha}","languages_url":"https://api.github.com/repos/dnouri/skorch/languages","stargazers_url":"https://api.github.com/repos/dnouri/skorch/stargazers","contributors_url":"https://api.github.com/repos/dnouri/skorch/contributors","subscribers_url":"https://api.github.com/repos/dnouri/skorch/subscribers","subscription_url":"https://api.github.com/repos/dnouri/skorch/subscription","commits_url":"https://api.github.com/repos/dnouri/skorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnouri/skorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnouri/skorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnouri/skorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnouri/skorch/contents/{+path}","compare_url":"https://api.github.com/repos/dnouri/skorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnouri/skorch/merges","archive_url":"https://api.github.com/repos/dnouri/skorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnouri/skorch/downloads","issues_url":"https://api.github.com/repos/dnouri/skorch/issues{/number}","pulls_url":"https://api.github.com/repos/dnouri/skorch/pulls{/number}","milestones_url":"https://api.github.com/repos/dnouri/skorch/milestones{/number}","notifications_url":"https://api.github.com/repos/dnouri/skorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnouri/skorch/labels{/name}","releases_url":"https://api.github.com/repos/dnouri/skorch/releases{/id}","deployments_url":"https://api.github.com/repos/dnouri/skorch/deployments","created_at":"2017-07-18T00:13:54Z","updated_at":"2017-11-06T00:31:20Z","pushed_at":"2017-11-03T16:49:48Z","git_url":"git://github.com/dnouri/skorch.git","ssh_url":"git@github.com:dnouri/skorch.git","clone_url":"https://github.com/dnouri/skorch.git","svn_url":"https://github.com/dnouri/skorch","homepage":"","size":2370,"stargazers_count":52,"watchers_count":52,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"forks":5,"open_issues":19,"watchers":52,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dnouri/skorch/pulls/106"},"html":{"href":"https://github.com/dnouri/skorch/pull/106"},"issue":{"href":"https://api.github.com/repos/dnouri/skorch/issues/106"},"comments":{"href":"https://api.github.com/repos/dnouri/skorch/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/dnouri/skorch/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/dnouri/skorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dnouri/skorch/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/dnouri/skorch/statuses/f009eb7824e2128baf614f40330803faabe615d8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ottonemo"}}