automl/NASLib

Inconsistent dependencies

Closed this issue · 4 comments

Hi everyone,

I have been trying to set up NASLib for a few days now and have been running into issues with the stated dependencies of the library. A number of dependencies have very precise version numbers, such as numpy==1.16.4 and pytorch==1.15.4, which are causing compatibility problems down the line for other libraries which don't have any version numbers specified at all. My estimate is that the latest versions of some other libraries deeper in the dependency tree, which are being pulled by conda/pip, are incompatible with the specific older versions specified in the requirements.txt. As of writing this issue, I have been unable to satisfy all the version dependencies in the requirements.txt with any of the python versions I tested, including 3.5 - which was specified as the minimum working version in the setup.py. Could you kindly provide some advice on this?

Setting up an environment that ignored the version-specific requirements but did include the requested libraries resulted in the unit tests failing with these errors

I ran another test using python=3.7.10 and tried to document some of the issues that crop up. The full details and outputs can be found in this gist, but the baseline is that when I created a partially complete environment using python=3.7.10 and relaxed the numpy version requirement, I was still unable to install pytorch=1.5.0 as stated in the requirements.txt due to version conflicts with the python version itself. This suggests that even the minimum python version needs to be python>=3.9. The following is an excerpt of the full output from the gist:

(naslib) bansala@kis2bat2:~/thesis/NASLib$ conda install -c pytorch pytorch=1.5.0

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - joblib -> python[version='>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']
  - more-itertools -> python[version='>=3.9,<3.10.0a0']
  - networkx -> python[version='>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']
  - packaging -> python[version='>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']
  - pyopenssl -> python[version='>=3.9,<3.10.0a0']
  - python-dateutil -> python[version='>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']
  - pytorch=1.5.0 -> python[version='>=2.7,<2.8.0a0|>=3.9,<3.10.0a0']
  - typing_extensions -> python[version='>=3.9,<3.10.0a0']
  - wheel -> python[version='>=3.9,<3.10.0a0']

 Your python: python=3.7.10

The conda environment in question had been created using this command:

(base) bansala@kis2bat2:~/thesis/NASLib$ conda create -n naslib -c conda-forge python=3.7.10 pip cython hyperopt=0.1.2 pyyaml fvcore matplotlib pandas pytest pytest-cov codecov coverage lightgbm emcee=2.2.1

P.S. I had accidentally installed pytorch=1.4.0 prior to running this test (which is indeed compatible) and will update the relevant gists with a fresh environment and no older pytorch installation. Updated.

Hi,

I was able to reproduce your errors by following your steps, so I set up my environment from scratch once again as follows and it worked for me (MacBook).

First, remove the version constraint on numpy in both requirements.txt and setup.py. The use pip to install the packages as follows (grakel was also missing and had to be installed explicitly):

conda create -n naslibenvtest python=3.7.1
conda activate naslibenvtest
pip install -r requirements.txt
pip install grakel
pip install -e . 

Let me know if this works for you.

Yes, creating an environment using your methodology has been working fine thus far. The coverage tests still fail and I still need to include that modification to naslib.utils.utils.py that you had mentioned in your e-mail in order to run naslib.examples.run_darts.py, but there are no other dependency conflicts. This seems to be one of those conda vs pip conflicts that I had heard of but not encountered yet.

Thank you for your help!

We have updated the package versions, so now NASLib should work for python 3.6, 3.7