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<ParseOutput> {
       // Use the metadata and payload however you'd like
    }
}

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

Uploaded Source

Built Distributions

tlparse-0.3.14-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3 Windows x86-64

tlparse-0.3.14-py3-none-win32.whl (1.0 MB view details)

Uploaded Python 3 Windows x86

tlparse-0.3.14-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.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.5 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ s390x

tlparse-0.3.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.4 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

tlparse-0.3.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (2.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

tlparse-0.3.14-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.14-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.14-py3-none-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.14-py3-none-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tlparse-0.3.14.tar.gz
Algorithm Hash digest
SHA256 1054ca88630a01031b561319cc3b33cc86563e5cbf5c1b18ce639914626b533e
MD5 89c94ec9d584f88c99cfb28bff7a8128
BLAKE2b-256 f221c7a642b7320fea9bfffeb9bebab93d054611297c718f7a9ea3d17db64ddc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4cb073abaaa9808485d17b39f1ff86701399f59d21856bfa2fda6dd9724572ca
MD5 891ae7398388a62ede4655038ab7ab84
BLAKE2b-256 27f8a0e77ed73ad479f567b6d9760d0f327dde83e85b8f8d78df2f5cedc8b8dc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tlparse-0.3.14-py3-none-win32.whl
Algorithm Hash digest
SHA256 413c71e761860cada472f56e155a1da7d3aff5c5fde2a8bbc37ffae1ac676319
MD5 9e35921343562b3751bcc28559fc5b64
BLAKE2b-256 75683776675bd899c98ed847cd5fb434b563a1ce9275eb58ecdf592235b7a6d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2004aaadb0676392376435e0354ea6a70bf82b4f199f279ed7a82372b3d0e341
MD5 a8bad9e5b7e39581f4b9cbc60317637d
BLAKE2b-256 7c9e8ce82fe8ffbbccf4be35f3c102d9a1a140e7b2b308e6e99d9a772c584f05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 76ae34e8bd4514091678b630f96068f8d18ea926437b3a6bfc10da5bfc711b70
MD5 d8803892c4a232f60f23fdb0bed26e5d
BLAKE2b-256 dfd274e20fcc27c47647623cbfd653782f99a488bd5cafccbda66e1e9df97aae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 ddf058c2adfaa54685a062f26a61315cdee009389c39f86e00a43d0c09600c80
MD5 9491d3aa6e6b9031acc0dab1b8db32b8
BLAKE2b-256 424dbf2e529731ffcff176cddb24f533abd247e4d0c8b62ba7f7cf867376b17e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a60c18d668d6333bc0b7c3291a478d6807bd4a3d9b3d0a72a560d6e65586ef1d
MD5 02b7c13e5e67049feace7854aceb8ff1
BLAKE2b-256 69bac5914e8d537b28629fada1a4a009df3877970326fdf068a1654daa3d758f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f4e8965e3d8ebf547b66cf371ca117bf2c91e7e7454a183c5d6befa8f05ab9f4
MD5 3f5f32922119f37ba3229aa3a54c6c00
BLAKE2b-256 b0730abb01d95735383071fd3f0bddad68b54566b5848db6cd64a3ee2218b357

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 367bb3feee1234c1faa84f1c5e76a180f823856af38bf5ca76d0a444715412d5
MD5 dad634a1caf56bbd305634956d292a53
BLAKE2b-256 3d595c62242952f458ca9c6a31f0290dfd8c7330e0e336e6edb56e24470e77ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f5f6b3ef30ec0403b656201366f1d8d4b147e6254898f42ed08acc420384d611
MD5 0dbef5aa182f7536fdf0737e62c309de
BLAKE2b-256 d01be868a0aceed6500c5e00dc5164cfc8304cf2a34d2c15ac778fd4cc45b49f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.14-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 14e874ba9c77f8742b7bca6ec456b36e3276c8fb8b2cea2cc9efd4030fbb37f6
MD5 bcace0745e761f2e2b7cd6b4bfbbfb44
BLAKE2b-256 c7f4e21e0cf3ece55baf3192c5166a313de4c32a483f0eea1722748a96a801e8

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