Skip to content

Creating SAS data using Mathieu Doucet's (Archibald et al.'s) GitLab repo

Batuhan Y edited this page Oct 13, 2022 · 9 revisions

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.

  1. 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.

  2. 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).

  3. 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

  1. Install dependencies for pyopencl:

conda install -c "conda-forge/label/cf201901" pocl

python -m pip install mako

  1. Install pyopencl (an older version):

python -m pip install pyopencl==2019.1.2

  1. Next, install Doucet's model-generator-sans repository.

python setup.py install

  1. 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.

Clone this wiki locally