thundersvm icon indicating copy to clipboard operation
thundersvm copied to clipboard

load_from_file and predictions very slow

Open itsciccio opened this issue 3 years ago • 2 comments

Hi,

I am implementing a real-time prediction system using thundersvm.

Before my program starts running, it first loads the necessary files using svm.load_from_file(). It takes ~47s to load 2 models. ~69MB each in size. However, this long load time is not the issue.

The time taken to predict a SINGLE sample is ~1.2s long. For an SVM that uses GPU, I think this is way too slow, especially for a real-time application.

Is there a way to speed up things or is it behaving as it should?

itsciccio avatar May 04 '21 11:05 itsciccio

I am facing the same issue.

gergopool avatar Aug 16 '21 17:08 gergopool

It looks a bit strange. For a real-time application, the SVM model should be preloaded into the GPU memory. In general, the loading time can be ignored. We haven't done the optimization for model loading in the current implementation.

Regarding slow prediction, would you provide a simple example for us to reproduce the issue?

zeyiwen avatar Aug 20 '21 07:08 zeyiwen