meyer-lab/DDMC

Muting randomized_svd warning

Closed this issue · 3 comments

@aarmey Looks like randomized_svd within SoftImpute generates the warning below because random_state is not defined. It's a bit annoying because it shows up a million times. I guess we will keep using the default non-deterministic setting so is there a way to specifically mute this warning?

https://github.com/iskandr/fancyimpute/blob/a56a6ec2a84abf129e85d33c6a29b654a27ae3ff/fancyimpute/soft_impute.py#L113

warnings.warn( /home/gitactions/actions-runner2/_work/resistance-MS/resistance-MS/venv/lib/python3.9/site-packages/sklearn/utils/extmath.py:368: FutureWarning: If 'random_state' is not supplied, the current default is to use 0 as a fixed seed. This will change to None in version 1.2 leading to non-deterministic results that better reflect nature of the randomized_svd solver. If you want to silence this warning, set 'random_state' to an integer seed or to None explicitly depending if you want your code to be deterministic or not.

Yeah it's super annoying. Let me try something....

Just committed a fix.

Great—thanks!