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<ParseOutput> {
// Use the metadata and payload however you'd like
}
}
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.17.tar.gz
(32.1 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.17-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a24c5baac638e8c745928e8b94cad6258bb70f4c5b2da329a13e14e9b6a2a5e2 |
|
MD5 | 3454d06f40e45946e787528542553242 |
|
BLAKE2b-256 | d20ac04351588d0f40481a7e8b1c6d7dae638dc82dc6d765fea83cfbf00c5ae2 |
Close
Hashes for tlparse-0.3.17-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ec18022bbbbddcb8424dacb1732e8d865bd0e47f93153816ce4fd413aab05ef |
|
MD5 | 8dfd86cf6ddf0ea611d19c48d671487d |
|
BLAKE2b-256 | 2c43c8ddc10a057180717f38addeb78d198bafd8004768189aa626947023739c |
Close
Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d0cf51d8c99add9791286b6316aa424e1af29459f220a6dd6f85f57baa489b |
|
MD5 | 1acc8fe002a93d968ca5c5ed52d9fa96 |
|
BLAKE2b-256 | c759e477378e65212b5d22b292395c223ed56a9d4b9f6844b6a131a93d428445 |
Close
Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edc84ef7b852a68c8e5245d3a7f892b3eb21fd57011d883fec7266007e9974b4 |
|
MD5 | 690a880f2d4b4097278a06336160dd14 |
|
BLAKE2b-256 | 3a8c29179173872a7ea8b5e5043b8debaf7a4c0a824e45f863e23f087f34f259 |
Close
Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1e8feab0fb3025fea1fec1f385d48b956c327ea395cbc9193846be5e59d1abd |
|
MD5 | da2692c287c99c15a6b1d50acfb42ff8 |
|
BLAKE2b-256 | 71fc6e42a8bd524f87b66d9ac3581ee403f839a5f26ced69f0c7e1d1340e09e5 |
Close
Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd35e57b77903b9a9c9570cbbca0f0e5ea6b8c2ca09a3c4e092236fec367ff8a |
|
MD5 | 44f45f6e27e33408fd6f8cd7b0d823d1 |
|
BLAKE2b-256 | af064f81bb2574d216f32750e600c3c4757e1bbc36e35883ec3115a699727562 |
Close
Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9629d9500d76eb0c4d3408a11324e9c51c378f961dd0807240330c19648ea8dd |
|
MD5 | c1ca37e1ba5305123dcb38e726b11bd7 |
|
BLAKE2b-256 | 9d74bddd98399fd79d216a473962f28aa5b74e54e200358726d4d7f3e258dfb5 |
Close
Hashes for tlparse-0.3.17-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cdfbd876b8c7f9ebdd93cdaae71d3121107259f6f2023f210f3c96d225adf2f |
|
MD5 | c436ea754a0d0758705caa7cd2f30c1b |
|
BLAKE2b-256 | 0c9716085333aa9310e6faedd7ec429bd736b121d0b697902ddf4ef652f88de2 |
Close
Hashes for tlparse-0.3.17-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6a6b3843048ca536b5f977010257e1466d4e85fc3ea8b651d9d1317dc7eca53 |
|
MD5 | 016584d216adac619bd72ef4172fef30 |
|
BLAKE2b-256 | b9cbe7fe2abb8382fc621a7ec6dad66b4f507ec72d15b6bcc45ee946e037caac |
Close
Hashes for tlparse-0.3.17-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fecce5fea7687302b3787d4853c1731624f7a85f328bc4daa4e788be51e02750 |
|
MD5 | 8307adbf51bf69466085e9b03ac3a3b5 |
|
BLAKE2b-256 | d6575bc9e9d842bd6ae2312d11100c724f491fb4abd8cfd33bef3a063600f4ef |