-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in python 3.5+ #11
Comments
In the file 'eval_funcs.py' there's the computation of the NDCG. The input to the HR is the same as the one to the NDCG. You could implement a function with the same header and then call it where the NDCG is called. |
Solved the above issue. Now I have another issue. I am using python 3.5+ and when I ran the following block. I get this error and I have attached the traceback here. Any help would be appreciated. Code: np.seterr(divide='ignore', invalid='ignore') #Added by me with tf.Session() as sess:
Error Traceback: InvalidArgumentError Traceback (most recent call last) ~.conda\envs\reco_base\lib\site-packages\tensorflow\python\client\session.py in _run_fn(feed_dict, fetch_list, target_list, options, run_metadata) ~.conda\envs\reco_base\lib\site-packages\tensorflow\python\client\session.py in _call_tf_sessionrun(self, options, feed_dict, fetch_list, target_list, run_metadata) InvalidArgumentError: Nan in summary histogram for: ndcg_at_k_hist_validation During handling of the above exception, another exception occurred: InvalidArgumentError Traceback (most recent call last) ~.conda\envs\reco_base\lib\site-packages\tensorflow\python\client\session.py in run(self, fetches, feed_dict, options, run_metadata) ~.conda\envs\reco_base\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata) ~.conda\envs\reco_base\lib\site-packages\tensorflow\python\client\session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata) ~.conda\envs\reco_base\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args) InvalidArgumentError: Nan in summary histogram for: ndcg_at_k_hist_validation Caused by op 'ndcg_at_k_hist_validation', defined at: InvalidArgumentError (see above for traceback): Nan in summary histogram for: ndcg_at_k_hist_validation |
When I print sess.run(train_op_var, feed_dict=feed_dict) in the above code. I get None Any help would be appreciated. I am using a different dataset but I made it exactly same movielens dataset except I didn't have a timestamp. I have userid, custid, ratings |
I get the same error and I don't understand why. |
I have the same error too. |
Hi. It's been months since I last worked on this project. I couldn't find any definitive solution so what I did was to ignore the dcg with zero as value which was causing a division by zero error and creating NaNs. It's not the best solution but it was the only way I could make it work.
Good luck with everything. I hope you'll be able to find a better way to solve the issue. If you do find a better solution let me know as well.
Have a great day. Best, Alina.
Sent from Yahoo Mail on Android
On Tue, Nov 10, 2020 at 5:24 PM, tuanbmhust<[email protected]> wrote:
I have the same error too.
Have you found a solution to figure it out yet?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi all,
Is there a way to get the hit ratio along with ndcg from the code? Any help would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered: