{"id":18034542,"url":"https://github.com/burlachenkok/flpytorch","last_synced_at":"2025-03-27T06:31:38.284Z","repository":{"id":44377365,"uuid":"512325483","full_name":"burlachenkok/flpytorch","owner":"burlachenkok","description":"FL_PyTorch: Optimization Research Simulator for Federated Learning","archived":false,"fork":false,"pushed_at":"2023-07-07T15:41:46.000Z","size":87731,"stargazers_count":35,"open_issues_count":10,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-23T08:22:03.609Z","etag":null,"topics":["federated-learning","optimization-algorithms"],"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/burlachenkok.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-07-10T02:14:49.000Z","updated_at":"2025-02-14T06:59:09.000Z","dependencies_parsed_at":"2024-10-30T11:22:31.663Z","dependency_job_id":null,"html_url":"https://github.com/burlachenkok/flpytorch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlachenkok%2Fflpytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlachenkok%2Fflpytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlachenkok%2Fflpytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlachenkok%2Fflpytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burlachenkok","download_url":"https://codeload.github.com/burlachenkok/flpytorch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245797569,"owners_count":20673886,"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":["federated-learning","optimization-algorithms"],"created_at":"2024-10-30T11:12:26.275Z","updated_at":"2025-03-27T06:31:33.275Z","avatar_url":"https://github.com/burlachenkok.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](docs/imgs/intro_img.jpg)\n\n# README\n\n# Table of Content\n\n- [About Document](#about-document)\n- [Preparation](#preparation)\n  * [Optional IDE installation](#optional-ide-installation)\n  * [Install Conda environment](#install-conda-environment)\n  * [Prepare Conda environment](#prepare-conda-environment)\n  * [Install packages via pip and virtualenv](#install-packages-via-pip-and-virtualenv)\n  * [Tackling the possible problems in Windows OS](#tackling-the-possible-problems-in-windows-os)\n  * [Ability to edit UI files for Qt5](#ability-to-edit-ui-files-for-qt5)\n    + [Linux](#linux)\n    + [MacOS](#macos)\n  * [Clone the project and create your branch](#clone-the-project-and-create-your-branch)\n- [Start Work](#start-work)\n  * [1. Use GUI](#1-use-gui)\n  * [2. You can not install VCN Server but want to use GUI](#2-you-can-not-install-vcn-server-but-want-to-use-gui)\n  * [3. Use the console command-line interface](#3-use-the-console-command-line-interface)\n- [Obtain Command-Line from GUI](#obtain-command-line-from-gui)\n- [Cleaning after Work](#cleaning-after-work)\n- [Forum](#forum)\n- [Reporting an Issue](#reporting-an-issue)\n- [Another Resources](#another-resources)\n- [About the License](#about-the-license)\n\n\n# About FL_PyTorch\n\n[FL_PyTorch](https://github.com/burlachenkok/flpytorch) is a software suite based on [PyTorch](https://pytorch.org/) to support efficient simulated Federated Learning experiments. This [README.md](README.md) file contains a description of how to prepare and install all needed things to start working with FL_PyTorch.\n\nIf you have already installed and prepared all the needed for a start but need assistance in the following steps, we recommend starting with [TUTORIAL.md](TUTORIAL.md). We also provide automatic generated documentation for the code [pdoc3 documentation](docs/generated) located in \"docs/generated\" folder of the project.\n\n**Materials:**\n* Video Presentation: [Link-1](https://burlachenkok.github.io/FL_PyTorch-presentation-at-rising-starts-in-AI-Symposium/), [Link-2](https://webcast.kaust.edu.sa/mediasite/Showcase/kaust/Presentation/600c852bedf94c8298f92d8c1703f8521d)\n* The arXiv link for the paper: [https://arxiv.org/abs/2202.03099](https://arxiv.org/abs/2202.03099)\n* Original publication [https://dl.acm.org/doi/abs/10.1145/3488659.3493775](https://dl.acm.org/doi/abs/10.1145/3488659.3493775)\n* [FL_PyTorch in deepai.org](https://deepai.org/publication/fl-pytorch-optimization-research-simulator-for-federated-learning)\n* [FL_PyTorch in researchgate.net](https://www.researchgate.net/publication/358422816_FL_PyTorch_optimization_research_simulator_for_federated_learning)\n* The slides, presentations, posters, and video with the project presentation are available in [presentations](presentations). \n\n**Forum:**\n* Slack Workspace: [https://fl-pytorch.slack.com/](https://fl-pytorch.slack.com/)\n* The invitation Link: [https://join.slack.com/t/fl-pytorch/shared_invite/zt-1cjkjct9c-1wuFdrbVT4LcrAcjyj_gBw](https://join.slack.com/t/fl-pytorch/shared_invite/zt-1cjkjct9c-1wuFdrbVT4LcrAcjyj_gBw)\n\n---\n\n# Preparation\n\n## Optional IDE installation\nBecause [FL_PyTorch](https://github.com/burlachenkok/fl_pytorch) during runtime is presented as a single process, it can be debugged using standard IDE for working with [Python](https://www.python.org/), \nlike [PyCharm IDE](https://www.jetbrains.com/pycharm/) or [Visual Studio Code](https://code.visualstudio.com/docs/python/debugging).\n\nSo in case of need to debug source code with your changes, we recommend installing some IDE.\n\n## Install Conda environment\nIf you don't have conda package and environment manager you can install via the following steps for Linux OS:\n```bash\nwget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\nbash Miniconda3-latest-Linux-x86_64.sh -b\nexport PATH=\"${PATH}:~/miniconda3/bin\"\n~/miniconda3/bin/conda init bash \u0026\u0026 source ~/.bashrc \u0026\u0026 conda config --set auto_activate_base false\n```\n\n## Prepare Conda environment\nFor refresh conda commands, you can look into [official Conda cheat sheet](https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf). \n\nCommands below will install all needed software as a part of an environment named **fl**, or you can use the name you prefer.\n\nFor **Windows OS, Linux OS**, please use the following commands to prepare the environment:\n\n```bash\nconda create -n fl python=3.9.1 -y\nconda install -n fl pytorch\"=1.10.0\" torchvision numpy cudatoolkit\"=11.1\" h5py\"=3.6.0\" coloredlogs matplotlib psutil pyqt pytest pdoc3 wandb -c pytorch -c nvidia -c conda-forge -y\n```\n\nFor **Mac OS**, CUDA is not currently available, please install PyTorch without CUDA support:\n\n```bash\nconda create -n fl python=3.9.1 -y\nconda install -n fl pytorch\"=1.10.0\" torchvision numpy h5py\"=3.6.0\" coloredlogs matplotlib psutil pyqt pytest pdoc3 wandb -c pytorch -c nvidia -c conda-forge -y\n```\n\n\n## Install packages via pip and virtualenv\n\nAlternatively, instead of using conda, you can use a standard virtual environment in Python, which sometimes is used instead of Conda.\n\n```bash\npython -m pip install virtualenv\npython -m venv flpip\nsource flpip/bin/activate\npython -m pip install -r requirements.txt -f https://download.pytorch.org/whl/cu113/torch_stable.html\n```\n## Tackling the possible problems in Windows OS\nIn case of any problems with installing PyTorch with CUDA support on a Windows workstation, follow the steps:\n\n1. Install CUDA Toolkit (https://developer.nvidia.com/cuda-toolkit)\n2. Install libCUDNN. You should download and unpack binaries, including all libraries, into the correspondent folders in the local directory with CUDA Toolkit. https://developer.nvidia.com/rdp/cudnn-download\n3. Install a specific version of PyTorch with GPU support. For example, in the following way:\n\n```bash\npip install torch==1.8.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html\n```\n\n## Ability to edit UI files for Qt5 \n\nIn case you want to modify the user interface in the GUI tool via appending extra elements, please make one of the following:\n\n1. Completely install Qt5 SDK, \n2. Install the package with Qt5 tools only, which includes Qt Designer.\n\n### Linux\n\n```bash\nsudo apt-get install qttools5-dev-tools\n```\nApt is a standard package management tool in the Ubuntu OS. If you have never worked with it but want to learn more, this is the best place with various how to:\n[apt-get: How To](https://help.ubuntu.com/community/AptGet/Howto).\n\n### MacOS\n\n```bash\nbrew install qt5\nbrew install --cask qt-creator\n```\n\n## Clone the project and create your branch\n\nInstall git client for your OS if it has not been installed, and clone the project:\n\n```bash\n# Clone project\ngit clone https://github.com/burlachenkok/fl_pytorch\ncd fl_pytorch\n\n# Create a personal branch\ngit branch my_work\ngit checkout my_work\ngit push --set-upstream origin my_work\n```\n\nThere is nothing to compile or pre-build. The project is entirely has been written in [Python](https://www.python.org/) programming language and does not contain any [C++](https://en.cppreference.com/) or [Cython](https://cython.readthedocs.io/en/latest/index.html) parts in it explicitly.\n\n# Start Work\n\nYou have three options to start working. \n## 1. Use GUI\n\nSuppose you interconnect with a physical/remote computing device with a windows management system in such a way you can instantiate an application with a GUI interface.\nIn that case, you can launch our simulation environment with Graphical User Interface(GUI) interface to experiment with optimization algorithms:\n\n```bash\ncd ./fl_pytorch/GUI \npython start.py\n```\nAfter that, you will observe the GUI tool. GUI tool allows launching several experiments simultaneously. The entry point to use the GUI tool launch script is located here [fl_pytorch/GUI/start.py](fl_pytorch/gui/start.py)\n\n## 2. You can not install VCN Server but want to use GUI\n\nAnother scenario may happen when you have access to the machine in a cluster with dedicated installed GPU/CPU compute resources. \nIf you don't have root privileges to install the Windows Management system native for OS or provided as VNC systems like [*tigervncserver*](https://tigervnc.org/), we provide the ability to launch the GUI tool with the following commands:\n\n```bash\ncd ./fl_pytorch/fl_pytorch/GUI \n./start_with_vnc.sh\n```\nTo change the listening port, please directly change *listet_port* parameter inside this bootstrap bash script. \nTo connect remotely for an application instance, please use your host machine and VNC Viewer, e.g. [RealVNC VNC Viewer](https://www.realvnc.com/en/).\nThe booststrap script to launch VNC server is locating here: [fl_pytorch/gui/start_with_vnc.sh](fl_pytorch/gui/start_with_vnc.sh).\n\n## 3. Use the console command-line interface\n\nThe last option is to use the console interface for the experiment. Any research project has many options to select, and our project is not an exception to this rule, but we provide some assistance on that aspect. \nTo observe options for the CLI program, please launch:\n\n```bash\ncd ./fl_pytorch/ \npython ./run.py --help\n```\nThe entry point and the script to use during work with CUI are located here [fl_pytorch/run.py](fl_pytorch/run.py).\n\n# Obtain Command Line from GUI\n\n* The first way is to specify command-line parameters explicitly via using ```python ./run.py ...```\n* Second way is to launch GUI tool ```python start.py```, select Extra-\u003eLow Window(F2), and press one of the command line icons. It will produce a command line for loaded and configured experiments in GUI.\n\n# Cleaning after Work\n\nRemove Conda environment in case you are using Conda: \n```bash\nconda remove --name fl --all\n```\nAnd please remove all not need files in the filesystem, including logs, checkpoints, and saved experiments in binary format.\n\n# Forum\n\nYou are welcome to join the Slack workspace of project and ask questions.\n\n[https://fl-pytorch.slack.com/](https://fl-pytorch.slack.com/)\n\nPlease use this invitation [Link](https://join.slack.com/t/fl-pytorch/shared_invite/zt-1cjkjct9c-1wuFdrbVT4LcrAcjyj_gBw).\n\n# Reporting an Issue\n\nFor bug or feature request, please fill the ticket in the github repository.\n\n# About the License\n\nThe project is distributed under [Apache 2.0 license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburlachenkok%2Fflpytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburlachenkok%2Fflpytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburlachenkok%2Fflpytorch/lists"}