Open jeandut opened 1 year ago
@tomMoral answered:
For the CLI to work you need to have all dependencies installed already for your imports to succeed otherwise you get import errors when launching this command aka you need to have a conda already set up. So what does this command bring ? (genuine question)
I am also confused by your question ^^
The core idea is that if you have installed python with conda
and then install benchopt
, you can install the dependencies of a benchmark, either in an existing env or in a new one (the -e
option of benchopt install
creates an env benchopt_flamby
with dependencies to the the benchmark_flamby
). The idea is that you can also easily install the specific dependencies of a dataset or solver. This is important so that benchmark users have an easy install procedure for the code that it runs. For this to work, the classes Solver/Dataset/Objective
should be importable even without the dependencies: this is the purpose of the safe_import_context
, which catches ImportError
.
For the error you are reporting, this is strange as the repo should exist and can be install with this command. Which version of pip
is present in the env? If you run benchopt install -e
, there is no connection to the current environment so the pip install -e
command run before should not have any impact.
After having installed benchopt, the command
benchopt install -e
at the root of this repository is supposed to create a conda environment with all our benchmark's dependencies installed. In our case this would mainly install FLamby from github with all its dependencies. However currently this does not work as the CLI is plagued by import errors and it fails to fetch FLamby with all_extra option from github. Here is how to reproduce the issue.The error above is "normalish" as the import of FLamby is skipped because it fails (it is not installed). Then I install FLamby to avoid this error (which I shouldn't have to because I would like benchopt install -e to do that for me):