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
Built Distributions
File details
Details for the file tlparse-0.3.19.tar.gz
.
File metadata
- Download URL: tlparse-0.3.19.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ea4962b2a5d03ccc4a9f51c6ae05ce7a5cbf087de49796c743858ca8223c8ea |
|
MD5 | 0da86c35a4f7ca898cfe964e3539b7e7 |
|
BLAKE2b-256 | e978ab6b35c05e8946d229a01b04368b9788934f7b4c529ee33273cce26b8c7d |
File details
Details for the file tlparse-0.3.19-py3-none-win_amd64.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d828eacad87a1e876745c65b348af4111a9b4323bd59d1bb6de3caf4f9a33c9 |
|
MD5 | 20367dfff0dd945b5e3c3744afe2e5ca |
|
BLAKE2b-256 | 77519ac7ada88f543286e77a935694c399c3c75410bbd5d7d239c420623e0442 |
File details
Details for the file tlparse-0.3.19-py3-none-win32.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-win32.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60e9a164001d306febbc77ddbc26a9d1bd4809e8fd6e5b61fef3cc9807af7018 |
|
MD5 | 43de947ff076b9ef5b5edc5508ec824a |
|
BLAKE2b-256 | c7427abf916fead464906b91a5cbd58a7583565bf1c015c614b69320c66aa620 |
File details
Details for the file tlparse-0.3.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb4c43f1e9c315f2b95766e3b4969807ddf0904fa6440b5c23c0e012a91c95c |
|
MD5 | a3b5643c66f05de01031b6a45a53d1e1 |
|
BLAKE2b-256 | bc62c98ff36f182e587a0fd9243e0fd87135a4e159e247ba18e18cbe26c9b479 |
File details
Details for the file tlparse-0.3.19-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9d2e1f647f7c1c283b5dbf7e25f88516acf7c0ae68ebba3e53374fea76eb458 |
|
MD5 | c94d3fe3eb316d1ed9b013414b4b91f4 |
|
BLAKE2b-256 | 4eab33b626928f3ea1b9260b36533c0d1d802d68814883529e1dc84e1d36f743 |
File details
Details for the file tlparse-0.3.19-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44650e408731837bb7deb2f2dc8a5447daddacaccdaaa80dda97195de82a5320 |
|
MD5 | 92c6d1fbe9515d8e8bc406a56fc064b7 |
|
BLAKE2b-256 | 4da5476b45dcd054f0dc1f96a2bbcd21c511cdbdb0180718536bbd8b370b618f |
File details
Details for the file tlparse-0.3.19-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9db79c525f4000c3227181dde98af2d8a39310e662b1afe52db5d8a6b82555 |
|
MD5 | 2ea7dfe5408ad1c2ca407b933053f282 |
|
BLAKE2b-256 | 23e9ff3343ad470d9d28b636c32aa82d7f71285b6a5466578ca823018252cf67 |
File details
Details for the file tlparse-0.3.19-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87d9ecdd1d5ead2791c839866028dbd48413c64d5bf31c8aad5950b28a21d26 |
|
MD5 | 8f6659b4fdeeab99cd37bc5b22fe483c |
|
BLAKE2b-256 | 7f8c84ebccd23123bc55ad963fb3861bf2fe636590c4ea6c98d2877b89732678 |
File details
Details for the file tlparse-0.3.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b9516a28dfca8db631a8bf3080027ef61b7a5caec6eb7adc7267300aebfccd8 |
|
MD5 | 2551117ea2413dc295241b4f09e4bad6 |
|
BLAKE2b-256 | c03fb8a40537a934b75fb29940e5290c3f1057e010744adc3ddf95a672384c6a |
File details
Details for the file tlparse-0.3.19-py3-none-macosx_11_0_arm64.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63fe0998da3d964aee7e7c30a67eb3233d6bb9c797ed74d1188176f76dfaf6d2 |
|
MD5 | 3ddb2e1b633d6be4e10a97a17900d9b8 |
|
BLAKE2b-256 | 91f4e0cae364620936fc25af903fbafa1dd3268c3eeec9bc7e781bd948121621 |
File details
Details for the file tlparse-0.3.19-py3-none-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: tlparse-0.3.19-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8328b51fd05ba96f15957e19827cd07856d6087c110435829df1e2191a53f90 |
|
MD5 | fa4919e50cd825d2833597855b13cb25 |
|
BLAKE2b-256 | a5652713b5b8df7f0ae3a7a79415bb2170f049fa894c6f857520ed0d8ab7b7bf |