{"action":"created","comment":{"url":"https://api.github.com/repos/cosmir/openmic-2018/pulls/comments/215821431","pull_request_review_id":153174935,"id":215821431,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTgyMTQzMQ==","diff_hunk":"@@ -34,8 +35,11 @@ def process_args(args):\n                         help='Path to sparse-labels.csv',\n                         type=str)\n \n+    parser.add_argument('--dupes', dest='dupe_file', type=str,\n+                        help='Path to track de-duplication index')\n+\n     parser.add_argument('-s', '--seed', dest='seed',\n-                        default=20180821,\n+                        default=20180903,","path":"scripts/openmic_split.py","position":31,"original_position":31,"commit_id":"5e531facb5e17cf30a9cfce9029f8447f1f59697","original_commit_id":"5e531facb5e17cf30a9cfce9029f8447f1f59697","user":{"login":"ejhumphrey","id":926379,"node_id":"MDQ6VXNlcjkyNjM3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/926379?v=4","gravatar_id":"","url":"https://api.github.com/users/ejhumphrey","html_url":"https://github.com/ejhumphrey","followers_url":"https://api.github.com/users/ejhumphrey/followers","following_url":"https://api.github.com/users/ejhumphrey/following{/other_user}","gists_url":"https://api.github.com/users/ejhumphrey/gists{/gist_id}","starred_url":"https://api.github.com/users/ejhumphrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejhumphrey/subscriptions","organizations_url":"https://api.github.com/users/ejhumphrey/orgs","repos_url":"https://api.github.com/users/ejhumphrey/repos","events_url":"https://api.github.com/users/ejhumphrey/events{/privacy}","received_events_url":"https://api.github.com/users/ejhumphrey/received_events","type":"User","site_admin":false},"body":"nitwarning: if we're going to use dates, maybe we can pull this from date-time so we won't have to keep bumping it? otherwise it's probably fine to leave it as some pseudo-arbitrary number, e.g. 12345?","created_at":"2018-09-07T01:15:12Z","updated_at":"2018-09-07T01:15:12Z","html_url":"https://github.com/cosmir/openmic-2018/pull/25#discussion_r215821431","pull_request_url":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cosmir/openmic-2018/pulls/comments/215821431"},"html":{"href":"https://github.com/cosmir/openmic-2018/pull/25#discussion_r215821431"},"pull_request":{"href":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25","id":212817323,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyODE3MzIz","html_url":"https://github.com/cosmir/openmic-2018/pull/25","diff_url":"https://github.com/cosmir/openmic-2018/pull/25.diff","patch_url":"https://github.com/cosmir/openmic-2018/pull/25.patch","issue_url":"https://api.github.com/repos/cosmir/openmic-2018/issues/25","number":25,"state":"open","locked":false,"title":"Revised train-test splitter to support artist conditioning and distribution matching","user":{"login":"bmcfee","id":1190540,"node_id":"MDQ6VXNlcjExOTA1NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1190540?v=4","gravatar_id":"","url":"https://api.github.com/users/bmcfee","html_url":"https://github.com/bmcfee","followers_url":"https://api.github.com/users/bmcfee/followers","following_url":"https://api.github.com/users/bmcfee/following{/other_user}","gists_url":"https://api.github.com/users/bmcfee/gists{/gist_id}","starred_url":"https://api.github.com/users/bmcfee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmcfee/subscriptions","organizations_url":"https://api.github.com/users/bmcfee/orgs","repos_url":"https://api.github.com/users/bmcfee/repos","events_url":"https://api.github.com/users/bmcfee/events{/privacy}","received_events_url":"https://api.github.com/users/bmcfee/received_events","type":"User","site_admin":false},"body":"Fixes #24 \r\n\r\nThis PR overhauls the train-test split generator in three ways:\r\n\r\n1. The metadata has been de-duped at the artist id level using a nearest-neighbor search in vggish feature space.  The process is described in #24 comment thread, with a link the corresponding notebook.  The process is deterministic and easy to reproduce.\r\n2. Train-test splits are now artist-conditional, and can optionally use the de-dupe index produced by (1) above.  This effectively eliminates the most obvious cases of train-test leakage by (near) duplication.\r\n3. Shuffle splits are now done with rejection sampling based on a probability ratio match.  For each proposed split, the distribution of positive and negative examples for each instrument cannot deviate by more than a constant factor from the full sample.\r\n\r\nFor step (3), I have checked in a generated train-test split with tolerance of 0.875 (closer to 1 meaning a tighter match to the full distribution).  I haven't been able to improve on this yet, and we're probably hitting the limits imposed by the data (e.g. the Bach effect mentioned in #24), but I think this ratio is pretty good.\r\n\r\nAside from CR, what I need from @ejhumphrey and/or @simondurand is instructions for where to put the dedupe index data.  Otherwise, I think this resolves all of the major issues known in the previous train-test split logic.","created_at":"2018-09-03T20:54:34Z","updated_at":"2018-09-07T01:15:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04f11135feacd6a4d09dde84daed6e547b1a0296","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1026381045,"node_id":"MDU6TGFiZWwxMDI2MzgxMDQ1","url":"https://api.github.com/repos/cosmir/openmic-2018/labels/bug","name":"bug","color":"d73a4a","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25/commits","review_comments_url":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25/comments","review_comment_url":"https://api.github.com/repos/cosmir/openmic-2018/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cosmir/openmic-2018/issues/25/comments","statuses_url":"https://api.github.com/repos/cosmir/openmic-2018/statuses/5e531facb5e17cf30a9cfce9029f8447f1f59697","head":{"label":"cosmir:splitter-condition","ref":"splitter-condition","sha":"5e531facb5e17cf30a9cfce9029f8447f1f59697","user":{"login":"cosmir","id":21199812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTk5ODEy","avatar_url":"https://avatars3.githubusercontent.com/u/21199812?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmir","html_url":"https://github.com/cosmir","followers_url":"https://api.github.com/users/cosmir/followers","following_url":"https://api.github.com/users/cosmir/following{/other_user}","gists_url":"https://api.github.com/users/cosmir/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmir/subscriptions","organizations_url":"https://api.github.com/users/cosmir/orgs","repos_url":"https://api.github.com/users/cosmir/repos","events_url":"https://api.github.com/users/cosmir/events{/privacy}","received_events_url":"https://api.github.com/users/cosmir/received_events","type":"Organization","site_admin":false},"repo":{"id":145010144,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMTAxNDQ=","name":"openmic-2018","full_name":"cosmir/openmic-2018","owner":{"login":"cosmir","id":21199812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTk5ODEy","avatar_url":"https://avatars3.githubusercontent.com/u/21199812?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmir","html_url":"https://github.com/cosmir","followers_url":"https://api.github.com/users/cosmir/followers","following_url":"https://api.github.com/users/cosmir/following{/other_user}","gists_url":"https://api.github.com/users/cosmir/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmir/subscriptions","organizations_url":"https://api.github.com/users/cosmir/orgs","repos_url":"https://api.github.com/users/cosmir/repos","events_url":"https://api.github.com/users/cosmir/events{/privacy}","received_events_url":"https://api.github.com/users/cosmir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cosmir/openmic-2018","description":"Tools and tutorials for the OpenMIC-2018 dataset.","fork":false,"url":"https://api.github.com/repos/cosmir/openmic-2018","forks_url":"https://api.github.com/repos/cosmir/openmic-2018/forks","keys_url":"https://api.github.com/repos/cosmir/openmic-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmir/openmic-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmir/openmic-2018/teams","hooks_url":"https://api.github.com/repos/cosmir/openmic-2018/hooks","issue_events_url":"https://api.github.com/repos/cosmir/openmic-2018/issues/events{/number}","events_url":"https://api.github.com/repos/cosmir/openmic-2018/events","assignees_url":"https://api.github.com/repos/cosmir/openmic-2018/assignees{/user}","branches_url":"https://api.github.com/repos/cosmir/openmic-2018/branches{/branch}","tags_url":"https://api.github.com/repos/cosmir/openmic-2018/tags","blobs_url":"https://api.github.com/repos/cosmir/openmic-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmir/openmic-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmir/openmic-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmir/openmic-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmir/openmic-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmir/openmic-2018/languages","stargazers_url":"https://api.github.com/repos/cosmir/openmic-2018/stargazers","contributors_url":"https://api.github.com/repos/cosmir/openmic-2018/contributors","subscribers_url":"https://api.github.com/repos/cosmir/openmic-2018/subscribers","subscription_url":"https://api.github.com/repos/cosmir/openmic-2018/subscription","commits_url":"https://api.github.com/repos/cosmir/openmic-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmir/openmic-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmir/openmic-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmir/openmic-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmir/openmic-2018/contents/{+path}","compare_url":"https://api.github.com/repos/cosmir/openmic-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmir/openmic-2018/merges","archive_url":"https://api.github.com/repos/cosmir/openmic-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmir/openmic-2018/downloads","issues_url":"https://api.github.com/repos/cosmir/openmic-2018/issues{/number}","pulls_url":"https://api.github.com/repos/cosmir/openmic-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmir/openmic-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmir/openmic-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmir/openmic-2018/labels{/name}","releases_url":"https://api.github.com/repos/cosmir/openmic-2018/releases{/id}","deployments_url":"https://api.github.com/repos/cosmir/openmic-2018/deployments","created_at":"2018-08-16T15:58:15Z","updated_at":"2018-09-03T20:29:46Z","pushed_at":"2018-09-07T01:07:15Z","git_url":"git://github.com/cosmir/openmic-2018.git","ssh_url":"git@github.com:cosmir/openmic-2018.git","clone_url":"https://github.com/cosmir/openmic-2018.git","svn_url":"https://github.com/cosmir/openmic-2018","homepage":null,"size":2565,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":15,"watchers":2,"default_branch":"master"}},"base":{"label":"cosmir:master","ref":"master","sha":"bd141b07af8ccd9a7a2b14f99ccac3cc37f1c8f5","user":{"login":"cosmir","id":21199812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTk5ODEy","avatar_url":"https://avatars3.githubusercontent.com/u/21199812?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmir","html_url":"https://github.com/cosmir","followers_url":"https://api.github.com/users/cosmir/followers","following_url":"https://api.github.com/users/cosmir/following{/other_user}","gists_url":"https://api.github.com/users/cosmir/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmir/subscriptions","organizations_url":"https://api.github.com/users/cosmir/orgs","repos_url":"https://api.github.com/users/cosmir/repos","events_url":"https://api.github.com/users/cosmir/events{/privacy}","received_events_url":"https://api.github.com/users/cosmir/received_events","type":"Organization","site_admin":false},"repo":{"id":145010144,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMTAxNDQ=","name":"openmic-2018","full_name":"cosmir/openmic-2018","owner":{"login":"cosmir","id":21199812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMTk5ODEy","avatar_url":"https://avatars3.githubusercontent.com/u/21199812?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmir","html_url":"https://github.com/cosmir","followers_url":"https://api.github.com/users/cosmir/followers","following_url":"https://api.github.com/users/cosmir/following{/other_user}","gists_url":"https://api.github.com/users/cosmir/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmir/subscriptions","organizations_url":"https://api.github.com/users/cosmir/orgs","repos_url":"https://api.github.com/users/cosmir/repos","events_url":"https://api.github.com/users/cosmir/events{/privacy}","received_events_url":"https://api.github.com/users/cosmir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cosmir/openmic-2018","description":"Tools and tutorials for the OpenMIC-2018 dataset.","fork":false,"url":"https://api.github.com/repos/cosmir/openmic-2018","forks_url":"https://api.github.com/repos/cosmir/openmic-2018/forks","keys_url":"https://api.github.com/repos/cosmir/openmic-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmir/openmic-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmir/openmic-2018/teams","hooks_url":"https://api.github.com/repos/cosmir/openmic-2018/hooks","issue_events_url":"https://api.github.com/repos/cosmir/openmic-2018/issues/events{/number}","events_url":"https://api.github.com/repos/cosmir/openmic-2018/events","assignees_url":"https://api.github.com/repos/cosmir/openmic-2018/assignees{/user}","branches_url":"https://api.github.com/repos/cosmir/openmic-2018/branches{/branch}","tags_url":"https://api.github.com/repos/cosmir/openmic-2018/tags","blobs_url":"https://api.github.com/repos/cosmir/openmic-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmir/openmic-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmir/openmic-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmir/openmic-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmir/openmic-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmir/openmic-2018/languages","stargazers_url":"https://api.github.com/repos/cosmir/openmic-2018/stargazers","contributors_url":"https://api.github.com/repos/cosmir/openmic-2018/contributors","subscribers_url":"https://api.github.com/repos/cosmir/openmic-2018/subscribers","subscription_url":"https://api.github.com/repos/cosmir/openmic-2018/subscription","commits_url":"https://api.github.com/repos/cosmir/openmic-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmir/openmic-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmir/openmic-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmir/openmic-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmir/openmic-2018/contents/{+path}","compare_url":"https://api.github.com/repos/cosmir/openmic-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmir/openmic-2018/merges","archive_url":"https://api.github.com/repos/cosmir/openmic-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmir/openmic-2018/downloads","issues_url":"https://api.github.com/repos/cosmir/openmic-2018/issues{/number}","pulls_url":"https://api.github.com/repos/cosmir/openmic-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmir/openmic-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmir/openmic-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmir/openmic-2018/labels{/name}","releases_url":"https://api.github.com/repos/cosmir/openmic-2018/releases{/id}","deployments_url":"https://api.github.com/repos/cosmir/openmic-2018/deployments","created_at":"2018-08-16T15:58:15Z","updated_at":"2018-09-03T20:29:46Z","pushed_at":"2018-09-07T01:07:15Z","git_url":"git://github.com/cosmir/openmic-2018.git","ssh_url":"git@github.com:cosmir/openmic-2018.git","clone_url":"https://github.com/cosmir/openmic-2018.git","svn_url":"https://github.com/cosmir/openmic-2018","homepage":null,"size":2565,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":15,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25"},"html":{"href":"https://github.com/cosmir/openmic-2018/pull/25"},"issue":{"href":"https://api.github.com/repos/cosmir/openmic-2018/issues/25"},"comments":{"href":"https://api.github.com/repos/cosmir/openmic-2018/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/cosmir/openmic-2018/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cosmir/openmic-2018/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/cosmir/openmic-2018/statuses/5e531facb5e17cf30a9cfce9029f8447f1f59697"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ejhumphrey"}}