nebula.scenarios#
Classes#
A class to represent a scenario. |
|
Module Contents#
- class nebula.scenarios.Scenario(scenario_title, scenario_description, deployment, federation, topology, nodes, nodes_graph, n_nodes, matrix, dataset, iid, partition_selection, partition_parameter, model, agg_algorithm, rounds, logginglevel, accelerator, network_subnet, network_gateway, epochs, attacks, poisoned_node_percent, poisoned_sample_percent, poisoned_noise_percent, with_reputation, is_dynamic_topology, is_dynamic_aggregation, target_aggregation, random_geo, latitude, longitude, mobility, mobility_type, radius_federation, scheme_mobility, round_frequency, mobile_participants_percent, additional_participants, schema_additional_participants)#
A class to represent a scenario.
Attributes: scenario_title : str
Title of the scenario.
- scenario_descriptionstr
Description of the scenario.
- deploymentstr
Type of deployment (e.g., ‘docker’, ‘process’).
- federationstr
Type of federation.
- topologystr
Network topology.
- nodesdict
Dictionary of nodes.
- nodes_graphdict
Graph representation of nodes.
- n_nodesint
Number of nodes.
- matrixlist
Matrix representation of the network.
- datasetstr
Dataset used in the scenario.
- iidbool
Indicator if the dataset is IID.
- partition_selectionstr
Method of partition selection.
- partition_parameterfloat
Parameter for partition selection.
- modelstr
Model used in the scenario.
- agg_algorithmstr
Aggregation algorithm.
- roundsint
Number of rounds.
- logginglevelstr
Logging level.
- acceleratorstr
Accelerator used.
- network_subnetstr
Network subnet.
- network_gatewaystr
Network gateway.
- epochsint
Number of epochs.
- attacksstr
Type of attacks.
- poisoned_node_percentfloat
Percentage of poisoned nodes.
- poisoned_sample_percentfloat
Percentage of poisoned samples.
- poisoned_noise_percentfloat
Percentage of poisoned noise.
- with_reputationbool
Indicator if reputation is used.
- is_dynamic_topologybool
Indicator if topology is dynamic.
- is_dynamic_aggregationbool
Indicator if aggregation is dynamic.
- target_aggregationstr
Target aggregation method.
- random_geobool
Indicator if random geo is used.
- latitudefloat
Latitude for mobility.
- longitudefloat
Longitude for mobility.
- mobilitybool
Indicator if mobility is used.
- mobility_typestr
Type of mobility.
- radius_federationfloat
Radius of federation.
- scheme_mobilitystr
Scheme of mobility.
- round_frequencyint
Frequency of rounds.
- mobile_participants_percentfloat
Percentage of mobile participants.
- additional_participantslist
List of additional participants.
- schema_additional_participantsstr
Schema for additional participants.
- scenario_title#
- scenario_description#
- deployment#
- federation#
- topology#
- nodes#
- nodes_graph#
- n_nodes#
- matrix#
- dataset#
- iid#
- partition_selection#
- partition_parameter#
- model#
- agg_algorithm#
- rounds#
- logginglevel#
- accelerator#
- network_subnet#
- network_gateway#
- epochs#
- attacks#
- poisoned_node_percent#
- poisoned_sample_percent#
- poisoned_noise_percent#
- with_reputation#
- is_dynamic_topology#
- is_dynamic_aggregation#
- target_aggregation#
- random_geo#
- latitude#
- longitude#
- mobility#
- mobility_type#
- radius_federation#
- scheme_mobility#
- round_frequency#
- mobile_participants_percent#
- additional_participants#
- schema_additional_participants#
- attack_node_assign(nodes, federation, attack, poisoned_node_percent, poisoned_sample_percent, poisoned_noise_percent)#
Identify which nodes will be attacked
- mobility_assign(nodes, mobile_participants_percent)#
Assign mobility to nodes
- classmethod from_dict(data)#
- class nebula.scenarios.ScenarioManagement(scenario)#
- scenario#
- start_date_scenario#
- scenario_name#
- root_path#
- host_platform#
- config_dir#
- log_dir#
- cert_dir#
- advanced_analytics#
- config#
- topologymanager = None#
- env_path = None#
- use_blockchain#
- scenario_file#
- settings#
- settings_file#
- nodes#
- static stop_blockchain()#
- static stop_participants()#
- static stop_nodes()#
- load_configurations_and_start_nodes(additional_participants=None, schema_additional_participants=None)#
- create_topology(matrix=None)#
- start_blockchain()#
- start_nodes_docker()#
- start_nodes_process()#
- classmethod remove_files_by_scenario(scenario_name)#
- scenario_finished(timeout_seconds)#