blades


Nameblades JSON
Version 0.1.1234 PyPI version JSON
download
home_page
SummaryA Unified Benchmark Suite for Byzantine Attacks and Defenses in Federated Learning
upload_time2023-11-22 14:17:48
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords deep-learning pytorch federated-learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
.. .. raw:: html

..     <div style="text-align: center;">

.. container:: badges

    .. image:: https://img.shields.io/badge/arXiv-2206.05359-red?logo=arxiv&style=flat-square&link=https%3A%2F%2Farxiv.org%2Fpdf%2F2206.05359.pdf
        :alt: Static Badge
        :target: https://arxiv.org/pdf/2206.05359.pdf

    .. image:: https://img.shields.io/github/last-commit/lishenghui/blades/master?logo=Github
        :alt: GitHub last commit (branch)
        :target: https://github.com/lishenghui/blades

    .. image:: https://img.shields.io/github/actions/workflow/status/lishenghui/blades/.github%2Fworkflows%2Funit-tests.yml?logo=Pytest&logoColor=hsl&label=Unit%20Testing
       :alt: GitHub Workflow Status (with event)

    .. image:: https://img.shields.io/badge/Pytorch-2.0-brightgreen?logo=pytorch&logoColor=red
       :alt: Static Badge
       :target: https://pytorch.org/get-started/pytorch-2.0/

    .. image:: https://img.shields.io/badge/Ray-2.8-brightgreen?logo=ray&logoColor=blue
       :alt: Static Badge
       :target: https://docs.ray.io/en/releases-2.8.0/

    .. image:: https://readthedocs.org/projects/blades/badge/?version=latest
        :target: https://blades.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

    .. image:: https://img.shields.io/github/license/lishenghui/blades?logo=apache&logoColor=red
        :alt: GitHub
        :target: https://github.com/lishenghui/blades/blob/master/LICENSE


.. .. raw:: html

..     <p align=center>
..         <img src="https://github.com/lishenghui/blades/raw/master/docs/source/images/arch.png" width="1000" alt="Blades Logo">
..     </p>

.. image:: https://github.com/lishenghui/blades/raw/master/docs/source/images/arch.png



Installation
==================================================

.. code-block:: bash

    git clone https://github.com/lishenghui/blades
    cd blades
    pip install -v -e .
    # "-v" means verbose, or more output
    # "-e" means installing a project in editable mode,
    # thus any local modifications made to the code will take effect without reinstallation.


.. code-block:: bash

    cd blades/blades
    python train.py file ./tuned_examples/fedsgd_cnn_fashion_mnist.yaml


**Blades** internally calls `ray.tune <https://docs.ray.io/en/latest/tune/tutorials/tune-output.html>`_; therefore, the experimental results are output to its default directory: ``~/ray_results``.

Experiment Results
==================================================

.. image:: https://github.com/lishenghui/blades/raw/master/docs/source/images/fashion_mnist.png

.. image:: https://github.com/lishenghui/blades/raw/master/docs/source/images/cifar10.png




Cluster Deployment
===================

To run **blades** on a cluster, you only need to deploy ``Ray cluster`` according to the `official guide <https://docs.ray.io/en/latest/cluster/user-guide.html>`_.


Built-in Implementations
==================================================
In detail, the following strategies are currently implemented:



Data Partitioners:
==================================================

Dirichlet Partitioner
----------------------

.. image:: https://github.com/lishenghui/blades/blob/master/docs/source/images/dirichlet_partition.png

Sharding Partitioner
----------------------

.. image:: https://github.com/lishenghui/blades/blob/master/docs/source/images/shard_partition.png


Citation
=========

Please cite our `paper <https://arxiv.org/abs/2206.05359>`_ (and the respective papers of the methods used) if you use this code in your own work:

