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.19.tar.gz
(37.4 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.19-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d828eacad87a1e876745c65b348af4111a9b4323bd59d1bb6de3caf4f9a33c9 |
|
MD5 | 20367dfff0dd945b5e3c3744afe2e5ca |
|
BLAKE2b-256 | 77519ac7ada88f543286e77a935694c399c3c75410bbd5d7d239c420623e0442 |
Close
Hashes for tlparse-0.3.19-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60e9a164001d306febbc77ddbc26a9d1bd4809e8fd6e5b61fef3cc9807af7018 |
|
MD5 | 43de947ff076b9ef5b5edc5508ec824a |
|
BLAKE2b-256 | c7427abf916fead464906b91a5cbd58a7583565bf1c015c614b69320c66aa620 |
Close
Hashes for tlparse-0.3.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb4c43f1e9c315f2b95766e3b4969807ddf0904fa6440b5c23c0e012a91c95c |
|
MD5 | a3b5643c66f05de01031b6a45a53d1e1 |
|
BLAKE2b-256 | bc62c98ff36f182e587a0fd9243e0fd87135a4e159e247ba18e18cbe26c9b479 |
Close
Hashes for tlparse-0.3.19-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9d2e1f647f7c1c283b5dbf7e25f88516acf7c0ae68ebba3e53374fea76eb458 |
|
MD5 | c94d3fe3eb316d1ed9b013414b4b91f4 |
|
BLAKE2b-256 | 4eab33b626928f3ea1b9260b36533c0d1d802d68814883529e1dc84e1d36f743 |
Close
Hashes for tlparse-0.3.19-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44650e408731837bb7deb2f2dc8a5447daddacaccdaaa80dda97195de82a5320 |
|
MD5 | 92c6d1fbe9515d8e8bc406a56fc064b7 |
|
BLAKE2b-256 | 4da5476b45dcd054f0dc1f96a2bbcd21c511cdbdb0180718536bbd8b370b618f |
Close
Hashes for tlparse-0.3.19-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9db79c525f4000c3227181dde98af2d8a39310e662b1afe52db5d8a6b82555 |
|
MD5 | 2ea7dfe5408ad1c2ca407b933053f282 |
|
BLAKE2b-256 | 23e9ff3343ad470d9d28b636c32aa82d7f71285b6a5466578ca823018252cf67 |
Close
Hashes for tlparse-0.3.19-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87d9ecdd1d5ead2791c839866028dbd48413c64d5bf31c8aad5950b28a21d26 |
|
MD5 | 8f6659b4fdeeab99cd37bc5b22fe483c |
|
BLAKE2b-256 | 7f8c84ebccd23123bc55ad963fb3861bf2fe636590c4ea6c98d2877b89732678 |
Close
Hashes for tlparse-0.3.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b9516a28dfca8db631a8bf3080027ef61b7a5caec6eb7adc7267300aebfccd8 |
|
MD5 | 2551117ea2413dc295241b4f09e4bad6 |
|
BLAKE2b-256 | c03fb8a40537a934b75fb29940e5290c3f1057e010744adc3ddf95a672384c6a |
Close
Hashes for tlparse-0.3.19-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63fe0998da3d964aee7e7c30a67eb3233d6bb9c797ed74d1188176f76dfaf6d2 |
|
MD5 | 3ddb2e1b633d6be4e10a97a17900d9b8 |
|
BLAKE2b-256 | 91f4e0cae364620936fc25af903fbafa1dd3268c3eeec9bc7e781bd948121621 |
Close
Hashes for tlparse-0.3.19-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8328b51fd05ba96f15957e19827cd07856d6087c110435829df1e2191a53f90 |
|
MD5 | fa4919e50cd825d2833597855b13cb25 |
|
BLAKE2b-256 | a5652713b5b8df7f0ae3a7a79415bb2170f049fa894c6f857520ed0d8ab7b7bf |