federer
Version:
Experiments in asynchronous federated learning and decentralized learning
28 lines • 1.38 kB
TypeScript
import * as tf from "@tensorflow/tfjs-node";
import { RoundResults } from "..";
import { DataSubset, RoundSummary } from "../../common";
import { CoordinatorOptions } from "../options/coordinator";
import { PrioritizedLockedTaskRunner } from "../PrioritizedLockedTaskRunner";
/** The evaluator is a class responsible for evaluating models. */
export declare class Evaluator {
protected readonly model: tf.Sequential;
protected readonly testSet: DataSubset;
protected readonly options: CoordinatorOptions;
/** Task runner for evaluation tasks. */
protected readonly evaluationTaskRunner: PrioritizedLockedTaskRunner;
constructor(model: tf.Sequential, testSet: DataSubset, options: CoordinatorOptions);
/**
* Evaluates the results sent by the server to the coordinator. The promise is
* rejected if a higher-priority evaluation request is received before we
* start evaluating the current evaluation request.
*
* @param summary Round summary, sent by the server
* @returns A promise that resolves to the evaluation results if evaluation
* was run, or that rejects if a newer round summary was received before we
* started evaluating `summary`
*/
evaluate(summary: RoundSummary): Promise<RoundResults>;
private setModelWeights;
private parseEvaluationResults;
}
//# sourceMappingURL=Evaluator.d.ts.map