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.20.tar.gz
(43.8 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.20-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c906268a69506384c85fa02a7a9f0e31b988faae6594d225fcbba27a554697f4 |
|
MD5 | 56a22960918a3388341466090db97b53 |
|
BLAKE2b-256 | 96074bdac21bbd73999f3346b4d8ba2c7d7c1e8a35aeedb8cb1ba0c8541978cd |
Close
Hashes for tlparse-0.3.20-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6da07d25646146a23188b97d02542d8b3c9fe5dbb09fce61dbf2c55706024b75 |
|
MD5 | f79135ad6fede470d622a2979990d07d |
|
BLAKE2b-256 | 99321296c688706f08cbe6bf7b991957d8f1c7cb1995cb6566bc2443a7219813 |
Close
Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 391209e96c746e9059d4621a1b77f17b2ff2b25d57bfdc19379b6d4c9acce38c |
|
MD5 | e9f81d1c0c15fd99ef93e0465066240c |
|
BLAKE2b-256 | 302ab97b0a5ad7c4320402f03d8c18ed480543aca8b4ea203d6cd8e28c61a24c |
Close
Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79f5eee44adb2f62257313e3ed9da55914419d0a6a786bd4de983444ef618a6d |
|
MD5 | 98c624070fcae8edfc95541ce78f6592 |
|
BLAKE2b-256 | 7775a525c58560fa854f20b361c7e5d16c013c303538515d60175d098c584b63 |
Close
Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c8f53c9e6857b2ad69df667895dc79727df573ecfe82e6c81615e34c30b9a77 |
|
MD5 | f6e258ed60a513004ed4a935b875f1e5 |
|
BLAKE2b-256 | 04b8d6790566237ddd6b10852aeea0254a809f6f12697ea858abd96e60aae6a6 |
Close
Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d68f7e0bda26697de02986e8ab899f05e96d27e5ac6175a8476e172df0181e2c |
|
MD5 | 63170373333938b7acbb72df35cf07ac |
|
BLAKE2b-256 | 09e63ef3fa9d5ed8137cdc0001a4a0ac57ea7e7cdfac8800271763274745c4dd |
Close
Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32b7467a770224ad84cb357c5bff3369011fcd969a9bca43986f82040e1fdf57 |
|
MD5 | e61d3e8844dc6e615a64a9b51d327deb |
|
BLAKE2b-256 | c34e0e7e2cb440d48fc5f099fefef5f025449425dbc82371d0bed8d67e9b55c0 |
Close
Hashes for tlparse-0.3.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d96964b0723f95cf4a0c876b6fbfe3fea53c8428723b0e57b5e412b7d721bb0 |
|
MD5 | 2e834ea19112a931619aab3d492ef181 |
|
BLAKE2b-256 | 03ecf1b870d491f19b2a5a0ac4c5a8ce9971048831ceddf9ef698cfab7eb0892 |
Close
Hashes for tlparse-0.3.20-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53d598a1d496f93276a6b029679330e4fe27ae02eb541450252e791884e4842b |
|
MD5 | a9bf37fb06b3df5db17a5906e2608223 |
|
BLAKE2b-256 | da210c6ab2c9e9fb4daa360ad2d80404f9c91b55edfe67eb527e2655cbc14fa2 |
Close
Hashes for tlparse-0.3.20-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62671347072687fa96126fac4d7e60ba70d955bdb5027d22d658861fac24f6c3 |
|
MD5 | aa792e654c77e9a450489862502b5871 |
|
BLAKE2b-256 | 55283146065a2f115f8529311f67a2d60de9a96da7644419b0bc9549ce0d9951 |