@snoopylion/spider
v0.0.1-beta.4
Published
Collaborative Learning from Scattered Data on Browser
Downloads
12
Readme
@fedml/spider
Collaborative Learning from Scattered Data on Browser
Usage
Install it with any node module manager
# npm npm install @fedml/spider -S # yarn yarn add @fedml/spider -S # pnpm pnpm install @fedml/spider -S
Install peer dependencies
npm i @tensorflow/tfjs @tensorflow/tfjs-vis -S
Import
fedml_train
function to start trainimport { fedml_train } from '@fedml/spider' // prepare running args const client_id = YOUR_CLIENT_ID const run_args = await AnyFunctionFetchRunArgs(...) // start training fedml_train(run_args, client_id, { // customDataLoader?: <Optional: Your custom data loader> })
API
type DataLoader = ( args: any, client_id: any, trainBatchSize: number, testBatchSize: number ) => Promise<{ trainData: any trainDataLabel: any testData: any testDataLabel: any }> interface Options { customDataLoader?: DataLoader } function fedml_train( run_args: any, client_id: string | number, options?: Options ): Promise<void>
Contributing
We recommend that you use pnpm
(https://pnpm.io/installation) as the package manager.
catalog
src
: Here the source codes, andsrc/index.ts
is the entry file for rollup bundle.dist
: The rollup bundle artifacts is output here. This will be not be committed to the GitHub codebase, however, will be released to npm.
script
pnpm install
: Bootstrap dependencies of this project.pnpm run dev
: Starting rollup bundler withwatch
mode.pnpm run lint:fix
: Format source code style undersrc
folder with eslint and prettier.pnpm run release
(Authorization required ): Release a upgraded version package to npm, then mark and push a released tag to GitHub.