Skip to content

Instantly share code, notes, and snippets.

@gadamc
Last active February 27, 2021 05:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gadamc/dc1f4aac3c637a7ab1c2542c85772d03 to your computer and use it in GitHub Desktop.
Save gadamc/dc1f4aac3c637a7ab1c2542c85772d03 to your computer and use it in GitHub Desktop.

Setup Instructions for running Effsubsee winning model for ML4SETI Code Challenge

For GPU support

Install CUDA -> https://developer.nvidia.com/cuda-downloads

Install cuDNN -> https://developer.nvidia.com/cudnn

Install Anaconda

https://www.anaconda.com/download/

Create new environment and install packages

Effsubsee's model runs on Python 2.7.

> conda create --name effsubsee python=2.7
> source activate effsubsee
> conda install pandas scikit-learn h5py tqdm tabulate

Install packages with pip

Effsubsee uses Pytorch version 0.1.12, which is not the latest version.

If you're running on Mac OSX, you need to install pytorch from source if you want GPU support. If you only want to run this on the CPU, you can install with pip.

> pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl

If you're running on Linux, you can pip install for both GPU and CPU options.

> pip install http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp27-cp27mu-manylinux1_x86_64.whl 

Install torchvision and ibmseti.

> pip install torchvision==0.1.8
> pip install ibmseti

Get the data

Download the simulation data from here. Any of the data sets will work, but try the preview test set to start with.

> wget https://dal.objectstorage.open.softlayer.com/v1/AUTH_cdbef52bdf7a449c96936e1071f0a46b/simsignals_v3_zipped/primary_testset_preview_v3.zip

Get the code

> git clone https://github.com/sgrvinod/ml4seti-Effsubsee 
> cd ml4seti-Effsubsee

Perform a classification

The following calls an example python script that utilizes one of the sets of model parameters that were calculated by the Effsubsee team.

This example runs on the CPU.

> python single_shot_cpu.py wresnet34x2\ models/wresnet34x2\ FOLD1/FOLD1_BEST_wresnet34x2_batchsize96_checkpoint.pth.tar folds/mean_stddev_primary_full_v3__384t__512f__logmod2-ph.hdf5 /path/to/primary_testset_preview_v3/00b3b8fdb14ce41f341dbe251f476093.dat

You can follow the instructions in the repository README to run the test.py script, which will run on your GPU.

Setup Instructions for running Signet 2nd place model for ML4SETI Code Challenge

For GPU support

Install CUDA -> https://developer.nvidia.com/cuda-downloads

Install cuDNN -> https://developer.nvidia.com/cudnn

Install Anaconda

https://www.anaconda.com/download/

Create new environment and install packages

Signet's code runs on Python 3.x.

> conda create --name signet python=3.5
> source activate signet
> conda install scikit-learn numpy tabulate

Pytorch on Linux

Signet's model uses the latest stable version of pytorch (0.2.0) and torchvision (0.1.9).

Install Pytorch without GPU support

> conda install pytorch torchvision -c soumith  

OR install Pytorch with GPU support

> conda install pytorch torchvision cuda80 -c soumith  

Pytorch on MacOSX

You'll need to install Pytorch from source if you want GPU support. Otherwise, to install the pytorch version 0.2.0 (as of September 2017)

> conda install pytorch torchvision -c soumith 

Install packages with pip

> pip install ibmseti==2.0.0.dev5

Get the data

Download the simulation data from here. Any of the data sets will work, but try the preview test set to start with.

> wget https://dal.objectstorage.open.softlayer.com/v1/AUTH_cdbef52bdf7a449c96936e1071f0a46b/simsignals_v3_zipped/primary_testset_preview_v3.zip

Get the code

NB: I've cloned sagelywizard's repository to add some scripts. If my updates are added to his code base, this note will be removed.

> git clone https://github.com/gadamc/ml4seti ml4seti-signet
> cd ml4seti-signet

Download Signet's Model Parameters

> wget https://dal.objectstorage.open.softlayer.com/v1/AUTH_cdbef52bdf7a449c96936e1071f0a46b/code_challenge_models/signet/final_densenet_model.pth

Perform a classification

The following calls an example python script that will perform a signal classification using the CPU.

> python single_shot_cpu.py /path/to/primary_testset_preview_v3/00b3b8fdb14ce41f341dbe251f476093.dat final_densenet_model.pth

To use the GPU, you can follow the instructions in the README.

@eyalbetzalel
Copy link

Hi!

is there any chance to update those links to the datasets?

Thanks in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment