tig-monorepo/tig-benchmarker
2025-05-07 00:55:10 +01:00
..
common Update documentation for native runtime. 2025-05-06 06:51:54 +01:00
master Fix invalid json with new benchmarker config. 2025-05-05 16:49:37 +01:00
nginx Add get-batch-data endpoint to master. 2025-01-18 14:19:26 +00:00
postgres Update workflow to build hypergraph algorithms. 2025-05-07 00:55:10 +01:00
tests Revamped benchmarker with database and UI. 2024-12-06 11:39:09 +00:00
ui Revamped benchmarker with database and UI. 2024-12-06 11:39:09 +00:00
.env Move envvars to .env file. 2024-12-31 22:20:04 +08:00
calc_apy.py Add weighting based on solution ratio. 2025-03-18 21:41:01 +08:00
calc_reward_share.py Add weighting based on solution ratio. 2025-03-18 21:41:01 +08:00
check_reliability.py Add script for checking reliability 2025-03-25 19:54:22 +08:00
docker-compose.yml Add VERBOSE to env var. 2024-12-17 09:30:07 +08:00
README.md Update documentation for native runtime. 2025-05-06 06:51:54 +01:00
slave.py Update slave to pick .so based on cpu architecture. 2025-05-04 11:24:59 +01:00
update_config.py Fix missing key error. 2024-12-17 07:38:12 +08:00
verify_batch.py Add example batch verification script. 2025-01-18 16:51:58 +00:00

tig-benchmarker

Benchmarker for TIG. Expected setup is a single master and multiple slaves on different servers.

Starting Your Master

Simply run:

docker-compose up --build

This uses the .env file:

POSTGRES_USER=postgres
POSTGRES_PASSWORD=mysecretpassword
POSTGRES_DB=postgres
UI_PORT=80
DB_PORT=5432
MASTER_PORT=5115
VERBOSE=

See last section on how to find your player_id & api_key.

Notes:

  • Interaction with the master is via UI: http://localhost
    • If your UI port is not 80, then your UI is accessed via http://localhost:<UI_PORT>
    • If you are running on a server, then your UI is access via: http://<SERVER_IP>
    • Alternatively, you can ssh port forward
  • The config of the master can be updated via the UI
  • Recommend to run dockers in detached mode: docker-compose up --detach
  • You can view the logs of each service individually: docker-compose logs -f <service>
    • There are 4 services: db, master, ui, nginx
  • To query the database, recommend to use pgAdmin

Hard Resetting Your Master

  1. Kill the services: docker-compose down
  2. Delete the database: rm -rf db_data
  3. Start your master

Connecting Slaves

  1. Run the appropiate runtime docker image for your slave. Available flavours are:

    • amd64 (x86_64 compatible)
    • aarch64
    • amd64-cuda12.6.3 (x86_64 compatible)
    • aarch64-cuda12.6.3
    # example
    docker run -it --gpus all ghcr.io/tig-foundation/tig-monorepo/runtime:0.0.1-amd64-cuda12.6.3
    
  2. Run slave.py:

    # runtime docker container should start you in /app
    python3 slave.py --help
    

Notes:

  • If your master is on a different server to your slave, you need to add the option --master <SERVER_IP>
  • To set the number of workers (threads), use the option --workers <NUM_WORKERS>
  • To use a different port, use the option --port <MASTER_PORT>
  • To see all options, use --help

Optimising your Config

See docs.tig.foundation

Finding your API Key

Mainnet

  1. Navigate to https://play.tig.foundation/
  2. Connect your wallet
  3. Your API key can be copied from the bottom left corner of the dashboard

Testnet

  1. Navigate to https://test.tig.foundation/
  2. Connect your wallet
  3. Your API key can be copied from the bottom left corner of the dashboard

License

End User License Agreement