{"action":"created","comment":{"url":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/comments/226978891","pull_request_review_id":166913919,"id":226978891,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjk3ODg5MQ==","diff_hunk":"@@ -20,14 +20,16 @@\n # granted to it by virtue of its status as an Intergovernmental Organization\n # or submit itself to any jurisdiction.\n \n-from __future__ import absolute_import, division, print_function\n-\n from marshmallow import Schema, fields\n from marshmallow.validate import OneOf\n \n \n+class ScoreSchema(Schema):\n+    core = fields.Float(attribute='rejected', required=True)\n+    non_core = fields.Float(attribute='non_core', required=True)\n+    rejected = fields.Float(attribute='core', required=True)","path":"inspire_classifier/serializers.py","position":13,"original_position":13,"commit_id":"be8e628e91fbfb4587efbfb159807f4ea4da754b","original_commit_id":"be8e628e91fbfb4587efbfb159807f4ea4da754b","user":{"login":"salmanmaq","id":13566663,"node_id":"MDQ6VXNlcjEzNTY2NjYz","avatar_url":"https://avatars0.githubusercontent.com/u/13566663?v=4","gravatar_id":"","url":"https://api.github.com/users/salmanmaq","html_url":"https://github.com/salmanmaq","followers_url":"https://api.github.com/users/salmanmaq/followers","following_url":"https://api.github.com/users/salmanmaq/following{/other_user}","gists_url":"https://api.github.com/users/salmanmaq/gists{/gist_id}","starred_url":"https://api.github.com/users/salmanmaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salmanmaq/subscriptions","organizations_url":"https://api.github.com/users/salmanmaq/orgs","repos_url":"https://api.github.com/users/salmanmaq/repos","events_url":"https://api.github.com/users/salmanmaq/events{/privacy}","received_events_url":"https://api.github.com/users/salmanmaq/received_events","type":"User","site_admin":false},"body":"The reason to have configurable class names is that they can be used elsewhere in the application. For example when checking correspondence between the classifier output (which is a np array) and what classes it corresponds to. \r\nSecondly,  we can use these to make assertions in the tests if we are getting the correct number of classes as output.\r\nThirdly, this would ease integrating multiple classifiers (for example for arxiv) into the current code. \r\n\r\nThe serializers can be hard-coded I think. But I would like to hear what you think about it.","created_at":"2018-10-22T12:56:36Z","updated_at":"2018-10-22T12:58:21Z","html_url":"https://github.com/inspirehep/inspire-classifier/pull/1#discussion_r226978891","pull_request_url":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/comments/226978891"},"html":{"href":"https://github.com/inspirehep/inspire-classifier/pull/1#discussion_r226978891"},"pull_request":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1"}},"in_reply_to_id":226970967},"pull_request":{"url":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1","id":221345128,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMzQ1MTI4","html_url":"https://github.com/inspirehep/inspire-classifier/pull/1","diff_url":"https://github.com/inspirehep/inspire-classifier/pull/1.diff","patch_url":"https://github.com/inspirehep/inspire-classifier/pull/1.patch","issue_url":"https://api.github.com/repos/inspirehep/inspire-classifier/issues/1","number":1,"state":"open","locked":false,"title":"ML: Added the core Machine Learning code","user":{"login":"salmanmaq","id":13566663,"node_id":"MDQ6VXNlcjEzNTY2NjYz","avatar_url":"https://avatars0.githubusercontent.com/u/13566663?v=4","gravatar_id":"","url":"https://api.github.com/users/salmanmaq","html_url":"https://github.com/salmanmaq","followers_url":"https://api.github.com/users/salmanmaq/followers","following_url":"https://api.github.com/users/salmanmaq/following{/other_user}","gists_url":"https://api.github.com/users/salmanmaq/gists{/gist_id}","starred_url":"https://api.github.com/users/salmanmaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salmanmaq/subscriptions","organizations_url":"https://api.github.com/users/salmanmaq/orgs","repos_url":"https://api.github.com/users/salmanmaq/repos","events_url":"https://api.github.com/users/salmanmaq/events{/privacy}","received_events_url":"https://api.github.com/users/salmanmaq/received_events","type":"User","site_admin":false},"body":"The code includes Language Model and Classifier classes, the data preprocessor functions, as well as the API and configuration files.\r\n\r\nSigned-off-by: Salman Maqbool salman.maqbool@cern.ch","created_at":"2018-10-09T08:13:14Z","updated_at":"2018-10-22T12:58:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1c38c9d3277f65edc4f2584a8fc7346582c3a82","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1/commits","review_comments_url":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1/comments","review_comment_url":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inspirehep/inspire-classifier/issues/1/comments","statuses_url":"https://api.github.com/repos/inspirehep/inspire-classifier/statuses/be8e628e91fbfb4587efbfb159807f4ea4da754b","head":{"label":"salmanmaq:ulmfit","ref":"ulmfit","sha":"be8e628e91fbfb4587efbfb159807f4ea4da754b","user":{"login":"salmanmaq","id":13566663,"node_id":"MDQ6VXNlcjEzNTY2NjYz","avatar_url":"https://avatars0.githubusercontent.com/u/13566663?v=4","gravatar_id":"","url":"https://api.github.com/users/salmanmaq","html_url":"https://github.com/salmanmaq","followers_url":"https://api.github.com/users/salmanmaq/followers","following_url":"https://api.github.com/users/salmanmaq/following{/other_user}","gists_url":"https://api.github.com/users/salmanmaq/gists{/gist_id}","starred_url":"https://api.github.com/users/salmanmaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salmanmaq/subscriptions","organizations_url":"https://api.github.com/users/salmanmaq/orgs","repos_url":"https://api.github.com/users/salmanmaq/repos","events_url":"https://api.github.com/users/salmanmaq/events{/privacy}","received_events_url":"https://api.github.com/users/salmanmaq/received_events","type":"User","site_admin":false},"repo":{"id":152068243,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIwNjgyNDM=","name":"inspire-classifier","full_name":"salmanmaq/inspire-classifier","private":false,"owner":{"login":"salmanmaq","id":13566663,"node_id":"MDQ6VXNlcjEzNTY2NjYz","avatar_url":"https://avatars0.githubusercontent.com/u/13566663?v=4","gravatar_id":"","url":"https://api.github.com/users/salmanmaq","html_url":"https://github.com/salmanmaq","followers_url":"https://api.github.com/users/salmanmaq/followers","following_url":"https://api.github.com/users/salmanmaq/following{/other_user}","gists_url":"https://api.github.com/users/salmanmaq/gists{/gist_id}","starred_url":"https://api.github.com/users/salmanmaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salmanmaq/subscriptions","organizations_url":"https://api.github.com/users/salmanmaq/orgs","repos_url":"https://api.github.com/users/salmanmaq/repos","events_url":"https://api.github.com/users/salmanmaq/events{/privacy}","received_events_url":"https://api.github.com/users/salmanmaq/received_events","type":"User","site_admin":false},"html_url":"https://github.com/salmanmaq/inspire-classifier","description":"INSPIRE text classification microservice","fork":true,"url":"https://api.github.com/repos/salmanmaq/inspire-classifier","forks_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/forks","keys_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/teams","hooks_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/hooks","issue_events_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/issues/events{/number}","events_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/events","assignees_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/assignees{/user}","branches_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/branches{/branch}","tags_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/tags","blobs_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/git/refs{/sha}","trees_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/statuses/{sha}","languages_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/languages","stargazers_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/stargazers","contributors_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/contributors","subscribers_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/subscribers","subscription_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/subscription","commits_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/commits{/sha}","git_commits_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/git/commits{/sha}","comments_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/comments{/number}","issue_comment_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/issues/comments{/number}","contents_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/contents/{+path}","compare_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/merges","archive_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/downloads","issues_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/issues{/number}","pulls_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/pulls{/number}","milestones_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/milestones{/number}","notifications_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/labels{/name}","releases_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/releases{/id}","deployments_url":"https://api.github.com/repos/salmanmaq/inspire-classifier/deployments","created_at":"2018-10-08T11:24:03Z","updated_at":"2018-10-17T13:36:03Z","pushed_at":"2018-10-22T11:45:00Z","git_url":"git://github.com/salmanmaq/inspire-classifier.git","ssh_url":"git@github.com:salmanmaq/inspire-classifier.git","clone_url":"https://github.com/salmanmaq/inspire-classifier.git","svn_url":"https://github.com/salmanmaq/inspire-classifier","homepage":"","size":117,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"inspirehep:master","ref":"master","sha":"3bef7ab8347e345f7fe0474fff68a0e0d73cb85b","user":{"login":"inspirehep","id":356664,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NjY2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/356664?v=4","gravatar_id":"","url":"https://api.github.com/users/inspirehep","html_url":"https://github.com/inspirehep","followers_url":"https://api.github.com/users/inspirehep/followers","following_url":"https://api.github.com/users/inspirehep/following{/other_user}","gists_url":"https://api.github.com/users/inspirehep/gists{/gist_id}","starred_url":"https://api.github.com/users/inspirehep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspirehep/subscriptions","organizations_url":"https://api.github.com/users/inspirehep/orgs","repos_url":"https://api.github.com/users/inspirehep/repos","events_url":"https://api.github.com/users/inspirehep/events{/privacy}","received_events_url":"https://api.github.com/users/inspirehep/received_events","type":"Organization","site_admin":false},"repo":{"id":151543605,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE1NDM2MDU=","name":"inspire-classifier","full_name":"inspirehep/inspire-classifier","private":false,"owner":{"login":"inspirehep","id":356664,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NjY2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/356664?v=4","gravatar_id":"","url":"https://api.github.com/users/inspirehep","html_url":"https://github.com/inspirehep","followers_url":"https://api.github.com/users/inspirehep/followers","following_url":"https://api.github.com/users/inspirehep/following{/other_user}","gists_url":"https://api.github.com/users/inspirehep/gists{/gist_id}","starred_url":"https://api.github.com/users/inspirehep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspirehep/subscriptions","organizations_url":"https://api.github.com/users/inspirehep/orgs","repos_url":"https://api.github.com/users/inspirehep/repos","events_url":"https://api.github.com/users/inspirehep/events{/privacy}","received_events_url":"https://api.github.com/users/inspirehep/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/inspirehep/inspire-classifier","description":"INSPIRE text classification microservice","fork":false,"url":"https://api.github.com/repos/inspirehep/inspire-classifier","forks_url":"https://api.github.com/repos/inspirehep/inspire-classifier/forks","keys_url":"https://api.github.com/repos/inspirehep/inspire-classifier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inspirehep/inspire-classifier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inspirehep/inspire-classifier/teams","hooks_url":"https://api.github.com/repos/inspirehep/inspire-classifier/hooks","issue_events_url":"https://api.github.com/repos/inspirehep/inspire-classifier/issues/events{/number}","events_url":"https://api.github.com/repos/inspirehep/inspire-classifier/events","assignees_url":"https://api.github.com/repos/inspirehep/inspire-classifier/assignees{/user}","branches_url":"https://api.github.com/repos/inspirehep/inspire-classifier/branches{/branch}","tags_url":"https://api.github.com/repos/inspirehep/inspire-classifier/tags","blobs_url":"https://api.github.com/repos/inspirehep/inspire-classifier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inspirehep/inspire-classifier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inspirehep/inspire-classifier/git/refs{/sha}","trees_url":"https://api.github.com/repos/inspirehep/inspire-classifier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inspirehep/inspire-classifier/statuses/{sha}","languages_url":"https://api.github.com/repos/inspirehep/inspire-classifier/languages","stargazers_url":"https://api.github.com/repos/inspirehep/inspire-classifier/stargazers","contributors_url":"https://api.github.com/repos/inspirehep/inspire-classifier/contributors","subscribers_url":"https://api.github.com/repos/inspirehep/inspire-classifier/subscribers","subscription_url":"https://api.github.com/repos/inspirehep/inspire-classifier/subscription","commits_url":"https://api.github.com/repos/inspirehep/inspire-classifier/commits{/sha}","git_commits_url":"https://api.github.com/repos/inspirehep/inspire-classifier/git/commits{/sha}","comments_url":"https://api.github.com/repos/inspirehep/inspire-classifier/comments{/number}","issue_comment_url":"https://api.github.com/repos/inspirehep/inspire-classifier/issues/comments{/number}","contents_url":"https://api.github.com/repos/inspirehep/inspire-classifier/contents/{+path}","compare_url":"https://api.github.com/repos/inspirehep/inspire-classifier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inspirehep/inspire-classifier/merges","archive_url":"https://api.github.com/repos/inspirehep/inspire-classifier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inspirehep/inspire-classifier/downloads","issues_url":"https://api.github.com/repos/inspirehep/inspire-classifier/issues{/number}","pulls_url":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls{/number}","milestones_url":"https://api.github.com/repos/inspirehep/inspire-classifier/milestones{/number}","notifications_url":"https://api.github.com/repos/inspirehep/inspire-classifier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inspirehep/inspire-classifier/labels{/name}","releases_url":"https://api.github.com/repos/inspirehep/inspire-classifier/releases{/id}","deployments_url":"https://api.github.com/repos/inspirehep/inspire-classifier/deployments","created_at":"2018-10-04T08:51:39Z","updated_at":"2018-10-16T15:27:11Z","pushed_at":"2018-10-22T11:45:01Z","git_url":"git://github.com/inspirehep/inspire-classifier.git","ssh_url":"git@github.com:inspirehep/inspire-classifier.git","clone_url":"https://github.com/inspirehep/inspire-classifier.git","svn_url":"https://github.com/inspirehep/inspire-classifier","homepage":"","size":48,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1"},"html":{"href":"https://github.com/inspirehep/inspire-classifier/pull/1"},"issue":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/issues/1"},"comments":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/inspirehep/inspire-classifier/statuses/be8e628e91fbfb4587efbfb159807f4ea4da754b"}},"author_association":"NONE"}}
{"actor":{"display_login":"salmanmaq"}}