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

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

tlparse-0.3.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

tlparse-0.3.17-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.17-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.17-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.17-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

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

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.17-py3-none-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tlparse-0.3.17.tar.gz
Algorithm Hash digest
SHA256 1112172f763a9750f982b4bb7089380d9d3ebadc38d94db81f9735e2db0a48de
MD5 73cd914451492fdfda2b7a49a27e3178
BLAKE2b-256 ce32c6ef3030aee5a19f48c103a8a1f9d83546a5bd64cd0157031abc3603aec1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a24c5baac638e8c745928e8b94cad6258bb70f4c5b2da329a13e14e9b6a2a5e2
MD5 3454d06f40e45946e787528542553242
BLAKE2b-256 d20ac04351588d0f40481a7e8b1c6d7dae638dc82dc6d765fea83cfbf00c5ae2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tlparse-0.3.17-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.17-py3-none-win32.whl
Algorithm Hash digest
SHA256 0ec18022bbbbddcb8424dacb1732e8d865bd0e47f93153816ce4fd413aab05ef
MD5 8dfd86cf6ddf0ea611d19c48d671487d
BLAKE2b-256 2c43c8ddc10a057180717f38addeb78d198bafd8004768189aa626947023739c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32d0cf51d8c99add9791286b6316aa424e1af29459f220a6dd6f85f57baa489b
MD5 1acc8fe002a93d968ca5c5ed52d9fa96
BLAKE2b-256 c759e477378e65212b5d22b292395c223ed56a9d4b9f6844b6a131a93d428445

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 edc84ef7b852a68c8e5245d3a7f892b3eb21fd57011d883fec7266007e9974b4
MD5 690a880f2d4b4097278a06336160dd14
BLAKE2b-256 3a8c29179173872a7ea8b5e5043b8debaf7a4c0a824e45f863e23f087f34f259

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 f1e8feab0fb3025fea1fec1f385d48b956c327ea395cbc9193846be5e59d1abd
MD5 da2692c287c99c15a6b1d50acfb42ff8
BLAKE2b-256 71fc6e42a8bd524f87b66d9ac3581ee403f839a5f26ced69f0c7e1d1340e09e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 dd35e57b77903b9a9c9570cbbca0f0e5ea6b8c2ca09a3c4e092236fec367ff8a
MD5 44f45f6e27e33408fd6f8cd7b0d823d1
BLAKE2b-256 af064f81bb2574d216f32750e600c3c4757e1bbc36e35883ec3115a699727562

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9629d9500d76eb0c4d3408a11324e9c51c378f961dd0807240330c19648ea8dd
MD5 c1ca37e1ba5305123dcb38e726b11bd7
BLAKE2b-256 9d74bddd98399fd79d216a473962f28aa5b74e54e200358726d4d7f3e258dfb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1cdfbd876b8c7f9ebdd93cdaae71d3121107259f6f2023f210f3c96d225adf2f
MD5 c436ea754a0d0758705caa7cd2f30c1b
BLAKE2b-256 0c9716085333aa9310e6faedd7ec429bd736b121d0b697902ddf4ef652f88de2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6a6b3843048ca536b5f977010257e1466d4e85fc3ea8b651d9d1317dc7eca53
MD5 016584d216adac619bd72ef4172fef30
BLAKE2b-256 b9cbe7fe2abb8382fc621a7ec6dad66b4f507ec72d15b6bcc45ee946e037caac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.17-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fecce5fea7687302b3787d4853c1731624f7a85f328bc4daa4e788be51e02750
MD5 8307adbf51bf69466085e9b03ac3a3b5
BLAKE2b-256 d6575bc9e9d842bd6ae2312d11100c724f491fb4abd8cfd33bef3a063600f4ef

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