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

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

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

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.13-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.13.tar.gz.

File metadata

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

File hashes

Hashes for tlparse-0.3.13.tar.gz
Algorithm Hash digest
SHA256 2531351a0caa8e79d5f886613363e0c5d2657bd91800dd16118cbbd91ecafadd
MD5 3db69fc3126de7f2562fa1cf957d255f
BLAKE2b-256 4deac12037ca641d07f81c734e20b749aeb84f48e9a52d992270e952cb571578

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9a229d496340877f51f8cef8e937c5e35fe858fa90831fc9e79769faf7053bb4
MD5 91bb9c25ec8e681e6ab6c896ad4fed6d
BLAKE2b-256 513fdcf6e0d78d8f2fe005a10cfeb98bb1602a55c703d1968f293a9a48e1cda2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tlparse-0.3.13-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.13-py3-none-win32.whl
Algorithm Hash digest
SHA256 2c05656ac0de5be0e064e6bb3cce6cbb2d96636e2b9a11aac84718e78d55b189
MD5 f329f0a21b41b58bd6cedfd5dca1b831
BLAKE2b-256 fd75ec1d8cb21e845573b032f5b3253f0dd2af0fcb1dbcdb53b0ba587bcb4290

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8175a0a283967e96b5821f9cd91a0834516214e454c293edb77cb91e9fdaa4e1
MD5 b00e10296fbed6b42054cfa333d22fed
BLAKE2b-256 2980576f5369c103aee9728eab13eccb546e406785bbfbb3603a490332ab9596

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 0ec5c5c19e7f8fe39f3b84d4942438773d76cf87bbb1b9c503566769c362189a
MD5 48dbe89c030aa7bef55464c08b805a01
BLAKE2b-256 a682d174c3b6bcfe1d3e2a75580ba0049d1b46354a59ac86963deecaeb4f5781

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 0ab1b40d4817eef13e1caacceb64c6d816287576786b6a1ede5a003ad5fe6cd1
MD5 f068352c0ae4e2899ce06bcdc5a5f9c1
BLAKE2b-256 632c09afbfaf82af42bc70f2de3b7befac88c4843be1508477b472d4c5a8a987

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b413f7c6d64e3be702c90a938488e967851f834d03aba81626de945b7409a817
MD5 63af2d67c641b4facedc68bcc5ec24fc
BLAKE2b-256 1ca8cd7a99272447bd2583b05d8d20964a8c34c19f1cc677e56006c23830a834

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 e48143ebb123aa35ddae654a829de5b9b975f8022d33ad1ec72acc2983a83e06
MD5 8bbee7be98b00f8a46eef9c0a8ae9fcd
BLAKE2b-256 17288b6b1c2a64b8552544293d8922f379c9489b85e54b8259d717b7f6c87c84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b2bd533ae299a77ffb1133cb7e82c6836aae85814ccb152f5afb401d8bbec438
MD5 8c9b53cd3f716d05a629435078d4eb23
BLAKE2b-256 de6fc198a32cb6fb0f729b910023f82e93a82e8d391ded6e2897b338b8fa322e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e570ac74914649e7e35540c4e0ddd978bd9f3dacd4d87740e672ee710b9c56f5
MD5 a5d3c1b9c0aff4b0a4fada2f774e52ea
BLAKE2b-256 749c64daa4f0bb82592bc0792ecf38c198738de50a4a93735f1b213ffe8f540f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.13-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a258f3b15b3f45af002b6dc8acc747191f8c5373d97a8760ceda4b7bfa9b76d1
MD5 fbb7b062bad4c58b46cb0cbae5c4291a
BLAKE2b-256 7d3d343463bfc8aea49c8fb2166f1e951a6be8d66bea82f804a3194844212ffa

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