Skip to content

Aim

kedro_aim.aim.utils

kedro_aim.aim.utils.list_metrics_in_run(run)

List all metrics in the run.

HACK: This is a workaround for the metrics property of aim.Run which is broken. In the future, we should use the metrics property of aim.Run instead of this.

Parameters:

Name Type Description Default
run Run

A aim run object.

required

Yields:

Type Description
Generator[SequenceView, None, None]

The metrics that are contained in the run.

Source code in kedro_aim/aim/utils.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
def list_metrics_in_run(run: Run) -> Generator[SequenceView, None, None]:
    """List all metrics in the run.

    HACK: This is a workaround for the `metrics` property of `aim.Run` which is broken.
    In the future, we should use the `metrics` property of `aim.Run` instead of this.

    Args:
        run: A aim run object.

    Yields:
        The metrics that are contained in the run.
    """
    for seq_name, ctx, run in run.iter_sequence_info_by_type("*"):
        yield Sequence(seq_name, ctx, run)  # type: ignore

kedro_aim.aim.utils.list_metrics_names_in_run(run)

List the names of all metrics in the run.

Parameters:

Name Type Description Default
run Run

A aim run object.

required

Yields:

Type Description
Generator[str, None, None]

The names of the metrics that are contained in the run.

Source code in kedro_aim/aim/utils.py
24
25
26
27
28
29
30
31
32
33
34
def list_metrics_names_in_run(run: Run) -> Generator[str, None, None]:
    """List the names of all metrics in the run.

    Args:
        run: A aim run object.

    Yields:
        The names of the metrics that are contained in the run.
    """
    for metric in list_metrics_in_run(run):
        yield metric.name