Skip to main content

arm-ai-model-optimizer

Arm AI Model Optimizer command-line client and Python API.

This package installs the np command, a client that submits model optimization work to the Arm AI Model Optimizer service and displays the results. Model optimization is performed by the service. Profiling jobs can execute on target devices.

Requirements

  • Python 3.11 or later
  • Network access to the Arm AI Model Optimizer service
  • For np profile, network access from the target device to the configured broker and S3 model storage

Installation

pip install arm-ai-model-optimizer

If you received a wheel file, install that file instead. Replace the quoted placeholder below with the actual path to the supplied wheel:

python -m pip install "<path-to-provided-wheel.whl>"

Getting started

1. Sign in

Issue a credential from the Arm AI Portal, then register it once on this machine:

np auth login <credential>
np auth status

The credential carries the address of the authentication server, so no further configuration is needed. np auth status reports the state of the stored token.

2. Check the connection

np health ready

3. Run an optimization

np workspace init      # create a workspace with a sample project
np models ls           # browse registered models
np validate            # check run.yaml against the backend
np run                 # submit the run
np status              # follow progress
np report              # inspect the results

Run np --help, or np <command> --help, for the full reference.

Commands

Command Purpose
np auth Sign in, sign out, inspect the current session
np workspace init Create a workspace and a sample project
np models / np datasets / np devices Register and browse resources
np projects / np experiments / np jobs Organize and inspect work
np validate / np run / np cancel Validate, submit and cancel runs
np status / np report / np ls Follow progress and read results
np profile / np evaluate Measure latency and memory, score accuracy
np analyze sensitivity Inspect layerwise sensitivity
np visualize Generate a model visualization link
np export Export artifacts for deployment or reproduction

Some commands may be unavailable depending on the features enabled for your deployment.

Profiling and network access

When using np profile, the target device connects to a broker to receive work and to S3 storage to retrieve models. This is a networked workflow.

The separately supplied executor_runner profiling binaries can also be invoked directly on a target device without a server connection or authentication. Their standalone, local-processing description applies to direct execution of those binaries, not to the full np profile workflow. See the README supplied with the profiling binaries for supported models, devices and direct-execution instructions.

Python API

The same package provides a Python API. Every command above has a counterpart, with the same behaviour: where the CLI exits non-zero, the call raises.

The example below refers to registered model, device and dataset identifiers. Replace these identifiers with resources available in your deployment.

from netspresso.api import NetsPresso

client = NetsPresso()  # same environment and stored credential as the CLI
project = client.projects.create(name="resnet18-rpi5", model="resnet18_pt2_pytorch_static_fp32",
                                 device="raspberry_pi_5_16gb", runtime="executorch", backend="xnnpack",
                                 calibration_dataset="sample_image_calib_seed42_n2",  # required for quantization
                                 evaluation_dataset="sample_image_eval_seed42_n2")
experiment = client.experiments.create(project_path=project.project_path, steps="go,gq")
client.run(experiment_path=experiment.experiment_path, wait=True)
report = client.report(experiment_path=experiment.experiment_path)

See the Python API reference in the documentation below for every call.

Documentation

https://developer.arm.com/dev-docs/arm-ai-model-optimizer

License

This software is licensed under the End User License Agreement for Arm AI Model Optimizer CLI, SDK and Related Software, provided in Arm AI Model Optimizer CLI SDK - EULA.txt. Read it before you install or use the software.

Third-party components are subject to their respective license terms, as identified in the accompanying third-party notices.

Notices for the open source software this package depends on are provided in licenses/Open Source Software Notice.md, with the full license texts in licenses/Appendix 1/ and the copyright notices in licenses/Appendix 2 - Copyright Attribution.md.

The software bill of materials (SBOM) is provided in CycloneDX and SPDX formats in sboms/.

In the source distribution, these paths are relative to the top level. In an installed package, the EULA and the licenses/ directory are under arm_ai_model_optimizer-<version>.dist-info/licenses/, and the SBOM files are under arm_ai_model_optimizer-<version>.dist-info/sboms/.

Metadata

Release files for arm-ai-model-optimizer 2.1.7

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

Source distribution (sdist)

Source distribution for arm-ai-model-optimizer 2.1.7
File Size Uploaded Provenance Actions
arm_ai_model_optimizer-2.1.7.tar.gz 694.3 kB Without provenance Details for arm_ai_model_optimizer-2.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arm-ai-model-optimizer 2.1.7
File Interpreter ABI Platform Actions
arm_ai_model_optimizer-2.1.7-py3-none-any.whl Python 3 none any Details for arm_ai_model_optimizer-2.1.7-py3-none-any.whl

Total release size: 1.9 MB

Release files / arm_ai_model_optimizer-2.1.7.tar.gz

Download URL arm_ai_model_optimizer-2.1.7.tar.gz
Size 694.3 kB
Tags Source
SHA-256 checksum
How to use checksums
207f989d6978d69d881a59b2d81799c0c0d9207a09063b80699ee06057072bd5
BLAKE2b-256 checksum
How to use checksums
e75fbd98ed706e0e01d83cdc72d7243bdda0ae88ef663932ef9e947927023c4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / arm_ai_model_optimizer-2.1.7-py3-none-any.whl

Download URL arm_ai_model_optimizer-2.1.7-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d01f51ae6105722c7771e174ca10cc7c91130a21ec6ff903158505034531453a
BLAKE2b-256 checksum
How to use checksums
0de13aab48835b7c19de7610541e7325421416d06d187239a25fa8386bb5548d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for arm-ai-model-optimizer 2.1.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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