Skip to main content

Arm® Mali™ frame selection core

A Python library for choosing representative frames from a workload. It groups frames with similar performance measurements and selects stable frames from each group. It also calculates weights that describe how much of the workload each selected frame represents.

Installation

Python 3.12 or newer is required.

To add the package to a uv project:

uv add mali-frame-selection-core

Or install it with pip in a virtual environment:

python -m pip install mali-frame-selection-core

To install from a local checkout instead, run this in the repository directory:

python -m pip install .

Usage

Provide a pandas DataFrame with one row per frame. The index contains unique integer frame IDs, and the columns contain numerical measurements. Include an activity column with positive, finite values in consistent units.

import pandas

from frame_selection_core import select_frames

features = pandas.DataFrame(
    {"activity": [100, 100, 200, 200], "metric": [1, 1, 4, 4]},
    index=[101, 103, 105, 107],
)

result = select_frames(features, clusters=2)
print(result.frames)
print(
    result.counters.loc[
        list(result.frames), ["fixed_rate_weight", "fixed_time_weight"]
    ]
)

The result contains the selected frame IDs, weights and diagnostic tables. The input table is not modified. Weights account for each representative's activity; they are not probabilities and do not necessarily add up to one.

The following optional arguments control selection:

Argument Default Description
clusters 3 Number of groups to form.
percentage 10 Maximum change between neighboring analyzed frames, in percent.
frame_start 0 Inclusive lower frame bound; zero leaves the start unrestricted.
frame_end None Inclusive upper frame bound; must be greater than the start.
frame_numbers None Analyze only the listed frame IDs within the selected range.

Fewer representatives may be returned if some groups have no stable frame. Invalid inputs or activity values that produce nonfinite weights raise FrameSelectionError.

Development

Install the development tools in a virtual environment:

python -m pip install -e ".[dev]"
python -m pytest
python -m ruff check src tests
python -m ruff format --check src tests

License

This project is licensed under the MIT License.

Arm and Mali are registered trademarks or trademarks of Arm Limited (or its subsidiaries or affiliates) in the US and/or elsewhere.

Metadata

Release files for mali-frame-selection-core 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mali-frame-selection-core 1.0.0
File Size Uploaded Provenance Actions
mali_frame_selection_core-1.0.0.tar.gz 11.6 kB With provenance Details for mali_frame_selection_core-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mali-frame-selection-core 1.0.0
File Interpreter ABI Platform Actions
mali_frame_selection_core-1.0.0-py3-none-any.whl Python 3 none any Details for mali_frame_selection_core-1.0.0-py3-none-any.whl

Total release size: 20.8 kB

Release files / mali_frame_selection_core-1.0.0.tar.gz

Download URL mali_frame_selection_core-1.0.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a206995832d53917e0bee47ef987e9100c93ba60d1d1e664b14c174ff261ab2d
BLAKE2b-256 checksum
How to use checksums
ae3123921ca56fca19ced635810265cd5cd38f66b9457bc03275a7214210a422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / mali_frame_selection_core-1.0.0-py3-none-any.whl

Download URL mali_frame_selection_core-1.0.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9c23e603153323e23e7f61965c7c3345ecc2389be76ba7e1f93a8d5d7b6cd04
BLAKE2b-256 checksum
How to use checksums
c86f6b59faf69a1bb6811c36310e12367cd69ce37df133e8dadadba7f324339a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for mali-frame-selection-core 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mali_frame_selection_core-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page