Skip to main content

An SDK for building applications on top of FLock V1

Project description

Flock SDK

An SDK for building applications on top of FLock V1

Creating a new model

Prerequisites: You must have docker and docker compose installed and set up to run as non-root user.

Installing Flock SDK as a package

Installing the SDK as a python package is pretty simple, all you need to do is run pip install .. This should make the SDK accessible globally for importing, which is important to run the examples.

If you are running a local flock chain

  1. Modify the example file and implement the evaluate, train and aggregate functions as required.
  2. Make sure that IPFS is started by running docker-compose up in the client directory
  3. Run ./build_and_upload.sh to build and upload the model definition to IPFS
  4. Modify the MODEL_DEFINITION_HASH in the contracts/deploy.sh file in the client directory to match the returned hash
  5. Rebuild the contracts using docker-compose build and restart the network using docker-compose restart
  6. Launch the clients using instructions in the client directory's README.

If you are running on the official flock chain

  1. Modify the example file and implement the evaluate, train and aggregate functions as required.
  2. Run ./build_and_upload.sh to build and upload the model definition to IPFS
  3. Create a new FlockTask with the returned IPFS hash

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flock_sdk-0.0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

flock_sdk-0.0.1-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page