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.24.tar.gz (793.4 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

tlparse-0.3.24-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.24-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.24-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.24-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.24-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.24-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.24-py3-none-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.24-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.24.tar.gz.

File metadata

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

File hashes

Hashes for tlparse-0.3.24.tar.gz
Algorithm Hash digest
SHA256 83f91b0fc7c14b65e6cb55e83142ae0bca741bea7f1c35c64bc1114b6b46873b
MD5 5d73b38f97dfaf1e966ef8c2bad7701e
BLAKE2b-256 49b120009c52d2c1503728733c104d66b26cb520cc4be6c1b677861b11e18bee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 82a714d57962e92b13b40d189eeb382acc0f7c3d00c0d1e24f384c7d0167f308
MD5 7dfc6e5f32717cebfe7167e9c98f0186
BLAKE2b-256 b4d8bb4adea56106013bf2f3544081bbe5f4adc7d716db37da1db364b3d6356b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tlparse-0.3.24-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.24-py3-none-win32.whl
Algorithm Hash digest
SHA256 053dd3f1b4f2769d1e7768d1e23c5c3a28426a857eb29f2dc853d74e61399e0a
MD5 e5d23ee6f49f2fd48db5d862043e1b1f
BLAKE2b-256 36f7f4da095821a6312c0cdbe5079c541f2abb0d7ecc3e373de862626d4a3e21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fc7cf324d65355a670849168b204e6c16ebb7962620552dcc79db93031d4150
MD5 d95f44594a93fdb3ea3937bb312e8d3a
BLAKE2b-256 5b68ce209f8c2a613c1551041ecf4fabe05893d3928a976ab270c9cfeb7ad99c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 3108c615dbe6a77e64d803dfa3c912e92dc104c616c3266320b5046bfb560fb5
MD5 e3c6833c8177cbfd4528d3c430e35314
BLAKE2b-256 5ad3c6f31d77a974634ebff41b3d65cfc760e1efe8e81055de8f7ee4f527d87f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 9af0469501342fb694c528c683825d90f8b17336b98e4265eb9ad96e3ba4adc4
MD5 7e09cc32c7163dd494159e1f2f2eb0f9
BLAKE2b-256 389308d43c8560bcfeef8fc9308b152eaf7eb31df25f3a0aef66fc293c848ebf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1272d2780a15e058cb8b982cc5cdfab4b56fd8c7a14bc250a77603d89c9d67cb
MD5 19941b41776253af3ac6b9625cb8c4eb
BLAKE2b-256 4b3014b11c56da4fa399a25163736f9ef41cb36ab41fa6253f3aed978eb537d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2b0ede8cc37ce0b2486d69716527f49791a1a6462c317cf4c12b87920ab219b8
MD5 accdcc8f961ba74ea424f7793a05d791
BLAKE2b-256 a0e22ff7d86bb962b363123587a3b7590f359c30faf41e575795606a83007160

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4c59dc8abbfbb26da8b6ea1abcfcb03493a8764672c84749246b34dc92cc2735
MD5 14590b42e0d89c2d8da44da3ee59c3b1
BLAKE2b-256 c5510911e5d2879dd7cd2c74e7bc2a34100771fc294bda820e3766ac0edd9d82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d89cf9c44c168202d4c2cadc71c05adbbdacfe39588db9dabd1a643fabbd751
MD5 59df71ded68615f7aeaacb85a2e3ba67
BLAKE2b-256 d503f5e796a919ed5e3926a5d9b396d6c6bc9653b16ed42ee35446aedb09ee2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.24-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f89fec691ee37ab707273f54c301f4505ad415c60c91c75ab36cfb0c3851ce8c
MD5 87c8cd090978df3966fc30404e0b4dd7
BLAKE2b-256 026faeaa66b9010f472dd63e16c252d29d6206369089b1b0ac950004499735e7

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