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

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3 Windows x86

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

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.18-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.18.tar.gz.

File metadata

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

File hashes

Hashes for tlparse-0.3.18.tar.gz
Algorithm Hash digest
SHA256 e94335ca4687d0dea21bcb001e7d4452866491fdad30383889b87efd15116c79
MD5 be453aeb64411d563d8fa08cc7e336e9
BLAKE2b-256 d99c8fd42102edd8d9ea75549bfaf6c4107d905017c2319f83eac007dbe78b05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 84d01e28c9b510cfcddbfdbe613a4aa92b10a65a7a9eada8029ee9e45e3b9b53
MD5 39060e35f35c2a7cf2047012ab1c4e03
BLAKE2b-256 40fdbdd7909f35a711db60794d0da070ef59b5fde76ecdeb4b716cc1e3afc830

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tlparse-0.3.18-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.18-py3-none-win32.whl
Algorithm Hash digest
SHA256 d91914335e4618db8275e4c66e6ebc433224a5b2aef94e9b5928bb86e6c78e15
MD5 40f8390d525b07c2a111fa43561fcae0
BLAKE2b-256 648d70d50e355002d5065badb097fac86d673a8592d4b3076ccf836088177751

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a1cc1b7c23519d713e07b1e0ff3f824793e917143ade66802877ed1beaff3768
MD5 4424804bfe8472cb4175e510d43bc3ba
BLAKE2b-256 0a3a6d3ea1901586626e9a495a29775301d04b60423d6f0ef4d37a3203a6b7a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 224f831dc1d03a5dd7f9250c773e8db181002df1f561d95d1acf714d4f8b2539
MD5 7e9b1903f3bc5a775d58c8546eb8c1eb
BLAKE2b-256 fedc72d19f229a8c5b6da553f8c52f95810f8985d675e60ce12271229016e7c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 4b287c088491c1572a683b9bea17a321adcdc6f0a092b5987443dd9c663653ce
MD5 f9a71d46fb0185f47c491f16e9d89962
BLAKE2b-256 e5023d75856ec22aa398bfb1ee318c2584c385df1b8b7f9e1109e0e8667a398a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8abd47b0f48a2d537f6870f0a804495164cf10c7099815f0e47b85dac1298f4e
MD5 f43314b8a06ab984b91b8a23d07177cd
BLAKE2b-256 52c29fcc4d2d0edaaf67d1cbc7a080046464655d60d352c8a4d4afe7b2d9a9e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 37b6d25a6b841141d45ec91ad9bc2df41d69094a1467498658c9f5eddf4f0eb8
MD5 3b8469c1ecf289fd6e548c6f7b0b93ea
BLAKE2b-256 02229fd34013552e78adad1f3712fc985d5521f1deadc1aad92618e85a3ccc04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1a6978c01a9fd4288d0c3561b60aa232c2f16a32fb240dcde23320628bb922b3
MD5 9a5ac88311d755ff65b029316ced5c28
BLAKE2b-256 f2aaea98f7e66394a9c3ab39798f36cbabda792a0cc49ec01b723f6c90c041ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 574055151301b81e8f05957190ad2621304ce13292b77f2a79e2c6fdf5e53ffe
MD5 519f04e2338552e8aefee2335472d73b
BLAKE2b-256 9250fceb10b8dbf7cc7cffd7c380ef6e3646d9f3265cd6c7966775062d70dc8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.18-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fa1b225f74bd850464fcb4091502ecd9db5e9594deffd53ebfe064fdd72eacbf
MD5 16b93b15aa67225a52b86fe29fd16ca0
BLAKE2b-256 661882af283b298689366a6cd749c5e98797c1f22fb5fcea7c8978e30ecf1efd

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