-
Notifications
You must be signed in to change notification settings - Fork 14
Description
The test_dataset.py module currently is throwing a bunch of warnings, that I believe all originate from #418
To me these look as if the test is trying to do some maths that it should not be allowed to do (log of 0, square root of negative number, divide by 0). If that is true, I am not sure why it is throwing warnings instead of errors for this.
I think we should investigate what is going on and why these warnings are being raised. If it is truly not a problem, the warnings can be suppressed or (even better) recode it in a way that the warning isn't raised in the first place.
The more "unnecessary" warnings are produced in actual use cases, the less likely it is a user will actually pay attention to the warnings that are actually relevant.
tests/test_dataset.py::TestDataSet::test_features_transform_logic_graphdataset
/home/dbodor/git/DeepRank/deeprank-core/tests/test_dataset.py:823: RuntimeWarning: invalid value encountered in log
features_transform = {'all': {'transform': lambda t: np.log(t+10), 'standardize': True}}tests/test_dataset.py::TestDataSet::test_only_transform_all_graphdataset
/home/dbodor/git/DeepRank/deeprank-core/tests/test_dataset.py:537: RuntimeWarning: invalid value encountered in log
features_transform = {'all': {'transform': lambda t: np.log(t+10)}}tests/test_dataset.py::TestDataSet::test_only_transform_graphdataset
/home/dbodor/git/DeepRank/deeprank-core/tests/test_dataset.py:456: RuntimeWarning: invalid value encountered in sqrt
'electrostatic': {'transform': lambda t: np.sqrt(t+50)},tests/test_dataset.py::TestDataSet::test_transform_standardize_graphdataset
/home/dbodor/git/DeepRank/deeprank-core/tests/test_dataset.py:740: RuntimeWarning: invalid value encountered in sqrt
'electrostatic': {'transform': lambda t: np.sqrt(t+50), 'standardize': True},tests/test_dataset.py::TestDataSet::test_transform_standardize_graphdataset
/home/dbodor/git/DeepRank/deeprank-core/deeprankcore/dataset.py:783: RuntimeWarning: divide by zero encountered in true_divide
vals = (vals-self.means[feat])/self.devs[feat]
Metadata
Metadata
Labels
Type
Projects
Status