{"id":37074646,"url":"https://github.com/nonabelian/leapy","last_synced_at":"2026-01-14T08:47:23.004Z","repository":{"id":62575447,"uuid":"177252005","full_name":"nonabelian/leapy","owner":"nonabelian","description":"BETA: Real-time inference from scalable machine learning in Python","archived":false,"fork":false,"pushed_at":"2019-05-07T20:15:16.000Z","size":624,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T19:07:53.962Z","etag":null,"topics":["dask","dask-ml","data-science","inference","machine-learning","pipeline","pipelines","real-time","realtime"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonabelian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-23T06:17:14.000Z","updated_at":"2019-05-07T20:16:18.000Z","dependencies_parsed_at":"2022-11-03T18:58:55.845Z","dependency_job_id":null,"html_url":"https://github.com/nonabelian/leapy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nonabelian/leapy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonabelian%2Fleapy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonabelian%2Fleapy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonabelian%2Fleapy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonabelian%2Fleapy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonabelian","download_url":"https://codeload.github.com/nonabelian/leapy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonabelian%2Fleapy/sbom","scorecard":{"id":693765,"data":{"date":"2025-08-11","repo":{"name":"github.com/nonabelian/leapy","commit":"152152eed87572983dd61b27a4a1726b5cb2e615"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T02:59:46.309Z","repository_id":62575447,"created_at":"2025-08-22T02:59:46.309Z","updated_at":"2025-08-22T02:59:46.309Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dask","dask-ml","data-science","inference","machine-learning","pipeline","pipelines","real-time","realtime"],"created_at":"2026-01-14T08:47:20.932Z","updated_at":"2026-01-14T08:47:22.927Z","avatar_url":"https://github.com/nonabelian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![fast](images/leapy.gif)\n\n**Just give me the dataz!**\n\nWelcome!  Leapy is a library for real-time, sub-millisecond inference;\nit provides customizable machine learning pipeline export for fast\nmodel serving. \nThese pipelines are targeted for using Dask's scalable machine learning,\nwhich follows the Scikit-Learn API. However, you can use this framework\ndirectly with Scikit-Learn as well.\n\n```python\npipe = Pipeline([\n        ('fp', FeaturePipeline([('ohe',\n                                 OneHotEncoder(sparse=False),\n                                 [0, 1])])),\n        ('clf', LogisticRegression())\n])\n\npipe.fit(X, y)\n\npipeline_runtime = pipe.to_runtime()               # ⚡⚡⚡ \ninit('./model_repo', pipeline_runtime, df.head())  # Ready to deploy\n```\n\nAnd serve this super fast pipeline:\n```\n$ leap serve --repo ./model_repo\n$ curl localhost:8080:/health\n{\n  \"status\": \"healthy\"\n}\n```\n(See below for benchmarks and a more detailed usage example.)\n\n### Benefits\n\nDask is a Python distributed computing environment in Python with a\nburgeoning machine learning component, compatible with Scikit-Learn's API.\nUsing Leapy's framework, we can serve these pipelines in real-time!\n\nThis means:\n\n* No JVM: No reliance on JVM from using Spark.\n* Python: All Python development and custom transformers -- no Scala \u0026 Java\n          needed!\n* Scale: Scikit-Learn logic and pipelines scaled to clusters.\n* Fast: You're in control of how fast your transformers are.\n* Simple: Easily build and deploy models with Docker.\n* Reliable: Encourages a test-driven approach.\n\u003c!--* MLflow: Serve runtime models (as Scikit-Learn models) through `mlflow`.--\u003e\n\n### Examples\n\n* [Simple](examples/simple)\n    -- Super simple example of creating, testing, and using custom\n    transformers\n* [XGBoost](examples/)\n    -- Advanced example of using XGBoost with Dask, saving, and serving the\n    model.\n\n### Benchmarks\n\nA simple example of what we're going for -- computing a one-hot-encoding,\nwith ~200K labels, of a single data point (dask array `x_da` and numpy array\n`x = x_da.compute()`):\n\n![sample benchmark](images/sample_benchmark.png)\n\nWhere `ohe_dml` (from `dask_ml`) and `ohe` (from `leapy`) are essentially the\nsame; `ohe_sk` is from `scikit-learn` and `ohe_runtime` is from\n`ohe.to_runtime()`. And, running `compute()` on Dask transforms above bumps\nthe time up to about 1 second.\n\nWith the time we save using `ohe_runtime`, we can squeeze in many more\ntransformations and an estimator to still come in under 1ms.\n\n### Example Usage\n\nStart with a dataset in dask arrays, `X`, `y`, and dataframe `ddf`:\npipeline:\n```python\nimport numpy as np\nimport pandas as pd\nimport dask.array as da\nimport dask.dataframe as dd\n\nX_np = np.array([[1, 'a'], [2, 'b']], dtype=np.object)\ndf_pd = pd.DataFrame(X_np, columns=['test_int', 'test_str'])\ny_np = np.array([0, 1])\n\nX = da.from_array(X_np, chunks=X_np.shape)\ny = da.from_array(y_np, chunks=y_np.shape)\nddf = dd.from_pandas(df_pd, npartitions=1)\n```\n\nCreate our pipeline:\n\n```python\nfrom sklearn.pipeline import Pipeline\nfrom dask_ml.linear_model import LogisticRegression\nfrom leapy.dask.transformers import OneHotEncoder\nfrom leapy.dask.pipeline import FeaturePipeline\nfrom leapy.serve import init\n\npipe = Pipeline([\n        ('fp', FeaturePipeline([\n            # One-Hot-Encode 'test_str' feature, drop 'test_int'\n            ('ohe', OneHotEncoder(sparse=False), [1])])),\n        ('clf', LogisticRegression())\n])\n\npipe.fit(X, y)\n```\n\nThen we export to a runtime pipeline and get ready for model serving:\n\n```python\npipe_runtime = pipe.to_runtime()\ninit('./model_repo', pipe_runtime, ddf.head())\n```\n\nFinally we serve the model:\n```\n$ leap serve --repo ./model_repo\n$ curl localhost:8080/predict \\\n    -X POST \\\n    -H \"Content-Type: application/json\" \\\n    --data '{\"test_int\": 1, \"test_str\": \"b\"}'\n{\n  \"prediction\": 1.0\n}\n```\n\n\nFor more on model serving see [leapy/serve/README.md](leapy/serve/README.md).\n\n## Acknowledgments\n\nLeapy is inspired by [MLeap](https://github.com/combust/mleap).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonabelian%2Fleapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonabelian%2Fleapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonabelian%2Fleapy/lists"}