geffy / tffm

TensorFlow implementation of an arbitrary order Factorization Machine
MIT License
780 stars 176 forks source link

Errors while working with TensorFlow 1.3 #29

Closed aliostad closed 7 years ago

aliostad commented 7 years ago

I noticed README mentions TF 1.0 but thought report this and if easy I can fix it. So running test.py for TF 1.3 results in errors below and it seems decision_function() has changed:

======================================================================
ERROR: test_dense_FM (__main__.TestFM)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 54, in test_dense_FM
    self.decision_function_order_4(input_type='dense', use_diag=False)
  File "test.py", line 48, in decision_function_order_4
    actual = model.decision_function(X)
TypeError: decision_function() takes exactly 3 arguments (2 given)

======================================================================
ERROR: test_dense_PN (__main__.TestFM)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 57, in test_dense_PN
    self.decision_function_order_4(input_type='dense', use_diag=True)
  File "test.py", line 48, in decision_function_order_4
    actual = model.decision_function(X)
TypeError: decision_function() takes exactly 3 arguments (2 given)

======================================================================
ERROR: test_sparse_FM (__main__.TestFM)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 60, in test_sparse_FM
    self.decision_function_order_4(input_type='sparse', use_diag=False)
  File "test.py", line 48, in decision_function_order_4
    actual = model.decision_function(X)
TypeError: decision_function() takes exactly 3 arguments (2 given)

======================================================================
ERROR: test_sparse_PN (__main__.TestFM)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 63, in test_sparse_PN
    self.decision_function_order_4(input_type='sparse', use_diag=True)
  File "test.py", line 48, in decision_function_order_4
    actual = model.decision_function(X)
TypeError: decision_function() takes exactly 3 arguments (2 given)

----------------------------------------------------------------------
Ran 4 tests in 8.957s

FAILED (errors=4)
geffy commented 7 years ago

Hi, thanks for reporting. Indeed, I've missed default value for pred_batch_size, fixed. Tested on TF 1.3 -- works fine, I will fix README.

Can you check and confirm that there is no problem now?

aliostad commented 7 years ago

Thanks a lot from prompt reply! I can confirm tests are fixed. I am going to start using it and report back. As for this issue, closing it and thanks again for your helpfulness.