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

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

tlparse-0.3.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

tlparse-0.3.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ s390x

tlparse-0.3.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.0 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

tlparse-0.3.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (3.0 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

tlparse-0.3.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

tlparse-0.3.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

tlparse-0.3.20-py3-none-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.20-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.20.tar.gz.

File metadata

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

File hashes

Hashes for tlparse-0.3.20.tar.gz
Algorithm Hash digest
SHA256 0865f40b17882bb6c602ee8dce40ad88a9b2d8c2947d5d4f11cc51e8ff5eafe0
MD5 4a8b5953f3de83439dc6d5d3813547b4
BLAKE2b-256 da2470464ca95f89d7fc05150ccb128ce456ba662f4f05f7cc0888ad68d09c96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c906268a69506384c85fa02a7a9f0e31b988faae6594d225fcbba27a554697f4
MD5 56a22960918a3388341466090db97b53
BLAKE2b-256 96074bdac21bbd73999f3346b4d8ba2c7d7c1e8a35aeedb8cb1ba0c8541978cd

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tlparse-0.3.20-py3-none-win32.whl
Algorithm Hash digest
SHA256 6da07d25646146a23188b97d02542d8b3c9fe5dbb09fce61dbf2c55706024b75
MD5 f79135ad6fede470d622a2979990d07d
BLAKE2b-256 99321296c688706f08cbe6bf7b991957d8f1c7cb1995cb6566bc2443a7219813

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 391209e96c746e9059d4621a1b77f17b2ff2b25d57bfdc19379b6d4c9acce38c
MD5 e9f81d1c0c15fd99ef93e0465066240c
BLAKE2b-256 302ab97b0a5ad7c4320402f03d8c18ed480543aca8b4ea203d6cd8e28c61a24c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 79f5eee44adb2f62257313e3ed9da55914419d0a6a786bd4de983444ef618a6d
MD5 98c624070fcae8edfc95541ce78f6592
BLAKE2b-256 7775a525c58560fa854f20b361c7e5d16c013c303538515d60175d098c584b63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 1c8f53c9e6857b2ad69df667895dc79727df573ecfe82e6c81615e34c30b9a77
MD5 f6e258ed60a513004ed4a935b875f1e5
BLAKE2b-256 04b8d6790566237ddd6b10852aeea0254a809f6f12697ea858abd96e60aae6a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d68f7e0bda26697de02986e8ab899f05e96d27e5ac6175a8476e172df0181e2c
MD5 63170373333938b7acbb72df35cf07ac
BLAKE2b-256 09e63ef3fa9d5ed8137cdc0001a4a0ac57ea7e7cdfac8800271763274745c4dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 32b7467a770224ad84cb357c5bff3369011fcd969a9bca43986f82040e1fdf57
MD5 e61d3e8844dc6e615a64a9b51d327deb
BLAKE2b-256 c34e0e7e2cb440d48fc5f099fefef5f025449425dbc82371d0bed8d67e9b55c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8d96964b0723f95cf4a0c876b6fbfe3fea53c8428723b0e57b5e412b7d721bb0
MD5 2e834ea19112a931619aab3d492ef181
BLAKE2b-256 03ecf1b870d491f19b2a5a0ac4c5a8ce9971048831ceddf9ef698cfab7eb0892

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53d598a1d496f93276a6b029679330e4fe27ae02eb541450252e791884e4842b
MD5 a9bf37fb06b3df5db17a5906e2608223
BLAKE2b-256 da210c6ab2c9e9fb4daa360ad2d80404f9c91b55edfe67eb527e2655cbc14fa2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.20-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 62671347072687fa96126fac4d7e60ba70d955bdb5027d22d658861fac24f6c3
MD5 aa792e654c77e9a450489862502b5871
BLAKE2b-256 55283146065a2f115f8529311f67a2d60de9a96da7644419b0bc9549ce0d9951

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