::

   @article{li2023blades,
     title={Blades: A Unified Benchmark Suite for Byzantine Attacks and Defenses in Federated Learning},
     author= {Li, Shenghui and Ju, Li and Zhang, Tianru and Ngai, Edith and Voigt, Thiemo},
     journal={arXiv preprint arXiv:2206.05359},
     year={2023}
   }


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "blades",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "deep-learning,pytorch,federated-learning",
    "author": "",
    "author_email": "Shenghui Li <shenghui.li@it.uu.se>",
    "download_url": "https://files.pythonhosted.org/packages/e4/4b/00a1baee1586ca906a0991fb9172cae06585d8f8d3051b0e945f96cb2b6e/blades-0.1.1234.tar.gz",
    "platform": null,
    "description": "\n.. .. raw:: html\n\n..     <div style=\"text-align: center;\">\n\n.. container:: badges\n\n    .. image:: https://img.shields.io/badge/arXiv-2206.05359-red?logo=arxiv&style=flat-square&link=https%3A%2F%2Farxiv.org%2Fpdf%2F2206.05359.pdf\n        :alt: Static Badge\n        :target: https://arxiv.org/pdf/2206.05359.pdf\n\n    .. image:: https://img.shields.io/github/last-commit/lishenghui/blades/master?logo=Github\n        :alt: GitHub last commit (branch)\n        :target: https://github.com/lishenghui/blades\n\n    .. image:: https://img.shields.io/github/actions/workflow/status/lishenghui/blades/.github%2Fworkflows%2Funit-tests.yml?logo=Pytest&logoColor=hsl&label=Unit%20Testing\n       :alt: GitHub Workflow Status (with event)\n\n    .. image:: https://img.shields.io/badge/Pytorch-2.0-brightgreen?logo=pytorch&logoColor=red\n       :alt: Static Badge\n       :target: https://pytorch.org/get-started/pytorch-2.0/\n\n    .. image:: https://img.shields.io/badge/Ray-2.8-brightgreen?logo=ray&logoColor=blue\n       :alt: Static Badge\n       :target: https://docs.ray.io/en/releases-2.8.0/\n\n    .. image:: https://readthedocs.org/projects/blades/badge/?version=latest\n        :target: https://blades.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n    .. image:: https://img.shields.io/github/license/lishenghui/blades?logo=apache&logoColor=red\n        :alt: GitHub\n        :target: https://github.com/lishenghui/blades/blob/master/LICENSE\n\n\n.. .. raw:: html\n\n..     <p align=center>\n..         <img src=\"https://github.com/lishenghui/blades/raw/master/docs/source/images/arch.png\" width=\"1000\" alt=\"Blades Logo\">\n..     </p>\n\n.. image:: https://github.com/lishenghui/blades/raw/master/docs/source/images/arch.png\n\n\n\nInstallation\n==================================================\n\n.. code-block:: bash\n\n    git clone https://github.com/lishenghui/blades\n    cd blades\n    pip install -v -e .\n    # \"-v\" means verbose, or more output\n    # \"-e\" means installing a project in editable mode,\n    # thus any local modifications made to the code will take effect without reinstallation.\n\n\n.. code-block:: bash\n\n    cd blades/blades\n    python train.py file ./tuned_examples/fedsgd_cnn_fashion_mnist.yaml\n\n\n**Blades** internally calls `ray.tune <https://docs.ray.io/en/latest/tune/tutorials/tune-output.html>`_; therefore, the experimental results are output to its default directory: ``~/ray_results``.\n\nExperiment Results\n==================================================\n\n.. image:: https://github.com/lishenghui/blades/raw/master/docs/source/images/fashion_mnist.png\n\n.. image:: https://github.com/lishenghui/blades/raw/master/docs/source/images/cifar10.png\n\n\n\n\nCluster Deployment\n===================\n\nTo run **blades** on a cluster, you only need to deploy ``Ray cluster`` according to the `official guide <https://docs.ray.io/en/latest/cluster/user-guide.html>`_.\n\n\nBuilt-in Implementations\n==================================================\nIn detail, the following strategies are currently implemented:\n\n\n\nData Partitioners:\n==================================================\n\nDirichlet Partitioner\n----------------------\n\n.. image:: https://github.com/lishenghui/blades/blob/master/docs/source/images/dirichlet_partition.png\n\nSharding Partitioner\n----------------------\n\n.. image:: https://github.com/lishenghui/blades/blob/master/docs/source/images/shard_partition.png\n\n\nCitation\n=========\n\nPlease cite our `paper <https://arxiv.org/abs/2206.05359>`_ (and the respective papers of the methods used) if you use this code in your own work:\n\n::\n\n   @article{li2023blades,\n     title={Blades: A Unified Benchmark Suite for Byzantine Attacks and Defenses in Federated Learning},\n     author= {Li, Shenghui and Ju, Li and Zhang, Tianru and Ngai, Edith and Voigt, Thiemo},\n     journal={arXiv preprint arXiv:2206.05359},\n     year={2023}\n   }\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Unified Benchmark Suite for Byzantine Attacks and Defenses in Federated Learning",
    "version": "0.1.1234",
    "project_urls": {
        "repository": "https://github.com/lishenghui/blades"
    },
    "split_keywords": [
        "deep-learning",
        "pytorch",
        "federated-learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6b2cf0d4331a5a4b886130b2729f074380c6718f66f8a554eb5a0e829dc150b",
                "md5": "7b71c3cb9c30338aef4d9bb4217ef7e4",
                "sha256": "14654cc3e2a4c4efd3f60d340e6d36e6d30352cf5fff7c6227ff1f76a246e0db"
            },
            "downloads": -1,
            "filename": "blades-0.1.1234-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7b71c3cb9c30338aef4d9bb4217ef7e4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 45469,
            "upload_time": "2023-11-22T14:17:46",
            "upload_time_iso_8601": "2023-11-22T14:17:46.270217Z",
            "url": "https://files.pythonhosted.org/packages/d6/b2/cf0d4331a5a4b886130b2729f074380c6718f66f8a554eb5a0e829dc150b/blades-0.1.1234-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e44b00a1baee1586ca906a0991fb9172cae06585d8f8d3051b0e945f96cb2b6e",
                "md5": "a97471cb242fb4c9744402d6fa293f04",
                "sha256": "270ddfab1cd33b581a5d6b1a0ddbd860683f3173c482f0b44a69db1187efafc5"
            },
            "downloads": -1,
            "filename": "blades-0.1.1234.tar.gz",
            "has_sig": false,
            "md5_digest": "a97471cb242fb4c9744402d6fa293f04",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 595571,
            "upload_time": "2023-11-22T14:17:48",
            "upload_time_iso_8601": "2023-11-22T14:17:48.844202Z",
            "url": "https://files.pythonhosted.org/packages/e4/4b/00a1baee1586ca906a0991fb9172cae06585d8f8d3051b0e945f96cb2b6e/blades-0.1.1234.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-22 14:17:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lishenghui",
    "github_project": "blades",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "blades"
}
        
Elapsed time: 0.68865s