{"id":26873576,"url":"https://github.com/agh-studies-projects/p2p-network-design-patterns","last_synced_at":"2025-03-31T09:16:26.650Z","repository":{"id":268188961,"uuid":"888424224","full_name":"AGH-studies-projects/P2P-network-design-patterns","owner":"AGH-studies-projects","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-14T19:24:16.000Z","size":457,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T09:16:23.487Z","etag":null,"topics":["agh","design-patterns","grid-search"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AGH-studies-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-14T11:27:20.000Z","updated_at":"2025-03-04T11:10:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"7be97768-8062-4534-9953-a2e2dc358f81","html_url":"https://github.com/AGH-studies-projects/P2P-network-design-patterns","commit_stats":null,"previous_names":["lidiamoryc/designpatterns","agh-studies-projects/p2p-network-design-patterns"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGH-studies-projects%2FP2P-network-design-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGH-studies-projects%2FP2P-network-design-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGH-studies-projects%2FP2P-network-design-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGH-studies-projects%2FP2P-network-design-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AGH-studies-projects","download_url":"https://codeload.github.com/AGH-studies-projects/P2P-network-design-patterns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443541,"owners_count":20778252,"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":["agh","design-patterns","grid-search"],"created_at":"2025-03-31T09:16:25.798Z","updated_at":"2025-03-31T09:16:26.641Z","avatar_url":"https://github.com/AGH-studies-projects.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Design Patterns Project :rocket:\n\n- **[Command](https://refactoring.guru/design-patterns/command)** 📜 - Encapsulates tasks as objects, making it easy to queue and execute tasks dynamically across peers.\n- **[Strategy](https://refactoring.guru/design-patterns/strategy)** 🧠 - Manages grid search methods (e.g., Random Search, Bayesian Search) with flexibility to plug in new strategies.\n- **[Singleton](https://refactoring.guru/design-patterns/singleton)** 🏠 - Ensures a single instance of the peer network configuration across the system.\n- **[Facade](https://refactoring.guru/design-patterns/facade)** - Provides a simplified interface to manage complex P2P interactions and task scheduling.\n\n## **Context**\n\n### **What is Peer-to-Peer?** 🤝\nPeer-to-peer (P2P) is a decentralized network design where nodes (peers) communicate directly with each other. There’s no central server—each peer can act as both a client and a server. This architecture makes systems more robust, scalable, and fault-tolerant.\n\n### **What is Grid Search?** 🔍\nGrid Search is a brute-force technique for **hyperparameter tuning**. It systematically tests all possible combinations of hyperparameters to find the optimal configuration for a machine learning model.\n\n#### **Cookie-Baking Example 🍪**\nImagine you’re baking cookies and experimenting with:\n- **Sugar**: 100g, 150g, 200g\n- **Baking Time**: 10 mins, 15 mins, 20 mins\n\nGrid Search will:\n1. **Test all combinations**: (100g, 10 mins), (100g, 15 mins), … (200g, 20 mins).\n2. **Taste each batch** 🍴 to find the perfect cookie recipe (hyperparameter set) based on flavor (model performance).\n\n## **Installation** ⚙️\n\nMake sure you have **Python `3.10.3`** installed. Then, follow these steps:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/your-username/peer-to-peer-grid-search.git\n   cd peer-to-peer-grid-search\n   ```\n\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## **Usage** 🚀\n\n### **Starting the P2P Grid Search**\n\n3. **Execute the grid search**:\n   ```bash\n   python app.py --port [PORT]\n   ```\n\n4. **Important notes**:\n- The app will inform in the console when the training is finished.\n- You can control possible hyperparams in the app.py file. List of possible models and params is available in file [p2p_network/src/validation/possible_models_and_params.json](p2p_network/src/validation/possible_models_and_params.json).\n- The logs of the training are stored in [p2p_network/src/logger/log.text](p2p_network/src/logger/log.text). You can also find example logs in this file, on this repository.\n\n**For more information about the architecture, read [docs.pdf](docs.pdf). Unfortunately, we provide only Polish version of the document for now.**\n\n\n\n## **Why Peer-to-Peer?** 🌐\n\n1. **Scalability**: Add or remove peers dynamically without disrupting the network.\n2. **Fault Tolerance**: Tasks are redistributed if a peer fails.\n3. **Efficiency**: Leverages the computational power of multiple machines.\n\n\n## **Key Features** 🌟\n\n- 🔗 **Decentralized Task Distribution**: No single point of failure.\n- ⚡ **Parallel Execution**: Tasks run concurrently across peers.\n- 🛠️ **Pluggable Search Strategies**: Swap or extend search methods easily.\n\n## **License** 📜\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagh-studies-projects%2Fp2p-network-design-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagh-studies-projects%2Fp2p-network-design-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagh-studies-projects%2Fp2p-network-design-patterns/lists"}