{"id":15645925,"url":"https://github.com/scitator/kittylyst","last_synced_at":"2025-04-30T11:43:44.383Z","repository":{"id":54975252,"uuid":"298849995","full_name":"Scitator/kittylyst","owner":"Scitator","description":"A tiny Catalyst-like experiment runner framework on top of micrograd.","archived":false,"fork":false,"pushed_at":"2021-01-18T16:01:58.000Z","size":568,"stargazers_count":52,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-26T15:42:50.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Scitator.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}},"created_at":"2020-09-26T16:02:15.000Z","updated_at":"2024-01-04T16:50:41.000Z","dependencies_parsed_at":"2022-08-14T07:50:56.646Z","dependency_job_id":null,"html_url":"https://github.com/Scitator/kittylyst","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fkittylyst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fkittylyst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fkittylyst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scitator%2Fkittylyst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scitator","download_url":"https://codeload.github.com/Scitator/kittylyst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232812211,"owners_count":18580131,"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":[],"created_at":"2024-10-03T12:10:36.053Z","updated_at":"2025-01-07T02:26:48.874Z","avatar_url":"https://github.com/Scitator.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kittylyst\n\n![kitty](assets/kitty.jpg)\n\nA tiny [Catalyst](https://github.com/catalyst-team/catalyst)-like \nexperiment runner framework on top of \n[micrograd](https://github.com/karpathy/micrograd).\n\nImplements `Experiment`, `Runner` and `Callback` Catalyst-core abstractions \nand has extra [PyTorch](https://github.com/pytorch)-like micrograd modules - \n`MicroLoader`, `MicroCriterion`, `MicroOptimizer` and `MicroScheduler`.\n\nEvery module is tiny, with about 100 lines of code (even this readme).\nHowever, this is enough to make `Kittylyst` easily extendable \nfor any number of data sources and support multi-stage experiments,\nas the demo notebook shows.\n\nPotentially useful for educational purposes.\n\n### Installation\n\n```bash\npip install kittylyst\n```\n\n### Example usage\n\n```python\nfrom micrograd.nn import MLP\nimport kittylyst as kt\n\nloaders = {\"train\": kt.MicroLoader(...), \"valid\": kt.MicroLoader(...)}\nmodel = MLP(2, [16, 16, 1])\ncriterion = kt.MicroCriterion()\noptimizer = kt.MicroOptimizer(model)\nscheduler = kt.MicroScheduler(optimizer, num_epochs=10)\nexperiment = kt.Experiment(\n    model=model,\n    criterion=criterion,\n    optimizer=optimizer,\n    scheduler=scheduler,\n    loaders=loaders,\n    num_epochs=10,\n    callbacks=[\n        kt.CriterionCallback(),\n        kt.AccuracyCallback(),\n        kt.OptimizerCallback(),\n        kt.SchedulerCallback(),\n        kt.LoggerCallback(),\n    ],\n    verbose=True,\n)\n\nkt.SupervisedRunner().run_experiment(experiment)\n```\n\n### Running an experiment\n\nThe notebook `demo.ipynb` provides a full demo of\nrunning an `Experiment` with `SupervisedRunner`\nfor  binary classification task.\nThis is achieved by training `MLP` from `micrograd` module\nwith a simple svm \"max-margin\" binary classification loss (`MicroCriterion`)\nand SGD (`MicroOptimizer`) with learning rate decay (`MicroScheduler`).\n\nAs shown in the notebook, \nusing a 2-layer neural net with two 16-node hidden layers \nwe achieve the following decision boundary on the moon dataset:\n\n![2d neuron](assets/moon_mlp.png)\n\n### Running codestyle\n\nTo run the codestyle check you will have to install \n[catalyst-codestyle](https://github.com/catalyst-team/codestyle). Then simply:\n\n```bash\ncatalyst-make-codestyle\n```\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscitator%2Fkittylyst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscitator%2Fkittylyst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscitator%2Fkittylyst/lists"}