Skip to content

synergylabs/VeriSplit

Repository files navigation

VeriSplit

ImageNet Dataset

Requires manual download. Please follow instructions here: https://www.tensorflow.org/datasets/catalog/imagenet2012_subset

Eventually, you would have a prepared dataset in ~/datasets/tf-record.

Docker Setup

  1. Install Docker
  2. Run the tensorflow/tensorflow:2.11.0-jupyter image and mount the VeriSplit directory
    • use --network="host" to run the Jupyter Notebook from a VM
    • use -it --entrypoint /bin/bash to get a shell instead
    • you can mount the VeriSplit directory and cd to it directly using something like
      docker run -it --entrypoint /bin/bash --network="host" --rm -v ~/VeriSplit:/VeriSplit -v ~/datasets:/root/datasets -w /VeriSplit tensorflow/tensorflow:2.11.0-jupyter
  3. Run ./bin/docker-setup.sh

VeriSplit Setup

  1. Run ./bin/setup.sh
  2. Run ./bin/compile_protobuf_schema.sh
  3. Run pip install -e . to install all requirements

Execution

To make sure everything works, run the following command

python verifier.py --config=config/verifier.py --config.offload=False --config.verify.enable=False --config.data.batch_size=4 --config.data.sample=4

[Optional] Enable Collection of Evaluation Results

By default, we disable data collection of evaluation results. If you want to enable it, you need to configure the backend database properly (e.g., setting up a MySQL host) and configure Verisplit in the following steps:

mv dbify_config ~/.dbify_config
vim ~/.dbify_config  # Set up the correct username, password, and MySQL database address 

After you edit the file with correct credentials, you can run the programs with the flag:

python [verifier.py/worker.py] <options and configs> --config.store_eval_results.enable=True

Example of a single Worker and Verifier running on a local network

Worker: python worker.py --config=config/worker.py --config.port=15316
Verifier: python verifier.py --config=config/verifier.py --config.worker.ips=127.0.0.1 --config.worker.ports=15316 --config.offload=True --config.verify.enable=False --config.data.batch_size=4 --config.data.sample=4

For multiple workers, separate their IP addresses and ports with commas

Verifier: python verifier.py --config=config/verifier.py --config.worker.ips=127.0.0.1,127.0.0.1 --config.worker.ports=15316,15330 --config.offload=True --config.verify.enable=False --config.data.batch_size=4 --config.data.sample=4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published