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.21.tar.gz
(44.8 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.21-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b292df0ff5b213097a1d58603c6e9136d1a5e18f541efb94dd8362eaa1eb11 |
|
MD5 | 16407c588f074858a9e9b4ef52197523 |
|
BLAKE2b-256 | c70e86867eeb526f463f880e82a2fdcda6da88447c31548a34b6796919392b5d |
Close
Hashes for tlparse-0.3.21-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 897505d42f8570cfc48e3a0e3ae1250b06d1e24327f136e14821d1d092f88fd6 |
|
MD5 | 18852cfc4b441dcf28244bbcb498c38e |
|
BLAKE2b-256 | 080eec7ba6cc322ae23563af0e4ebe5499d19aae34525dc4d2b5c2f92de515d0 |
Close
Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aecb5e160e59160eeb86a38bfe54e772533989c02b9f474fee615d3b76d1b19d |
|
MD5 | fa948cfde2f69df76bfc47b8713b3111 |
|
BLAKE2b-256 | 4875adf9e3e9dda0cf0d7cd5a57d33661f0b5926ff74dd1ebead8ad4e666aeae |
Close
Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88165c3386f228fbbd7b595b2e94356036ee8a42793e475db225b2a70beb3136 |
|
MD5 | e143f4572e0f713ebe0a431e67b9cde2 |
|
BLAKE2b-256 | 37bf360dd9fc290524ebe4b4dd9b2af49869952382ed4c210bc25d811e2d04bb |
Close
Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a9f8a6958280527f7b3ab2b4b03a1621f09f681e7e8e81367a9acebc3436a09 |
|
MD5 | 29ea39cc0ba5d83215b03b0cf2a96c36 |
|
BLAKE2b-256 | b9bf0d4405ac67b899bb226a3784beff2fb029c16d947479018f87b14cdb765b |
Close
Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbe185ae586f2ab8420d44aa08eea461303f41f41d5625df6fc5b4b9c1e0a13e |
|
MD5 | 873fc2a20977b1e40398cf542f5c4b0d |
|
BLAKE2b-256 | c3832306a789fd0818fbee2ddd54cc323b271f3ff30ca634b4d3c45a27136fb9 |
Close
Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19982c8da59732f326dab62d68dd2157f0f88dbe25135526e0461e5a02f3f011 |
|
MD5 | d846a9f11d4426f44541f0cfb8a0421f |
|
BLAKE2b-256 | 35b5dfeb6fd19648ab67a0e07322064cf6a3661c259dcd8159b81058d01d3718 |
Close
Hashes for tlparse-0.3.21-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f4b2fbb511d7e6cd90147d7e0ba2198f698da4fad041a7809c32c44560dea78 |
|
MD5 | 1aa55e7ac0e34c162e7d7689fbf298fc |
|
BLAKE2b-256 | 2e418aecc9f47b4596bb448a13e718d62faf681e28efedb78e20bd8d12ecde8e |
Close
Hashes for tlparse-0.3.21-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2871c29b28734ce1635d317601ff7adad3391e55cc76b9202d8f66d977376ad4 |
|
MD5 | 0f3fa2e540b4e42da3de68d4dc380241 |
|
BLAKE2b-256 | 892494c2eac4dc46bccd489a39b17c54f21d9d91560a50739971d202c80dce71 |
Close
Hashes for tlparse-0.3.21-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 826d0908bba1e6df28ff73a1a54576caed1b4f4b3972d3b2cd8243d9f1479cb0 |
|
MD5 | 199bc602adc39c11ed743e2279196346 |
|
BLAKE2b-256 | d240917a0690b8e12b50a2a8650ceaaa71cffc5710f636856804349db45d6306 |