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
Release history Release notifications | RSS feed
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.24.tar.gz
(793.4 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.24-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82a714d57962e92b13b40d189eeb382acc0f7c3d00c0d1e24f384c7d0167f308 |
|
MD5 | 7dfc6e5f32717cebfe7167e9c98f0186 |
|
BLAKE2b-256 | b4d8bb4adea56106013bf2f3544081bbe5f4adc7d716db37da1db364b3d6356b |
Close
Hashes for tlparse-0.3.24-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 053dd3f1b4f2769d1e7768d1e23c5c3a28426a857eb29f2dc853d74e61399e0a |
|
MD5 | e5d23ee6f49f2fd48db5d862043e1b1f |
|
BLAKE2b-256 | 36f7f4da095821a6312c0cdbe5079c541f2abb0d7ecc3e373de862626d4a3e21 |
Close
Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fc7cf324d65355a670849168b204e6c16ebb7962620552dcc79db93031d4150 |
|
MD5 | d95f44594a93fdb3ea3937bb312e8d3a |
|
BLAKE2b-256 | 5b68ce209f8c2a613c1551041ecf4fabe05893d3928a976ab270c9cfeb7ad99c |
Close
Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3108c615dbe6a77e64d803dfa3c912e92dc104c616c3266320b5046bfb560fb5 |
|
MD5 | e3c6833c8177cbfd4528d3c430e35314 |
|
BLAKE2b-256 | 5ad3c6f31d77a974634ebff41b3d65cfc760e1efe8e81055de8f7ee4f527d87f |
Close
Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9af0469501342fb694c528c683825d90f8b17336b98e4265eb9ad96e3ba4adc4 |
|
MD5 | 7e09cc32c7163dd494159e1f2f2eb0f9 |
|
BLAKE2b-256 | 389308d43c8560bcfeef8fc9308b152eaf7eb31df25f3a0aef66fc293c848ebf |
Close
Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1272d2780a15e058cb8b982cc5cdfab4b56fd8c7a14bc250a77603d89c9d67cb |
|
MD5 | 19941b41776253af3ac6b9625cb8c4eb |
|
BLAKE2b-256 | 4b3014b11c56da4fa399a25163736f9ef41cb36ab41fa6253f3aed978eb537d5 |
Close
Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b0ede8cc37ce0b2486d69716527f49791a1a6462c317cf4c12b87920ab219b8 |
|
MD5 | accdcc8f961ba74ea424f7793a05d791 |
|
BLAKE2b-256 | a0e22ff7d86bb962b363123587a3b7590f359c30faf41e575795606a83007160 |
Close
Hashes for tlparse-0.3.24-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c59dc8abbfbb26da8b6ea1abcfcb03493a8764672c84749246b34dc92cc2735 |
|
MD5 | 14590b42e0d89c2d8da44da3ee59c3b1 |
|
BLAKE2b-256 | c5510911e5d2879dd7cd2c74e7bc2a34100771fc294bda820e3766ac0edd9d82 |
Close
Hashes for tlparse-0.3.24-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d89cf9c44c168202d4c2cadc71c05adbbdacfe39588db9dabd1a643fabbd751 |
|
MD5 | 59df71ded68615f7aeaacb85a2e3ba67 |
|
BLAKE2b-256 | d503f5e796a919ed5e3926a5d9b396d6c6bc9653b16ed42ee35446aedb09ee2c |
Close
Hashes for tlparse-0.3.24-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f89fec691ee37ab707273f54c301f4505ad415c60c91c75ab36cfb0c3851ce8c |
|
MD5 | 87c8cd090978df3966fc30404e0b4dd7 |
|
BLAKE2b-256 | 026faeaa66b9010f472dd63e16c252d29d6206369089b1b0ac950004499735e7 |