{"action":"opened","number":195,"pull_request":{"url":"https://api.github.com/repos/wiki-ai/revscoring/pulls/195","id":46685083,"html_url":"https://github.com/wiki-ai/revscoring/pull/195","diff_url":"https://github.com/wiki-ai/revscoring/pull/195.diff","patch_url":"https://github.com/wiki-ai/revscoring/pull/195.patch","issue_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/195","number":195,"state":"open","locked":false,"title":"Adds model_info storage & utility","user":{"login":"halfak","id":984301,"avatar_url":"https://avatars.githubusercontent.com/u/984301?v=3","gravatar_id":"","url":"https://api.github.com/users/halfak","html_url":"https://github.com/halfak","followers_url":"https://api.github.com/users/halfak/followers","following_url":"https://api.github.com/users/halfak/following{/other_user}","gists_url":"https://api.github.com/users/halfak/gists{/gist_id}","starred_url":"https://api.github.com/users/halfak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfak/subscriptions","organizations_url":"https://api.github.com/users/halfak/orgs","repos_url":"https://api.github.com/users/halfak/repos","events_url":"https://api.github.com/users/halfak/events{/privacy}","received_events_url":"https://api.github.com/users/halfak/received_events","type":"User","site_admin":false},"body":"```\r\n$ ./utility model_info models/enwiki.reverted.linear_svc.model\r\nScikitLearnClassifier\r\n - type: LinearSVC\r\n - version: 0.3.2\r\n - trained: 2015-10-02T16:22:43.574856\r\n\r\nAccuracy: 0.7793696275071633\r\n\r\nROC-AUC: 0.8124735433078716\r\n\r\n      False    True\r\n--  -------  ------\r\n 0     8850     274\r\n 1     2119     623\r\n```\r\n\r\nAlso is able to output raw JSON:\r\n```\r\n$ ./utility model_info models/enwiki.reverted.linear_svc.model --as-json\r\n{\"type\": \"LinearSVC\", \"version\": \"0.3.2\", \"stats\": {\"accuracy\": 0.7793696275071633, \"table\": {\"(True, True)\": 623, \"(False, True)\": 2119, \"(True, False)\": 274, \"(False, False)\": 8850}, \"roc\": {\"auc\": 0.8124735433078716}}, \"trained\": 1443820963.5748563}\r\n```\r\n\r\nI had to modify ScorerModel in order to get this working.  This demonstrates that the utility still works for old scorer models. \r\n```\r\n$ ./utility model_info ../ores-wikimedia-config/models/enwiki.reverted.linear_svc.model \r\nScikitLearnClassifier\r\n - type: LinearSVC\r\n - version: 0.3.1\r\n - trained: 2015-09-02T20:24:12.202975\r\n\r\nNo stats available\r\n```","created_at":"2015-10-02T21:36:18Z","updated_at":"2015-10-02T21:36:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wiki-ai/revscoring/pulls/195/commits","review_comments_url":"https://api.github.com/repos/wiki-ai/revscoring/pulls/195/comments","review_comment_url":"https://api.github.com/repos/wiki-ai/revscoring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/195/comments","statuses_url":"https://api.github.com/repos/wiki-ai/revscoring/statuses/dc90b74c314271c8e6de8769af8ca7382fcb0b9b","head":{"label":"wiki-ai:model_info","ref":"model_info","sha":"dc90b74c314271c8e6de8769af8ca7382fcb0b9b","user":{"login":"wiki-ai","id":12821767,"avatar_url":"https://avatars.githubusercontent.com/u/12821767?v=3","gravatar_id":"","url":"https://api.github.com/users/wiki-ai","html_url":"https://github.com/wiki-ai","followers_url":"https://api.github.com/users/wiki-ai/followers","following_url":"https://api.github.com/users/wiki-ai/following{/other_user}","gists_url":"https://api.github.com/users/wiki-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/wiki-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiki-ai/subscriptions","organizations_url":"https://api.github.com/users/wiki-ai/orgs","repos_url":"https://api.github.com/users/wiki-ai/repos","events_url":"https://api.github.com/users/wiki-ai/events{/privacy}","received_events_url":"https://api.github.com/users/wiki-ai/received_events","type":"Organization","site_admin":false},"repo":{"id":23771350,"name":"revscoring","full_name":"wiki-ai/revscoring","owner":{"login":"wiki-ai","id":12821767,"avatar_url":"https://avatars.githubusercontent.com/u/12821767?v=3","gravatar_id":"","url":"https://api.github.com/users/wiki-ai","html_url":"https://github.com/wiki-ai","followers_url":"https://api.github.com/users/wiki-ai/followers","following_url":"https://api.github.com/users/wiki-ai/following{/other_user}","gists_url":"https://api.github.com/users/wiki-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/wiki-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiki-ai/subscriptions","organizations_url":"https://api.github.com/users/wiki-ai/orgs","repos_url":"https://api.github.com/users/wiki-ai/repos","events_url":"https://api.github.com/users/wiki-ai/events{/privacy}","received_events_url":"https://api.github.com/users/wiki-ai/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wiki-ai/revscoring","description":"A generic, machine learning-based revision scoring system for MediaWiki","fork":false,"url":"https://api.github.com/repos/wiki-ai/revscoring","forks_url":"https://api.github.com/repos/wiki-ai/revscoring/forks","keys_url":"https://api.github.com/repos/wiki-ai/revscoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wiki-ai/revscoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wiki-ai/revscoring/teams","hooks_url":"https://api.github.com/repos/wiki-ai/revscoring/hooks","issue_events_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/events{/number}","events_url":"https://api.github.com/repos/wiki-ai/revscoring/events","assignees_url":"https://api.github.com/repos/wiki-ai/revscoring/assignees{/user}","branches_url":"https://api.github.com/repos/wiki-ai/revscoring/branches{/branch}","tags_url":"https://api.github.com/repos/wiki-ai/revscoring/tags","blobs_url":"https://api.github.com/repos/wiki-ai/revscoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wiki-ai/revscoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wiki-ai/revscoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/wiki-ai/revscoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wiki-ai/revscoring/statuses/{sha}","languages_url":"https://api.github.com/repos/wiki-ai/revscoring/languages","stargazers_url":"https://api.github.com/repos/wiki-ai/revscoring/stargazers","contributors_url":"https://api.github.com/repos/wiki-ai/revscoring/contributors","subscribers_url":"https://api.github.com/repos/wiki-ai/revscoring/subscribers","subscription_url":"https://api.github.com/repos/wiki-ai/revscoring/subscription","commits_url":"https://api.github.com/repos/wiki-ai/revscoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/wiki-ai/revscoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/wiki-ai/revscoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/wiki-ai/revscoring/contents/{+path}","compare_url":"https://api.github.com/repos/wiki-ai/revscoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wiki-ai/revscoring/merges","archive_url":"https://api.github.com/repos/wiki-ai/revscoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wiki-ai/revscoring/downloads","issues_url":"https://api.github.com/repos/wiki-ai/revscoring/issues{/number}","pulls_url":"https://api.github.com/repos/wiki-ai/revscoring/pulls{/number}","milestones_url":"https://api.github.com/repos/wiki-ai/revscoring/milestones{/number}","notifications_url":"https://api.github.com/repos/wiki-ai/revscoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wiki-ai/revscoring/labels{/name}","releases_url":"https://api.github.com/repos/wiki-ai/revscoring/releases{/id}","created_at":"2014-09-07T21:20:37Z","updated_at":"2015-09-17T17:17:45Z","pushed_at":"2015-10-02T21:33:21Z","git_url":"git://github.com/wiki-ai/revscoring.git","ssh_url":"git@github.com:wiki-ai/revscoring.git","clone_url":"https://github.com/wiki-ai/revscoring.git","svn_url":"https://github.com/wiki-ai/revscoring","homepage":"http://pythonhosted.org/revscoring","size":2039,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":17,"forks":15,"open_issues":17,"watchers":13,"default_branch":"master"}},"base":{"label":"wiki-ai:master","ref":"master","sha":"cbd65151b8243a85d3c62132574f518903b76a62","user":{"login":"wiki-ai","id":12821767,"avatar_url":"https://avatars.githubusercontent.com/u/12821767?v=3","gravatar_id":"","url":"https://api.github.com/users/wiki-ai","html_url":"https://github.com/wiki-ai","followers_url":"https://api.github.com/users/wiki-ai/followers","following_url":"https://api.github.com/users/wiki-ai/following{/other_user}","gists_url":"https://api.github.com/users/wiki-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/wiki-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiki-ai/subscriptions","organizations_url":"https://api.github.com/users/wiki-ai/orgs","repos_url":"https://api.github.com/users/wiki-ai/repos","events_url":"https://api.github.com/users/wiki-ai/events{/privacy}","received_events_url":"https://api.github.com/users/wiki-ai/received_events","type":"Organization","site_admin":false},"repo":{"id":23771350,"name":"revscoring","full_name":"wiki-ai/revscoring","owner":{"login":"wiki-ai","id":12821767,"avatar_url":"https://avatars.githubusercontent.com/u/12821767?v=3","gravatar_id":"","url":"https://api.github.com/users/wiki-ai","html_url":"https://github.com/wiki-ai","followers_url":"https://api.github.com/users/wiki-ai/followers","following_url":"https://api.github.com/users/wiki-ai/following{/other_user}","gists_url":"https://api.github.com/users/wiki-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/wiki-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiki-ai/subscriptions","organizations_url":"https://api.github.com/users/wiki-ai/orgs","repos_url":"https://api.github.com/users/wiki-ai/repos","events_url":"https://api.github.com/users/wiki-ai/events{/privacy}","received_events_url":"https://api.github.com/users/wiki-ai/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wiki-ai/revscoring","description":"A generic, machine learning-based revision scoring system for MediaWiki","fork":false,"url":"https://api.github.com/repos/wiki-ai/revscoring","forks_url":"https://api.github.com/repos/wiki-ai/revscoring/forks","keys_url":"https://api.github.com/repos/wiki-ai/revscoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wiki-ai/revscoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wiki-ai/revscoring/teams","hooks_url":"https://api.github.com/repos/wiki-ai/revscoring/hooks","issue_events_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/events{/number}","events_url":"https://api.github.com/repos/wiki-ai/revscoring/events","assignees_url":"https://api.github.com/repos/wiki-ai/revscoring/assignees{/user}","branches_url":"https://api.github.com/repos/wiki-ai/revscoring/branches{/branch}","tags_url":"https://api.github.com/repos/wiki-ai/revscoring/tags","blobs_url":"https://api.github.com/repos/wiki-ai/revscoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wiki-ai/revscoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wiki-ai/revscoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/wiki-ai/revscoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wiki-ai/revscoring/statuses/{sha}","languages_url":"https://api.github.com/repos/wiki-ai/revscoring/languages","stargazers_url":"https://api.github.com/repos/wiki-ai/revscoring/stargazers","contributors_url":"https://api.github.com/repos/wiki-ai/revscoring/contributors","subscribers_url":"https://api.github.com/repos/wiki-ai/revscoring/subscribers","subscription_url":"https://api.github.com/repos/wiki-ai/revscoring/subscription","commits_url":"https://api.github.com/repos/wiki-ai/revscoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/wiki-ai/revscoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/wiki-ai/revscoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/wiki-ai/revscoring/contents/{+path}","compare_url":"https://api.github.com/repos/wiki-ai/revscoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wiki-ai/revscoring/merges","archive_url":"https://api.github.com/repos/wiki-ai/revscoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wiki-ai/revscoring/downloads","issues_url":"https://api.github.com/repos/wiki-ai/revscoring/issues{/number}","pulls_url":"https://api.github.com/repos/wiki-ai/revscoring/pulls{/number}","milestones_url":"https://api.github.com/repos/wiki-ai/revscoring/milestones{/number}","notifications_url":"https://api.github.com/repos/wiki-ai/revscoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wiki-ai/revscoring/labels{/name}","releases_url":"https://api.github.com/repos/wiki-ai/revscoring/releases{/id}","created_at":"2014-09-07T21:20:37Z","updated_at":"2015-09-17T17:17:45Z","pushed_at":"2015-10-02T21:33:21Z","git_url":"git://github.com/wiki-ai/revscoring.git","ssh_url":"git@github.com:wiki-ai/revscoring.git","clone_url":"https://github.com/wiki-ai/revscoring.git","svn_url":"https://github.com/wiki-ai/revscoring","homepage":"http://pythonhosted.org/revscoring","size":2039,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":17,"forks":15,"open_issues":17,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wiki-ai/revscoring/pulls/195"},"html":{"href":"https://github.com/wiki-ai/revscoring/pull/195"},"issue":{"href":"https://api.github.com/repos/wiki-ai/revscoring/issues/195"},"comments":{"href":"https://api.github.com/repos/wiki-ai/revscoring/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/wiki-ai/revscoring/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/wiki-ai/revscoring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wiki-ai/revscoring/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/wiki-ai/revscoring/statuses/dc90b74c314271c8e6de8769af8ca7382fcb0b9b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":181,"deletions":56,"changed_files":8}}