federer
Version:
Experiments in asynchronous federated learning and decentralized learning
33 lines • 1.51 kB
TypeScript
import { Logger } from "winston";
import { ClientStartOptions, LoggerOptions, PathOrURL, ServerStartOptions } from "../common";
import { PreprocessResult } from "./preprocess/PreprocessPipeline";
import { FLNetwork } from "./network/FLNetwork";
import { CoordinatorOptions } from ".";
export interface ExperimentData {
preprocessed: PreprocessResult;
/** Path to the file storing the initial model. */
modelFilePath: string;
experimentName: string;
}
export declare class Experiment {
protected readonly network: FLNetwork;
protected readonly options: CoordinatorOptions;
protected readonly data: ExperimentData;
protected readonly logger: Logger;
/** Client delays, computed from the {@link CoordinatorClientDelayOptions}. */
protected readonly clientDelays: ReadonlyArray<number>;
/** Client logger options. */
protected readonly clientLoggerOptions: LoggerOptions | undefined;
/** Path or URL to model.json */
protected readonly modelPathOrURL: PathOrURL;
constructor(network: FLNetwork, options: CoordinatorOptions, data: ExperimentData, logger: Logger);
private getPathOrUrl;
start(): Promise<void>;
stop(): Promise<void>;
protected startServer(): Promise<void>;
protected startClients(): Promise<void>;
/** Returns the options for client with a given id. */
protected getClientOptions(id: number): ClientStartOptions;
protected getServerOptions(): ServerStartOptions;
}
//# sourceMappingURL=Experiment.d.ts.map