{"id":18674031,"url":"https://github.com/jmaczan/darts-toolkit","last_synced_at":"2026-05-15T21:04:04.045Z","repository":{"id":257926615,"uuid":"872904362","full_name":"jmaczan/darts-toolkit","owner":"jmaczan","description":"Differentiable Architecture Search Toolkit in PyTorch Lightning","archived":false,"fork":false,"pushed_at":"2024-12-17T12:32:26.000Z","size":233,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T06:49:26.690Z","etag":null,"topics":["artificial-intelligence","darts","deep-learning","differentiable-architecture-search","machine-learning","nas","neural-architecture-search","pc-darts","pcdarts","pytorch","pytorch-lightning","research"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmaczan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-15T09:19:25.000Z","updated_at":"2025-07-18T18:26:25.000Z","dependencies_parsed_at":"2024-12-13T22:26:14.480Z","dependency_job_id":"5c2edea9-4680-4670-8004-b0f889f42e6a","html_url":"https://github.com/jmaczan/darts-toolkit","commit_stats":null,"previous_names":["jmaczan/pc-darts","jmaczan/lightning-pc-darts","jmaczan/darts-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmaczan/darts-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fdarts-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fdarts-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fdarts-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fdarts-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmaczan","download_url":"https://codeload.github.com/jmaczan/darts-toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmaczan%2Fdarts-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274135493,"owners_count":25228203,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":["artificial-intelligence","darts","deep-learning","differentiable-architecture-search","machine-learning","nas","neural-architecture-search","pc-darts","pcdarts","pytorch","pytorch-lightning","research"],"created_at":"2024-11-07T09:17:17.217Z","updated_at":"2026-05-15T21:03:59.013Z","avatar_url":"https://github.com/jmaczan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `darts-toolkit`\n\nDifferentiable Architecture Search Toolkit in PyTorch Lightning\n\n\u003e [!TIP]\n\u003e Boost your research and use solid engineering practices out-of-the-box\n\nUse this toolkit to:\n\n- Research your own DARTS algorithm with pre-built components and create your own components\n- Use existing DARTS architectures, like [Partially-Connected](https://arxiv.org/abs/1907.05737) [Differentiable Architecture Search](https://arxiv.org/abs/1806.09055)\n- Configure hyperparameters with `yaml` files\n- Scale to multiple GPUs with no effort\n- Visualize your neural network architecture\n\n## Examples\n\n#### Find a network architecture for image recognition\n\n```py\nfrom darts_toolkit.models import LPCDARTSLightningModule\nfrom darts_toolkit.data import CIFAR10DataModule\nfrom darts_toolkit.utils.yaml import load_config\nimport yaml\n\n# Load configuration\nconfig = load_config(os.path.join(\"src\", \"config.yaml\"))\n\n# Create data module\ndata_module = CIFAR10DataModule(config)\n\n# Create model\nmodel = LPCDARTSLightningModule(config)\n\n# Search phase\nsearch_model = LPCDARTSLightningModule(config)\nsearch_trainer = pl.Trainer(\n    max_epochs=config[\"training\"][\"max_epochs\"],\n    accelerator=\"gpu\" if config[\"training\"].get(\"gpus\") else \"auto\",\n    devices=config[\"training\"].get(\"gpus\") or \"auto\",\n    callbacks=[RichProgressBar()],\n    logger=TensorBoardLogger(\n        config[\"logging\"][\"log_dir\"],\n        name=f\"{config['logging']['experiment_name']}_search\",\n    ),\n)\n\n# Train the search model\nsearch_trainer.fit(search_model, data_module)\n\n# Test the search model\nsearch_trainer.test(search_model, datamodule=data_module)\n```\n\n#### Train a derived architecture\n\n```py\n# Derive and train the final architecture\nderived_architecture = search_model.derive_architecture()\nderived_model = DerivedPCDARTSModel(\n    derived_architecture=derived_architecture, config=config\n)\n\nderived_trainer = pl.Trainer(\n    max_epochs=config[\"training\"][\"derived_epochs\"],\n    accelerator=\"gpu\" if config[\"training\"].get(\"gpus\") else \"auto\",\n    devices=config[\"training\"].get(\"gpus\") or \"auto\",\n    callbacks=[ModelCheckpoint(monitor=\"val_acc\", mode=\"max\"), RichProgressBar()],\n    logger=TensorBoardLogger(\n        config[\"logging\"][\"log_dir\"],\n        name=f\"{config['logging']['experiment_name']}_derived\",\n    ),\n)\n\n# Train the derived model\nderived_trainer.fit(\n    derived_model,\n    train_dataloaders=data_module.train_dataloader()[\"train\"],\n    val_dataloaders=data_module.val_dataloader(),\n)\n\n# Test the derived model\nderived_trainer.test(derived_model, datamodule=data_module)\n```\n\n## Install\n\nUsing pip:\n\n```sh\npip install git+https://github.com/jmaczan/darts-toolkit.git\n```\n\nUsing uv:\n\n```sh\nuv pip install git+https://github.com/jmaczan/darts-toolkit.git\n```\n\n## Install (for development)\n\n```sh\ngit clone https://github.com/jmaczan/darts-toolkit.git\ncd darts-toolkit\n\n# Install using uv (recommended)\nuv pip install -e .\n\n# Or install using pip\npip install -e .\n```\n\n## Prerequisities\n\nThis project uses [uv](https://docs.astral.sh/uv/getting-started/installation/) for package management\n\nAlso, it uses [Ruff](https://docs.astral.sh/ruff/installation/) for formatting if you run the project in VS Code. You can install Ruff plugin by Astral Software from extensions marketplace and you're good to go\n\n```sh\nuv sync\n```\n\n## Run\n\n```sh\nuv run python -m src.models.lightning_pc_darts\n```\n\n## Cite\n\nIf you use this software in your research, please use the following citation:\n\n```bibtex\n@software{Maczan_PCDARTS_2024,\nauthor = {Maczan, Jędrzej Paweł},\ntitle = {Differentiable Architecture Search Toolkit in PyTorch Lightning},\nurl = {https://github.com/jmaczan/darts-toolkit},\nyear = {2024},\npublisher = {GitHub}\n}\n```\n\n## License\n\nGNU GPLv3\n\n## Author\n\nJędrzej Maczan, 2024\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmaczan%2Fdarts-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmaczan%2Fdarts-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmaczan%2Fdarts-toolkit/lists"}