kakao / buffalo

TOROS Buffalo: A fast and scalable production-ready open source project for recommender systems
Apache License 2.0
576 stars 106 forks source link

Fix type mismatch error in MatrixMarket #81

Closed dkkim1005 closed 8 months ago

dkkim1005 commented 8 months ago

Type mismatch error in MatrixMarket class is fixed, reported at the issue#80. All test cases(test code: tests/data/test_mm.py) passed, and CF methods(ALS, pLSI, EALS) that employ a MatrixMarket instance also worked properly.

$ nosetests ./data/test_mm.py -v

test0_get_default_option (data.test_mm.TestMatrixMarket) ... ok
test1_is_valid_option (data.test_mm.TestMatrixMarket) ... ok
test2_create (data.test_mm.TestMatrixMarket) ... [INFO    ] 2023-12-21 21:53:33 [mm.py:247] Create the database from matrix market file.
[DEBUG   ] 2023-12-21 21:53:33 [mm.py:252] Building meta part...
^M[PROGRESS] 0.00% 0.0/0.0secs 0.00it/s^M[PROGRESS] 100.00% 0.0/0.0secs 834.22it/s
[INFO    ] 2023-12-21 21:53:33 [mm.py:260] Creating working data...
^M[PROGRESS] 0.00% 0.0/0.0secs 0.00it/s^M[PROGRESS] 100.00% 0.0/0.0secs 190,949.48it/s
[DEBUG   ] 2023-12-21 21:53:33 [mm.py:264] Working data is created on /tmp/tmp32f8ummv
[INFO    ] 2023-12-21 21:53:33 [mm.py:265] Building data part...
[INFO    ] 2023-12-21 21:53:33 [base.py:417] Building compressed triplets for rowwise...
[INFO    ] 2023-12-21 21:53:33 [base.py:418] Preprocessing...
[INFO    ] 2023-12-21 21:53:33 [base.py:421] In-memory Compressing ...
[INFO    ] 2023-12-21 21:53:33 [base.py:301] Load triplet files. Total job files: 73
[INFO    ] 2023-12-21 21:53:33 [base.py:451] Finished
[INFO    ] 2023-12-21 21:53:33 [base.py:417] Building compressed triplets for colwise...
[INFO    ] 2023-12-21 21:53:33 [base.py:418] Preprocessing...
[INFO    ] 2023-12-21 21:53:33 [base.py:421] In-memory Compressing ...
[INFO    ] 2023-12-21 21:53:34 [base.py:301] Load triplet files. Total job files: 73
[INFO    ] 2023-12-21 21:53:34 [base.py:451] Finished
[INFO    ] 2023-12-21 21:53:34 [mm.py:279] DB built on ./mm.h5py
ok

...... (skip logs)

test3_list (data.test_mm.TestMatrixMarketReader) ... [DEBUG   ] 2023-12-21 21:53:36 [mm.py:70] creating temporary matrix-market data from numpy-kind array
ok

----------------------------------------------------------------------
Ran 10 tests in 3.271s

OK