tlparse


Nametlparse JSON
Version 0.3.30 PyPI version JSON
download
home_pageNone
SummaryParse TORCH_LOG logs produced by PyTorch torch.compile
upload_time2024-12-09 19:13:52
maintainerNone
docs_urlNone
authorEdward Z. Yang <ezyang@mit.edu>
requires_python>=3.6
licenseBSD-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 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:

```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/8d/21/bc1fa4ff579a37940831ef8d91203bd4d7a6da57ff134ea60f390d1e39c0/tlparse-0.3.30.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 example.py\n```\n\nFeed input into tlparse:\n```\ntlparse /tmp/my_traced_log -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.3.30",
    "project_urls": {
        "repository": "https://github.com/ezyang/tlparse"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d749f6f268ab79f94059bba9e59a5f2edebd404cd58bd94bf94b4e8874a77ff3",
                "md5": "db5e05dd28e0771d5692b45396a01bc3",
                "sha256": "4291f1553e507e16e6a79bff515d79029610f50e7cd2231fca7428297e74e2c6"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "db5e05dd28e0771d5692b45396a01bc3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2099115,
            "upload_time": "2024-12-09T19:13:17",
            "upload_time_iso_8601": "2024-12-09T19:13:17.658873Z",
            "url": "https://files.pythonhosted.org/packages/d7/49/f6f268ab79f94059bba9e59a5f2edebd404cd58bd94bf94b4e8874a77ff3/tlparse-0.3.30-py3-none-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eac45cb4890c2e736aef1adee72e5222d14405e6d54a82346d6088d6aa18ee7a",
                "md5": "18eea965e6895b92edc31c5d2b449dc7",
                "sha256": "b78a204f8593fcfebc2179032045517e1c68edb3261995abd6d43ca32025e212"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "18eea965e6895b92edc31c5d2b449dc7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2007152,
            "upload_time": "2024-12-09T19:13:19",
            "upload_time_iso_8601": "2024-12-09T19:13:19.249196Z",
            "url": "https://files.pythonhosted.org/packages/ea/c4/5cb4890c2e736aef1adee72e5222d14405e6d54a82346d6088d6aa18ee7a/tlparse-0.3.30-py3-none-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b5f4e0da10baf1361633b7fed9c6dd4317322ee14d5c9227ca4c44d595805e69",
                "md5": "7973bc8477e4c856dc1f996230aad96a",
                "sha256": "3920c9319b5cc0abc6ea07843d2c5d5464e25b0f62f61c401985d5ae61daa6f9"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "7973bc8477e4c856dc1f996230aad96a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2178921,
            "upload_time": "2024-12-09T19:13:21",
            "upload_time_iso_8601": "2024-12-09T19:13:21.367557Z",
            "url": "https://files.pythonhosted.org/packages/b5/f4/e0da10baf1361633b7fed9c6dd4317322ee14d5c9227ca4c44d595805e69/tlparse-0.3.30-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6c5d650e6edc59c4092e5db21b35e76c945dbc0cef27664b55aa5e6db365bd07",
                "md5": "313bd1361d845924381704ea51fb8860",
                "sha256": "01e15631a15dfa04613b38541abec2dd6641b4a26670274266f21377729c1bba"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "313bd1361d845924381704ea51fb8860",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2109041,
            "upload_time": "2024-12-09T19:13:23",
            "upload_time_iso_8601": "2024-12-09T19:13:23.503702Z",
            "url": "https://files.pythonhosted.org/packages/6c/5d/650e6edc59c4092e5db21b35e76c945dbc0cef27664b55aa5e6db365bd07/tlparse-0.3.30-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1285f6fa86fa8091d36c45b01d700288ecd3b1951f54589c90520d7476b280c7",
                "md5": "518edba657d313ab3ca8e9e61bde5ba5",
                "sha256": "83ec9d72142bb906249549721604455ea0b4c18f0ac88e599840e88e1b9c6816"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "518edba657d313ab3ca8e9e61bde5ba5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2310960,
            "upload_time": "2024-12-09T19:13:25",
            "upload_time_iso_8601": "2024-12-09T19:13:25.508347Z",
            "url": "https://files.pythonhosted.org/packages/12/85/f6fa86fa8091d36c45b01d700288ecd3b1951f54589c90520d7476b280c7/tlparse-0.3.30-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5c3d0ccd22356ce1e803e944215da7a9303766c9f1bb046f1f169db3d80d91a5",
                "md5": "7e1e4dfc7c54bfcba95f9597f35b8ee8",
                "sha256": "3a5d760e6d8ac97a0cbc378e06f9bd7f98956f2b4933cd1c00255b66e77845e9"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "7e1e4dfc7c54bfcba95f9597f35b8ee8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2335621,
            "upload_time": "2024-12-09T19:13:31",
            "upload_time_iso_8601": "2024-12-09T19:13:31.259859Z",
            "url": "https://files.pythonhosted.org/packages/5c/3d/0ccd22356ce1e803e944215da7a9303766c9f1bb046f1f169db3d80d91a5/tlparse-0.3.30-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b046d32e755fb228fc6570d7c07a48521d8eeb68b0212513b257dcf418038f05",
                "md5": "6ddd7ffe6a32a2ee99931a7210172505",
                "sha256": "3074e829085b739317afebe11831e01a82cfd04edc1e571b961f653fce8689fc"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "6ddd7ffe6a32a2ee99931a7210172505",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2453879,
            "upload_time": "2024-12-09T19:13:35",
            "upload_time_iso_8601": "2024-12-09T19:13:35.045766Z",
            "url": "https://files.pythonhosted.org/packages/b0/46/d32e755fb228fc6570d7c07a48521d8eeb68b0212513b257dcf418038f05/tlparse-0.3.30-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dcf4e6f3de42f80b98c9b3ec4aa835b454afaf4cbf43b7d5a8a4730b34948d6a",
                "md5": "32b25027ca4c5b9b77bcc10dd0bc315b",
                "sha256": "3a5d480ea3b5a2d5114b6b89b15f4546743ae86e9770c604364ccc02de744815"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "32b25027ca4c5b9b77bcc10dd0bc315b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 2265818,
            "upload_time": "2024-12-09T19:13:38",
            "upload_time_iso_8601": "2024-12-09T19:13:38.516859Z",
            "url": "https://files.pythonhosted.org/packages/dc/f4/e6f3de42f80b98c9b3ec4aa835b454afaf4cbf43b7d5a8a4730b34948d6a/tlparse-0.3.30-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f30a7368a7ecb68899e72b5619041785fb7f3c6dbdf72adae8d80b05e26ea8b3",
                "md5": "856422d803d2b18ed334f28b89185995",
                "sha256": "1b671ce06fb0c85bee329803cd6397b265fbfdade281ddd895941f8d381410ce"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-win32.whl",
            "has_sig": false,
            "md5_digest": "856422d803d2b18ed334f28b89185995",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 1721707,
            "upload_time": "2024-12-09T19:13:43",
            "upload_time_iso_8601": "2024-12-09T19:13:43.503447Z",
            "url": "https://files.pythonhosted.org/packages/f3/0a/7368a7ecb68899e72b5619041785fb7f3c6dbdf72adae8d80b05e26ea8b3/tlparse-0.3.30-py3-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7cd748ecf719bfe37595cebffdc86f4260d5ec8fa3dcd2fc8946ee8771739eb2",
                "md5": "606d1beb403a5540f0977b5b78ed495b",
                "sha256": "fbc9261c45a314fdacbd64e980144abc8b43384ca54040be6d5d0bbbb3e1e203"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "606d1beb403a5540f0977b5b78ed495b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 1842661,
            "upload_time": "2024-12-09T19:13:48",
            "upload_time_iso_8601": "2024-12-09T19:13:48.491355Z",
            "url": "https://files.pythonhosted.org/packages/7c/d7/48ecf719bfe37595cebffdc86f4260d5ec8fa3dcd2fc8946ee8771739eb2/tlparse-0.3.30-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8d21bc1fa4ff579a37940831ef8d91203bd4d7a6da57ff134ea60f390d1e39c0",
                "md5": "025ea0794e87f15f11d071b922c3caa9",
                "sha256": "6901ddd4403c116773a6d29532df468abd067e894b4c4bf7f7eb22e7955f6266"
            },
            "downloads": -1,
            "filename": "tlparse-0.3.30.tar.gz",
            "has_sig": false,
            "md5_digest": "025ea0794e87f15f11d071b922c3caa9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 147738,
            "upload_time": "2024-12-09T19:13:52",
            "upload_time_iso_8601": "2024-12-09T19:13:52.970871Z",
            "url": "https://files.pythonhosted.org/packages/8d/21/bc1fa4ff579a37940831ef8d91203bd4d7a6da57ff134ea60f390d1e39c0/tlparse-0.3.30.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-09 19:13:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ezyang",
    "github_project": "tlparse",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tlparse"
}
        
Elapsed time: 1.49671s