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.15.tar.gz
(30.4 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.15-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbd8af8cf493f264b21f202a9c14c88a6b688e63e9bed7f34ebad5ef6f0d2598 |
|
MD5 | e9814d58717b13905b2e935d54bf1a14 |
|
BLAKE2b-256 | f2ad25c846366fa924b794db33eb81b5791eacf8ddb948c0374333b662407692 |
Close
Hashes for tlparse-0.3.15-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b8265b41ae8138431ac2301fe83318acff5859c39e095654094fc7bf6c3991f |
|
MD5 | 7ba9b42b30051e097cacfe78793f81e7 |
|
BLAKE2b-256 | 3646049cd8086cce9b507dbb7a5d49fdedc1a514c2a847b78a37b34e782aca9c |
Close
Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00416c0ae1b10ccd6ecf3c2b54419e26e4db0417f97d73eea23f1cb1a3d2e061 |
|
MD5 | 3a5534ae80ac18860111ad2ddde5eb32 |
|
BLAKE2b-256 | 12534e5ccd4983046b00a30468f11807b1875d8b7f95da7bbb29b06e73d7fb3f |
Close
Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4511fcbd313131f4b1131133d5349889fe238b5eaf68aae1a1cf7dbbba810f40 |
|
MD5 | 125fc1e796924d22a6a6aa0791ec7ff1 |
|
BLAKE2b-256 | c547cbf7babed2d672e68766b76130e3dfe5c6c77a2c3f3425fe8e6b5f861b9d |
Close
Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 505d96b606167ee2baff5060452a19052d8dacf86afd3851b70a76885ac2d720 |
|
MD5 | 88277348d4f07253c559c37324a14d12 |
|
BLAKE2b-256 | c14f7d99c633bf46da3a10359e6daf9ec6c9157f6d7dd1f087f3d6e08967ed46 |
Close
Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c37de2042ed73a963db1ff8f860d71a0dc462e1c6e302413b79d53d655b2ed3 |
|
MD5 | 2207124ab0eeec485ac7e3efe54dcefc |
|
BLAKE2b-256 | f892658397368a8e49cd91d3b9588583b2ec368f912b4d69c3f1b2a08a836b26 |
Close
Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ac7ca548f462289b10197a0c308f4ce3647a07dcaa3e9beadc0e913d2567400 |
|
MD5 | 6a785b8555b50f2895892cd56a585866 |
|
BLAKE2b-256 | d43220b6a5e4453d99fc0ec7bb275107a83d33eb705854b7f60b8e6666acbf2f |
Close
Hashes for tlparse-0.3.15-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddde21c9e8a2a2166aa709465c158d98b72016dbd54bfa0bfe53e25a9fee66d2 |
|
MD5 | 216dd3904811201f59afb25a7625bbad |
|
BLAKE2b-256 | c926a67eb9c21dce115976a80b5112622a93d0411d130e64773963a22df2ca09 |
Close
Hashes for tlparse-0.3.15-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2c9e2b0db3384675516e7e5d43c3c943439529f7134ed2231eb63bee7cc3d34 |
|
MD5 | 2f19d196dedc4a9dc757e36904970541 |
|
BLAKE2b-256 | 8e8d2ff6322df3d061988f9b9bc1f4a8f4df0ec25ab9a917f492bd05b85b0427 |
Close
Hashes for tlparse-0.3.15-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b1c2e0e4413ecefe757b4bfe719ddc779c4e9ce4c89f90b1412fbe1cbbf0377 |
|
MD5 | 3b50bd899baa43e32b8ab8f0ee5aaf96 |
|
BLAKE2b-256 | 29e125b773450dfa019dcc673966a28e58ce8f0f617fbd54c29920831f6218cb |