p2pfl.settings module¶
Module to define constants for the p2pfl system.
- class p2pfl.settings.Settings[source]¶
Bases:
object
Class to define global settings for the p2pfl system.
-
AGGREGATION_TIMEOUT:
int
= 60¶ Timeout (seconds) for a node to wait for other models. Timeout starts when the first model is added.
- AMOUNT_LAST_MESSAGES_SAVED = 100¶
Number of last messages saved in the gossip protocol (avoid multiple message processing).
-
CA_CRT:
str
= '/home/runner/work/p2pfl/p2pfl/p2pfl/certificates/ca.crt'¶ CA certificate.
-
CLIENT_CRT:
str
= '/home/runner/work/p2pfl/p2pfl/p2pfl/certificates/client.crt'¶ Client certificate.
-
CLIENT_KEY:
str
= '/home/runner/work/p2pfl/p2pfl/p2pfl/certificates/client.key'¶ Client private key.
-
DISABLE_RAY:
bool
= False¶ Disable Ray for debugging (even if installed).
-
EXCLUDE_BEAT_LOGS:
bool
= True¶ Exclude heartbeat logs.
-
GOSSIP_EXIT_ON_X_EQUAL_ROUNDS:
int
= 4¶ Amount of equal rounds to exit gossiping. Careful, a low value can cause an early stop of gossiping.
-
GOSSIP_MESSAGES_PER_PERIOD:
int
= 100¶ Number of messages to send in each gossip period.
-
GOSSIP_MODELS_PERIOD:
int
= 1¶ Period of gossiping models (times by second).
-
GOSSIP_MODELS_PER_ROUND:
int
= 4¶ Amount of equal rounds to exit gossiping. Careful, a low value can cause an early stop of gossiping.
-
GOSSIP_PERIOD:
float
= 0¶ Period (seconds) for the gossip protocol.
-
GRPC_TIMEOUT:
float
= 0.5¶ Maximum time (seconds) to wait for a gRPC request.
-
HEARTBEAT_PERIOD:
float
= 0.5¶ Period (seconds) to send heartbeats.
-
HEARTBEAT_TIMEOUT:
float
= 2¶ Timeout (seconds) for a node to be considered dead.
-
LOG_DIR:
str
= 'logs'¶ Directory to save logs.
-
LOG_LEVEL:
str
= 'DEBUG'¶ Log level for the system.
-
RESOURCE_MONITOR_PERIOD:
int
= 1¶ Period (seconds) to send resource monitor information.
-
SERVER_CRT:
str
= '/home/runner/work/p2pfl/p2pfl/p2pfl/certificates/server.crt'¶ Server certificate.
-
SERVER_KEY:
str
= '/home/runner/work/p2pfl/p2pfl/p2pfl/certificates/server.key'¶ Server private key.
-
TRAIN_SET_SIZE:
int
= 4¶ Size of the training set.
-
TTL:
int
= 10¶ Time to live (TTL) for a message in the gossip protocol.
-
USE_SSL:
bool
= True¶ Use SSL on experiments.
-
VOTE_TIMEOUT:
int
= 60¶ Timeout (seconds) for a node to wait for a vote.
-
WAIT_HEARTBEATS_CONVERGENCE:
float
= 0.4¶ Time (seconds) to wait for the heartbeats to converge before a learning round starts.
-
AGGREGATION_TIMEOUT: