{"id":13738210,"url":"https://github.com/Scitator/animus","last_synced_at":"2025-05-08T16:32:47.261Z","repository":{"id":40402742,"uuid":"447092890","full_name":"Scitator/animus","owner":"Scitator","description":"Minimalistic framework to run machine learning experiments.","archived":false,"fork":false,"pushed_at":"2022-06-14T17:23:31.000Z","size":83,"stargazers_count":27,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T18:07:39.030Z","etag":null,"topics":["deep-learning","jax","keras","machine-learning","pytorch","reinforcement-learning","tensorflow"],"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/Scitator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["scitator"]}},"created_at":"2022-01-12T05:48:47.000Z","updated_at":"2025-01-20T01:20:39.000Z","dependencies_parsed_at":"2022-08-09T19:30:24.198Z","dependency_job_id":null,"html_url":"https://github.com/Scitator/animus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fanimus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fanimus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fanimus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fanimus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scitator","download_url":"https://codeload.github.com/Scitator/animus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253105376,"owners_count":21855013,"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":["deep-learning","jax","keras","machine-learning","pytorch","reinforcement-learning","tensorflow"],"created_at":"2024-08-03T03:02:14.569Z","updated_at":"2025-05-08T16:32:46.981Z","avatar_url":"https://github.com/Scitator.png","language":"Python","funding_links":["https://github.com/sponsors/scitator"],"categories":["Python"],"sub_categories":[],"readme":"# Animus\n\n\u003e One framework to rule them all.\n\nAnimus is a \"write it yourself\"-based machine learning framework.\u003cbr/\u003e\nPlease see `examples/` for more information.\u003cbr/\u003e\nFramework architecture is mainly inspired by [Catalyst](https://github.com/catalyst-team/catalyst).\n\n\n### FAQ\n\n\u003cdetails\u003e\n\u003csummary\u003eWhat is Animus?\u003c/summary\u003e\n\u003cp\u003e\n\nAnimus is a general-purpose for-loop-based experiment wrapper. It divides ML experiment with the straightforward logic:\n```python\ndef run(experiment):\n    for epoch in experiment.epochs:\n        for dataset in epoch.datasets:\n            for batch in dataset.batches:\n                handle_batch(batch)\n```\nEach `for` encapsulated with `on_{for}_start`, `run_{for}`, and `on_{for}_end` for  customisation purposes. Moreover, each `for` has its own metrics storage: `{for}_metrics` (`batch_metrics`, `dataset_metrics`, `epoch_metrics`, `experiment_metrics`).\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eWhat are Animus' competitors?\u003c/summary\u003e\n\u003cp\u003e\n\nAny high-level ML/DL libraries, like [Catalyst](https://github.com/catalyst-team/catalyst), [Ignite](https://github.com/pytorch/ignite), [FastAI](https://github.com/fastai/fastai), [Keras](https://github.com/keras-team/keras), etc.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eWhy do we need Animus if we have high-level alternatives?\u003c/summary\u003e\n\u003cp\u003e\n\nAlthough I find high-level DL frameworks an essential step for the community and the spread of Deep Learning (I have written one by myself), they have a few weaknesses. \n\nFirst of all, usually, they are heavily bounded to a single \"low-level\" DL framework ([Jax](https://github.com/google/jax), [PyTorch](https://github.com/pytorch/pytorch), [Tensorflow](https://github.com/tensorflow/tensorflow)). While [\"low-level\" frameworks become close each year](https://twitter.com/fchollet/status/1052228463300493312?s=20), high-level frameworks introduce different synthetic sugar, which makes it impossible for a fair comparison, or complementary use, of \"low-level\" frameworks.\n\n\nSecondly, high-level frameworks introduce high-level abstractions, which:\n- are built with some assumptions in mind, which could be wrong in your case,\n- can cause additional bugs - even \"low-level\" frameworks have quite a lot of them,\n- are really hard to debug/extend because of \"user-friendly\" interfaces and extra integrations.\n\nWhile these steps could seem unimportant in common cases, like supervised learning with `(features, targets)`, they became more and more important during research and heavy pipeline customization (e.g. privacy-aware multi-node distributed training with custom backpropagation).\n\n\nThirdly, many high-level frameworks try to divide ML pipeline into data, hardware, model, etc layers, making it easier for practitioners to start ML experiments and giving teams a tool to separate ML pipeline responsibility between different members. However, while it speeds up the creation of ML pipelines, it disregards that ML experiment results are heavily conditioned on the used model hyperparameters, **and data preprocessing/transformations/sampling**, **and hardware setup**.\u003cbr/\u003e\n*I found this the main reason why ML experiments fail - you have to focus on the whole data transformation pipeline simultaneously, from raw data through the training process to distributed inference, which is quite hard. And that's the reason Animus has Experiment abstraction ([Catalyst](https://github.com/catalyst-team/catalyst) analog - [IRunner](https://github.com/catalyst-team/catalyst/blob/master/catalyst/core/runner.py#L40)), which connects all parts of the experiment: hardware backend, data transformations, model train, and validation/inference logic.*\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eWhat is Animus' purpose?\u003c/summary\u003e\n\u003cp\u003e\n\nHighlight common \"breakpoints\" in ML experiments and provide a unified interface for them.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eWhat is Animus' main application?\u003c/summary\u003e\n\u003cp\u003e\n\nResearch experiments, where you have to define everything on your own to get the results right.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eDoes Animus have any requirements?\u003c/summary\u003e\n\u003cp\u003e\n\nNo. That's the case - only pure Python libraries.\nPyTorch and Keras could be used for extensions.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eDo you have plans for documentation?\u003c/summary\u003e\n\u003cp\u003e\n\nNo. Animus core is about 300 lines of code, so it's much easier to read than 3000 lines of documentation.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n#### Demo\n\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/scitator/animus/blob/main/examples/notebooks/colab_ci_cd.ipynb) [Jax/Keras/Sklearn/Torch pipelines](./examples/notebooks/colab_ci_cd.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/scitator/animus/blob/main/examples/notebooks/XLA_jax.ipynb) [Jax XLA example](./examples/notebooks/XLA_jax.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/scitator/animus/blob/main/examples/notebooks/XLA_torch.ipynb) [Torch XLA example](./examples/notebooks/XLA_torch.ipynb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FScitator%2Fanimus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FScitator%2Fanimus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FScitator%2Fanimus/lists"}