{"id":23887091,"url":"https://github.com/m-pektas/bfas","last_synced_at":"2025-10-08T17:11:45.934Z","repository":{"id":61442872,"uuid":"551611069","full_name":"m-pektas/BFAS","owner":"m-pektas","description":"Brute Force Architecture Search","archived":false,"fork":false,"pushed_at":"2024-01-24T14:47:16.000Z","size":198,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T06:43:37.683Z","etag":null,"topics":["deep-learning","deep-neural-networks","hyperparameter-optimization","mlops","model-comparison","model-compression","nas","neural-architecture-search","python","pytorch","random-search"],"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/m-pektas.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-14T18:33:49.000Z","updated_at":"2023-08-15T18:22:23.000Z","dependencies_parsed_at":"2024-01-24T16:15:10.172Z","dependency_job_id":null,"html_url":"https://github.com/m-pektas/BFAS","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pektas%2FBFAS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pektas%2FBFAS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pektas%2FBFAS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pektas%2FBFAS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-pektas","download_url":"https://codeload.github.com/m-pektas/BFAS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248149926,"owners_count":21055833,"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","deep-neural-networks","hyperparameter-optimization","mlops","model-comparison","model-compression","nas","neural-architecture-search","python","pytorch","random-search"],"created_at":"2025-01-04T07:29:31.603Z","updated_at":"2025-10-08T17:11:40.913Z","avatar_url":"https://github.com/m-pektas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BFAS\nBrute Force Architecture Search\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"assets/logo-min.png\" width=\"25%\" \u003e\n\u003c/p\u003e\n\n*This repository aims to find neural network architecture that shows best performance on your hardware.* \n\n\u003cbr\u003e\n\n## Usage\n\n1. **Create your files**\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"assets/tree-min.png\" width=\"20%\" \u003e\n\u003c/p\u003e\n\n\n2. **Install BFAS with pip**\n```\npip install bfas\n```\n\n3. **Run**\n\n```python\n#app.py\nfrom bfas import BFAS\nfrom bfas.utils.data_types import *\n\nbfas = BFAS(project_name=\"bfas\",\n            archname=\"mobilenetv2_custom\",\n            archs_dir = \"archs\",\n            device=\"cpu\",\n            logger_name=\"tensorboard\",\n            is_logging_active=True,\n            seed=28,\n            )\n\nbfas.rules.addRule(Rule(Metrics.FPS, Limit.MIN, 1))\nbfas.rules.addRule(Rule(Metrics.PARAMCOUNT, Limit.MAX, 10))\nbfas.run(iter_count=5)\n```\n\n\n\n## Description\n\n1. **Architecture file (archname.py)**\n\nThis file contains your neural network architecture. It has Net (torch.nn.module) and the net takes your variables as arguments.\n\n2. **Variables file (archname.json)**\n\nThis file contains information about your variables that in your neural network. We define 2 types variable as \"range\", \"array\". The range variable have start, end and step values. This type variables can have range of values. The array variable have a list of item. In parameter sampling process, parameters sampled from this array.\n\n3. **Application file (app.py)**\n\nIn this file, you can create your bfas experiments. It contains codes like;\n\n```python\n\nfrom bfas import BFAS\nfrom bfas.utils.data_types import *\n\nbfas = BFAS(project_name=\"bfas\",\n            archname=\"resnet50_custom\",\n            archs_dir = \"archs\",\n            device=\"mps\",\n            logger_name=\"wandb\",\n            is_logging_active=True,\n            seed=25,\n            is_training_active=True,\n            dataset=\"cifar10\",\n            batch_size=16,\n            test_step=5,\n            train_step=50,\n            )\n\nbfas.rules.addRule(Rule(Metrics.FPS, Limit.MIN, 20))\nbfas.rules.addRule(Rule(Metrics.PARAMCOUNT, Limit.MIN, 20))\nbfas.run(iter_count=10)\n\n```\nHere, We import the BFAS module and related data_types such as Rule, FPS metric etc. After that, We create BFAS object with necessarly arguments. Then, We add the rules for \"brute force architecture search\" process. If the model can suitable to our rules, we can add this model and their parameter to our logs. This rule adding step is optional. If you don't add any rule, all resulst are going to save to logs. The last operation is run the experiments. You can set iteration count before the running the experiment.\n\n\u003e**Note**\n\u003eIf you want see detailed information about creating environment and designing your experiment, You can look at [guide](docs/guide.md).\n\nWandb logging example here:\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"assets/log-min.png\" width=\"100%\" \u003e\n\u003c/p\u003e\n\n\n\u003e**Note**\n\u003eYou can see our development plan and open tasks for this project from [todo](docs/todo.md) document .\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-pektas%2Fbfas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-pektas%2Fbfas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-pektas%2Fbfas/lists"}