Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.57k stars 217 forks source link

Added basic error catches to the R interface #163

Closed NathanSkene closed 5 years ago

NathanSkene commented 5 years ago

There were no error catches in the existing intereface. This meant that the R session crashed everytime a problematic argument was given: very disruptive. I've added some basic checks, it could use more.

NathanSkene commented 5 years ago

That makes sense, as long as someone does source the file immediately before calling the function. That's a very non-standard way of using R though. Especially for a function such as this one, which can crash an entire R session with ease, it's very important that error checks be inside the function.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Li Qinbin notifications@github.com Sent: Monday, September 9, 2019 8:27:17 AM To: Xtra-Computing/thundersvm thundersvm@noreply.github.com Cc: Skene, Nathan G n.skene@imperial.ac.uk; Author author@noreply.github.com Subject: Re: [Xtra-Computing/thundersvm] Added basic error catches to the R interface (#163)

@GODqinbin commented on this pull request.

Thanks for your contribution! Since we have loaded the library when we source the file, it seems that we needn't check the position of the library inside svm_train_R or svm_predict_R?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Xtra-Computing/thundersvm/pull/163?email_source=notifications&email_token=AH5ZPE7YM5Q4DN7V4FK4VEDQIX3FLA5CNFSM4ISRGI72YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEA2JDA#pullrequestreview-285320332, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH5ZPE25XNTLWWS6YLZZMR3QIX3FLANCNFSM4ISRGI7Q.