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

OSerror access violation writing when training #67

Closed
asilva19 opened this issue May 12, 2018 · 3 comments
Closed

OSerror access violation writing when training #67

asilva19 opened this issue May 12, 2018 · 3 comments

Comments

@asilva19
Copy link

asilva19 commented May 12, 2018

I'm using the scikit-learn python wrapper. I think I successfully built thundersvm because VisualStudio didn't report any errors. Using Windows 10 and the winpython distribution.

I can successfully run this command:
clf = SVC(cost = 1,gamma = .1, kernel = 2)

Then I call:
clf.fit(trainData, trainLabels), and I get the following error/trace:

File "C:/Users/Andres/Desktop/getthisright/GPU_SVMwithPermutation.py", line 302, in InnerCV_Angle
clf.fit(inphaseTrainingData, inphaseTrainingLabels)

File "C:\Users\Andres\Desktop\getthisright\thundersvmScikit.py", line 67, in fit
thundersvm.model_free(c_void_p(self.model))

OSError: exception: access violation writing 0x0000000066222618

Do you know what is happening here?

I should mention that just after I built thundersvm, I tried the command "from thundersvmScikit import *" and got an error message saying it couldn't find thundersvmScikit.py. So, I moved thundersvmScikit.py to the same directory as my real script, and this time I was
I moved the thundersvm root folder into the folder with my python script. This time, when I tried to import thundersvmScikit.py, it outputted "please build the library first!" even though everything was built. So, I also moved the thundersvm root folder into the folder containing my script and changed the thundersvmScikit.py script so that it would look for thundersvm in the new location (lines 18-22). I hope those changes didn't lead to this issue. But if they did, then I don't know how else to solve the other issues in this paragraph.

Thank you so much for your help. thundersvm seems like an amazing project that I want to use.

If it's useful, the full trace is this:

Traceback (most recent call last):

File "", line 1, in
runfile('C:/Users/Andres/Desktop/getthisright/GPU_SVMwithPermutation.py', wdir='C:/Users/Andres/Desktop/getthisright')

File "C:\Users\Andres\Desktop\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)

File "C:\Users\Andres\Desktop\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/Andres/Desktop/getthisright/GPU_SVMwithPermutation.py", line 621, in
allPerformanceAngle,allFoldsBestParametersAngle, allFoldsParameterInfosAngle = OuterCV_Angle(subjectDataset)

File "C:/Users/Andres/Desktop/getthisright/GPU_SVMwithPermutation.py", line 447, in OuterCV_Angle
nmotionTrainingData, nmotionTrainingLabels, nmotionTrainingLabelsPermuted, nmotionTrainingRuns) #send data to inner loop for parameter selection

File "C:/Users/Andres/Desktop/getthisright/GPU_SVMwithPermutation.py", line 302, in InnerCV_Angle
clf.fit(inphaseTrainingData, inphaseTrainingLabels)

File "C:\Users\Andres\Desktop\getthisright\thundersvmScikit.py", line 67, in fit
thundersvm.model_free(c_void_p(self.model))

OSError: exception: access violation writing 0x0000000066222618

@QinbinLi
Copy link
Member

The scikit interface can't work on windows with python3 now. We're trying to fix it. You can try to use the scikit interface with python2 on windows. By the way, you can just put your script on thundersvm's python dir and run it. No need to make many changes. Thanks!

@QinbinLi
Copy link
Member

We have fixed the bug of scikit interface on windows with python3. You can try again. Thanks.

@zeyiwen
Copy link
Collaborator

zeyiwen commented Jun 11, 2018

This issue should be fixed now, and hence I'd like to close it.

@zeyiwen zeyiwen closed this as completed Jun 11, 2018
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

No branches or pull requests

3 participants