{"id":16494666,"url":"https://github.com/devrimcavusoglu/torchrush","last_synced_at":"2026-06-10T09:31:35.994Z","repository":{"id":104379561,"uuid":"556006177","full_name":"devrimcavusoglu/torchrush","owner":"devrimcavusoglu","description":"Powerful torch based deep-learning framework with combination of tools from PyTorch-Lightning and HuggingFace.","archived":false,"fork":false,"pushed_at":"2023-02-12T14:11:05.000Z","size":123,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T21:37:55.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/devrimcavusoglu.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-22T21:11:18.000Z","updated_at":"2023-10-30T10:48:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"7bda8a9e-a60f-4761-920c-6a4442634767","html_url":"https://github.com/devrimcavusoglu/torchrush","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devrimcavusoglu/torchrush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrimcavusoglu%2Ftorchrush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrimcavusoglu%2Ftorchrush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrimcavusoglu%2Ftorchrush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrimcavusoglu%2Ftorchrush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devrimcavusoglu","download_url":"https://codeload.github.com/devrimcavusoglu/torchrush/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrimcavusoglu%2Ftorchrush/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34146871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-11T14:14:55.459Z","updated_at":"2026-06-10T09:31:35.763Z","avatar_url":"https://github.com/devrimcavusoglu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./rsc/logo.png\" width=\"200\" height=\"200\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eTorchRush\u003c/h1\u003e\n\nPowerful torch based deep-learning framework with combination of tools from PyTorch-Lightning and HuggingFace.\n\nYet another framework built on top of PyTorch that is designed with a high speed experimental setup in mind. It also \npossesses the power of allowing you to build and alter the core of the building blocks of your development and/or \nresearch projects. \n\n# Installation\n\nInstall with:\n\n```shell\npip install git+https://github.com/devrimcavusoglu/torchrush.git\n```\n\nor build from source:\n```shell\ngit clone git@github.com:devrimcavusoglu/torchrush.git\ncd torchrush\npip install -e .[dev]\n```\n\n# Training\n\nTraining is easy as follows.\n\n```python\nimport pytorch_lightning as pl\n\nfrom torchrush.data_loader import DataLoader\nfrom torchrush.dataset import GenericImageClassificationDataset\nfrom torchrush.module.lenet5 import LeNetForClassification\n\n# Prepare datasets\ntrain_loader = DataLoader.from_datasets(\n\t\t\"mnist\", split=\"train\", constructor=GenericImageClassificationDataset, batch_size=32\n)\nval_loader = DataLoader.from_datasets(\n\t\t\"mnist\", split=\"test\", constructor=GenericImageClassificationDataset, batch_size=32\n)\n\n# Set module\nmodel = LeNetForClassification(criterion=\"CrossEntropyLoss\", optimizer=\"SGD\", input_size=(28, 28, 1), lr=0.01)\n\n# Train\ntrainer = pl.Trainer(max_epochs=1)\ntrainer.fit(model, train_loader, val_loader)\n```\n\n# Experiment tracking\n\nLogger classes should be imported from `torchrush.loggers` and metrics should be set using `torchrush.MetricCallback`:\n\n```python\nimport pytorch_lightning as pl\n\nfrom torchrush.loggers import TensorBoardLogger, NeptuneLogger\nfrom torchrush.metrics import MetricCallback\n\nmetric_callback = MetricCallback(metrics=['accuracy', 'f1', 'precision', 'recall'])\n\ntrainer = pl.Trainer(\n    max_epochs=10,\n    check_val_every_n_epoch=1,\n    val_check_interval=1.0,\n    logger=[TensorBoardLogger(), NeptuneLogger()],\n    callbacks=[metric_callback]\n)\n```\n\n`metrics` variable in `MetricCallback` can include any [evaluate default metrics](https://huggingface.co/evaluate-metric) or custom metrics from [hf/spaces](https://huggingface.co/spaces).\n\n# Contributing\n\nThis repo is developed and currently maintained by [@devrimcavusoglu](https://github.com/devrimcavusoglu) and [@fcakyon](https://github.com/fcakyon). We welcome any contribution, so do not hesitate :) \n\nBefore opening a PR, run tests and reformat the code with:\n\n```bash\npython -m tests.run_tests -rx\npython -m tests.run_code_style format\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrimcavusoglu%2Ftorchrush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevrimcavusoglu%2Ftorchrush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrimcavusoglu%2Ftorchrush/lists"}