Skip to content

[MRG+1] HOTFIX for incorrect cast in liblinear.pyx #5565

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

Merged
merged 1 commit into from
Oct 23, 2015

Conversation

MechCoder
Copy link
Member

No description provided.

@MechCoder
Copy link
Member Author

@amueller sorry, I did not check after @larsmans told me that the memoryview type should be float

@agramfort
Copy link
Member

what was failing?

@amueller
Copy link
Member

@agramfort the C code was not matching the cython code. The cython code did not compile.

@amueller
Copy link
Member

I'm not familiar with the code so it is really hard for me to review.

@amueller
Copy link
Member

rebase?

@amueller
Copy link
Member

I messed with master so you may need to reset. I'll buy you a beer when I'm back ;)

@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

I don't understand this hotfix, why revert to char*?

@MechCoder MechCoder force-pushed the hot_fix branch 2 times, most recently from fdac94b to 6f2f59c Compare October 23, 2015 15:46
@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

Can you please remove the merge commit? create a new branch off of the current upstream/master and just cherry-pick fdac94b into it and force push to MechCoder:hot_fix.

@MechCoder MechCoder force-pushed the hot_fix branch 5 times, most recently from f3ffe83 to b3ab377 Compare October 23, 2015 16:00
@MechCoder
Copy link
Member Author

As far as the hotfix goes, I do not have time to investigate further right now (exams approaching) but while rerunning cython liblinear.pyx I got this error #5274 (comment) , which somehow looks like numpy returns a char pointer for a data buffer in NumPy, which cython is not able to implicitly cast into a double pointer. (I'm just speculating not sure though)

@amueller Thanks for the offer ! But I am not much of a beer fan and would prefer either rum or whisky :)

@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

The content of b3ab377 is not the cython cast hotfix for the liblinear sample weights.

@MechCoder
Copy link
Member Author

just a second, fixing it up

@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

fdac94b has the right fix in case you lost it.

@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

Ok for using the char* type, it seems to be a Cython / numpy thingy. At least it's consistent with the rest of the file.

@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

I cancelled the travis build because 25d50a6 still does not have the correct fix. You should use git log -p to check the content of the commit before pushing if you are not sure.

@MechCoder MechCoder force-pushed the hot_fix branch 2 times, most recently from 027cb23 to ca4ea3f Compare October 23, 2015 16:19
@MechCoder
Copy link
Member Author

Sorry about the trouble, it should look all right now.

I tried the cherry-pick approach and it did not seem to work. Hence I reverted each of the faulty commits that seemed to show up and squashed.

@amueller
Copy link
Member

ping @larsmans @agramfort ?

@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

+1 if travis is green.

@ogrisel ogrisel changed the title HOTFIX for incorrect cast in liblinear.pyx [MRG+1] HOTFIX for incorrect cast in liblinear.pyx Oct 23, 2015
@ogrisel
Copy link
Member

ogrisel commented Oct 23, 2015

travis is green, merging.

ogrisel added a commit that referenced this pull request Oct 23, 2015
[MRG+1] HOTFIX for incorrect cast in liblinear.pyx
@ogrisel ogrisel merged commit b255056 into scikit-learn:master Oct 23, 2015
@MechCoder MechCoder deleted the hot_fix branch October 23, 2015 18:12
@arthurmensch
Copy link
Contributor

I ll rebase my PR ASAP
Le 23 oct. 2015 20:10, "Olivier Grisel" notifications@github.com a écrit :

travis is green, merging.


Reply to this email directly or view it on GitHub
#5565 (comment)
.

@MechCoder
Copy link
Member Author

Sorry for the mess everyone should have checked twice :((

@amueller
Copy link
Member

No worries @MechCoder, happens to the best of us ;) @arthurmensch's PR will make sure we won't have this issue in the future.

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.

5 participants