Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jul 15, 2024
1 parent 8fbcd94 commit 58526c7
Show file tree
Hide file tree
Showing 515 changed files with 110,502 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nebula.enriquetomasmb.com
nebula.enriquetomasmb.com
Binary file added _images/armasuisse.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/docker-required-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/nebula-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/umu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/uzh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions _sources/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
API Reference
=============

This page contains auto-generated API reference documentation [#f1]_.

.. toctree::
:titlesonly:


.. [#f1] Created by `Enrique Tomás Martínez Beltrán <https://www.enriquetomasmb.com/>`_
110 changes: 110 additions & 0 deletions _sources/api/nebula/addons/attacks/attacks/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
:py:mod:`nebula.addons.attacks.attacks`
=======================================

.. py:module:: nebula.addons.attacks.attacks
Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

nebula.addons.attacks.attacks.Attack
nebula.addons.attacks.attacks.GLLNeuronInversionAttack
nebula.addons.attacks.attacks.NoiseInjectionAttack
nebula.addons.attacks.attacks.SwappingWeightsAttack
nebula.addons.attacks.attacks.DelayerAttack



Functions
~~~~~~~~~

.. autoapisummary::

nebula.addons.attacks.attacks.create_attack



.. py:function:: create_attack(attack_name)
Function to create an attack object from its name.


.. py:class:: Attack
.. py:method:: attack(received_weights)
:abstractmethod:

Function to perform the attack on the received weights. It should return the
attacked weights.



.. py:class:: GLLNeuronInversionAttack(strength=5.0, perc=1.0)
Bases: :py:obj:`Attack`

Function to perform neuron inversion attack on the received weights.

.. py:method:: attack(received_weights)
Function to perform the attack on the received weights. It should return the
attacked weights.



.. py:class:: NoiseInjectionAttack(strength=10000, perc=1.0)
Bases: :py:obj:`Attack`

Function to perform noise injection attack on the received weights.

.. py:method:: attack(received_weights)
Function to perform the attack on the received weights. It should return the
attacked weights.



.. py:class:: SwappingWeightsAttack(layer_idx=0)
Bases: :py:obj:`Attack`

Function to perform swapping weights attack on the received weights. Note that this
attack performance is not consistent due to its stochasticity.

Warning: depending on the layer the code may not work (due to reshaping in between),
or it may be slow (scales quadratically with the layer size).
Do not apply to last layer, as it would make the attack detectable (high loss
on malicious node).

.. py:method:: attack(received_weights)
Function to perform the attack on the received weights. It should return the
attacked weights.



.. py:class:: DelayerAttack
Bases: :py:obj:`Attack`

Function to perform delayer attack on the received weights. It delays the
weights for an indefinite number of rounds.

.. py:method:: attack(received_weights)
Function to perform the attack on the received weights. It should return the
attacked weights.



24 changes: 24 additions & 0 deletions _sources/api/nebula/addons/attacks/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:py:mod:`nebula.addons.attacks`
===============================

.. py:module:: nebula.addons.attacks
Subpackages
-----------
.. toctree::
:titlesonly:
:maxdepth: 3

poisoning/index.rst


Submodules
----------
.. toctree::
:titlesonly:
:maxdepth: 1

attacks/index.rst


36 changes: 36 additions & 0 deletions _sources/api/nebula/addons/attacks/poisoning/datapoison/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
:py:mod:`nebula.addons.attacks.poisoning.datapoison`
====================================================

.. py:module:: nebula.addons.attacks.poisoning.datapoison
Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

nebula.addons.attacks.poisoning.datapoison.datapoison
nebula.addons.attacks.poisoning.datapoison.add_x_to_image
nebula.addons.attacks.poisoning.datapoison.poison_to_nlp_rawdata



.. py:function:: datapoison(dataset, indices, poisoned_persent, poisoned_ratio, targeted=False, target_label=3, noise_type='salt')
Function to add random noise of various types to the dataset.


.. py:function:: add_x_to_image(img)
Add a 10*10 pixels X at the top-left of an image


.. py:function:: poison_to_nlp_rawdata(text_data, poisoned_ratio)
for NLP data, change the word vector to 0 with p=poisoned_ratio


17 changes: 17 additions & 0 deletions _sources/api/nebula/addons/attacks/poisoning/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:py:mod:`nebula.addons.attacks.poisoning`
=========================================

.. py:module:: nebula.addons.attacks.poisoning
Submodules
----------
.. toctree::
:titlesonly:
:maxdepth: 1

datapoison/index.rst
labelflipping/index.rst
modelpoison/index.rst


Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:py:mod:`nebula.addons.attacks.poisoning.labelflipping`
=======================================================

.. py:module:: nebula.addons.attacks.poisoning.labelflipping
Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

nebula.addons.attacks.poisoning.labelflipping.labelFlipping



.. py:function:: labelFlipping(dataset, indices, poisoned_persent=0, targeted=False, target_label=4, target_changed_label=7)
select flipping_persent of labels, and change them to random values.
:param dataset: the dataset of training data, torch.util.data.dataset like.
:param indices: Indices of subsets, list like.
:param flipping_persent: The ratio of labels want to change, float like.


24 changes: 24 additions & 0 deletions _sources/api/nebula/addons/attacks/poisoning/modelpoison/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:py:mod:`nebula.addons.attacks.poisoning.modelpoison`
=====================================================

.. py:module:: nebula.addons.attacks.poisoning.modelpoison
Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

nebula.addons.attacks.poisoning.modelpoison.modelpoison



.. py:function:: modelpoison(model, poisoned_ratio, noise_type='gaussian')
Function to add random noise of various types to the model parameter.


Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
:py:mod:`nebula.addons.blockchain.blockchain_deployer`
======================================================

.. py:module:: nebula.addons.blockchain.blockchain_deployer
Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

nebula.addons.blockchain.blockchain_deployer.BlockchainDeployer




Attributes
~~~~~~~~~~

.. autoapisummary::

nebula.addons.blockchain.blockchain_deployer.w3
nebula.addons.blockchain.blockchain_deployer.b


.. py:data:: w3
.. py:class:: BlockchainDeployer(n_validator=3, config_dir='.', input_dir='.')
Creates files (docker-compose.yaml and genesis.json) for deploying blockchain network


.. py:data:: b
6 changes: 6 additions & 0 deletions _sources/api/nebula/addons/blockchain/chaincode/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:py:mod:`nebula.addons.blockchain.chaincode`
============================================

.. py:module:: nebula.addons.blockchain.chaincode
6 changes: 6 additions & 0 deletions _sources/api/nebula/addons/blockchain/geth/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:py:mod:`nebula.addons.blockchain.geth`
=======================================

.. py:module:: nebula.addons.blockchain.geth
26 changes: 26 additions & 0 deletions _sources/api/nebula/addons/blockchain/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
:py:mod:`nebula.addons.blockchain`
==================================

.. py:module:: nebula.addons.blockchain
Subpackages
-----------
.. toctree::
:titlesonly:
:maxdepth: 3

chaincode/index.rst
geth/index.rst
oracle/index.rst


Submodules
----------
.. toctree::
:titlesonly:
:maxdepth: 1

blockchain_deployer/index.rst


Loading

0 comments on commit 58526c7

Please sign in to comment.