automl / neps

Neural Pipeline Search (NePS): Helps deep learning experts find the best neural pipeline.
https://automl.github.io/neps/
Apache License 2.0
44 stars 11 forks source link

ModuleNotFoundError for 'gpytorch' after installing neural-pipeline-search #24

Closed danrgll closed 8 months ago

danrgll commented 8 months ago

Tested the installation of neural-pipeline-search using pip in a clean Conda environment with Python 3.9, but encountered an error: ModuleNotFoundError: No module named 'gpytorch'.

eddiebergman commented 8 months ago

Had a look, seems it's specified in the dev dependancies, i.e. pip install neural-pipeline-search[dev].

The reason for this I don't know.

@Neeratyoy please let me know how best to proceed in fixing this. The following options:

  1. Make it an explicitly required dependancy. Likely casuses conflict even if someone doesn't use the deep GPs, but it does make it easier.
  2. Make it an optional dependancy of DeepGP, seems to be the only occurence of it
    $ grep --recursive --with-filename --line-number "import gpytorch" src 
    src/neps/optimizers/bayesian_optimization/models/deepGP.py:8:import gpytorch
Neeratyoy commented 8 months ago

I would advocate making gpytorch a conditional dependency.

We could have an optional dependency such as neps[experimental] that installs dependencies for extra stuff like deepGPs. @karibbov could you consult @eddiebergman and check the fix out? We should release a new package version with this fix as right now, on a fresh installation, a simple neps import will fail.