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.16.tar.gz
(32.2 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.16-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ac46ea8a0fd581ee17d2a629aa9870783029c4af8e1d94e1736994000a56c79 |
|
MD5 | 04c4a8dc712969d0f75827062b33f0ca |
|
BLAKE2b-256 | c695a1a9365293718322f1e5babd428ec5824976b6e031e57443f50cf02eca6c |
Close
Hashes for tlparse-0.3.16-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58bbe363a917179efff11389eea29a68391378b106f451c1bc24a28726ab70ba |
|
MD5 | 45fe7c36e5eff1636465db680cef98cd |
|
BLAKE2b-256 | f992d4e6eed8408e709d2933893182496cb0bf251b5c90994d806745cbdd2af2 |
Close
Hashes for tlparse-0.3.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4827e653686bcbc01bef07f8c411155a85bb056bd2f48f38907a5413f74b75dc |
|
MD5 | 68e73aa42cc22d97faedb2bc56d19001 |
|
BLAKE2b-256 | 5ac143fb781b3c701aa41906da8f1e21bd770707728d01b9a937b549a4cff857 |
Close
Hashes for tlparse-0.3.16-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6009700a4288e58721643c4ccdb1f2482147e4ffb4998041a540d24212461a8e |
|
MD5 | 24a863b144d3fcb1b93a5611bf27cc8e |
|
BLAKE2b-256 | 7757d508c6554103ba672d0f97814ff6930eb655419f611d35c8aae73d1d6ec2 |
Close
Hashes for tlparse-0.3.16-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 762fa9519c28681386d46edc8555f7d2652e58e476a2ff130e9a420491bbb00f |
|
MD5 | 1c362684e25582a53d37393523dd3c83 |
|
BLAKE2b-256 | 3346296ba7066f751e3c01025530220d6d22efa3baf2f0f92f946843ca041ae3 |
Close
Hashes for tlparse-0.3.16-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2db390b5d74ce1a31348478ba56d21c56cb49176a48b201c3fd8d4a4ffce0e34 |
|
MD5 | 6bbd5e155e89fb306994cb48f742adcb |
|
BLAKE2b-256 | a234c45614a84d4e05fdf1ad6623fad60168739f9e3ab323c084cae816ae5b60 |
Close
Hashes for tlparse-0.3.16-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da522064ed1cd70a00b47f9e31dddfda4e3d0299a2e2088b3253925e4f772378 |
|
MD5 | 6b48d6074d709a7be2ee6f7013ff8128 |
|
BLAKE2b-256 | b37fec1207eb0f5d5093efab245b5d0a13413cc8e107526b77a992008f931f43 |
Close
Hashes for tlparse-0.3.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8211718f75f1e18c9e7691ebd691351f6dd01e0aeb65fe025f4bc2f5860ed54 |
|
MD5 | 2077d0dd0b9e9a727b3d8e6068dda9ab |
|
BLAKE2b-256 | ccc3bb1e6864c839ce08d1a350c7d2bf942af19e06aacce06ddb2a987cdfd2ab |
Close
Hashes for tlparse-0.3.16-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60428c937a382953e07a6b0eb44332a467fd06629bac5463a7c91248cf2b86ef |
|
MD5 | abf54bcfe57e8d0b650ad61857eb56a2 |
|
BLAKE2b-256 | 262cd25b6cf2d6b390ecf164ea9a4fce430e52bceb5b69f4a8218b5146cd538d |
Close
Hashes for tlparse-0.3.16-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c767bd6e2c7920747da097f56447680dc1f0d0be2189b426fd36b8a9a0b16be |
|
MD5 | 0a8579d17011bde2c78e131274466e07 |
|
BLAKE2b-256 | 5700eb381ad2704c0aecbe74483dba242f79051ef427e326c73e8e7a8a5cd5e0 |