Rosetta
Namespaces | Functions | Variables
pyrosetta.distributed.dask Namespace Reference

Namespaces

 worker
 

Functions

def worker_extra (init_flags=None, local_directory=None)
 
def init_notebook (init_flags=None)
 

Variables

string __author__ = "Jason C. Klima"
 

Function Documentation

◆ init_notebook()

def pyrosetta.distributed.dask.init_notebook (   init_flags = None)
Initialize PyRosetta with command line flags.

For example, to execute in a Jupyter Notebook:

import pyrosetta.distributed.dask
pyrosetta.distributed.dask.init_notebook(init_flags)

References pyrosetta.distributed.init().

Referenced by pyrosetta.tests.distributed.test_dask_worker.TestDaskArgs.test_worker_extra().

◆ worker_extra()

def pyrosetta.distributed.dask.worker_extra (   init_flags = None,
  local_directory = None 
)
Format flags and local directory for dask worker preload.

Convenience function that optionally accepts unformatted PyRosetta command
line flags as the `init_flags` option, and a working directory for dask
worker processes to output files as the `local_directory` option, which are
then formatted into a dask worker process extra commands list. If
`init_flags` is not specified, PyRosetta is initialized on the dask worker
process without command line flags. If `local_directory` is not specified,
the dask worker default directory ./dask-worker-space is used.

For example, to execute on a SLURM scheduler via dask_jobqueue:

from dask_jobqueue import SLURMCluster
import pyrosetta.distributed.dask
cluster = SLURMCluster(
    cores=1,
    processes=1,
    memory="4GB",
    extra=pyrosetta.distributed.dask.worker_extra(init_flags, local_directory)
)

References pyrosetta.distributed._normflags(), and pyrosetta.tests.distributed.test_dask.format.

Referenced by pyrosetta.tests.distributed.test_dask_worker.TestDaskArgs.test_worker_extra().

Variable Documentation

◆ __author__

string pyrosetta.distributed.dask.__author__ = "Jason C. Klima"
private