Skip to content

FIX Change int32_t to be a uint64_t in hashing (#9642) #9643

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

Closed
wants to merge 1 commit into from

Conversation

erg
Copy link
Contributor

@erg erg commented Aug 28, 2017

Fixes #9642.

A uint32_t would eventually overflow as well...

@erg
Copy link
Contributor Author

erg commented Aug 28, 2017

My model took an hour to train and has the error:

    return self.fit(X, **fit_params).transform(X)                                              
  File "/usr/lib/python3.6/site-packages/sklearn/feature_extraction/text.py", line 519, in transform                                                                                          
    X = self._get_hasher().transform(analyzer(doc) for doc in X)                               
  File "/usr/lib/python3.6/site-packages/sklearn/feature_extraction/hashing.py", line 160, in transform                                                                                       
    self.alternate_sign)                       
  File "sklearn/feature_extraction/_hashing.pyx", line 79, in sklearn.feature_extraction._hashing.transform                                                                                   
OverflowError: signed integer is greater than maximum                                          

This pr is better: #9147

@erg erg closed this Aug 28, 2017
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.

1 participant