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.25.tar.gz
(49.6 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.25-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7df216d8a0772bb5ee96480e38ae76ab010662c36882e7fd63889280521981fa |
|
MD5 | a79649909b51ead3f3d33e748fa2889f |
|
BLAKE2b-256 | a0c2c0075376336ff7c1a81f32bd011181aea58506609dab766a445bbd4ee7ab |
Close
Hashes for tlparse-0.3.25-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b78b387b3353aa8f318deb5c59a0c5c687adf296cf131ce52d354bf29be5d38d |
|
MD5 | 34f57e50ebd7cad6a89ac4350223f93d |
|
BLAKE2b-256 | 09b38e4dcc25ff1758198814654f5c875daefcba1c9d826ae1268b9df4d62c0c |
Close
Hashes for tlparse-0.3.25-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4e5f77b70b77761edd187cca30f28e1e5c0908d3f193dc56ac853ae1dbfc7cb |
|
MD5 | 1f2a568d1c3b09f01df6d9d3f4850f03 |
|
BLAKE2b-256 | 845c53ff7be0c4ce05bf961f1ec0fa7f0e90f1cfbaf7e766bd5025d0b66da0cf |
Close
Hashes for tlparse-0.3.25-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90e8caab4c76bc5cf87e2e76ceb608c741315f90306ec4e371a349400f099aee |
|
MD5 | 866a62d7a2064738fca1e49f05e13c88 |
|
BLAKE2b-256 | 0fb252fe748246e175f33a98d74535615e3c6d4dd549725495a8a00ad912dd01 |
Close
Hashes for tlparse-0.3.25-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f666134ad88713f65ec8134a83b311401ee6fb306b8352c2230c685080b7e4a6 |
|
MD5 | 6fcb20f9386576f067d1688d54cc9b50 |
|
BLAKE2b-256 | 6d09a6d91a39a07f731dcc6177420ca954a21b6a9f50c48db29fe1dc76bc46c6 |
Close
Hashes for tlparse-0.3.25-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d469b4402dd69ecf9a607c540e361cac82d6ccc15962b78f53a099111a7b4d4 |
|
MD5 | b92d4e11e1a273f6e4fba5eab3afa29d |
|
BLAKE2b-256 | 612ff9ebee2837fa3cd04fc4357c36e0c652b5c9e0b55512e3b3e5463b89652b |
Close
Hashes for tlparse-0.3.25-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5d4c73bb7b0e21ab2429e7009cf92a977874faf7cb5df3cdaccd9bdbbf2c35d |
|
MD5 | 4e5800b3b5a9524409d91f262b21ec30 |
|
BLAKE2b-256 | 4b8ead1d1885ec4984ab629619d089570d948ab49dc78321678bb88c47a205ac |
Close
Hashes for tlparse-0.3.25-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b84aaf2af805547b41d47264587a9d80b63727f28e5ea9cfeb4612d0f26dd187 |
|
MD5 | b554948d0a9062db909798492a144c80 |
|
BLAKE2b-256 | 102f72da9cd298eae8e3ae109806a78f982c6b86079d79212b19979a7ccb6659 |
Close
Hashes for tlparse-0.3.25-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24627cd68192f55a4ac3b08d0c60c11fd092318b34462d03d862dc9cd281c2fb |
|
MD5 | 36becb7f7481422530ff533332a5293f |
|
BLAKE2b-256 | 854d08d5f5729a02b97452bb2568b4ee8436bbd2ee0aa5e84d7f30adc543fd85 |
Close
Hashes for tlparse-0.3.25-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0acde83f600455aa003c79f951b93f05520576ef94c18ee629a0e6ee13f07ce1 |
|
MD5 | 50ea311a7800875c39fe79f68720e78a |
|
BLAKE2b-256 | 32e8821c47f331d600fd8d56cf5e685b6b74c4c44043da5604527c8a27f82e2d |