{"id":19623734,"url":"https://github.com/advancedclimatesystems/gonnx","last_synced_at":"2025-08-10T21:06:20.214Z","repository":{"id":65733312,"uuid":"591251127","full_name":"AdvancedClimateSystems/gonnx","owner":"AdvancedClimateSystems","description":"Run ONNX models using Go","archived":false,"fork":false,"pushed_at":"2024-10-21T10:12:00.000Z","size":1594,"stargazers_count":42,"open_issues_count":121,"forks_count":3,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-10-21T14:47:29.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdvancedClimateSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-20T09:46:29.000Z","updated_at":"2024-10-21T10:12:03.000Z","dependencies_parsed_at":"2023-11-26T09:24:49.352Z","dependency_job_id":"10ba94c4-3084-4ac2-9940-1a217dd149ef","html_url":"https://github.com/AdvancedClimateSystems/gonnx","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvancedClimateSystems%2Fgonnx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvancedClimateSystems%2Fgonnx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvancedClimateSystems%2Fgonnx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvancedClimateSystems%2Fgonnx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdvancedClimateSystems","download_url":"https://codeload.github.com/AdvancedClimateSystems/gonnx/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224096496,"owners_count":17255098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T11:35:16.909Z","updated_at":"2024-11-11T11:35:18.446Z","avatar_url":"https://github.com/AdvancedClimateSystems.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GONNX\n\n![image info](./logo.png)\n\n[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\n\n\nThe goal of this package is to provide an easy way of running ONNX models in Go. This package\nis intended for inference usage of ONNX models. The package can be used to load an `.onnx` file\nand perform inference using the model described by this file.  \n\nCurrently, we are implementing ONNX operation set 13, and we plan to add all opsets following this\none as well. Feel free to contribute by implementing operators!\n\n## Getting started\n\n### Installation \u0026 setup\n\nFirst, [install Go on your machine](https://golang.org/doc/install).\nThen, clone the repository:\n\n```sh\ngit clone https://github.com/AdvancedClimateSystems/gonnx.git\ncd gonnx\n```\n\nThen, install the dependencies as follows:\n```sh\nmake install\nmake install_lint\nmake install_gotestsum\n```\n\n### Usage\nA simple example is shown below:\n```go\npackage main\n\nimport (\n    \"github.com/advancedclimatesystems/gonnx\"\n    \"gorgonia.org/tensor\"\n)\n\n\nfunc main() {\n    model, err := gonnx.NewModel(\"./path_to_onnx/model.onnx\")\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    var inputs map[string]*tensor.Tensor\n    inputs = // However you construct inputs. It must have a tensor for all inputs.\n\n    result, err := model.Run(inputs)\n    if err != nil {\n        log.Fatal(err)\n    }\n}\n```\n\n### Tests\nMost of the code should be tested. \nIf you add operators (or an entire opset version) make sure you add unit tests as wel \nas tests for the ONNX test suite\n\nThe GONNX test suite consists of unit tests and integration tests, the\n[standard](https://github.com/onnx/onnx/blob/master/docs/OnnxBackendTest.md)\nprovided by ONNX.\n\nThe ONNX test data is not stored in the repository, hence one needs to download it first:\n```sh\nmake test_data\n```\n\nNow, one can run all tests using (which runs both integration and unit tests):\n```sh\nmake test\n```\n\nBecause the current implementation is lacking certain opset versions, some of the tests from\nONNX will not run. All tests that are skipped can be found in `ops_test.go`, as well as the\nreason that particular test is skipped. We try to be explicit in which tests are ran and which\nare skipped.\n\n\n# How to Contribute\nAny kind of contribution is welcome. Try to keep the style consistent and \nmake sure all linter checks succeed before opening a pull request.\n\n\n## Pull requests\nOur workflow is based on the [github-flow](https://guides.github.com/introduction/flow/\u003e) .\n\n1. Create a new issue.\n2. Fork the project.\n3. Clone your fork and add the upstream.\n    ```bash\n    git remote add upstream https://github.com/AdvancedClimateSystems/gonnx.git\n    ```\n\n4. Pull new changes from the upstream.\n    ```bash\n    git checkout main\n    git fetch upstream\n    git merge upstream/main\n    ```\n\n5. Create a feature branch\n    ```bash\n    git checkout -b \u003cbranch-name\u003e\n    ```\n\n6. Commit your changes and reference the issue number in your comment.\n    ```bash\n    git commit -m \"Issue #\u003cissue-ref\u003e : \u003cyour message\u003e\"\n    ```\n\n7. Push the feature branch to your remote repository.\n    ```bash\n    git push origin \u003cbranch-name\u003e\n    ```\n\n8. Open new pull request.\n\n\n# Code of conduct\nWelcome to the GONNX community! To make sure everyone has a blast while working together,\nhere's our quick code of conduct:\n\n1. Be respectful and kind to everyone. No hate speech or harassment allowed.\n2. Keep conversations on topic and respectful.\n3. Respect other people's work and intellectual property rights.\n4. Follow the guidelines for contributing to the project and make your first pull request! Anything is welcome :slightly_smiling_face:\n5. If you see something, say something. Report any violations to the maintainers.\n6. Have fun! We're all here to work on something awesome together, so let's make the most of it!\n\nBy participating in the GONNX project, you're agreeing to follow these guidelines and\nmake sure everyone has a good time. Whether you're a seasoned veteran or a newcomer,\nwe're excited to have you here. Let's make something amazing!\n\n# Authors\n\n- [@wipsel](https://www.github.com/wipsel)\n- [@swopper050](https://www.github.com/swopper050)\n- [@stensipma](https://www.github.com/stensipma)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvancedclimatesystems%2Fgonnx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadvancedclimatesystems%2Fgonnx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvancedclimatesystems%2Fgonnx/lists"}