Skip to main content

Profile your CoreML model directly from Python.

Project description

CoreML (Python) Profiler 🐍

Quick and easy profiling of CoreML models in Python!

Quick Start ⚡️

#convert model using guide: https://apple.github.io/coremltools/docs-guides/source/introductory-quickstart.html
#or download one from the 🤗 Hub 
from coremlprofiler import CoreMLProfiler
from huggingface_hub import snapshot_download

repo_path = snapshot_download(repo_id="FL33TW00D-HF/test-st", local_dir="./")
model_path = repo_path + "/sentence_transformer_all-MiniLM-L6-v2.mlpackage"

# Create the Profiler
profiler = CoreMLProfiler(model_path)

# Print your device usage
print(profiler.device_usage_summary_chart())
# Enjoy your nice plot!

Python Profiling

CLI

Profile a local model:

coremlprofile path/to/my/model.mlpackage

Download from Hugging Face and profile:

coremlprofile --hf_repo="FL33TW00D-HF/test-st" sentence_transformer_all-MiniLM-L6-v2.mlpackage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coremlprofiler-0.4.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

coremlprofiler-0.4.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file coremlprofiler-0.4.0.tar.gz.

File metadata

  • Download URL: coremlprofiler-0.4.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/24.1.0

File hashes

Hashes for coremlprofiler-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0a8ee7bd30a2afbbc774114719ac435299a3eb9f5773b355c73ad0873f4ffc8e
MD5 0d1d62976cb900e543e7ae4f0b60a075
BLAKE2b-256 6edf322b34065ffc55726a3111464d4d3f384e5bb1a66103edd72b90f427df51

See more details on using hashes here.

File details

Details for the file coremlprofiler-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: coremlprofiler-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/24.1.0

File hashes

Hashes for coremlprofiler-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2792b28d810e36fe066255a1baa3ee558eba640dbb7c39615d86b3b5f3ccbe17
MD5 ae72a51ff08c905f47859ec3e0883cd5
BLAKE2b-256 9d07184f036d9d05874bc334cf7c76278e31cd341bd70078bb8538d3d147acca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page