ai2_kit.core.executor module#
- class ai2_kit.core.executor.BaseExecutorConfig(*, ssh: Optional[SshConfig] = None, queue_system: QueueSystemConfig, work_dir: str, python_cmd: str = 'python')[source]#
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'python_cmd': FieldInfo(annotation=str, required=False, default='python'), 'queue_system': FieldInfo(annotation=QueueSystemConfig, required=True), 'ssh': FieldInfo(annotation=Union[SshConfig, NoneType], required=False, default=None), 'work_dir': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- python_cmd: str#
- queue_system: QueueSystemConfig#
- work_dir: str#
- class ai2_kit.core.executor.Executor[source]#
Bases:
ABC
- name: str#
- python_cmd: str#
- tmp_dir: str#
- work_dir: str#
- class ai2_kit.core.executor.ExecutorManager(executor_configs: Mapping[str, BaseExecutorConfig])[source]#
Bases:
object
- class ai2_kit.core.executor.HpcExecutor(connector: BaseConnector, queue_system: BaseQueueSystem, work_dir: str, python_cmd: str, name: str)[source]#
Bases:
Executor
- classmethod from_config(config: Union[dict, BaseExecutorConfig], name: str = '')[source]#
- property is_local#
- name: str#
- python_cmd: str#
- tmp_dir: str#
- work_dir: str#
- ai2_kit.core.executor.create_executor(config: BaseExecutorConfig, name: str) Executor [source]#