|
Rosetta
|

Public Member Functions | |
| def | __attrs_post_init__ (self) |
| Union[NoReturn, Generator[Tuple[PackedPose, Dict[Any, Any]], None, None]] | generate (self, *Any args, Any protocols=None, Any clients_indices=None, Any resources=None) |
| Optional[NoReturn] | distribute (self, *Any args, Any protocols=None, Any clients_indices=None, Any resources=None) |
Public Member Functions inherited from pyrosetta.distributed.cluster.logging_support.LoggingSupport | |
| None | __init__ (self) |
Public Attributes | |
| serializer | |
| clients_dict | |
Public Attributes inherited from pyrosetta.distributed.cluster.logging_support.LoggingSupport | |
| socket_listener | |
Public Attributes inherited from pyrosetta.distributed.cluster.utilities.SchedulerManager | |
| scheduler | |
Private Member Functions | |
| Future | _create_future (self, Client client, str protocol_name, bytes compressed_protocol, bytes compressed_packed_pose, bytes compressed_kwargs, Dict[str, Any] pyrosetta_init_kwargs, Dict[str, Any] extra_args, bytes passkey, Optional[Dict[Any, Any]] resource) |
| Union[NoReturn, Generator[Tuple[PackedPose, Dict[Any, Any]], None, None]] | _run (self, *Any args, Any protocols=None, Any clients_indices=None, Any resources=None) |
Static Private Attributes | |
| __doc__ | |
| def pyrosetta.distributed.cluster.core.PyRosettaCluster.__attrs_post_init__ | ( | self | ) |
|
private |
Scatter data and return submitted 'user_spawn_thread' future.
References pyrosetta.distributed.cluster.hkdf.derive_task_key().
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
private |
Run user-provided PyRosetta protocols on a local or remote compute cluster using
the user-customized PyRosettaCluster instance. Either arguments or the 'protocols'
keyword argument is required. If both are provided, then the 'protocols' keyword
argument gets concatenated after the input arguments.
Examples:
PyRosettaCluster().distribute(protocol_1)
PyRosettaCluster().distribute(protocols=protocol_1)
PyRosettaCluster().distribute(protocol_1, protocol_2, protocol_3)
PyRosettaCluster().distribute(protocols=(protocol_1, protocol_2, protocol_3))
PyRosettaCluster().distribute(protocol_1, protocol_2, protocols=[protocol_3, protocol_4])
# Run `protocol_1` on `client_1`,
# then `protocol_2` on `client_2`,
# then `protocol_3` on `client_1`,
# then `protocol_4` on `client_2`:
PyRosettaCluster(clients=[client_1, client_2]).distribute(
protocols=[protocol_1, protocol_2, protocol_3, protocol_4],
clients_indices=[0, 1, 0, 1],
)
# Run `protocol_1` on `client_2`,
# then `protocol_2` on `client_3`,
# then `protocol_3` on `client_1`:
PyRosettaCluster(clients=[client_1, client_2, client_3]).distribute(
protocols=[protocol_1, protocol_2, protocol_3],
clients_indices=[1, 2, 0],
)
# Run `protocol_1` on `client_1` with dask worker resource constraints "GPU=2",
# then `protocol_2` on `client_1` with dask worker resource constraints "MEMORY=100e9",
# then `protocol_3` on `client_1` without dask worker resource constraints:
PyRosettaCluster(client=client_1).distribute(
protocols=[protocol_1, protocol_2, protocol_3],
resources=[{"GPU": 2}, {"MEMORY": 100e9}, None],
)
# Run `protocol_1` on `client_1` with dask worker resource constraints "GPU=2",
# then `protocol_2` on `client_2` with dask worker resource constraints "MEMORY=100e9":
PyRosettaCluster(clients=[client_1, client_2]).distribute(
protocols=[protocol_1, protocol_2],
clients_indices=[0, 1],
resources=[{"GPU": 2}, {"MEMORY": 100e9}],
)
Args:
*args: Optional instances of type `types.GeneratorType` or `types.FunctionType`,
in the order of protocols to be executed.
protocols: An optional iterable of extra callable PyRosetta protocols,
i.e. an iterable of objects of `types.GeneratorType` and/or
`types.FunctionType` types; or a single instance of type
`types.GeneratorType` or `types.FunctionType`.
Default: None
clients_indices: An optional `list` or `tuple` object of `int` objects, where each `int` object represents
a zero-based index corresponding to the initialized dask `distributed.client.Client` object(s) passed
to the `PyRosettaCluster(clients=...)` class attribute. If not `None`, then the length of the
`clients_indices` object must equal the number of protocols passed to the `PyRosettaCluster().distribute`
method.
Default: None
resources: An optional `list` or `tuple` object of `dict` objects, where each `dict` object represents
an abstract, arbitrary resource to constrain which dask workers run the user-defined PyRosetta protocols.
If `None`, then do not impose resource constaints on any protocols. If not `None`, then the length
of the `resources` object must equal the number of protocols passed to the `PyRosettaCluster().distribute`
method, such that each resource specified indicates the unique resource constraints for the protocol at the
corresponding index of the protocols passed to `PyRosettaCluster().distribute`. Note that this feature is only
useful when one passes in their own instantiated client(s) with dask workers set up with various resource
constraints. If dask workers were not instantiated to satisfy the specified resource constraints, protocols
will hang indefinitely because the dask scheduler is waiting for workers that meet the specified resource
constraints so that it can schedule these protocols. Unless workers were created with these resource tags
applied, the protocols will not run. See https://distributed.dask.org/en/stable/resources.html for more
information.
Default: None
References pyrosetta.distributed.cluster.logging_support.LoggingSupport._close_logger(), pyrosetta.distributed.cluster.logging_support.LoggingSupport._close_socket_listener(), pyrosetta.distributed.cluster.core.PyRosettaCluster._create_future(), pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_adapt(), pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_teardown(), pyrosetta.distributed.cluster.converters._parse_yield_results(), pyrosetta.distributed.cluster.io.IO._save_results(), pyrosetta.distributed.cluster.utilities.SchedulerManager._setup_clients_cluster_adaptive(), pyrosetta.distributed.cluster.base.TaskBase._setup_initial_kwargs(), pyrosetta.distributed.cluster.base.TaskBase._setup_kwargs(), pyrosetta.distributed.cluster.base.TaskBase._setup_protocols_protocol_seed(), pyrosetta.distributed.cluster.logging_support.LoggingSupport._setup_socket_listener(), pyrosetta.distributed.cluster.core.PyRosettaCluster.compression, pyrosetta.distributed.cluster.serialization.Serialization.compression, pyrosetta.distributed.cluster.core.PyRosettaCluster.decoy_ids, basic::options::OptionKeys::stepwise.enumerate, pyrosetta.distributed.cluster.core.PyRosettaCluster.filter_results, pyrosetta.tests.distributed.test_dask.format, pyrosetta.distributed.cluster.core.PyRosettaCluster.ignore_errors, pyrosetta.distributed.cluster.logging_listeners.SocketListener.ignore_errors, pyrosetta.distributed.cluster.core.PyRosettaCluster.input_packed_pose, pyrosetta.tests.distributed.cluster.test_smoke.ScoresTest.input_packed_pose, pyrosetta.tests.distributed.cluster.test_smoke.TestBase.input_packed_pose, pyrosetta.distributed.cluster.core.PyRosettaCluster.logging_level, pyrosetta.distributed.cluster.core.PyRosettaCluster.max_delay_time, pyrosetta.distributed.cluster.core.PyRosettaCluster.nstruct, pyrosetta.toolbox.py_jobdistributor.PyJobDistributor.nstruct, ui::task::Task::Job.nstruct, pyrosetta.distributed.cluster.core.PyRosettaCluster.protocols_key, range, pyrosetta.distributed.cluster.core.PyRosettaCluster.save_all, pyrosetta.distributed.cluster.core.PyRosettaCluster.serializer, pyrosetta.distributed.cluster.core.PyRosettaCluster.tasks, ui::task::Project.tasks(), pyrosetta.distributed.cluster.core.PyRosettaCluster.tasks_size, pyrosetta.distributed.cluster.core.PyRosettaCluster.timeout, pyrosetta.distributed.cluster.logging_listeners.SocketListener.timeout, ui::network::B.timeout, and pyrosetta.distributed.cluster.core.PyRosettaCluster.yield_results.
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster.distribute(), and pyrosetta.distributed.cluster.core.PyRosettaCluster.generate().
| Optional[NoReturn] pyrosetta.distributed.cluster.core.PyRosettaCluster.distribute | ( | self, | |
| *Any | args, | ||
| Any | protocols = None, |
||
| Any | clients_indices = None, |
||
| Any | resources = None |
||
| ) |
| Union[NoReturn, Generator[Tuple[PackedPose, Dict[Any, Any]], None, None]] pyrosetta.distributed.cluster.core.PyRosettaCluster.generate | ( | self, | |
| *Any | args, | ||
| Any | protocols = None, |
||
| Any | clients_indices = None, |
||
| Any | resources = None |
||
| ) |
|
staticprivate |
Referenced by test.Workshop9_my_shapes.MyShape.__str__().
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_adapt().
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._setup_clients_dict(), pyrosetta.tests.distributed.test_dask.TestDaskDistribution.tearDown(), pyrosetta.tests.distributed.test_dask.TestDaskDistribution.test_basic(), and pyrosetta.tests.distributed.test_dask.TestDaskDistribution.test_rosetta_scripts().
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._setup_clients_dict(), pyrosetta.tests.distributed.cluster.test_smoke.TestBase.tearDownClass(), pyrosetta.tests.distributed.cluster.test_smoke.GeneratorTest.test_generate_multi_user_clients(), pyrosetta.tests.distributed.cluster.test_smoke.GeneratorTest.test_generate_partition_clients(), pyrosetta.tests.distributed.cluster.test_smoke.RuntimeTest.test_timing_multi_instance(), and pyrosetta.tests.distributed.cluster.test_smoke.RuntimeTest.test_timing_single_instance().
| pyrosetta.distributed.cluster.core.PyRosettaCluster.clients_dict |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_adapt(), pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_teardown(), pyrosetta.distributed.cluster.utilities.SchedulerManager._setup_clients_cluster_adaptive(), and pyrosetta.distributed.cluster.base.TaskBase._setup_protocols_protocol_seed().
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._save_results().
|
static |
Referenced by pyrosetta.distributed.cluster.serialization.Serialization.__attrs_post_init__(), and pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
static |
Referenced by pyrosetta.distributed.cluster.logging_support.LoggingSupport._cooldown().
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._get_cluster().
|
static |
Referenced by pyrosetta.tests.distributed.cluster.test_smoke.ScoresTest.get_scores_dict().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), and pyrosetta.distributed.cluster.base.TaskBase._setup_protocols_protocol_seed().
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._save_results().
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._save_results(), and pyrosetta.distributed.cluster.io.IO._write_environment_file().
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._write_environment_file().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster.__attrs_post_init__(), and pyrosetta.distributed.cluster.io.IO._save_results().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), pyrosetta.tests.distributed.cluster.test_smoke.ScoresTest.setup_input_packed_pose(), pyrosetta.tests.distributed.cluster.test_smoke.ScoresTest.test_detached_scores(), pyrosetta.tests.distributed.cluster.test_smoke.ScoresTest.test_detached_scores_with_reserve_scores(), pyrosetta.tests.distributed.cluster.test_smoke.GeneratorTest.test_generate_builtin_clients(), pyrosetta.tests.distributed.cluster.test_smoke.GeneratorTest.test_generate_multi_user_clients(), pyrosetta.tests.distributed.cluster.test_smoke.GeneratorTest.test_generate_partition_clients(), pyrosetta.tests.distributed.cluster.test_smoke.GeneratorTest.test_generate_user_client(), pyrosetta.tests.distributed.cluster.test_smoke.RuntimeTest.test_timing_multi_instance(), and pyrosetta.tests.distributed.cluster.test_smoke.RuntimeTest.test_timing_single_instance().
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.base.TaskBase._setup_initial_kwargs(), and pyrosetta.distributed.cluster.logging_support.LoggingSupport._setup_socket_listener().
|
static |
Referenced by pyrosetta.distributed.cluster.worker_plugins.SocketLoggerPlugin.__init__(), pyrosetta.distributed.cluster.logging_handlers.MultiSocketHandler.__init__(), pyrosetta.distributed.cluster.logging_support.LoggingSupport._register_socket_logger_plugin(), pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), pyrosetta.distributed.cluster.logging_support.LoggingSupport._setup_logger(), pyrosetta.distributed.cluster.worker_plugins.SocketLoggerPlugin.setup(), and pyrosetta.distributed.cluster.logging_handlers.MultiSocketHandler.setup_handler().
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.logging_support.LoggingSupport._setup_logger().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._get_cluster(), pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_adapt(), and pyrosetta.distributed.cluster.utilities.SchedulerManager._setup_clients_cluster_adaptive().
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._setup_clients_cluster_adaptive().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), and pyrosetta.toolbox.py_jobdistributor.PyJobDistributor.output_decoy().
|
static |
Referenced by pyrosetta.distributed.cluster.base.TaskBase._setup_initial_kwargs().
|
static |
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._process_kwargs(), pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), pyrosetta.distributed.cluster.base.TaskBase._setup_initial_kwargs(), and pyrosetta.distributed.cluster.base.TaskBase._setup_kwargs().
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.base.TaskBase._setup_pyrosetta_init_kwargs().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._get_cluster(), pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_adapt(), and pyrosetta.distributed.cluster.utilities.SchedulerManager._setup_clients_cluster_adaptive().
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._save_results().
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._get_cluster().
|
static |
Referenced by pyrosetta.distributed.cluster.base.TaskBase._get_seed(), and pyrosetta.distributed.cluster.base.TaskBase._setup_protocols_protocol_seed().
| pyrosetta.distributed.cluster.core.PyRosettaCluster.serializer |
Referenced by pyrosetta.distributed.cluster.io.IO._get_instance_and_metadata(), pyrosetta.distributed.cluster.io.IO._parse_results(), pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), pyrosetta.distributed.cluster.base.TaskBase._setup_initial_kwargs(), and pyrosetta.distributed.cluster.base.TaskBase._setup_kwargs().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster.generate().
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._save_results().
|
static |
Referenced by pyrosetta.distributed.cluster.io.IO._save_results(), and pyrosetta.distributed.cluster.io.IO._write_environment_file().
|
static |
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
static |
Referenced by pyrosetta.distributed.cluster.utilities.SchedulerManager._maybe_adapt(), and pyrosetta.distributed.cluster.core.PyRosettaCluster._run().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), and pyrosetta.distributed.cluster.logging_listeners.SocketListener.serve_until_stopped().
|
static |
Referenced by pyrosetta.distributed.cluster.core.PyRosettaCluster._run(), pyrosetta.distributed.cluster.core.PyRosettaCluster.distribute(), and pyrosetta.distributed.cluster.core.PyRosettaCluster.generate().