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.18.tar.gz
(32.3 kB
view hashes)
Built Distributions
Close
Hashes for tlparse-0.3.18-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d01e28c9b510cfcddbfdbe613a4aa92b10a65a7a9eada8029ee9e45e3b9b53 |
|
MD5 | 39060e35f35c2a7cf2047012ab1c4e03 |
|
BLAKE2b-256 | 40fdbdd7909f35a711db60794d0da070ef59b5fde76ecdeb4b716cc1e3afc830 |
Close
Hashes for tlparse-0.3.18-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d91914335e4618db8275e4c66e6ebc433224a5b2aef94e9b5928bb86e6c78e15 |
|
MD5 | 40f8390d525b07c2a111fa43561fcae0 |
|
BLAKE2b-256 | 648d70d50e355002d5065badb097fac86d673a8592d4b3076ccf836088177751 |
Close
Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1cc1b7c23519d713e07b1e0ff3f824793e917143ade66802877ed1beaff3768 |
|
MD5 | 4424804bfe8472cb4175e510d43bc3ba |
|
BLAKE2b-256 | 0a3a6d3ea1901586626e9a495a29775301d04b60423d6f0ef4d37a3203a6b7a9 |
Close
Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224f831dc1d03a5dd7f9250c773e8db181002df1f561d95d1acf714d4f8b2539 |
|
MD5 | 7e9b1903f3bc5a775d58c8546eb8c1eb |
|
BLAKE2b-256 | fedc72d19f229a8c5b6da553f8c52f95810f8985d675e60ce12271229016e7c9 |
Close
Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b287c088491c1572a683b9bea17a321adcdc6f0a092b5987443dd9c663653ce |
|
MD5 | f9a71d46fb0185f47c491f16e9d89962 |
|
BLAKE2b-256 | e5023d75856ec22aa398bfb1ee318c2584c385df1b8b7f9e1109e0e8667a398a |
Close
Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8abd47b0f48a2d537f6870f0a804495164cf10c7099815f0e47b85dac1298f4e |
|
MD5 | f43314b8a06ab984b91b8a23d07177cd |
|
BLAKE2b-256 | 52c29fcc4d2d0edaaf67d1cbc7a080046464655d60d352c8a4d4afe7b2d9a9e6 |
Close
Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b6d25a6b841141d45ec91ad9bc2df41d69094a1467498658c9f5eddf4f0eb8 |
|
MD5 | 3b8469c1ecf289fd6e548c6f7b0b93ea |
|
BLAKE2b-256 | 02229fd34013552e78adad1f3712fc985d5521f1deadc1aad92618e85a3ccc04 |
Close
Hashes for tlparse-0.3.18-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a6978c01a9fd4288d0c3561b60aa232c2f16a32fb240dcde23320628bb922b3 |
|
MD5 | 9a5ac88311d755ff65b029316ced5c28 |
|
BLAKE2b-256 | f2aaea98f7e66394a9c3ab39798f36cbabda792a0cc49ec01b723f6c90c041ed |
Close
Hashes for tlparse-0.3.18-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 574055151301b81e8f05957190ad2621304ce13292b77f2a79e2c6fdf5e53ffe |
|
MD5 | 519f04e2338552e8aefee2335472d73b |
|
BLAKE2b-256 | 9250fceb10b8dbf7cc7cffd7c380ef6e3646d9f3265cd6c7966775062d70dc8c |
Close
Hashes for tlparse-0.3.18-py3-none-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa1b225f74bd850464fcb4091502ecd9db5e9594deffd53ebfe064fdd72eacbf |
|
MD5 | 16b93b15aa67225a52b86fe29fd16ca0 |
|
BLAKE2b-256 | 661882af283b298689366a6cd749c5e98797c1f22fb5fcea7c8978e30ecf1efd |