PreferredAI / cornac

A Comparative Framework for Multimodal Recommender Systems
https://cornac.preferred.ai
Apache License 2.0
888 stars 144 forks source link

[BUG] np.Inf does not supported in numpy>=2.0 cause error in Recommender class reset_info method #644

Closed lthoang closed 2 months ago

lthoang commented 2 months ago

Description

Using python 3.10, the current numpy version after setting up the environment is numpy=2.1.1. When I run an example experiment, it shown the following error.

image

In which platform does it happen?

How do we replicate the issue?

Expected behavior (i.e. solution)

Other Comments

tqtg commented 2 months ago

We have already pin version of Numpy<2.0.0 -- https://github.com/PreferredAI/cornac/blob/73123c95570f1c12bad3ed2ece4a33ff32cb5717/setup.py#L346. With that said, we should probably fix all of compatibility issues when our bandwidth allows.

lthoang commented 2 months ago

I think we should also consider to update the following line of code.

https://github.com/PreferredAI/cornac/blob/73123c95570f1c12bad3ed2ece4a33ff32cb5717/setup.py#L40

When I set up a new environment, I often copy the suggestion command to install the missing libraries. Which leads to the issue of installing numpy with a newer version.

tqtg commented 2 months ago

Great spot! We should’ve changed that as well