federer
Version:
Experiments in asynchronous federated learning and decentralized learning
29 lines • 1.33 kB
TypeScript
import * as io from "socket.io";
import { ClientToServerMessages, ServerToClientMessages, FedAsyncServerStartOptions, Weights, SerializedWeights } from "../../common";
import { FLRoundState, FLServer } from "../FLServer";
interface RoundState extends FLRoundState {
/** Weighted sum of the currently received model updates. */
weights: Weights;
/** Serialized representation of the weights */
weightsAtRoundStart: SerializedWeights;
}
export declare class FedAsyncServer extends FLServer<RoundState, FedAsyncServerStartOptions> {
protected expectDeltaUpdates: boolean;
protected getInitialRoundState(initialWeights: Weights): RoundState;
/**
* Registers listeners to react to events on the socket.
*
* @param socket Socket to the client
*/
protected registerSocketListeners(socket: io.Socket<ClientToServerMessages, ServerToClientMessages>): void;
/** Incorporates an upload message into the state. */
private updateRoundState;
/** Ends the current round, and moves on to the next one. */
private endRound;
/** Periodically trigger training tasks on some clients */
private scheduler;
/** Creates a message that informs clients about a given round state. */
private createRoundMessage;
}
export {};
//# sourceMappingURL=FedAsyncServer.d.ts.map