{"id":13780942,"url":"https://github.com/Oxid15/cascade","last_synced_at":"2025-05-11T14:34:27.915Z","repository":{"id":37041789,"uuid":"460920693","full_name":"Oxid15/cascade","owner":"Oxid15","description":"Lightweight and modular MLOps library targeted at small teams or individuals","archived":false,"fork":false,"pushed_at":"2025-05-04T09:38:23.000Z","size":46979,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T10:32:06.584Z","etag":null,"topics":["experiment-tracking","feature-selection","machine-learning","ml","ml-experimentation","mlops","model-lifecycle","model-selection"],"latest_commit_sha":null,"homepage":"https://oxid15.github.io/cascade/en/latest","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/Oxid15.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-18T16:14:46.000Z","updated_at":"2025-04-06T12:33:02.000Z","dependencies_parsed_at":"2023-02-19T00:45:57.002Z","dependency_job_id":"77c47170-d635-49ea-a66e-a18ca9b2514f","html_url":"https://github.com/Oxid15/cascade","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oxid15%2Fcascade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oxid15%2Fcascade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oxid15%2Fcascade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oxid15%2Fcascade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oxid15","download_url":"https://codeload.github.com/Oxid15/cascade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253580247,"owners_count":21930908,"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":["experiment-tracking","feature-selection","machine-learning","ml","ml-experimentation","mlops","model-lifecycle","model-selection"],"created_at":"2024-08-03T18:01:21.350Z","updated_at":"2025-05-11T14:34:24.671Z","avatar_url":"https://github.com/Oxid15.png","language":"Python","funding_links":[],"categories":["Model Lifecycle"],"sub_categories":[],"readme":"![header](cascade/docs/imgs/header.png)\n\n![ver](https://img.shields.io/github/v/release/oxid15/cascade?style=plastic)\n![build](https://github.com/oxid15/cascade/actions/workflows/python-package.yml/badge.svg)\n[![Downloads](https://pepy.tech/badge/cascade-ml)](https://pepy.tech/project/cascade-ml)\n[![DOI](https://zenodo.org/badge/460920693.svg)](https://zenodo.org/badge/latestdoi/460920693)\n\nLightweight and modular MLOps library with the aim to make ML development more efficient targeted at small teams or individuals.\n\nCascade was built especially for individuals or small teams that are in need of MLOps, but don't have time or resources to integrate with platforms.\n\n**Included in [Model Lifecycle](https://github.com/kelvins/awesome-mlops#model-lifecycle) section of Awesome MLOps list**\n\n## Installation\n\n```bash\npip install cascade-ml\n```\n\nMore info on installation can be found in [documentation](https://oxid15.github.io/cascade/en/latest/)\n\n## Docs\n\n[Go to Cascade documentation](https://oxid15.github.io/cascade/en/latest)\n\n## Usage Examples\n\nThis section is divided into blocks based on what problem you can solve using Cascade. These are the simplest examples\nof what the library is capable of. See more in documentation.\n\n### ETL pipeline tracking\n\nData processing pipelines need to be versioned and tracked as a part of model experiments.  \nTo track changes and version everything about data Cascade has `Datasets` - special wrappers\nthat encapsulate operations on data.\n\n```python\nfrom pprint import pprint\nfrom cascade import data as cdd\nfrom sklearn.datasets import load_digits\nimport numpy as np\n\n\nX, y = load_digits(return_X_y=True)\npairs = [(x, y) for (x, y) in zip(X, y)]\n\nds = cdd.Wrapper(pairs)\nds = cdd.RandomSampler(ds)\n\ntrain_ds, test_ds = cdd.split(ds)\ntrain_ds = cdd.ApplyModifier(\n    train_ds,\n    lambda pair: pair + np.random.random() * 0.1 - 0.05\n)\n\npprint(train_ds.get_meta())\n```\n\nWe see all the stages that we did in meta.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see full pipeline metadata\u003c/summary\u003e\n\n```json\n[{\"comments\": [],\n  \"description\": null,\n  \"len\": 898,\n  \"links\": [],\n  \"name\": \"cascade.data.apply_modifier.ApplyModifier\",\n  \"tags\": [],\n  \"type\": \"dataset\"},\n {\"comments\": [],\n  \"description\": null,\n  \"len\": 898,\n  \"links\": [],\n  \"name\": \"cascade.data.range_sampler.RangeSampler\",\n  \"tags\": [],\n  \"type\": \"dataset\"},\n {\"comments\": [],\n  \"description\": null,\n  \"len\": 1797,\n  \"links\": [],\n  \"name\": \"cascade.data.random_sampler.RandomSampler\",\n  \"tags\": [],\n  \"type\": \"dataset\"},\n {\"comments\": [],\n  \"description\": null,\n  \"len\": 1797,\n  \"links\": [],\n  \"name\": \"cascade.data.dataset.Wrapper\",\n  \"obj_type\": \"\u003cclass 'list'\u003e\",\n  \"tags\": [],\n  \"type\": \"dataset\"}]\n```\n\n\u003c/details\u003e\n\nSee all datasets in [zoo](https://oxid15.github.io/cascade/en/latest/modules/dataset_zoo.html)  \nSee tutorial in [documentation](https://oxid15.github.io/cascade/en/latest/tutorials/tutorials.html)\n\n\n### Experiment tracking\n\nCascade provides a rich set of ML-experiment tracking tools.\nYou can easily track history of model changes, save and restore models\nin a structured manner along with metadata.\n\n```python\nimport random\nfrom cascade.models import Model\nfrom cascade.repos import Repo\n\nmodel = Model()\nmodel.add_metric('acc', random.random())\n\nrepo = Repo('./repo')\n\nline = repo.add_line('baseline')\nline.save(model, only_meta=True)\n```\n\n`Repo` is the collection of lines and `Line` can be a bunch of experiments on one model type.\nLines can also store data pipelines.\n\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see full model metadata\u003c/summary\u003e\n\n```json\n[\n    {\n        \"name\": \"cascade.models.model.Model\",\n        \"description\": null,\n        \"tags\": [],\n        \"comments\": [],\n        \"links\": [],\n        \"type\": \"model\",\n        \"created_at\": \"2024-08-25T19:15:24.658259+00:00\",\n        \"metrics\": [\n            {\n                \"name\": \"acc\",\n                \"value\": 0.4323295098641783,\n                \"created_at\": \"2024-08-25T19:15:24.658356+00:00\"\n            }\n        ],\n        \"params\": {},\n        \"path\": \"/home/user/repo/baseline/00000\",\n        \"slug\": \"rustling_finicky_hoatzin\",\n        \"saved_at\": \"2024-08-25T19:15:25.548339+00:00\",\n        \"python_version\": \"3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]\",\n        \"user\": \"user\",\n        \"host\": \"hostname\"\n    }\n]\n```\n\n\u003c/details\u003e\n\n\nSee tutorial in [documentation](https://oxid15.github.io/cascade/en/latest/tutorials/tutorials.html)\n\n\n### Metadata analysis\n\nDuring experiments Cascade produces many metadata which can be analyzed later.\n`MetricViewer` is the tool that allows to see the relationship between parameters and\nmetrics of all models in repository.\n\n```python\nfrom cascade.meta import MetricViewer\nfrom cascade.repos import Repo\n\nrepo = cdm.Repo(\"repo\")\n\n# This runs web-server that relies on optional dependency\nMetricViewer(repo).serve()\n```\n\n![metric-viewer](cascade/docs/imgs/metric-viewer.gif)\n\n`HistoryViewer` allows to see model's lineage, what parameters resulted in what metrics\n\n```python\nfrom cascade import meta as cme\nfrom cascade.repos import Repo\n\n\nrepo = cdm.Repo(\"repo\")\n\n# This returns plotly figure\ncme.HistoryViewer(repo).plot()\n\n# This runs a dash server and allows to see changes in real time (for example while models are trained)\ncme.HistoryViewer(repo).serve()\n```\n\nSee tutorial in [documentation](https://oxid15.github.io/cascade/en/latest/tutorials/tutorials.html)\n\n![history-viewer](cascade/docs/imgs/history-viewer.gif)\n\n## Who could find Cascade useful\n\nML engineers and researchers in small teams or working individually.\nThe price of integrating with large-scale MLOps solutions can be too high and the aim of\nCascade is to bridge this gap for everyone.\n\n## Principles\n\nThe key principles of Cascade are:\n\n* **Elegancy** - ML code should be about ML with minimum meta-code\n* **Flexibility** - to easily build prototypes and integrate existing projects with Cascade *(don't pay for what you don't use)*\n* **Reusability** - code to be reused in similar projects with no effort\n* **Traceability** - everything should have meta-data\n\n## Contributing\n\nPull requests and issues are welcome! For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests and docs as appropriate.\n\n## License\n\n[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/)\n\n## Versions\n\nThis project uses Semantic Versioning - \u003chttps://semver.org/\u003e\n\n## Cite the code\n\nIf you used the code in your research, please cite it with:  \n  \n[![DOI](https://zenodo.org/badge/460920693.svg)](https://zenodo.org/badge/latestdoi/460920693)\n\n```bibtex\n@software{ilia_moiseev_2023_8006995,\n  author       = {Ilia Moiseev},\n  title        = {Oxid15/cascade: Lightweight ML Engineering library},\n  month        = jun,\n  year         = 2023,\n  publisher    = {Zenodo},\n  doi          = {10.5281/zenodo.8006995},\n  url          = {https://doi.org/10.5281/zenodo.8006995}\n}\n```\n\n![footer](cascade/docs/imgs/footer.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOxid15%2Fcascade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOxid15%2Fcascade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOxid15%2Fcascade/lists"}