Skip to content

Aim

kedro_aim.config.model

kedro_aim.config.model.DisableOptions

Bases: BaseModel

Options for the disable command.

Source code in kedro_aim/config/model.py
77
78
79
80
81
82
83
class DisableOptions(BaseModel):
    """Options for the disable command."""

    pipelines: List[str] = Field(
        default_factory=list,
        description="List of pipelines in which tracking with aim will be disabled.",
    )

kedro_aim.config.model.KedroAimConfig

Bases: BaseModel

The pydantic model for the aim.yml file which configures this plugin.

Source code in kedro_aim/config/model.py
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class KedroAimConfig(BaseModel):
    """The pydantic model for the `aim.yml` file which configures this plugin."""

    class Config:
        extra = Extra.forbid

    ui: UiOptions = Field(UiOptions(), description="Options for the aim ui.")
    run: RunOptions = Field(RunOptions(), description="Options for the aim run.")
    repository: RepositoryOptions = Field(
        RepositoryOptions(), description="Configurations for the aim repository."
    )
    disable: DisableOptions = Field(
        DisableOptions(), description="Options for disabling aim tracking."
    )

kedro_aim.config.model.RepositoryOptions

Bases: BaseModel

Options for the repository.

Source code in kedro_aim/config/model.py
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
class RepositoryOptions(BaseModel):
    """Options for the repository."""

    class Config:
        extra = Extra.forbid

    path: Optional[str] = Field(
        default=None, description="Path to the repository folder."
    )
    read_only: Optional[bool] = Field(
        default=None, description="Enable/Disable writes to repository."
    )
    init: bool = Field(
        default=False,
        description="Enable/Disable initialilzation of repository folder before run.",
    )

kedro_aim.config.model.RunOptions

Bases: BaseModel

Options for the run command.

Source code in kedro_aim/config/model.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
class RunOptions(BaseModel):
    """Options for the run command."""

    class Config:
        extra = Extra.forbid

    run_hash: Optional[str] = Field(
        default=None,
        description=(
            "The hash of the run. If a run hash is selected that already "
            "exists, it will be logged to that run."
        ),
    )
    experiment: Optional[str] = Field(
        default=None,
        description=(
            "The name of the experiment. 'default’ if not specified. "
            "Can be used later to query runs/sequences"
        ),
    )
    system_tracking_interval: Optional[int] = Field(
        default=DEFAULT_SYSTEM_TRACKING_INT,
        description=(
            "Sets the tracking interval in seconds for system usage metrics "
            "(CPU, Memory, etc.). Set to None to disable system metrics tracking."
        ),
    )
    log_system_params: Optional[bool] = Field(
        default=False,
        description=(
            "Enable/Disable logging of system params such as installed packages, "
            "git info, environment variables, etc."
        ),
    )
    capture_terminal_logs: Optional[bool] = Field(
        default=True, description="Enable/Disable the capturing of terminal logs."
    )
    tags: List[str] = Field(
        default_factory=list, description="List of tags for the run."
    )

kedro_aim.config.model.UiOptions

Bases: BaseModel

Options for the ui command.

Source code in kedro_aim/config/model.py
 7
 8
 9
10
11
12
13
14
class UiOptions(BaseModel):
    """Options for the ui command."""

    class Config:
        extra = Extra.forbid

    port: int = Field(default=43800, description="Port to run the aim UI on.")
    host: str = Field(default="127.0.0.1", description="Host to run the aim UI on.")

kedro_aim.config.utils

kedro_aim.config.utils.load_repository(cfg)

Load the a aim repository from the config options.

Parameters:

Name Type Description Default
cfg RepositoryOptions

Config for the repository.

required

Returns:

Type Description
Optional[Repo]

A aim repository or None if the repository is disabled.

Source code in kedro_aim/config/utils.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
def load_repository(cfg: RepositoryOptions) -> Optional[Repo]:
    """Load the a aim repository from the config options.

    Args:
        cfg: Config for the repository.

    Returns:
        A aim repository or None if the repository is disabled.
    """
    if cfg.path is None:
        return None
    else:
        return Repo(path=cfg.path, read_only=cfg.read_only, init=cfg.init)