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

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

tlparse-0.3.21-py3-none-win32.whl (1.6 MB view details)

Uploaded Python 3 Windows x86

tlparse-0.3.21-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.21-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.21-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.21-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.21-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.21-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.21-py3-none-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.21-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.21.tar.gz.

File metadata

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

File hashes

Hashes for tlparse-0.3.21.tar.gz
Algorithm Hash digest
SHA256 840434fc2d4a3067069a79537ec0e9410be7486ca85c2b3963ad1d1254f7cb0d
MD5 5fd18b5a65c156003b33d012bcc55fe3
BLAKE2b-256 cc1aa457781bb48a1dae224803ccf1c74af0b3d56e25b728b752c5f8ec52c6a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 45b292df0ff5b213097a1d58603c6e9136d1a5e18f541efb94dd8362eaa1eb11
MD5 16407c588f074858a9e9b4ef52197523
BLAKE2b-256 c70e86867eeb526f463f880e82a2fdcda6da88447c31548a34b6796919392b5d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tlparse-0.3.21-py3-none-win32.whl
Algorithm Hash digest
SHA256 897505d42f8570cfc48e3a0e3ae1250b06d1e24327f136e14821d1d092f88fd6
MD5 18852cfc4b441dcf28244bbcb498c38e
BLAKE2b-256 080eec7ba6cc322ae23563af0e4ebe5499d19aae34525dc4d2b5c2f92de515d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aecb5e160e59160eeb86a38bfe54e772533989c02b9f474fee615d3b76d1b19d
MD5 fa948cfde2f69df76bfc47b8713b3111
BLAKE2b-256 4875adf9e3e9dda0cf0d7cd5a57d33661f0b5926ff74dd1ebead8ad4e666aeae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 88165c3386f228fbbd7b595b2e94356036ee8a42793e475db225b2a70beb3136
MD5 e143f4572e0f713ebe0a431e67b9cde2
BLAKE2b-256 37bf360dd9fc290524ebe4b4dd9b2af49869952382ed4c210bc25d811e2d04bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 4a9f8a6958280527f7b3ab2b4b03a1621f09f681e7e8e81367a9acebc3436a09
MD5 29ea39cc0ba5d83215b03b0cf2a96c36
BLAKE2b-256 b9bf0d4405ac67b899bb226a3784beff2fb029c16d947479018f87b14cdb765b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 fbe185ae586f2ab8420d44aa08eea461303f41f41d5625df6fc5b4b9c1e0a13e
MD5 873fc2a20977b1e40398cf542f5c4b0d
BLAKE2b-256 c3832306a789fd0818fbee2ddd54cc323b271f3ff30ca634b4d3c45a27136fb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 19982c8da59732f326dab62d68dd2157f0f88dbe25135526e0461e5a02f3f011
MD5 d846a9f11d4426f44541f0cfb8a0421f
BLAKE2b-256 35b5dfeb6fd19648ab67a0e07322064cf6a3661c259dcd8159b81058d01d3718

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6f4b2fbb511d7e6cd90147d7e0ba2198f698da4fad041a7809c32c44560dea78
MD5 1aa55e7ac0e34c162e7d7689fbf298fc
BLAKE2b-256 2e418aecc9f47b4596bb448a13e718d62faf681e28efedb78e20bd8d12ecde8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2871c29b28734ce1635d317601ff7adad3391e55cc76b9202d8f66d977376ad4
MD5 0f3fa2e540b4e42da3de68d4dc380241
BLAKE2b-256 892494c2eac4dc46bccd489a39b17c54f21d9d91560a50739971d202c80dce71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.21-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 826d0908bba1e6df28ff73a1a54576caed1b4f4b3972d3b2cd8243d9f1479cb0
MD5 199bc602adc39c11ed743e2279196346
BLAKE2b-256 d240917a0690b8e12b50a2a8650ceaaa71cffc5710f636856804349db45d6306

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