Skip to main content

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<ParserResult> {
       // Use the metadata and payload however you'd like
       // Return either a ParserOutput::File(filename, payload) or ParserOutput::Link(name, url)
    }
}

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

tlparse-0.3.22.tar.gz (45.4 kB view details)

Uploaded Source

Built Distributions

tlparse-0.3.22-py3-none-win_amd64.whl (1.8 MB view details)

Uploaded Python 3 Windows x86-64

tlparse-0.3.22-py3-none-win32.whl (1.7 MB view details)

Uploaded Python 3 Windows x86

tlparse-0.3.22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

tlparse-0.3.22-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.4 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ s390x

tlparse-0.3.22-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

tlparse-0.3.22-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (2.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

tlparse-0.3.22-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

tlparse-0.3.22-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

tlparse-0.3.22-py3-none-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.22-py3-none-macosx_10_12_x86_64.whl (2.0 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

File details

Details for the file tlparse-0.3.22.tar.gz.

File metadata

  • Download URL: tlparse-0.3.22.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for tlparse-0.3.22.tar.gz
Algorithm Hash digest
SHA256 da26ea5d3e0dba10eb8d369a829d7606e2967995585fd3a069ecdf7afc103dc1
MD5 e90cb10f21e46c11bec770c799ad6c08
BLAKE2b-256 a413003dc51c79b12c3ebb165ec682ea322563af54022380d92aa729475c57c6

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5bd6b62fd6a8959cbaf1c373d1cada423d402bf0747e4e3f4e50d3288459517b
MD5 998deed1536a5e9804aeac83fdfd826d
BLAKE2b-256 7f57382cc04150bdfe2da3b101831a2dd67aac1c4c289ff85052fc6ae3586365

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-win32.whl.

File metadata

  • Download URL: tlparse-0.3.22-py3-none-win32.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for tlparse-0.3.22-py3-none-win32.whl
Algorithm Hash digest
SHA256 ea6f53d31382082e4503763be00ac842198ef24c3350ddbfef06631d60f81ff5
MD5 0f55226a8aa8a3b4c0068d01854499f6
BLAKE2b-256 75b1ad92d591b6f68a92f185da06ca9cf7f260b9279621ec6eefba8eff011668

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f5aadbdcb31fcdd47f378e32031ea29b6a822ad96422deeaddcff55666f0c63
MD5 5ba09b8b8ab82e94466971bade72d0d7
BLAKE2b-256 7a36db85ea62d97193db694f12d09fa224aec1138d29b381073ee00d0b9a5713

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 bd868180970922ae14374cd388cb062cdbd35ea01c5efd4a856701dc1a196c7f
MD5 7225e1a48511205d0212d97103fa3edc
BLAKE2b-256 2a1fa80f27769f8de5baf9702a1c44870756646bba2c7ec14b965618ff853bf2

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 d4eb6bfdd3c3f0cc12c01295e673424ee52e4dd07222e7bcbfbc875c79f369d3
MD5 82b018b2ba11302e93f73e3f439558d5
BLAKE2b-256 14f1b42cea7e638df07f4dbdb02070085bc1bc6b39672be04443a9b44312dd7b

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7d53db5f9839d0c5248082ee5104f1a67d28d014cc118a1e3684d719dc336357
MD5 84d79361e9988d54794ec919ce590124
BLAKE2b-256 46f5a6459ca581bca199379bca424b1a87cc63bebc45078f42838b860968a707

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 ab8da11f06819ba1b074832626482d0acb841d0da72e45ca1927afce8898ecec
MD5 312a11dde585ec5a7d99a5c21c5f6733
BLAKE2b-256 aa14306f11901c53d9213b862857ded8257e32d3f34dd6d3fad0223ecc9570eb

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 de00dd4c4c7775f84c8506c3d6e682e91c0bef9c1e8638bf8b7a97c5576137c0
MD5 0dc61e8339a67547925e6eadc1158b14
BLAKE2b-256 bea4e7ccdda7216bf35b19791c16bf8fccb6457dcb53236415b91ecb5e06b4af

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d65da3a6ab04fb4e0690cbf84f289b16cd8323f9ace029bbfed812deaf4c9513
MD5 f24ba9283a4a8a4799186e3f4e330aad
BLAKE2b-256 0c74700f45f837dc344005117964fed121a1aacb8ece301ef56761cd71c04720

See more details on using hashes here.

File details

Details for the file tlparse-0.3.22-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tlparse-0.3.22-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2c77a9a0d40be8590702d4fb9761b8206fd2c115da995b5adbd93c7dadc927fe
MD5 b1b23eb7b664f434a63f52be4fb499fb
BLAKE2b-256 3892888a66cabf3810ad697a6bd40cb6eb7e302461ecd4ba9d90fa0636148b48

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