Parse TORCH_LOG logs produced by PyTorch torch.compile
Project description
tlparse: Parse structured PT2 logs
tlparse
parses structured torch trace logs and outputs HTML files analyzing data.
Quick start: Run PT2 with the TORCH_TRACE environment variable set:
TORCH_TRACE=/tmp/my_traced_log example.py
Feed input into tlparse:
tlparse /tmp/my_traced_log -o tl_out/
Adding custom parsers
You can extend tlparse with custom parsers which take existing structured log data and output any file. To do so, first implement StructuredLogParser with your own trait:
pub struct MyCustomParser;
impl StructuredLogParser for MyCustomParser {
fn name(&self) -> &'static str {
"my_custom_parser"
}
fn get_metadata<'e>(&self, e: &'e Envelope) -> Option<Metadata<'e>> {
// Get required metadata from the Envelope.
// You'll need to update Envelope with your custom Metadata if you need new types here
....
}
fn parse<'e>(&self,
lineno: usize,
metadata: Metadata<'e>,
_rank: Option<u32>,
compile_id: &Option<CompileId>,
payload: &str
) -> anyhow::Result<ParseOutput> {
// Use the metadata and payload however you'd like
}
}
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
tlparse-0.3.13.tar.gz
(29.4 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.13-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a229d496340877f51f8cef8e937c5e35fe858fa90831fc9e79769faf7053bb4 |
|
MD5 | 91bb9c25ec8e681e6ab6c896ad4fed6d |
|
BLAKE2b-256 | 513fdcf6e0d78d8f2fe005a10cfeb98bb1602a55c703d1968f293a9a48e1cda2 |
Close
Hashes for tlparse-0.3.13-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c05656ac0de5be0e064e6bb3cce6cbb2d96636e2b9a11aac84718e78d55b189 |
|
MD5 | f329f0a21b41b58bd6cedfd5dca1b831 |
|
BLAKE2b-256 | fd75ec1d8cb21e845573b032f5b3253f0dd2af0fcb1dbcdb53b0ba587bcb4290 |
Close
Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8175a0a283967e96b5821f9cd91a0834516214e454c293edb77cb91e9fdaa4e1 |
|
MD5 | b00e10296fbed6b42054cfa333d22fed |
|
BLAKE2b-256 | 2980576f5369c103aee9728eab13eccb546e406785bbfbb3603a490332ab9596 |
Close
Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ec5c5c19e7f8fe39f3b84d4942438773d76cf87bbb1b9c503566769c362189a |
|
MD5 | 48dbe89c030aa7bef55464c08b805a01 |
|
BLAKE2b-256 | a682d174c3b6bcfe1d3e2a75580ba0049d1b46354a59ac86963deecaeb4f5781 |
Close
Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab1b40d4817eef13e1caacceb64c6d816287576786b6a1ede5a003ad5fe6cd1 |
|
MD5 | f068352c0ae4e2899ce06bcdc5a5f9c1 |
|
BLAKE2b-256 | 632c09afbfaf82af42bc70f2de3b7befac88c4843be1508477b472d4c5a8a987 |
Close
Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b413f7c6d64e3be702c90a938488e967851f834d03aba81626de945b7409a817 |
|
MD5 | 63af2d67c641b4facedc68bcc5ec24fc |
|
BLAKE2b-256 | 1ca8cd7a99272447bd2583b05d8d20964a8c34c19f1cc677e56006c23830a834 |
Close
Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e48143ebb123aa35ddae654a829de5b9b975f8022d33ad1ec72acc2983a83e06 |
|
MD5 | 8bbee7be98b00f8a46eef9c0a8ae9fcd |
|
BLAKE2b-256 | 17288b6b1c2a64b8552544293d8922f379c9489b85e54b8259d717b7f6c87c84 |
Close
Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2bd533ae299a77ffb1133cb7e82c6836aae85814ccb152f5afb401d8bbec438 |
|
MD5 | 8c9b53cd3f716d05a629435078d4eb23 |
|
BLAKE2b-256 | de6fc198a32cb6fb0f729b910023f82e93a82e8d391ded6e2897b338b8fa322e |
Close
Hashes for tlparse-0.3.13-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e570ac74914649e7e35540c4e0ddd978bd9f3dacd4d87740e672ee710b9c56f5 |
|
MD5 | a5d3c1b9c0aff4b0a4fada2f774e52ea |
|
BLAKE2b-256 | 749c64daa4f0bb82592bc0792ecf38c198738de50a4a93735f1b213ffe8f540f |
Close
Hashes for tlparse-0.3.13-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a258f3b15b3f45af002b6dc8acc747191f8c5373d97a8760ceda4b7bfa9b76d1 |
|
MD5 | fbb7b062bad4c58b46cb0cbae5c4291a |
|
BLAKE2b-256 | 7d3d343463bfc8aea49c8fb2166f1e951a6be8d66bea82f804a3194844212ffa |