Skip to content

Commit

Permalink
make scripts executable
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Nov 9, 2018
1 parent 95aa6bc commit a864d5c
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 10 deletions.
21 changes: 16 additions & 5 deletions cscs_launcher.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/usr/bin/env python3

"""
Script to run experiments on the Swiss National Supercomputing Centre (CSCS).
https://www.cscs.ch/
"""

import os

from grid import pgrid


txtfile = '''#!/bin/bash -l
#SBATCH --time=6:00:00
#SBATCH --nodes=1
Expand All @@ -15,7 +24,6 @@
source $HOME/deepsphere/bin/activate
cd $SCRATCH/deepsphere/
srun python results_deepsphere_with_augmentation.py {0} {1} {2} {3}
'''
Expand All @@ -28,7 +36,10 @@ def launch_simulation(etype, sigma, order, sigma_noise):
os.system("sbatch launch.sh")
os.remove('launch.sh')

grid = pgrid()
for p in grid:
launch_simulation('FCN', *p)
launch_simulation('CNN', *p)

if __name__ == '__main__':

grid = pgrid()
for p in grid:
launch_simulation('FCN', *p)
launch_simulation('CNN', *p)
20 changes: 16 additions & 4 deletions euler_launcher.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
#!/usr/bin/env python3

"""
Script to run experiments on the Euler high performance cluster of ETH Zürich.
https://scicomp.ethz.ch/wiki/Euler
"""

import os
from pgrid import pgrid

from grid import pgrid


cmd = 'bsub -W 48:00 -n 36 -R "rusage[mem=2000]" -R fullnode -oo log_{0}-{1}-{2}.txt python results_psd_with_augmentation.py {0} {1} {2}'


def launch_simulation(sigma, order, sigma_noise):
os.system(cmd.format(sigma, order, sigma_noise))

grid = pgrid()
for p in grid:
launch_simulation(*p)

if __name__ == '__main__':
grid = pgrid()
for p in grid:
launch_simulation(*p)
3 changes: 3 additions & 0 deletions grid.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""Matrix / grid of parameters to be run in experiments."""

import collections


def pgrid():
"""Return the grid of parameter for the simulations."""
sigma = 3
Expand Down
7 changes: 7 additions & 0 deletions results_deepsphere_with_augmentation.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/env python3
# coding: utf-8

"""
Script to run the DeepSphere experiment.
Both the fully convolutional (FCN) and the classic (CNN) architecture variants
are supported.
"""

import os
import shutil
import sys
Expand Down
9 changes: 9 additions & 0 deletions results_histogram_with_augmentation.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/usr/bin/env python3
# coding: utf-8

"""
Script to run the baseline experiment:
SVM classification with histogram features.
"""

import os
import sys

import numpy as np

from deepsphere import experiment_helper
from grid import pgrid


def single_experiment(sigma, order, sigma_noise, path):
"""Run as experiment.
Expand Down
9 changes: 8 additions & 1 deletion results_psd_with_augmentation.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
#!/usr/bin/env python3
# coding: utf-8

"""
Script to run the baseline experiment:
SVM classification with power spectral densities (PSD) features.
"""

import os
import sys

import numpy as np

from deepsphere import experiment_helper
from grid import pgrid



def single_experiment(sigma, order, sigma_noise, path):
"""Run as experiment.
Expand Down

0 comments on commit a864d5c

Please sign in to comment.