-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
FastText SkipGram Implementation Broken since 3.7.2 #2508
Comments
Given the extra error ("C extension not loaded, training will be slow"), it looks like (1) your gensim-3.7.3 installation didn't get the native libraries your earlier installation did; and (2) the gensim plain-Python code path is what's broken. That's rarely used, as it's up-to-100x slower, and thus far must be manually tested (since the normal, important testing successfully loads/tests the optimized variants). So, @zstachniak, your local problem may be fixable by ensuring the native libraries are available. On Windows, often a 'wheel' install or 'conda' install will succeed in that, even when a 'pip install' does not. (You have to watch the install output closely; a failure to build native libraries will generate a message, but not cause the overall installation to fail.) The gensim-side problem would require either (1) fixing-up & testing the pure-Python paths (and perhaps arranging the pure-Python paths to be auto-tested, though that'd be a pain that also slows automated testing noticeably; (2) explicitly dropping support for the plain-Python paths, improving the error messages when the optimized code isn't available. |
I'm inclined toward 2) We're really trying to tighten up our interfaces & remove brittle / academic fluff now. The pure Python path may have been useful for educational reasons historically, but serves little purpose now (aside from the lack of testing / masking installation issues). CC @mpenkov thoughts? |
Ah, interesting. @gojomo , any idea why a pip install on 3.7.1 work with my C compiler but 3.7.2 and above do not? I'm not seeing any messages indicating an error during install... |
Update: When trying to install directly from a PyPI download, I did finally encounter error messages during install (but still only for 3.7.3). For some reason, performing a Devs, let me know if I should close this issue, and thanks for your support! For any other Python users who are forced to use a Windows box... |
I'm +1 for removing native Python support for fasttext. I can't see a reason for using it. @menshikh-iv WDYT? |
@mpenkov I'm +1 for drop pure-python implementation of w2v/d2v/ft/etc and stay only cython implementations. |
OK, opened a separate ticket to deal with it. I think we can close this one. |
The FastText implementation using skip-gram appears to be broken since 3.7.2. Below is the sample code I am using, which is almost identical to the example in the docs but with additional printed output. In v3.7.1, everything runs fine, but in subsequent versions, an IndexError occurs during train_sg_pair.
Works in 3.7.1
Fails in 3.7.3
The text was updated successfully, but these errors were encountered: