{"id":16393684,"url":"https://github.com/astariul/gibbs","last_synced_at":"2025-03-23T04:31:50.503Z","repository":{"id":38009843,"uuid":"467786325","full_name":"astariul/gibbs","owner":"astariul","description":"Scale your ML workers asynchronously across processes and machines","archived":false,"fork":false,"pushed_at":"2024-02-14T13:31:35.000Z","size":3316,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-14T15:51:16.977Z","etag":null,"topics":["asyncio","deep-learning","machine-learning","ml","mlops","multiprocessing","python","zmq"],"latest_commit_sha":null,"homepage":"https://astariul.github.io/gibbs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astariul.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}},"created_at":"2022-03-09T05:13:15.000Z","updated_at":"2024-04-16T00:24:14.509Z","dependencies_parsed_at":"2023-11-08T23:33:15.948Z","dependency_job_id":"5308c8a4-3b60-4830-a041-17f753ec0851","html_url":"https://github.com/astariul/gibbs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"astariul/pytere","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fgibbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fgibbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fgibbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fgibbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astariul","download_url":"https://codeload.github.com/astariul/gibbs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245056889,"owners_count":20553855,"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":["asyncio","deep-learning","machine-learning","ml","mlops","multiprocessing","python","zmq"],"created_at":"2024-10-11T04:54:02.071Z","updated_at":"2025-03-23T04:31:49.984Z","avatar_url":"https://github.com/astariul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003egibbs\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\nScale your ML workers asynchronously across processes and machines\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/astariul/gibbs/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/astariul/gibbs.svg\" alt=\"GitHub release\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/astariul/gibbs/actions/workflows/pytest.yaml\"\u003e\u003cimg src=\"https://github.com/astariul/gibbs/actions/workflows/pytest.yaml/badge.svg\" alt=\"Test status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/astariul/gibbs/actions/workflows/lint.yaml\"\u003e\u003cimg src=\"https://github.com/astariul/gibbs/actions/workflows/lint.yaml/badge.svg\" alt=\"Lint status\" /\u003e\u003c/a\u003e\n    \u003cimg src=\".github/badges/coverage.svg\" alt=\"Coverage status\" /\u003e\n    \u003ca href=\"https://astariul.github.io/gibbs\"\u003e\u003cimg src=\"https://img.shields.io/website?down_message=failing\u0026label=docs\u0026up_color=green\u0026up_message=passing\u0026url=https%3A%2F%2Fastariul.github.io%2Fgibbs\" alt=\"Docs\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/astariul/gibbs/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"licence\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#description\"\u003eDescription\u003c/a\u003e •\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#faq\"\u003eFAQ\u003c/a\u003e •\n  \u003ca href=\"#contribute\"\u003eContribute\u003c/a\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://astariul.github.io/gibbs/\" target=\"_blank\"\u003eDocumentation\u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003ch2 align=\"center\"\u003eDescription\u003c/h2\u003e\n\n**`gibbs`** is a python package that helps you scale your ML workers (or any python code) across processes and machines, asynchronously.\n\n`gibbs` is :\n\n* ⚡️ Highly performant\n* 🔀 Asynchronous\n* 🐥 Easy-to-use\n\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\nInstall `gibbs` by running :\n\n\n```\npip install gibbs\n```\n\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\nAfter defining your awesome model :\n\n```python\nimport time\n\nclass MyAwesomeModel:\n    def __init__(self, wait_time=0.25):\n        super().__init__()\n        self.w = wait_time\n\n    def __call__(self, x):\n        time.sleep(self.w)\n        return x**2\n```\n\nYou can simply start a few workers serving the model :\n\n```python\nfrom gibbs import Worker\n\nfor _ in range(4):\n    Worker(MyAwesomeModel).start()\n```\n\nAnd send requests through the Hub :\n\n```python\nfrom gibbs import Hub\n\nhub = Hub()\n\n# In an async function\nawait hub.request(34)\n```\n\nAnd that's it !\n\n---\n\nMake sure to check the [documentation](https://astariul.github.io/gibbs/usage/) for a more detailed explanation.\n\nOr you can run some examples from the `examples/` folder.\n\n\n\u003ch2 align=\"center\"\u003eFAQ\u003c/h2\u003e\n\n#### ❓ **How `gibbs` works ?**\n\n`gibbs` simply run your model code in separate processes, and send requests to the right process to ensure requests are treated in parallel.\n\n`gibbs` uses a modified form of [the Paranoid Pirate Pattern from the zmq guide](https://zguide.zeromq.org/docs/chapter4/#Robust-Reliable-Queuing-Paranoid-Pirate-Pattern).\n\n#### ❓ **Why the name \"gibbs\" ?**\n\nJoshamee Gibbs is the devoted first mate of Captain Jack Sparrow.  \nSince we are using the Paranoid Pirate Pattern, we needed a pirate name !\n\n\u003ch2 align=\"center\"\u003eContribute\u003c/h2\u003e\n\nTo contribute, install the package locally, create your own branch, add your code (and tests, and documentation), and open a PR !\n\n### Pre-commit hooks\n\nPre-commit hooks are set to check the code added whenever you commit something.\n\nIf you never ran the hooks before, install it with :\n\n```bash\npre-commit install\n```\n\n---\n\nThen you can just try to commit your code. If you code does not meet the quality required by linters, it will not be committed. You can just fix your code and try to commit again !\n\n---\n\nYou can manually run the pre-commit hooks with :\n\n```bash\npre-commit run --all-files\n```\n\n### Tests\n\nWhen you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary !\n\nYou can run the tests with :\n\n```bash\npytest\n```\n\n---\n\nPre-commit hooks will not run the tests, but it will automatically update the coverage badge !\n\n### Documentation\n\nThe documentation should be kept up-to-date. You can visualize the documentation locally by running :\n\n```bash\nmkdocs serve\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastariul%2Fgibbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastariul%2Fgibbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastariul%2Fgibbs/lists"}