qat.qlmaas.plugins.QLMaaSPlugin
Remote Plugins are managed by QLMaaSPlugin objects. These objects can be
built using:
qlmaas.pluginsmodule if a configuration exists on your computera
QLMaaSConnectionobject (when the connection is defined manually). Please note that, even if there is no configuration file on your computer, instantiating aQLMaaSConnectionobject enables theqlmaas.pluginsmodule
- class qat.qlmaas.plugins.QLMaaSPlugin(connection, name: str, constructor: SerializedArguments, description: str)
Class describing a Plugin defined on a remote server.
If a configuration file is present on your computer, you can use the module
qlmaas.pluginsto instantiate a remote Plugin:from qlmaas.plugins import Nnizer # Define a plugin plugin = Nnizer()
Otherwise, if no configuration file is set on your machine, you can use a
QLMaaSConnectionobject:from qat.qlmaas import QLMaaSConnection # Connect to the server conn = QLMaaSConnection() # Get remote Plugin Nnizer = conn.get_qpu("qat.plugins:Nnizer") plugin = Nnizer()
- compile(batch, specs, meta_data: dict | None = None, mem_usage: int | None = None, core_usage: int | None = None, nb_nodes: int | None = None, max_time: int | timedelta | None = None)
Compile a batch
- Parameters:
batch (
Batch) – batch to compilespecs (
HardwareSpecs) – specsmeta_data (dict, optional) – override the meta_data of the batch
mem_usage (int, optional) – override default memory usage (in MB) calculation
core_usage (int, optional) – override default core usage calculation
nb_nodes (int, optional) – override default number of nodes
max_time (int | datetime.timedelta, optional) – maximum time for the job, indicated either with a timedelta, or in minutes (this argument may not be supported by the scheduler)
- Returns:
asynchronous result
- Return type:
- compile_job(*args, **kwargs)
Compiles a single job
- Parameters:
job (
Job) – job to compilespecs (
HardwareSpecs) – specsmeta_data (dict, optional) – override the meta_data of the batch
mem_usage (int, optional) – memory usage (in MB)
core_usage (int, optional) – core usage
- Returns:
asynchronous result
- Return type: