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

Uploaded Source

Built Distributions

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

Uploaded Python 3 Windows x86-64

tlparse-0.3.26-py3-none-win32.whl (1.7 MB view details)

Uploaded Python 3 Windows x86

tlparse-0.3.26-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.26-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.26-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.26-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.26-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.26-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.26-py3-none-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

tlparse-0.3.26-py3-none-macosx_10_12_x86_64.whl (2.1 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

File details

Details for the file tlparse-0.3.26.tar.gz.

File metadata

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

File hashes

Hashes for tlparse-0.3.26.tar.gz
Algorithm Hash digest
SHA256 7ab8ede816d37bfc4d867402aae6faa9b59bfd12d049f65f346581bed1461994
MD5 b15062202712d6c2de17607252f7f6d2
BLAKE2b-256 35368647fa7431bc990b693de81a5a886b82aa81e8e043e9a16a3b0e5a2b3c8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4bec1e1136e86947eeacd32d0c1914af80c52ee87c56572fef44cb96c8a90ce7
MD5 2a96bdfe927e43f3ae4b84a44f602987
BLAKE2b-256 4a006a5e557343c7a32d227b2fb868aa2fb7e3ce8d08ac8ff590e41f3abdfcd5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tlparse-0.3.26-py3-none-win32.whl
Algorithm Hash digest
SHA256 aa360d772c2d23ca7cc3c499cb302d05e66b19018acd9e47896f562c0ae5aefd
MD5 f59b133dd7dd607591352ce7c8eac492
BLAKE2b-256 e24a565e1ffaa8a27abf6b7f078170cf1d5f35039ab73ea396da832ebd7ff34a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 111e5429108a1bc7922b9d70c5c1ed59da7061dc801ba8fb6b0b1b91e75b515f
MD5 f8ed116196559411707ad2e8e64aa58a
BLAKE2b-256 6ab6b42a1995c946d7ac1910cfcf539c7dfcfe0aedd9e3d41c532e582ded9eba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4d6ddec9aa40e02fee8c873440557f7822a91fa3f866c33f6396a60fb25c4bbc
MD5 e5743d0b3e7a15228c716ec405dbc67a
BLAKE2b-256 09e374af4d2c84c6ea2c241847906a8c2687692cae4a65c0035c7addb91a74d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 fae32d8f3879ab2e509ebe10937be56659b78d398b68807d9adb8e01c595ddce
MD5 6019d168cc07f44a3206785e1751ace4
BLAKE2b-256 55e3fa94ec879741a4b2c92d22da18a539e155eb0ad7981319d787ac233fd63b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 665442f5045fbbb6f1d439308a61185707b641b9c89338e03fd07e2b101d11cc
MD5 9f026f5135a0ee73e960426140cd5df5
BLAKE2b-256 44346330c1c36dd389b4124bd3adbf2d7e2994b08a9f7c75034fa1eda4109106

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 0ad036c24ffeb123015a8442435c1e59f38333ccd98e0e574d5ebc486d8b45ec
MD5 ad7eb50c8c5f6c9d61b2861d641450f1
BLAKE2b-256 51d1ecf5ea85ccfea95f8c0ad9d8ce8261590ac24a03d247343f47b602cbb4d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ba8a84dbc206ee28ecbd77ce46f51cc4e3e41a9f0010b016b14ae0687530df36
MD5 93a0ca3d388bea2d52949acb3669e207
BLAKE2b-256 3d5a7aef9bd64f7c2c26b95e0f44896e4da5acb602e0690e49f88c9f219bcffe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2cd1ecda87178d030b21ec86a11d341db77feb45a849514e2546e92716871047
MD5 a90192de7c888e84aa6bf6fda1681253
BLAKE2b-256 f0c50a6ac987e5728cad4e51221dfc8b41aadb0604644b6b5c914de7f0579c69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tlparse-0.3.26-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6d1c8bca299d25d0109be7441945a1555810cfc710df085cd97b442ffc066677
MD5 5e5bf498f3f3ca8e19bbaa266eaabc2f
BLAKE2b-256 dc3e8d30db5284af830adcd8d53ad20d7bf67c4d34f47061f0d9fe75e1bce161

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