shankarpandala / lazypredict

Lazy Predict help build a lot of basic models without much code and helps understand which models works better without any parameter tuning
MIT License
2.87k stars 331 forks source link

Dependency list needs to be expanded #284

Closed shyamcody closed 3 years ago

shyamcody commented 3 years ago

Describe the bug The current dependencies mentioned are not enough. User has to manually download multiple other libraries such as tqdm,xgboost, lightgbm, pytest. So please add these to the dependency/ requirements so that it automatically downloads these files when lazypredict is installed in an environment.

To Reproduce Steps to reproduce the behavior:

  1. Create a new python environment.

  2. install lazypredict.

  3. try and run lazypredict from python using the following lines:

    import lazypredict from lazypredict.Supervised import LazyClassifier Traceback (most recent call last): File "", line 1, in File "/home/shyambhu.mukherjee/spacy_lazypredict/new_app/lib/python3.6/site-packages/lazypredict/Supervised.py", line 8, in from tqdm import tqdm ModuleNotFoundError: No module named 'tqdm'

  4. See that module not found error will come for tqdm,xgboost, lightgbm and pytest.

Expected behavior While pip installing lazypredict, it should download all the things.

Desktop:

brendalf commented 3 years ago

I would like to fix this. What you think, @shankarpandala?

shankarpandala commented 3 years ago

Sure go-ahead

shyamcody commented 3 years ago

I couldn't basically figure out where the issue is generated from as both setup.py and requirements_dev.txt contains the modules I wanted to include in dependency. @brendalf seemed to know how to resolve it, so I have unassigned myself.

brendalf commented 3 years ago

Working on the issue, I found this line inside the setup.py file: python_requires=">=3.8, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",

This line was added on commit e3371dec from @shankarpandala. Is there any special reason for python >= 3.8? I guess that the remaining conditions can be removed, what you guys think?

brendalf commented 3 years ago

It also appears that this issue happens in the latest version available, tag v0.2.7, because the setup.py there only installs the click as requirement.

setup.py on v.0.2.7:

requirements = ['Click>=7.0', ]

setup(
    ...
    install_requires=requirements,
    ...
)

The setup.py inside the dev branch already fix this issue, with the commit 45fad6b1 from @shankarpandala.

setup.py on dev:

requirements = [
    "click>=7.1.2",
    "joblib>=0.16.0",
    "lightgbm>=2.3.1",
    "numpy>=1.19.1",
    "optuna>=1.5.0",
    "pandas>=1.0.5",
    "pytest>=5.4.3",
    "PyYAML>=5.3.1",
    "scikit-learn>=0.23.1",
    "scipy>=1.5.2",
    "six>=1.15.0",
    "tqdm>=4.48.0",
    "xgboost>=1.1.1",
]

setup(
    ...
    install_requires=requirements,
    ...
)

There still some bugs with the dependency list I'm fixing right now.

shankarpandala commented 3 years ago

@brendalf and @shyamcody

I whole heartedly appreciate all the efforts you both are putting to make things right with lazypredict.

Please let me if there is anything I can help from my side.

Big down side is the current code is not suitable for cross validation and hyperparameter tuning. Please let me know you guys have any ideas with less efforts.

shyamcody commented 3 years ago

Maybe we need to incorporate some autoML tool that will take a model object in and give out the best parameters. I have already raised a separate issue for the hyperparameter optimization; and reviewing some automl frameworks as I am new in that. Will make some comments once I get a good idea. Currently, optuna and H20ai seems promising.

shankarpandala commented 3 years ago

@brendalf Travis CI is failing for this commit stating requirements.txt not found. Can you check why it is failing even the file is there.

brendalf commented 3 years ago

@shankarpandala off course. I will take a look

brendalf commented 3 years ago

@shankarpandala, PR #318 should fix this issue.