-
Notifications
You must be signed in to change notification settings - Fork 1
Creating SAS data using Mathieu Doucet's (Archibald et al.'s) GitLab repo
The original code used to create the data from Archibald et al.'s work can be found in this repository.
Frustratingly, the code was written in Python 2, which caused me a bunch of trouble when trying to run it myself and generate the data. Here is how I got it to work, after several days of trying. To avoid potential conflicts with my current Anaconda installation, I did this in a Ubuntu 18.04 virtual machine, but this may not be necessary for you.
-
Install an older version of Anaconda with Python 2 as default from the Anaconda archive. The version that worked for me is Anaconda2-2019.10-Linux-x86_64.sh.
-
Clone Doucet's repository. Move into the directory
cd model-generator-sans
and edit the play_27_env.yml file by commenting out or removing the pip dependencies (line 7 onwards). -
Following Doucet's instructions, create the conda env from the yaml file and activate it:
conda env create -f play_27_env.yml
I got a confusing error message after this step but the environment was created anyway.
conda activate playground-27
- Install dependencies for pyopencl:
conda install -c "conda-forge/label/cf201901" pocl
python -m pip install mako
- Install pyopencl (an older version):
python -m pip install pyopencl==2019.1.2
- Next, install Doucet's model-generator-sans repository.
python setup.py install
- Check that everything works by moving into the
knn
directory and running
python KNN_gendata.py --model_file=../tests/models/sphere.yaml
I hope this saves you (or future me) time.