{"action":"created","issue":{"url":"https://api.github.com/repos/salestock/fastText.py/issues/59","repository_url":"https://api.github.com/repos/salestock/fastText.py","labels_url":"https://api.github.com/repos/salestock/fastText.py/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/salestock/fastText.py/issues/59/comments","events_url":"https://api.github.com/repos/salestock/fastText.py/issues/59/events","html_url":"https://github.com/salestock/fastText.py/issues/59","id":173929478,"number":59,"title":"Predict Performance","user":{"login":"elmar-haussmann","id":14123414,"avatar_url":"https://avatars.githubusercontent.com/u/14123414?v=3","gravatar_id":"","url":"https://api.github.com/users/elmar-haussmann","html_url":"https://github.com/elmar-haussmann","followers_url":"https://api.github.com/users/elmar-haussmann/followers","following_url":"https://api.github.com/users/elmar-haussmann/following{/other_user}","gists_url":"https://api.github.com/users/elmar-haussmann/gists{/gist_id}","starred_url":"https://api.github.com/users/elmar-haussmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmar-haussmann/subscriptions","organizations_url":"https://api.github.com/users/elmar-haussmann/orgs","repos_url":"https://api.github.com/users/elmar-haussmann/repos","events_url":"https://api.github.com/users/elmar-haussmann/events{/privacy}","received_events_url":"https://api.github.com/users/elmar-haussmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-30T04:51:51Z","updated_at":"2016-08-30T13:00:17Z","closed_at":null,"body":"The performance of `classifier.predict` is extremely bad at the moment. This is because for each call `FastTextModel::classifierPredict` instantiates `Model model(_input_matrix, _output_matrix, dim, args.lr, 1);`, which in turn recomputes the binary tree for hierarchical softmax. In my experiments, this took roughly a second for each call, but it depends on the size of the dictionary.\r\n\r\nOne solution would be to make the model a member of FastTextModel."},"comment":{"url":"https://api.github.com/repos/salestock/fastText.py/issues/comments/243430372","html_url":"https://github.com/salestock/fastText.py/issues/59#issuecomment-243430372","issue_url":"https://api.github.com/repos/salestock/fastText.py/issues/59","id":243430372,"user":{"login":"minimaxir","id":2179708,"avatar_url":"https://avatars.githubusercontent.com/u/2179708?v=3","gravatar_id":"","url":"https://api.github.com/users/minimaxir","html_url":"https://github.com/minimaxir","followers_url":"https://api.github.com/users/minimaxir/followers","following_url":"https://api.github.com/users/minimaxir/following{/other_user}","gists_url":"https://api.github.com/users/minimaxir/gists{/gist_id}","starred_url":"https://api.github.com/users/minimaxir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minimaxir/subscriptions","organizations_url":"https://api.github.com/users/minimaxir/orgs","repos_url":"https://api.github.com/users/minimaxir/repos","events_url":"https://api.github.com/users/minimaxir/events{/privacy}","received_events_url":"https://api.github.com/users/minimaxir/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T13:00:17Z","updated_at":"2016-08-30T13:00:17Z","body":"Hitting similar performance issues (1 sec/call on a large dictionary) with `classifier.predict`. "}}
{"actor":{"display_login":"minimaxir"}}