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

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

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

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.15-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.15.tar.gz.

File metadata

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

File hashes

Hashes for tlparse-0.3.15.tar.gz
Algorithm Hash digest
SHA256 db1612b9865ad36e14c0d89c1e031d16c515b9e1d3224bb28220aa124e8eb97b
MD5 132ed6fd29517517a63d6b4d5c9b5226
BLAKE2b-256 684ab7eb25f06b3a25f27e094b774d64f89535bcd887d30bb092084ca089051c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 bbd8af8cf493f264b21f202a9c14c88a6b688e63e9bed7f34ebad5ef6f0d2598
MD5 e9814d58717b13905b2e935d54bf1a14
BLAKE2b-256 f2ad25c846366fa924b794db33eb81b5791eacf8ddb948c0374333b662407692

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tlparse-0.3.15-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.15-py3-none-win32.whl
Algorithm Hash digest
SHA256 0b8265b41ae8138431ac2301fe83318acff5859c39e095654094fc7bf6c3991f
MD5 7ba9b42b30051e097cacfe78793f81e7
BLAKE2b-256 3646049cd8086cce9b507dbb7a5d49fdedc1a514c2a847b78a37b34e782aca9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00416c0ae1b10ccd6ecf3c2b54419e26e4db0417f97d73eea23f1cb1a3d2e061
MD5 3a5534ae80ac18860111ad2ddde5eb32
BLAKE2b-256 12534e5ccd4983046b00a30468f11807b1875d8b7f95da7bbb29b06e73d7fb3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4511fcbd313131f4b1131133d5349889fe238b5eaf68aae1a1cf7dbbba810f40
MD5 125fc1e796924d22a6a6aa0791ec7ff1
BLAKE2b-256 c547cbf7babed2d672e68766b76130e3dfe5c6c77a2c3f3425fe8e6b5f861b9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 505d96b606167ee2baff5060452a19052d8dacf86afd3851b70a76885ac2d720
MD5 88277348d4f07253c559c37324a14d12
BLAKE2b-256 c14f7d99c633bf46da3a10359e6daf9ec6c9157f6d7dd1f087f3d6e08967ed46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 0c37de2042ed73a963db1ff8f860d71a0dc462e1c6e302413b79d53d655b2ed3
MD5 2207124ab0eeec485ac7e3efe54dcefc
BLAKE2b-256 f892658397368a8e49cd91d3b9588583b2ec368f912b4d69c3f1b2a08a836b26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8ac7ca548f462289b10197a0c308f4ce3647a07dcaa3e9beadc0e913d2567400
MD5 6a785b8555b50f2895892cd56a585866
BLAKE2b-256 d43220b6a5e4453d99fc0ec7bb275107a83d33eb705854b7f60b8e6666acbf2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ddde21c9e8a2a2166aa709465c158d98b72016dbd54bfa0bfe53e25a9fee66d2
MD5 216dd3904811201f59afb25a7625bbad
BLAKE2b-256 c926a67eb9c21dce115976a80b5112622a93d0411d130e64773963a22df2ca09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c2c9e2b0db3384675516e7e5d43c3c943439529f7134ed2231eb63bee7cc3d34
MD5 2f19d196dedc4a9dc757e36904970541
BLAKE2b-256 8e8d2ff6322df3d061988f9b9bc1f4a8f4df0ec25ab9a917f492bd05b85b0427

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.15-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0b1c2e0e4413ecefe757b4bfe719ddc779c4e9ce4c89f90b1412fbe1cbbf0377
MD5 3b50bd899baa43e32b8ab8f0ee5aaf96
BLAKE2b-256 29e125b773450dfa019dcc673966a28e58ce8f0f617fbd54c29920831f6218cb

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