Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable using various workers in tests for FastText #1686

Merged
merged 1 commit into from
Nov 2, 2017

Conversation

horpto
Copy link
Contributor

@horpto horpto commented Nov 2, 2017

Current version of FastText is pure-python,
so CPU-bound processing with multiple workers in it is a bad idea.
Using workers=12 in a some tests increased execution time of tests.

@menshikh-iv
Copy link
Contributor

Thanks @horpto, can you compare the time of test_fasttext before/after?
CC: @chinmayapancholi13 WDYT about this change?

Current version of FastText is pure-python,
so CPU-bound processing with multiple workers in it is a bad idea.
Using workers=12 in a some tests increased execution time of tests.
@menshikh-iv
Copy link
Contributor

I run each test 3 times and averaged the results.

Test Before (sec) After (sec) Speedup (x)
test_cbow_hs_against_wrapper 115.7 52.5 2.2
test_sg_hs_against_wrapper 189.6 92.1 2.0
test_sg_hs_online 23.5 13.1 1.7
test_sg_neg_online 29.9 16.8 1.8
test_cbow_hs_online 18.0 9.0 2.0
test_cbow_neg_online 20.3 11.1 1.8

Nice speedup for slowest tests, good job @horpto!

@menshikh-iv menshikh-iv merged commit c583b28 into piskvorky:develop Nov 2, 2017
@horpto horpto deleted the optimise-pure-python-model branch November 2, 2017 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants