{"action":"created","comment":{"url":"https://api.github.com/repos/bigartm/bigartm/pulls/comments/37819994","id":37819994,"diff_hunk":"@@ -0,0 +1,723 @@\n+import os\n+import csv\n+import uuid\n+import glob\n+import shutil\n+import tempfile\n+\n+from pandas import DataFrame\n+\n+import messages_pb2\n+import library as lib\n+\n+import batches_utils as bu\n+import regularizers\n+import scores\n+import scores_info as si\n+\n+SCORE_INFO = {\n+    lib.ScoreConfig_Type_SparsityPhi: si.SparsityPhiScoreInfo,\n+    lib.ScoreConfig_Type_SparsityTheta: si.SparsityThetaScoreInfo,\n+    lib.ScoreConfig_Type_Perplexity: si.PerplexityScoreInfo,\n+    lib.ScoreConfig_Type_ThetaSnippet: si.ThetaSnippetScoreInfo,\n+    lib.ScoreConfig_Type_ItemsProcessed: si.ItemsProcessedScoreInfo,\n+    lib.ScoreConfig_Type_TopTokens: si.TopTokensScoreInfo,\n+    lib.ScoreConfig_Type_TopicKernel: si.TopicKernelScoreInfo\n+}\n+\n+\n+def _parse_collection_inline(target_folder, data_path, data_format, method_name,\n+                             collection_name=None, batches=None, batch_size=None):\n+    batches_list = []\n+    if data_format == 'batches':\n+        if batches is None:\n+            batches_list = glob.glob(os.path.join(data_path, '*.batch'))\n+            if len(batches_list) < 1:\n+                raise RuntimeError('ArtmModel.' + method_name + '(): No batches were found')\n+        else:\n+            batches_list = [os.path.join(data_path, batch) for batch in batches]\n+\n+    elif data_format == 'bow_uci' or data_format == 'vowpal_wabbit':\n+        collection_parser_config = bu._create_parser_config(\n+            data_path=data_path,\n+            collection_name=collection_name,\n+            target_folder=target_folder,\n+            batch_size=batch_size,\n+            data_format=data_format)\n+\n+        lib.Library().ParseCollection(collection_parser_config)\n+        batches_list = glob.glob(os.path.join(target_folder, '*.batch'))\n+\n+    elif data_format == 'plain_text':\n+        raise NotImplementedError()\n+    else:\n+        raise IOError('ArtmModel.' + method_name + '(): Unknown data format')\n+\n+    return batches_list\n+\n+\n+class ArtmModel(object):","path":"python/artm/model.py","position":59,"original_position":59,"commit_id":"1ae6a5a26a2c49a7511a3d43d7539229ef23b002","original_commit_id":"1ae6a5a26a2c49a7511a3d43d7539229ef23b002","user":{"login":"romovpa","id":152387,"avatar_url":"https://avatars.githubusercontent.com/u/152387?v=3","gravatar_id":"","url":"https://api.github.com/users/romovpa","html_url":"https://github.com/romovpa","followers_url":"https://api.github.com/users/romovpa/followers","following_url":"https://api.github.com/users/romovpa/following{/other_user}","gists_url":"https://api.github.com/users/romovpa/gists{/gist_id}","starred_url":"https://api.github.com/users/romovpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romovpa/subscriptions","organizations_url":"https://api.github.com/users/romovpa/orgs","repos_url":"https://api.github.com/users/romovpa/repos","events_url":"https://api.github.com/users/romovpa/events{/privacy}","received_events_url":"https://api.github.com/users/romovpa/received_events","type":"User","site_admin":false},"body":"Rename to `ARTM`, seriously","created_at":"2015-08-25T00:05:58Z","updated_at":"2015-08-25T00:05:58Z","html_url":"https://github.com/bigartm/bigartm/pull/256#discussion_r37819994","pull_request_url":"https://api.github.com/repos/bigartm/bigartm/pulls/256","_links":{"self":{"href":"https://api.github.com/repos/bigartm/bigartm/pulls/comments/37819994"},"html":{"href":"https://github.com/bigartm/bigartm/pull/256#discussion_r37819994"},"pull_request":{"href":"https://api.github.com/repos/bigartm/bigartm/pulls/256"}}},"pull_request":{"url":"https://api.github.com/repos/bigartm/bigartm/pulls/256","id":41554597,"html_url":"https://github.com/bigartm/bigartm/pull/256","diff_url":"https://github.com/bigartm/bigartm/pull/256.diff","patch_url":"https://github.com/bigartm/bigartm/pull/256.patch","issue_url":"https://api.github.com/repos/bigartm/bigartm/issues/256","number":256,"state":"open","locked":false,"title":"Mel lain artm model fixes","user":{"login":"MelLain","id":6525360,"avatar_url":"https://avatars.githubusercontent.com/u/6525360?v=3","gravatar_id":"","url":"https://api.github.com/users/MelLain","html_url":"https://github.com/MelLain","followers_url":"https://api.github.com/users/MelLain/followers","following_url":"https://api.github.com/users/MelLain/following{/other_user}","gists_url":"https://api.github.com/users/MelLain/gists{/gist_id}","starred_url":"https://api.github.com/users/MelLain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelLain/subscriptions","organizations_url":"https://api.github.com/users/MelLain/orgs","repos_url":"https://api.github.com/users/MelLain/repos","events_url":"https://api.github.com/users/MelLain/events{/privacy}","received_events_url":"https://api.github.com/users/MelLain/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-04T10:21:46Z","updated_at":"2015-08-25T00:05:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35b21d520da1881a58869405efa8134480de6b67","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bigartm/bigartm/pulls/256/commits","review_comments_url":"https://api.github.com/repos/bigartm/bigartm/pulls/256/comments","review_comment_url":"https://api.github.com/repos/bigartm/bigartm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bigartm/bigartm/issues/256/comments","statuses_url":"https://api.github.com/repos/bigartm/bigartm/statuses/1ae6a5a26a2c49a7511a3d43d7539229ef23b002","head":{"label":"MelLain:MelLain_ArtmModel_fixes","ref":"MelLain_ArtmModel_fixes","sha":"1ae6a5a26a2c49a7511a3d43d7539229ef23b002","user":{"login":"MelLain","id":6525360,"avatar_url":"https://avatars.githubusercontent.com/u/6525360?v=3","gravatar_id":"","url":"https://api.github.com/users/MelLain","html_url":"https://github.com/MelLain","followers_url":"https://api.github.com/users/MelLain/followers","following_url":"https://api.github.com/users/MelLain/following{/other_user}","gists_url":"https://api.github.com/users/MelLain/gists{/gist_id}","starred_url":"https://api.github.com/users/MelLain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelLain/subscriptions","organizations_url":"https://api.github.com/users/MelLain/orgs","repos_url":"https://api.github.com/users/MelLain/repos","events_url":"https://api.github.com/users/MelLain/events{/privacy}","received_events_url":"https://api.github.com/users/MelLain/received_events","type":"User","site_admin":false},"repo":{"id":24302081,"name":"bigartm","full_name":"MelLain/bigartm","owner":{"login":"MelLain","id":6525360,"avatar_url":"https://avatars.githubusercontent.com/u/6525360?v=3","gravatar_id":"","url":"https://api.github.com/users/MelLain","html_url":"https://github.com/MelLain","followers_url":"https://api.github.com/users/MelLain/followers","following_url":"https://api.github.com/users/MelLain/following{/other_user}","gists_url":"https://api.github.com/users/MelLain/gists{/gist_id}","starred_url":"https://api.github.com/users/MelLain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelLain/subscriptions","organizations_url":"https://api.github.com/users/MelLain/orgs","repos_url":"https://api.github.com/users/MelLain/repos","events_url":"https://api.github.com/users/MelLain/events{/privacy}","received_events_url":"https://api.github.com/users/MelLain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MelLain/bigartm","description":"","fork":true,"url":"https://api.github.com/repos/MelLain/bigartm","forks_url":"https://api.github.com/repos/MelLain/bigartm/forks","keys_url":"https://api.github.com/repos/MelLain/bigartm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MelLain/bigartm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MelLain/bigartm/teams","hooks_url":"https://api.github.com/repos/MelLain/bigartm/hooks","issue_events_url":"https://api.github.com/repos/MelLain/bigartm/issues/events{/number}","events_url":"https://api.github.com/repos/MelLain/bigartm/events","assignees_url":"https://api.github.com/repos/MelLain/bigartm/assignees{/user}","branches_url":"https://api.github.com/repos/MelLain/bigartm/branches{/branch}","tags_url":"https://api.github.com/repos/MelLain/bigartm/tags","blobs_url":"https://api.github.com/repos/MelLain/bigartm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MelLain/bigartm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MelLain/bigartm/git/refs{/sha}","trees_url":"https://api.github.com/repos/MelLain/bigartm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MelLain/bigartm/statuses/{sha}","languages_url":"https://api.github.com/repos/MelLain/bigartm/languages","stargazers_url":"https://api.github.com/repos/MelLain/bigartm/stargazers","contributors_url":"https://api.github.com/repos/MelLain/bigartm/contributors","subscribers_url":"https://api.github.com/repos/MelLain/bigartm/subscribers","subscription_url":"https://api.github.com/repos/MelLain/bigartm/subscription","commits_url":"https://api.github.com/repos/MelLain/bigartm/commits{/sha}","git_commits_url":"https://api.github.com/repos/MelLain/bigartm/git/commits{/sha}","comments_url":"https://api.github.com/repos/MelLain/bigartm/comments{/number}","issue_comment_url":"https://api.github.com/repos/MelLain/bigartm/issues/comments{/number}","contents_url":"https://api.github.com/repos/MelLain/bigartm/contents/{+path}","compare_url":"https://api.github.com/repos/MelLain/bigartm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MelLain/bigartm/merges","archive_url":"https://api.github.com/repos/MelLain/bigartm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MelLain/bigartm/downloads","issues_url":"https://api.github.com/repos/MelLain/bigartm/issues{/number}","pulls_url":"https://api.github.com/repos/MelLain/bigartm/pulls{/number}","milestones_url":"https://api.github.com/repos/MelLain/bigartm/milestones{/number}","notifications_url":"https://api.github.com/repos/MelLain/bigartm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MelLain/bigartm/labels{/name}","releases_url":"https://api.github.com/repos/MelLain/bigartm/releases{/id}","created_at":"2014-09-21T20:03:41Z","updated_at":"2015-04-11T13:33:10Z","pushed_at":"2015-08-22T09:34:56Z","git_url":"git://github.com/MelLain/bigartm.git","ssh_url":"git@github.com:MelLain/bigartm.git","clone_url":"https://github.com/MelLain/bigartm.git","svn_url":"https://github.com/MelLain/bigartm","homepage":null,"size":8624,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bigartm:master","ref":"master","sha":"888c34543f50f2dfdf96fb594c9a87fc13035527","user":{"login":"bigartm","id":8783740,"avatar_url":"https://avatars.githubusercontent.com/u/8783740?v=3","gravatar_id":"","url":"https://api.github.com/users/bigartm","html_url":"https://github.com/bigartm","followers_url":"https://api.github.com/users/bigartm/followers","following_url":"https://api.github.com/users/bigartm/following{/other_user}","gists_url":"https://api.github.com/users/bigartm/gists{/gist_id}","starred_url":"https://api.github.com/users/bigartm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigartm/subscriptions","organizations_url":"https://api.github.com/users/bigartm/orgs","repos_url":"https://api.github.com/users/bigartm/repos","events_url":"https://api.github.com/users/bigartm/events{/privacy}","received_events_url":"https://api.github.com/users/bigartm/received_events","type":"Organization","site_admin":false},"repo":{"id":24072579,"name":"bigartm","full_name":"bigartm/bigartm","owner":{"login":"bigartm","id":8783740,"avatar_url":"https://avatars.githubusercontent.com/u/8783740?v=3","gravatar_id":"","url":"https://api.github.com/users/bigartm","html_url":"https://github.com/bigartm","followers_url":"https://api.github.com/users/bigartm/followers","following_url":"https://api.github.com/users/bigartm/following{/other_user}","gists_url":"https://api.github.com/users/bigartm/gists{/gist_id}","starred_url":"https://api.github.com/users/bigartm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigartm/subscriptions","organizations_url":"https://api.github.com/users/bigartm/orgs","repos_url":"https://api.github.com/users/bigartm/repos","events_url":"https://api.github.com/users/bigartm/events{/privacy}","received_events_url":"https://api.github.com/users/bigartm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bigartm/bigartm","description":"Fast topic modeling platform","fork":false,"url":"https://api.github.com/repos/bigartm/bigartm","forks_url":"https://api.github.com/repos/bigartm/bigartm/forks","keys_url":"https://api.github.com/repos/bigartm/bigartm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigartm/bigartm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigartm/bigartm/teams","hooks_url":"https://api.github.com/repos/bigartm/bigartm/hooks","issue_events_url":"https://api.github.com/repos/bigartm/bigartm/issues/events{/number}","events_url":"https://api.github.com/repos/bigartm/bigartm/events","assignees_url":"https://api.github.com/repos/bigartm/bigartm/assignees{/user}","branches_url":"https://api.github.com/repos/bigartm/bigartm/branches{/branch}","tags_url":"https://api.github.com/repos/bigartm/bigartm/tags","blobs_url":"https://api.github.com/repos/bigartm/bigartm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigartm/bigartm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigartm/bigartm/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigartm/bigartm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigartm/bigartm/statuses/{sha}","languages_url":"https://api.github.com/repos/bigartm/bigartm/languages","stargazers_url":"https://api.github.com/repos/bigartm/bigartm/stargazers","contributors_url":"https://api.github.com/repos/bigartm/bigartm/contributors","subscribers_url":"https://api.github.com/repos/bigartm/bigartm/subscribers","subscription_url":"https://api.github.com/repos/bigartm/bigartm/subscription","commits_url":"https://api.github.com/repos/bigartm/bigartm/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigartm/bigartm/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigartm/bigartm/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigartm/bigartm/issues/comments{/number}","contents_url":"https://api.github.com/repos/bigartm/bigartm/contents/{+path}","compare_url":"https://api.github.com/repos/bigartm/bigartm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigartm/bigartm/merges","archive_url":"https://api.github.com/repos/bigartm/bigartm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigartm/bigartm/downloads","issues_url":"https://api.github.com/repos/bigartm/bigartm/issues{/number}","pulls_url":"https://api.github.com/repos/bigartm/bigartm/pulls{/number}","milestones_url":"https://api.github.com/repos/bigartm/bigartm/milestones{/number}","notifications_url":"https://api.github.com/repos/bigartm/bigartm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigartm/bigartm/labels{/name}","releases_url":"https://api.github.com/repos/bigartm/bigartm/releases{/id}","created_at":"2014-09-15T20:26:11Z","updated_at":"2015-07-22T22:06:02Z","pushed_at":"2015-08-24T23:42:34Z","git_url":"git://github.com/bigartm/bigartm.git","ssh_url":"git@github.com:bigartm/bigartm.git","clone_url":"https://github.com/bigartm/bigartm.git","svn_url":"https://github.com/bigartm/bigartm","homepage":"http://bigartm.org/","size":10016,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":40,"forks":12,"open_issues":40,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bigartm/bigartm/pulls/256"},"html":{"href":"https://github.com/bigartm/bigartm/pull/256"},"issue":{"href":"https://api.github.com/repos/bigartm/bigartm/issues/256"},"comments":{"href":"https://api.github.com/repos/bigartm/bigartm/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/bigartm/bigartm/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/bigartm/bigartm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bigartm/bigartm/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/bigartm/bigartm/statuses/1ae6a5a26a2c49a7511a3d43d7539229ef23b002"}}}}