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.23.tar.gz
(46.4 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.23-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6608a64593017a087f491c4f0032a3680975101ef6f23407e78730f2315dd52c |
|
MD5 | 40b4dcd0d7fed19ff6d62f24cca0b24f |
|
BLAKE2b-256 | 4f95d711820d8917c00bce9e919fddf8816bee0dc39e6dcf7224d5782e750e74 |
Close
Hashes for tlparse-0.3.23-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f3870e1baed88b5a836c3bfd503d52bedce53822812c19a43583ffc0b76eb0b |
|
MD5 | 2656be9d7df35e5524f22470e5db5def |
|
BLAKE2b-256 | b58808f9076c4c53175f74c64eafa36213c4d4c2153f875834bb0ec2d2c6d6a6 |
Close
Hashes for tlparse-0.3.23-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91f5e93a7e6323fc656a9ee1654eee657d2e23d0a9d2eb3f923ae04b443b78e6 |
|
MD5 | 31bd6a280a42fd525c9161e4635e6dd3 |
|
BLAKE2b-256 | 4cb7db7529d7febf520c1ecbe010540b9ec935174af29af0639da9b3dea1857f |
Close
Hashes for tlparse-0.3.23-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67f6a87220e2722b5e18c8e201b7e5af4009d16cd6934f0dfe7acb905168d82 |
|
MD5 | b9f10a82713842ef08aeec0c7b48de64 |
|
BLAKE2b-256 | ecfaa7534524e26c5d0a5d34d45b3c15b95a7ced3ffe3fb9d94dbe015d8a2f70 |
Close
Hashes for tlparse-0.3.23-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8df31247415b250025935a188cf5cdba11fe543f94ee5880b6d0666fbde7bad5 |
|
MD5 | bae7b2550fcf5b6303c9e3ab37155438 |
|
BLAKE2b-256 | bb8d1fad26cf81a72d6f40a5e6352027f0ca95bfd1abe9aad87fc09dee7aa1f3 |
Close
Hashes for tlparse-0.3.23-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a97c1613d57b5c9939b7e9e2c8947623dbea5cde0b0b83d2321483bb59958a3f |
|
MD5 | 96fffd96621309f6de992793f7d2d20f |
|
BLAKE2b-256 | a288712adbf2df4f58980276db11852759c4b2b04b0182d25d3272047ff2b49b |
Close
Hashes for tlparse-0.3.23-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 619ae15a2e8975262c6d822eeb4fee30e0df486b27873e69151c46864366361b |
|
MD5 | c4ef25891994068015d09fd88e42e31e |
|
BLAKE2b-256 | f4f990f0a6eaee7f5542bedf11cf387ea9aab0906573f39fd1a1c6d5fd5e996f |
Close
Hashes for tlparse-0.3.23-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 779066afd1923a5819694830f636b43ed20c8fc05f9b452779e58bbb9cd73664 |
|
MD5 | 1b87232b24dc3568b0e410ca27eff368 |
|
BLAKE2b-256 | 99be16ac50a40060a8dfad06b3a81bb3f4adfcc0122bbf68535d0257434a2a1b |
Close
Hashes for tlparse-0.3.23-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23f42f6b7933f9003f82f1984408641de98be9e250977849022da1e7d539bd29 |
|
MD5 | e0f83bf676cd73d868e6b8fb3eb27cd6 |
|
BLAKE2b-256 | 5bfa315fac9ae38998925aaba01a8cfe5935287d9175627e0bf748385a358d50 |
Close
Hashes for tlparse-0.3.23-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 437ef370a8c51e620052a645b5b93293c075e2b31cc6b63bfa03f10e481326b6 |
|
MD5 | 5248e809e45c6ad95449d136643c18b6 |
|
BLAKE2b-256 | 8e338c82aae0ec56fa9776861670867dee4e9ce507fe4792b115298fc22889bd |