| Name | tlparse JSON |
| Version |
0.4.3
JSON |
| download |
| home_page | None |
| Summary | Parse TORCH_LOG logs produced by PyTorch torch.compile |
| upload_time | 2025-09-12 17:22:30 |
| maintainer | None |
| docs_url | None |
| author | Edward Z. Yang <ezyang@mit.edu> |
| requires_python | >=3.6 |
| license | BSD-3-Clause |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# 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_dir example.py
```
Feed input into tlparse:
```
tlparse /tmp/my_traced_log_dir -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:
```Rust
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)
}
}
```
## How to release
1. Make a release commit by updating Cargo.toml and then running cargo update
2. Push the release commit and a tag for it. This will trigger PyPI release
3. cargo publish
Raw data
{
"_id": null,
"home_page": null,
"name": "tlparse",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Edward Z. Yang <ezyang@mit.edu>",
"author_email": "Edward Z. Yang <ezyang@mit.edu>",
"download_url": "https://files.pythonhosted.org/packages/83/79/1ca1d6023f6a79430958e7f547b19344b9620a39b69e4f5dbb71700e86f7/tlparse-0.4.3.tar.gz",
"platform": null,
"description": "# tlparse: Parse structured PT2 logs\n`tlparse` parses structured torch trace logs and outputs HTML files analyzing data.\n\nQuick start:\nRun PT2 with the TORCH_TRACE environment variable set:\n```\nTORCH_TRACE=/tmp/my_traced_log_dir example.py\n```\n\nFeed input into tlparse:\n```\ntlparse /tmp/my_traced_log_dir -o tl_out/\n```\n\n## Adding custom parsers\nYou 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:\n\n```Rust\npub struct MyCustomParser;\nimpl StructuredLogParser for MyCustomParser {\n fn name(&self) -> &'static str {\n \"my_custom_parser\"\n }\n fn get_metadata<'e>(&self, e: &'e Envelope) -> Option<Metadata<'e>> {\n // Get required metadata from the Envelope.\n // You'll need to update Envelope with your custom Metadata if you need new types here\n ....\n }\n\n fn parse<'e>(&self,\n lineno: usize,\n metadata: Metadata<'e>,\n _rank: Option<u32>,\n compile_id: &Option<CompileId>,\n payload: &str\n ) -> anyhow::Result<ParserResult> {\n // Use the metadata and payload however you'd like\n // Return either a ParserOutput::File(filename, payload) or ParserOutput::Link(name, url)\n }\n}\n```\n\n## How to release\n\n1. Make a release commit by updating Cargo.toml and then running cargo update\n2. Push the release commit and a tag for it. This will trigger PyPI release\n3. cargo publish\n\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Parse TORCH_LOG logs produced by PyTorch torch.compile",
"version": "0.4.3",
"project_urls": {
"repository": "https://github.com/ezyang/tlparse"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b9ee28816a19d6a34bc0e33d1aa35eacbe934182bca4ce7f2905a99117d0632e",
"md5": "d22978866f78e0a142fbdf9da2dd0942",
"sha256": "bf87bbf8286463ae34e6b3cbbd467438c081e5be7860399522ecca646319b14e"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "d22978866f78e0a142fbdf9da2dd0942",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2344351,
"upload_time": "2025-09-12T17:22:15",
"upload_time_iso_8601": "2025-09-12T17:22:15.863378Z",
"url": "https://files.pythonhosted.org/packages/b9/ee/28816a19d6a34bc0e33d1aa35eacbe934182bca4ce7f2905a99117d0632e/tlparse-0.4.3-py3-none-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b7b73b66de797619e8f8ee26c78e11661b2b3e67adcfdbb0ca15891ca416b375",
"md5": "d2d5685368b29b17456fe40192b6217e",
"sha256": "e114130439f019a67f9856bcd5ef9eaf267994dc565e5d973906e5b79d6329dd"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "d2d5685368b29b17456fe40192b6217e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2248521,
"upload_time": "2025-09-12T17:22:17",
"upload_time_iso_8601": "2025-09-12T17:22:17.315918Z",
"url": "https://files.pythonhosted.org/packages/b7/b7/3b66de797619e8f8ee26c78e11661b2b3e67adcfdbb0ca15891ca416b375/tlparse-0.4.3-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d2cc8934441d69254e6a5ab6da73e5ea3044bf1081045cfc3c9b537beeaaa9ca",
"md5": "4ef01f9436b4359e4c81611d40f6c227",
"sha256": "284aba9623fb4fa4282d36ae50d9e7f2cbef66f4bcb65c621a203f5cb3086e2e"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "4ef01f9436b4359e4c81611d40f6c227",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2410371,
"upload_time": "2025-09-12T17:22:18",
"upload_time_iso_8601": "2025-09-12T17:22:18.574345Z",
"url": "https://files.pythonhosted.org/packages/d2/cc/8934441d69254e6a5ab6da73e5ea3044bf1081045cfc3c9b537beeaaa9ca/tlparse-0.4.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3b36842c1a9cdfd97d5d69843f08d013bdfca015b4826d62c5c9cf6d60d6ca6e",
"md5": "70991f8fe3a16b2754e1151e5c1d82a2",
"sha256": "9649b60e3efb57e6bed1dc1c79dc940492e8d3aa3a8663a2f2a83e8aaa5b86db"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
"has_sig": false,
"md5_digest": "70991f8fe3a16b2754e1151e5c1d82a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2341628,
"upload_time": "2025-09-12T17:22:20",
"upload_time_iso_8601": "2025-09-12T17:22:20.081657Z",
"url": "https://files.pythonhosted.org/packages/3b/36/842c1a9cdfd97d5d69843f08d013bdfca015b4826d62c5c9cf6d60d6ca6e/tlparse-0.4.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f58ca8408e222744bb65a21731d003de0a2f512a54c82191b2e186a93fc14d69",
"md5": "05a9916ecdf7a0fe34afe77c5bae42a7",
"sha256": "60cc97be1ad54d7e43241d94271760070375a8a815af9f0d037948f042268774"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl",
"has_sig": false,
"md5_digest": "05a9916ecdf7a0fe34afe77c5bae42a7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2575417,
"upload_time": "2025-09-12T17:22:21",
"upload_time_iso_8601": "2025-09-12T17:22:21.702027Z",
"url": "https://files.pythonhosted.org/packages/f5/8c/a8408e222744bb65a21731d003de0a2f512a54c82191b2e186a93fc14d69/tlparse-0.4.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0705f13a7eabb5f279ad4b9143ffadb1e9cf4ff1aebabc2346a2db6fc317bfbe",
"md5": "a769c256de363de7f48ed2388a6db189",
"sha256": "6deb673b0287252e9bd7608ba16839e0f7d39eb28953b38c04311f8b436b146b"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
"has_sig": false,
"md5_digest": "a769c256de363de7f48ed2388a6db189",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2704069,
"upload_time": "2025-09-12T17:22:23",
"upload_time_iso_8601": "2025-09-12T17:22:23.365533Z",
"url": "https://files.pythonhosted.org/packages/07/05/f13a7eabb5f279ad4b9143ffadb1e9cf4ff1aebabc2346a2db6fc317bfbe/tlparse-0.4.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fac49b74543fc4a54de19c5a250f8b76a8a36a630ed2007392e6ea845852a33f",
"md5": "df08158c2595f126ae10a2300eaa61e5",
"sha256": "3f2a15aaff8dbdf1adac407033534be71695bbc50248686d6cabed5bd88523c5"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl",
"has_sig": false,
"md5_digest": "df08158c2595f126ae10a2300eaa61e5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2600764,
"upload_time": "2025-09-12T17:22:24",
"upload_time_iso_8601": "2025-09-12T17:22:24.693659Z",
"url": "https://files.pythonhosted.org/packages/fa/c4/9b74543fc4a54de19c5a250f8b76a8a36a630ed2007392e6ea845852a33f/tlparse-0.4.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "72bfd261cdbc338ca497ffe27cdd7b49cd1c9de756e95e1429b8aa8c29b7cc9c",
"md5": "34638bb7d54dabb67be24d44d0476cac",
"sha256": "cf0b613cf91ddc74b8e20b23f09d70fa5f1426a2019dce7e4139ae28a2b9053c"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "34638bb7d54dabb67be24d44d0476cac",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2506276,
"upload_time": "2025-09-12T17:22:26",
"upload_time_iso_8601": "2025-09-12T17:22:26.224438Z",
"url": "https://files.pythonhosted.org/packages/72/bf/d261cdbc338ca497ffe27cdd7b49cd1c9de756e95e1429b8aa8c29b7cc9c/tlparse-0.4.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "86aaca33edc91ddf3c745f7ed5e40a436dca57744d3a2d1065866f905d776b50",
"md5": "f57421de782d3ea3c65ab1348e8e9880",
"sha256": "b3f19ee15262c0f16c1d37255638dd47fc8165e870a7c5ca5bc932885504c746"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-win32.whl",
"has_sig": false,
"md5_digest": "f57421de782d3ea3c65ab1348e8e9880",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 1906576,
"upload_time": "2025-09-12T17:22:27",
"upload_time_iso_8601": "2025-09-12T17:22:27.588428Z",
"url": "https://files.pythonhosted.org/packages/86/aa/ca33edc91ddf3c745f7ed5e40a436dca57744d3a2d1065866f905d776b50/tlparse-0.4.3-py3-none-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1f8724cf14b52adc1a0884d1fa345424ac4c5da670abec558b3eb85e83f56a95",
"md5": "2c9aabe10ba965af21fe14292b170e3a",
"sha256": "cb5cbc670aca4034736e1b2f001cb99c8ff52edcec6126ec7418f69641248077"
},
"downloads": -1,
"filename": "tlparse-0.4.3-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "2c9aabe10ba965af21fe14292b170e3a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2045088,
"upload_time": "2025-09-12T17:22:28",
"upload_time_iso_8601": "2025-09-12T17:22:28.848135Z",
"url": "https://files.pythonhosted.org/packages/1f/87/24cf14b52adc1a0884d1fa345424ac4c5da670abec558b3eb85e83f56a95/tlparse-0.4.3-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "83791ca1d6023f6a79430958e7f547b19344b9620a39b69e4f5dbb71700e86f7",
"md5": "0c7df0e6302fbe741a91547ae34b9797",
"sha256": "5fc8208a465e532e8dbbad62fefdc712cda9d7a0a28ab4f170c18193f83aba9d"
},
"downloads": -1,
"filename": "tlparse-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "0c7df0e6302fbe741a91547ae34b9797",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5910982,
"upload_time": "2025-09-12T17:22:30",
"upload_time_iso_8601": "2025-09-12T17:22:30.683183Z",
"url": "https://files.pythonhosted.org/packages/83/79/1ca1d6023f6a79430958e7f547b19344b9620a39b69e4f5dbb71700e86f7/tlparse-0.4.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-12 17:22:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ezyang",
"github_project": "tlparse",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tlparse"
}