Skip to content
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

Nanmean is deprecated, imported, unused, and never tested #201

Open
thomas-reimonn opened this issue Jul 11, 2024 · 1 comment
Open

Nanmean is deprecated, imported, unused, and never tested #201

thomas-reimonn opened this issue Jul 11, 2024 · 1 comment

Comments

@thomas-reimonn
Copy link

In predict.py nanmean is imported from scipy. nanmean was deprecated and removed from scipy.stats version 0.18.0: https://stackoverflow.com/questions/40944243/module-scipy-stats-has-no-attribute-nanmean and the version is not pinned in requirements.txt

Additionally, nanmean is never used in predict.py so it can just be removed.

There appears to be no testing process that catches this, which prevent the bias pipeline from finishing.

@tjgibson
Copy link

I have the same issue. When I run chrombpnet bias pipeline using the most recent docker image, it fails after training and saving the best model. Here is the error:

Traceback (most recent call last):
  File "/opt/conda/bin/chrombpnet", line 33, in <module>
    sys.exit(load_entry_point('chrombpnet', 'console_scripts', 'chrombpnet')())
  File "/scratch/chrombpnet/chrombpnet/CHROMBPNET.py", line 38, in main
    pipelines.train_bias_pipeline(args)
  File "/scratch/chrombpnet/chrombpnet/pipelines.py", line 329, in train_bias_pipeline
    import chrombpnet.training.predict as predict
  File "/scratch/chrombpnet/chrombpnet/training/predict.py", line 14, in <module>
    from scipy import nanmean, nanstd
ImportError: cannot import name 'nanmean' from 'scipy' (/opt/conda/lib/python3.9/site-packages/scipy/__init__.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants