xain_fl package¶
XAIN FL init
Subpackages¶
Submodules¶
xain_fl.logger module¶
XAIN FL structured logger
-
xain_fl.logger.
configure_aimetrics_logger
()¶ Configure a logger named “aimetrics” with a configurable log level.
-
xain_fl.logger.
configure_structlog
()¶ Set the structlog configuration
-
xain_fl.logger.
get_logger
(name, level=None)¶ Wrap python logger with default configuration of structlog.
-
xain_fl.logger.
initialize_logging
()¶ Set up logging
-
xain_fl.logger.
set_log_level
(level)¶ Set the log level on the root logger. Since by default, the root logger log level is inherited by all the loggers, this is like setting a default log level.
- Parameters
level (
Union
[str
,int
]) – the log level, as documented in the Python standard library
xain_fl.serve module¶
XAIN FL serving
-
xain_fl.serve.
serve
(coordinator, server_config)¶ Start a coordinator service and keep it running until an interruption signal (
SIGINT
) is received.- Parameters
coordinator (
Coordinator
) –xain_fl.coordinator.coordinator.Coordinator
instance to runstore – client for the storage service used by the coordinator to upload the aggregated weights and retrieve the participants weights.
server_config (
ServerConfig
) – server configuration: binding address, gRPC options, etc.
- Return type
None