Skip to content

Fix installation #473

@gcroci2

Description

@gcroci2

After changing deeprank-core's name to deeprank2 (see issue #467), I had to recreate my local environments in order to reinstall the editable version of the newly named deeprank2.

Tests are now failing, both on my MacOS with M1 Chip, and on Snellius (Unix-based OS). Tests are failing using both python 3.9 and python 3.10. I also deleted the folders and cloned again the repos, just in case it was a cache-related issue, but it seems not. What's very weird is that the build actions on the remote work, and tests do not fail at all (see for example here)

I am pretty sure it's an issue due to some dependencies' changes, but I couldn't figure it out yet. The error is always the same, in all tests:

============================================================================================================ short test summary info =============================================================================================================
FAILED tests/test_trainer.py::TestTrainer::test_dataset_equivalence_pretrained - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_fout - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_ginet - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_ginet_class - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_ginet_sigmoid - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_incompatible_pretrained_no_Net - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_incompatible_pretrained_no_test - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_naive - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_no_valid_full_train - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_no_valid_provided - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional
FAILED tests/test_trainer.py::TestTrainer::test_sgat - numpy.linalg.LinAlgError: 0-dimensional array given. Array must be at least two-dimensional

So it seems related to a numpy operation called in deeprank2.utils.community_pooling.community_detection. In particular, result = mc.run_mcl(matrix) throws the error, which seems to be caused by the fact that matrix is a 0-dimensional array. That is not true, I checked it and matrix.ndim gives 2 as a result. I already tried to downgrade numpy (and networkx) to the versions we have in the actions, but it didn't solve the issue.

Metadata

Metadata

Assignees

Labels

blockingThis issue blocks the othersbugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions