{"id":13449724,"url":"https://github.com/yahoo/graphkit","last_synced_at":"2025-04-13T09:36:53.851Z","repository":{"id":49770812,"uuid":"61408251","full_name":"yahoo/graphkit","owner":"yahoo","description":"A lightweight Python module for creating and running ordered graphs of computations.","archived":false,"fork":false,"pushed_at":"2023-03-21T02:49:20.000Z","size":112,"stargazers_count":85,"open_issues_count":21,"forks_count":24,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-17T12:11:13.650Z","etag":null,"topics":["computer-vision","machine-learning","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yahoo.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}},"created_at":"2016-06-17T23:41:57.000Z","updated_at":"2024-11-01T06:24:21.000Z","dependencies_parsed_at":"2024-01-13T17:18:34.597Z","dependency_job_id":"d83b19ed-ab9c-484a-903f-eea45775499c","html_url":"https://github.com/yahoo/graphkit","commit_stats":{"total_commits":56,"total_committers":5,"mean_commits":11.2,"dds":0.4821428571428571,"last_synced_commit":"e70718bbc7b394280c39c1fda381bcebd4c3de8d"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fgraphkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fgraphkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fgraphkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fgraphkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yahoo","download_url":"https://codeload.github.com/yahoo/graphkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245761294,"owners_count":20667895,"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":["computer-vision","machine-learning","python"],"created_at":"2024-07-31T06:00:52.500Z","updated_at":"2025-03-27T01:09:42.222Z","avatar_url":"https://github.com/yahoo.png","language":"Python","funding_links":[],"categories":["Graph Computation","Basic Components"],"sub_categories":["Cryptocurrencies","Computation"],"readme":"# GraphKit\n\n[![PyPI version](https://badge.fury.io/py/graphkit.svg)](https://badge.fury.io/py/graphkit) [![Build Status](https://travis-ci.org/yahoo/graphkit.svg?branch=master)](https://travis-ci.org/yahoo/graphkit) [![codecov](https://codecov.io/gh/yahoo/graphkit/branch/master/graph/badge.svg)](https://codecov.io/gh/yahoo/graphkit)\n\n[Full Documentation](https://pythonhosted.org/graphkit/)\n\n\u003e It's a DAG all the way down\n\n## Lightweight computation graphs for Python\n\nGraphKit is a lightweight Python module for creating and running ordered graphs of computations, where the nodes of the graph correspond to computational operations, and the edges correspond to output --\u003e input dependencies between those operations.  Such graphs are useful in computer vision, machine learning, and many other domains.\n\n## Quick start\n\nHere's how to install:\n\n```\npip install graphkit\n```    \n\nHere's a Python script with an example GraphKit computation graph that produces multiple outputs (`a * b`, `a - a * b`, and `abs(a - a * b) ** 3`):\n\n```\nfrom operator import mul, sub\nfrom graphkit import compose, operation\n\n# Computes |a|^p.\ndef abspow(a, p):\n    c = abs(a) ** p\n    return c\n\n# Compose the mul, sub, and abspow operations into a computation graph.\ngraph = compose(name=\"graph\")(\n    operation(name=\"mul1\", needs=[\"a\", \"b\"], provides=[\"ab\"])(mul),\n    operation(name=\"sub1\", needs=[\"a\", \"ab\"], provides=[\"a_minus_ab\"])(sub),\n    operation(name=\"abspow1\", needs=[\"a_minus_ab\"], provides=[\"abs_a_minus_ab_cubed\"], params={\"p\": 3})(abspow)\n)\n\n# Run the graph and request all of the outputs.\nout = graph({'a': 2, 'b': 5})\n\n# Prints \"{'a': 2, 'a_minus_ab': -8, 'b': 5, 'ab': 10, 'abs_a_minus_ab_cubed': 512}\".\nprint(out)\n\n# Run the graph and request a subset of the outputs.\nout = graph({'a': 2, 'b': 5}, outputs=[\"a_minus_ab\"])\n\n# Prints \"{'a_minus_ab': -8}\".\nprint(out)\n```\n\nAs you can see, any function can be used as an operation in GraphKit, even ones imported from system modules!\n\n# License\n\nCode licensed under the Apache License, Version 2.0 license. See LICENSE file for terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fgraphkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyahoo%2Fgraphkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fgraphkit/lists"}