mala-project / mala

Materials Learning Algorithms. A framework for machine learning materials properties from first-principles data.
https://mala-project.github.io/mala/
BSD 3-Clause "New" or "Revised" License
81 stars 26 forks source link

Unused `pandas` dependency in `requirements.txt` #451

Closed elcorto closed 1 year ago

elcorto commented 1 year ago

Mala (0f37e0d7) doesn't use pandas

$ find -name '*.py' | xargs grep pandas

Also none of the deps use it:

$ grep -vE '^\s*$|^#' requirements.txt | xargs -IX sh -c 'pip show X | sed -nre "s/Requires:/X -->/p"'
ase --> matplotlib, numpy, scipy
mpmath -->
numpy -->
optuna --> alembic, cmaes, colorlog, numpy, packaging, PyYAML, sqlalchemy, tqdm
scipy --> numpy
tensorboard --> absl-py, google-auth, google-auth-oauthlib, grpcio, markdown, numpy, protobuf, requests, setuptools, tensorboard-data-server, werkzeug, wheel
elcorto commented 1 year ago

The mala envs in install/mala_*.yml have it also and even pin the version (#452), not sure which package in the conda envs needs it. However, since it is not a dep of mala, I'd remove it from requirements.txt at least.

RandomDefaultUser commented 1 year ago

Good point, thanks for pointing that out. The problem is that pandas is an optional dependency of optuna, and needed for a few nice functions we use from that library (such as visualization). If pandas is missing, we cannot use the functions, however just installing optuna with the optional dependency flag installs way more then just pandas. Having pandas as a requirement for MALA thus allows us to use the functionalities without installing clutter.