Profile Metaflow steps with pyinstrument and render as HTML cards
Project description
metaflow-pyinstrument
Profile Metaflow steps with pyinstrument and view results as interactive HTML cards.
Installation
pip install metaflow-pyinstrument
Usage
from metaflow import FlowSpec, step, pypi_base
from metaflow_pyinstrument import pyinstrument_card
@pypi_base(packages={'pyinstrument': ''})
class MyFlow(FlowSpec):
@pyinstrument_card()
@step
def start(self):
# Your code here - will be profiled
result = sum(i**2 for i in range(100000))
self.next(self.end)
@step
def end(self):
pass
if __name__ == '__main__':
MyFlow()
Run with:
python myflow.py --environment=pypi --with kubernetes run
View the card:
python myflow.py card view start
Parameters
| Parameter | Default | Description |
|---|---|---|
card_id |
"pyinstrument" |
Card identifier |
interval |
0.001 |
Sampling interval (seconds). Use 0.0001 for fast code |
html_attribute |
"html" |
Artifact name for HTML output |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metaflow_pyinstrument-0.1.1.tar.gz.
File metadata
- Download URL: metaflow_pyinstrument-0.1.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93a79986672676eaf6d04abc4f27630a5b4360d0ca56c5b597686f6cc2457e47
|
|
| MD5 |
ca678d67568af3c58b4f48a652776035
|
|
| BLAKE2b-256 |
178f804c7ecf28e7857413bb95988e062d3d91351e569858888e7bbffeb253ca
|
Provenance
The following attestation bundles were made for metaflow_pyinstrument-0.1.1.tar.gz:
Publisher:
publish.yml on outerbounds/metaflow-pyinstrument
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaflow_pyinstrument-0.1.1.tar.gz -
Subject digest:
93a79986672676eaf6d04abc4f27630a5b4360d0ca56c5b597686f6cc2457e47 - Sigstore transparency entry: 854850962
- Sigstore integration time:
-
Permalink:
outerbounds/metaflow-pyinstrument@3a89ee3b0a56a6123885bdc2c47b2b71c4db8f87 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/outerbounds
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3a89ee3b0a56a6123885bdc2c47b2b71c4db8f87 -
Trigger Event:
release
-
Statement type:
File details
Details for the file metaflow_pyinstrument-0.1.1-py3-none-any.whl.
File metadata
- Download URL: metaflow_pyinstrument-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
692bda2ab0c4707e89046afb192327fafcdf8f1c52398e26a4159891b3ef4fb9
|
|
| MD5 |
7a2dad8653123a52b4d7fff6abd5a137
|
|
| BLAKE2b-256 |
f8bb1a39dbe26c21c80b0c365244a1a4424b49a7beb596068f8c9f0c568316ad
|
Provenance
The following attestation bundles were made for metaflow_pyinstrument-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on outerbounds/metaflow-pyinstrument
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metaflow_pyinstrument-0.1.1-py3-none-any.whl -
Subject digest:
692bda2ab0c4707e89046afb192327fafcdf8f1c52398e26a4159891b3ef4fb9 - Sigstore transparency entry: 854850966
- Sigstore integration time:
-
Permalink:
outerbounds/metaflow-pyinstrument@3a89ee3b0a56a6123885bdc2c47b2b71c4db8f87 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/outerbounds
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3a89ee3b0a56a6123885bdc2c47b2b71c4db8f87 -
Trigger Event:
release
-
Statement type: