UNPKG

federer

Version:

Experiments in asynchronous federated learning and decentralized learning

65 lines (64 loc) 2.42 kB
/** * Converts a relative path to an absolute one. * * Assumes the current directory is the root of this project (i.e. where * `package.json` is located). * * @param relative Relative path, based on the root of the project directory * @returns Absolute path to */ export declare function absolute(relative: string): string; /** * Converts an absolute path to a relative one. * * The path must be in the current project's directory, and must be absolute. * The relative path is relative to the root of the project (i.e. where * `package.json` is located). * * @param absolute Absolute path, in the project directory * @returns Relative path to `absolute`, based on the root of the project */ export declare function relative(absolute: string): string; /** Returns whether two paths are equivalent. */ export declare function pathsEqual(path1: string, path2: string): boolean; /** Returns whether `parent` is a parent directory of `child` */ export declare function isParentDirectory(parent: string, child: string): boolean; export declare const absolutePath: { readonly data: { /** * Returns the path to an experiment's raw data directory. This directory * contains the raw, immutable source data. */ readonly raw: (experimentName: string) => string; /** * Returns the path to an experiment's raw data directory. This directory * contains data processed from the {@link rawDataDirectory}. */ readonly processed: (experimentName: string) => string; }; readonly models: { /** * Returns the path to an experiment's federated model save directory on the * server. */ readonly server: (experimentName: string) => string; /** * Returns the path to an experiment's federated model on the coordinator. */ readonly coordinator: (experimentName: string, runName: string) => string; }; readonly weights: { /** * Returns the path to the file on the server containing weights of an * experiment's federated model. */ readonly server: (experimentName: string, modelName: string) => string; }; }; /** * Creates a path recursively, similarly to `mkdir -p $path`. * * @param path Path to create */ export declare function mkdirp(path: string): void; //# sourceMappingURL=paths.d.ts.map