HyperLoom
Stanislav Böhm, Vojtěch Cima https://hyperloom.eu It4Innovations / ADAS / DEF
HyperLoom Stanislav Bhm, Vojt ch Cima https://hyperloom.eu - - PowerPoint PPT Presentation
HyperLoom Stanislav Bhm, Vojt ch Cima https://hyperloom.eu It4Innovations / ADAS / DEF 10:00-11:30 Intoduction to HyperLoom Hands-on: 'Hello world' 12:30-14:00 Hands-on: Building a real pipeline Best practices
Stanislav Böhm, Vojtěch Cima https://hyperloom.eu It4Innovations / ADAS / DEF
10:00-11:30
12:30-14:00
14:30-16:00
gene GSK3B
ZZRDAWZXJBVQSO-UYBDAZJANA-N ZZRDINJRCNXHIQ-MCRMGHHCNA-N ZZRDSHKJUCIYQL-GPQMBLKYNA-N ZZRDKBQKAVQCMK-LILDFLRNNA-N
Inactive Inactive Active Inactive
labeled dataset
M
modelling (machine learning) model training data (~80%)
...
M
modelling (machine learning) model
V
validation model accuracy training data (~80%)
...
validation data (~20%)
M V
training data (~80%)
...
TF1
validation data (~20%)
VF1
M V
training data (~80%)
TF2 VF2
validation data (~20%)
average accuracies cross-validated accuracy
cross-validated accuracy (for given parametrization)
P
modelling parameterization
P1 P2 P3
P1 P2 P3
pick best model best model
best model (but only for a single target!)
Duration of tasks
HPC Schedulers PBS SLURM
Duration of tasks
Workflow systems Luigi Airflow DAGMAN HPC Schedulers PBS SLURM
Duration of tasks
Workflow systems Luigi Airflow DAGMAN HPC Schedulers PBS SLURM Task-based programming OmpSs StarPU
Duration of tasks
Workflow systems Luigi Airflow DAGMAN HPC Schedulers PBS SLURM Task-based programming OmpSs StarPU
Duration of tasks
Map Reduce Spark Hadoop Workflow systems Luigi Airflow DAGMAN HPC Schedulers PBS SLURM Task-based programming OmpSs StarPU
Duration of tasks
Map Reduce Spark Hadoop Workflow systems Luigi Airflow DAGMAN HPC Schedulers PBS SLURM Task-based programming OmpSs StarPU
Dask/ Distributed
Rain Berkeley Ray
pycompss
https://code.it4i.cz/ADAS/loom
client server worker worker worker
Architecture
pipeline
client server worker worker worker
Architecture
server schedules tasks for execution on workers
client server worker worker worker
Architecture
workers process tasks
client server worker worker worker
Architecture
server returns results to client
results
client server worker worker worker
Deployment
pipeline results
single PBS job
HyperLoom Checklist
Task Output Inputs
Intra-node tasks
HyperLoom Checklist
Task Output Inputs
Intra-node tasks
.py ./binary
Python code & Extern programs
HyperLoom Checklist
Task Output Inputs
Intra-node tasks
.py ./binary
Python code & Extern programs
100k+
Many tasks
HyperLoom Checklist
Task Output Inputs
Intra-node tasks
.py ./binary
Python code & Extern programs
100k+
Many tasks Inter-depenedant tasks
HyperLoom Checklist
Task Output Inputs
Intra-node tasks
.py ./binary
Python code & Extern programs
100k+
Many tasks Inter-depenedant tasks Heterogenous tasks
Example 1
import loom.client as lc # Pipeline Definition task1 = lc.tasks.const("Hello ") task2 = lc.tasks.const("world!") task3 = lc.tasks.merge((task1, task2)) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task3) # Gather result result = future.gather()
Example 1
import loom.client as lc # Pipeline Definition task1 = lc.tasks.const("Hello ") task2 = lc.tasks.const("world!") task3 = lc.tasks.merge((task1, task2)) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task3) # Gather result result = future.gather()
const const merge
Example 1
import loom.client as lc # Pipeline Definition task1 = lc.tasks.const("Hello ") task2 = lc.tasks.const("world!") task3 = lc.tasks.merge((task1, task2)) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task3) # Gather result result = future.gather()
const const merge
Example 1
import loom.client as lc # Pipeline Definition task1 = lc.tasks.const("Hello ") task2 = lc.tasks.const("world!") task3 = lc.tasks.merge((task1, task2)) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task3) # Gather result result = future.gather()
const const merge
Example 1
import loom.client as lc # Pipeline Definition task1 = lc.tasks.const("Hello ") task2 = lc.tasks.const("world!") task3 = lc.tasks.merge((task1, task2)) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task3) # Gather result result = future.gather()
const const merge
Example 2
import loom.client as lc # Pipeline Definition task1 = lc.tasks.run("/bin/hostname") # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task1) # Gather result print(future.gather())
Example 3A
import loom.client as lc # Pipeline Definition tasks = [lc.tasks.run("/bin/hostname") for i in range(100)] task1 = lc.tasks.merge(tasks) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task1) # Gather result print(future.gather())
Example 3A
import loom.client as lc # Pipeline Definition tasks = [lc.tasks.run("/bin/hostname") for i in range(100)] task1 = lc.tasks.merge(tasks) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task1) # Gather result print(future.gather()) Output: r37u12n989 r36u11n321 r36u11n320 r37u12n989 r37u12n989
Example 3B
import loom.client as lc # Pipeline Definition tasks = [lc.tasks.run("/bin/hostname > output", shell=True,
task1 = lc.tasks.merge(tasks) # Create a client object client = lc.Client("localhost", 9010) # Submit tasks/pipeline future = client.submit_one(task1) # Gather result print(future.gather())
Mapping inputs/outputs
task_load_data = ... tasks = lc.tasks.run("./my-train --train-data=train.dat --output=model.dat", inputs=[(task_load_data, "train.dat")],
Example 4
import loom.client as lc @lc.tasks.py_task() def tensorflow_task(param): import tensorflow as tf p = param.read() hello = tf.constant("{} from TensorFlow!".format(p)) sess = tf.Session() return sess.run(hello) param = lc.tasks.const("Hello") task = tensorflow_task(param) task.resource_request = lc.tasks.cpus(24) c = lc.Client("localhost", 9010) future = c.submit_one(task) result = future.gather()
Example 4
import loom.client as lc @lc.tasks.py_task() def tensorflow_task(param): import tensorflow as tf p = param.read() hello = tf.constant("{} from TensorFlow!".format(p)) sess = tf.Session() return sess.run(hello) param = lc.tasks.const("Hello") task = tensorflow_task(param) task.resource_request = lc.tasks.cpus(24) c = lc.Client("localhost", 9010) future = c.submit_one(task) result = future.gather()
Example 4
import loom.client as lc @lc.tasks.py_task() def tensorflow_task(param): import tensorflow as tf p = param.read() hello = tf.constant("{} from TensorFlow!".format(p)) sess = tf.Session() return sess.run(hello) param = lc.tasks.const("Hello") task = tensorflow_task(param) task.resource_request = lc.tasks.cpus(24) c = lc.Client("localhost", 9010) future = c.submit_one(task) result = future.gather()
Example 4
import loom.client as lc @lc.tasks.py_task() def tensorflow_task(param): import tensorflow as tf p = param.read() hello = tf.constant("{} from TensorFlow!".format(p)) sess = tf.Session() return sess.run(hello) param = lc.tasks.const("Hello") task = tensorflow_task(param) task.resource_request = lc.tasks.cpus(24) c = lc.Client("localhost", 9010) future = c.submit_one(task) result = future.gather()
Example 5
task = ... task.resource_request = lc.tasks.cpus(24) task.checkpoint_path = "/scratch/myproject/task-1"
Progress Node utilization Scheduling info Loom reporting
Hands-on
user@loginX.salomon$ cp -r /scratch/temp/hyperloom-tutorial/examples/ex1 . user@loginX.salomon$ cd ex1 user@loginX.salomon$ qsub ex1.pbs
Hands-on
user@loginX.salomon$ cp -r /scratch/temp/hyperloom-tutorial/examples/ex1 . user@loginX.salomon$ cd ex1 user@loginX.salomon$ qsub ex1.pbs user@loginX.salomon$ ml load loom user@loginX.salomon$ python3 -m pip install bokeh==0.12.6 --user user@loginX.salomon$ python3 -m loom.lore lore_logs user@loginX.salomon$ firefox output.html # Or download output.html and open it locally