{"action":"created","issue":{"url":"https://api.github.com/repos/Yoctol/word-embedder/issues/5","repository_url":"https://api.github.com/repos/Yoctol/word-embedder","labels_url":"https://api.github.com/repos/Yoctol/word-embedder/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Yoctol/word-embedder/issues/5/comments","events_url":"https://api.github.com/repos/Yoctol/word-embedder/issues/5/events","html_url":"https://github.com/Yoctol/word-embedder/pull/5","id":360710056,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1ODY0NTI0","number":5,"title":"added fasttext light for low memory condition","user":{"login":"SoluMilken","id":19161836,"node_id":"MDQ6VXNlcjE5MTYxODM2","avatar_url":"https://avatars1.githubusercontent.com/u/19161836?v=4","gravatar_id":"","url":"https://api.github.com/users/SoluMilken","html_url":"https://github.com/SoluMilken","followers_url":"https://api.github.com/users/SoluMilken/followers","following_url":"https://api.github.com/users/SoluMilken/following{/other_user}","gists_url":"https://api.github.com/users/SoluMilken/gists{/gist_id}","starred_url":"https://api.github.com/users/SoluMilken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoluMilken/subscriptions","organizations_url":"https://api.github.com/users/SoluMilken/orgs","repos_url":"https://api.github.com/users/SoluMilken/repos","events_url":"https://api.github.com/users/SoluMilken/events{/privacy}","received_events_url":"https://api.github.com/users/SoluMilken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-17T03:03:14Z","updated_at":"2018-09-17T05:48:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Yoctol/word-embedder/pulls/5","html_url":"https://github.com/Yoctol/word-embedder/pull/5","diff_url":"https://github.com/Yoctol/word-embedder/pull/5.diff","patch_url":"https://github.com/Yoctol/word-embedder/pull/5.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/Yoctol/word-embedder/issues/comments/421895319","html_url":"https://github.com/Yoctol/word-embedder/pull/5#issuecomment-421895319","issue_url":"https://api.github.com/repos/Yoctol/word-embedder/issues/5","id":421895319,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTg5NTMxOQ==","user":{"login":"SoluMilken","id":19161836,"node_id":"MDQ6VXNlcjE5MTYxODM2","avatar_url":"https://avatars1.githubusercontent.com/u/19161836?v=4","gravatar_id":"","url":"https://api.github.com/users/SoluMilken","html_url":"https://github.com/SoluMilken","followers_url":"https://api.github.com/users/SoluMilken/followers","following_url":"https://api.github.com/users/SoluMilken/following{/other_user}","gists_url":"https://api.github.com/users/SoluMilken/gists{/gist_id}","starred_url":"https://api.github.com/users/SoluMilken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoluMilken/subscriptions","organizations_url":"https://api.github.com/users/SoluMilken/orgs","repos_url":"https://api.github.com/users/SoluMilken/repos","events_url":"https://api.github.com/users/SoluMilken/events{/privacy}","received_events_url":"https://api.github.com/users/SoluMilken/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T05:48:52Z","updated_at":"2018-09-17T05:48:52Z","author_association":"CONTRIBUTOR","body":"## profile\r\n```\r\n...gensim load\r\n...gensim load done in 0:06:49.841293\r\n...gensim get vectors\r\n...gensim get vectors done in 0:00:00.134226\r\n...embedder load\r\n...embedder load done in 0:00:26.608154\r\n...embedder get vectors\r\n...embedder get vectors done in 0:00:09.239922\r\n...embedder get different vectors\r\n...embedder get different vectors done in 0:00:08.738935\r\n\r\n```\r\n\r\n## code\r\n```python\r\nimport random\r\n\r\nfrom gensim.models import KeyedVectors\r\nfrom bistiming import SimpleTimer\r\nfrom word_embedder import lib\r\n\r\nmax_iter = 100000\r\n\r\n\r\nwith SimpleTimer('gensim load'):\r\n    e = KeyedVectors.load_word2vec_format(\r\n        '/home/en/word-embedder/data/ft.zh.300.vec')\r\n\r\nwith SimpleTimer('gensim get vectors'):\r\n    for _ in range(max_iter):\r\n        e['我']\r\n\r\ndel e\r\n\r\nwith SimpleTimer('embedder load'):\r\n    e = lib['ChineseFastTextLight']\r\n\r\ncan = random.sample(range(e.n_vocab), max_iter)\r\n\r\nwith SimpleTimer('embedder get vectors'):\r\n    for _ in range(max_iter):\r\n        e['我']\r\n\r\n\r\nwith SimpleTimer('embedder get different vectors'):\r\n    for i in can:\r\n        e[i]\r\n\r\nimport ipdb; ipdb.set_trace()\r\n\r\n```"}}
{"actor":{"display_login":"SoluMilken"}}