{"id":28008,"library":"onnx-tool","title":"onnx-tool","description":"A library for parsing, editing, optimizing, and profiling ONNX models. Current version 1.0.1, no defined release cadence. Primarily used for model analysis and shape inference.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/ThanatosShinji/onnx-tool","tags":["onnx","model-analysis","profiling","optimization"],"install":[{"cmd":"pip install onnx-tool","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for ONNX model handling","package":"onnx","optional":false},{"reason":"Array operations and shape calculations","package":"numpy","optional":false}],"imports":[{"wrong":"from onnx_tool import ModelParser","symbol":"Model","correct":"from onnx_tool import Model"},{"symbol":"Graph","correct":"from onnx_tool import Graph"},{"symbol":"loadmodel","correct":"from onnx_tool import loadmodel"}],"quickstart":{"code":"from onnx_tool import ModelParser\nimport onnx\n\n# Load an ONNX model\nmodel_path = 'model.onnx'\nmodel = onnx.load(model_path)\n\n# Create parser and get model graph info\nparser = ModelParser(model)\nprint(parser.graph_info())","lang":"python","description":"Load an ONNX model and print graph information."},"warnings":[{"fix":"Use onnx.load(model_path) to load the model.","message":"onnx-tool expects ONNX models in protobuf format; ensure you use onnx.load() rather than onnx.load_model() which is deprecated in newer ONNX versions.","severity":"gotcha","affected_versions":"all"},{"fix":"Iterate over keys with .items() and check for presence.","message":"The ModelParser's graph_info() may return different keys across versions; always handle dictionary keys dynamically.","severity":"gotcha","affected_versions":"<=1.0.1"},{"fix":"Use from onnx_tool.shape_inference import infer_shapes if available.","message":"The function 'infer_shapes' has been moved to a separate module 'shape_inference' in some versions; check documentation.","severity":"deprecated","affected_versions":"<=1.0.0"},{"fix":"Update subclass to match new API; see changelog.","message":"Version 1.0.0 changed the base class for ModelParser; existing code inheriting from it may break.","severity":"breaking","affected_versions":"1.0.0"}],"env_vars":null,"search_vec":"'1.0.1':16 'analysi':25,32 'cadenc':20 'current':14 'defin':18 'edit':8 'infer':28 'librari':5 'model':13,24,31 'model-analysi':30 'onnx':2,12,29 'onnx-tool':1 'optim':9,34 'pars':7 'primarili':21 'profil':11,33 'releas':19 'shape':27 'tool':3 'use':22 'version':15","created_at":"2026-05-09T05:53:15.293415+00:00","updated_at":"2026-05-09T05:53:15.293415+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ThanatosShinji/onnx-tool","docs":null,"changelog":null,"pypi":"https://pypi.org/project/onnx-tool/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}