mantik.config.core

Attributes

APPLICATION_LOGS_FILE

COMPUTE_BUDGET_ACCOUNT_ENV_VAR

logger

Classes

Config

The backend config for the UNICORE MLflow backend.

SSHConfig

The backend config for SSH MLflow backend.

SupportedBackends

Create a collection of name/value pairs.

Functions

backend_type_from_backend_config(→ SupportedBackends)

Module Contents

mantik.config.core.APPLICATION_LOGS_FILE = 'mantik.log'[source]
mantik.config.core.COMPUTE_BUDGET_ACCOUNT_ENV_VAR = 'MANTIK_COMPUTE_BUDGET_ACCOUNT'[source]
class mantik.config.core.Config[source]

Bases: mantik.config._base.ConfigObject

The backend config for the UNICORE MLflow backend.

add_env_vars(env_vars: Dict) None[source]
property backend_type: SupportedBackends[source]
environment: mantik.config.environment.Environment | None = None[source]
exclude: List | None = None[source]
execution_environment_given() bool[source]
property files_to_exclude: List[str][source]
firecrest: mantik.config.firecrest.Firecrest | None = None[source]
classmethod from_filepath(filepath: pathlib.Path, connection_id: uuid.UUID | None = None) Config[source]

Initialize from a given file.

password: str[source]
project: str[source]
resources: mantik.config.resources.Resources[source]
to_bash_script(arguments: str) str[source]

Create a bash script for UNICORE.

to_slurm_batch_script(arguments: str, run_id: str, run_dir: pathlib.Path) str[source]

Create a Slurm batch script for firecREST.

firecREST only allows to submit jobs via batch scripts, which has to be manually constructed.

to_unicore_job_description(bash_script_name: str) Dict[source]

Convert to UNICORE job description.

unicore_api_url: str | None = None[source]
user: str[source]
class mantik.config.core.SSHConfig[source]

Bases: mantik.config._base.ConfigObject

The backend config for SSH MLflow backend.

add_env_vars(env_vars: Dict) None[source]
property backend_type: SupportedBackends[source]
environment: mantik.config.environment.Environment | None = None[source]
exclude: List | None = None[source]
execution_environment_given() bool[source]
property files_to_exclude: List[str][source]
classmethod from_filepath(filepath: pathlib.Path) SSHConfig[source]

Initialize from a given file.

hostname: str[source]
password: str | None = None[source]
port: str | None = None[source]
private_key: str | None = None[source]
resources: mantik.config.resources.Resources[source]
to_slurm_batch_script(arguments: str, run_id: str, run_dir: pathlib.Path) str[source]
username: str[source]
class mantik.config.core.SupportedBackends(*args, **kwds)[source]

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

    >>> Color.RED
    <Color.RED: 1>
    
  • value lookup:

    >>> Color(1)
    <Color.RED: 1>
    
  • name lookup:

    >>> Color['RED']
    <Color.RED: 1>
    

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

FIRECREST = 'firecrest'[source]
SSH_REMOTE_COMPUTE_SYSTEM = 'ssh remote compute system'[source]
UNICORE = 'unicore'[source]
mantik.config.core.backend_type_from_backend_config(backend_config: Dict) SupportedBackends[source]
mantik.config.core.logger[source]