cuMF / cumf_als

CUDA Matrix Factorization Library with Alternating Least Square (ALS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shall we provide a python interface?

llcao opened this issue · comments

py interface may be slower, but easier to use....

yes. let us work on python script to invoke cuMF, and also preprocess the input data.

I would like to go even a step further, i.e., to wrap cuMF cuda kernels as tensorflow Ops and use TF to "re-write" the glue code. By this means cuMF can run on TF.

very cool!
forgive me if I am picky, it seems easier to use if you separate the whole function into (1) training and (2) testing

In this case, do we still split training set into training and validation?

not really, users may want to determine their training and testing set.
What I want is simply as:
[thetaT,XT] = als_module.train_als(csrRow, csrCol, csrVal, cscRow, cscCol, cscVal, cooRow)
cooValPred = als_module.pred_als(cooRowTest, cooColTest)
rmse = evaluate_mse(cooValTest, cooValPred)

Hi, I am attempting to run the TensorFlow example - I run the build script, which builds OK and creates als_tf.so and libALS.so in the current directory, but when I execute "cumf_as_tensorflow_ops_test.py" it says

tensorflow.python.framework.errors.NotFoundError: libALS.so: cannot open shared object file: No such file or directory

So I move the libraries to /usr/lib :
cp *.so /usr/lib

and then running it generates the following error:

I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally Traceback (most recent call last): File "cumf_as_tensorflow_ops_test.py", line 10, in <module> als_module = tf.load_op_library(lib_path) File "/root/CuMF/env3/lib/python3.4/site-packages/tensorflow/python/framework/load_library.py", line 75, in load_op_library raise errors._make_specific_exception(None, None, error_msg, error_code) tensorflow.python.framework.errors.NotFoundError: /usr/lib/libALS.so: undefined symbol: _Z17updateXWithCGHostPfS_S_iif

Can I get some guidance on what went wrong please?

Hi sorry we updated the ALS code with a new .o file (the CG solver), but we have not updated it the build libALS.so file. I will update it soon and let you know when it is done.

@alainrichardt : I just pushed a update to the code fixing the issue you saw. Here is the result I got from python notebook:
Hello, TensorFlow!
[[ 0.91662455]]