airspeed-velocity / asv

Airspeed Velocity: A simple Python benchmarking tool with web-based reporting
https://asv.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
874 stars 180 forks source link

ENH: Question on specifying specific conda environment #1343

Open adam2392 opened 1 year ago

adam2392 commented 1 year ago

I have a Mac M1 setup, where I essentially have 2 conda environments: one from miniconda, which runs x64 and one from miniforge, which runs on arm64 (i.e. M1 chip). I want to run a benchmark comparing the current branch w/ the main branch. E.g. a command like this:

asv continuous --verbose --split --bench RandomForest origin/main constantsv2

My Python project is running on the miniforge environment (i.e.) the /Users/adam2392/miniforge3/envs/sktree environment. However, whenever I run asv benchmarks, I get a compiler error. I think this is because the default conda environment is my miniconda env. I'm wondering how we can specify the conda environment to use when setting up the two environments for asv.

Here is my conda env list:

base                  *  /Users/adam2392/miniconda3
sktest                   /Users/adam2392/miniconda3/envs/sktest
                         /Users/adam2392/miniforge3
                         /Users/adam2392/miniforge3/envs/sktree
                         /opt/miniconda3
                         /opt/miniconda3/envs/sickkids

I'm following this page: https://asv.readthedocs.io/en/stable/env_vars.html and am not exactly sure what should be set. I'm wondering if it is possible / good to add a few examples of setting these environment variables and their consequences?

HaoZeke commented 1 year ago

The environment variables are set, not read OTOH. I don't think this issue was considered during the design at all (I didn't think of it when writing the micromamba plugin) and it would probably need more design. As a workaround, what about locally setting the right PATH variables to find the correct environment?