title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned |
---|---|---|---|---|---|---|---|
Sn1 |
π |
yellow |
purple |
streamlit |
1.33.0 |
app.py |
false |
Opentensor Dashboards, made with streamlit. The goal of this repo is to provide a means to visually introspect and quickly analyze key components of the bittensor network, namely the blockchain and AI layers. Furthermore, the dashboard are designed to be useful to beginners and experts alike so that the entire community can benefit from and learn more about the dynamic and decentralized bittensor marketplace. for complete beginners, we refer you to the bittensor repo and official docs.
Repo contents:
- openvalidators dashboard
- openmetagraph dashboard
Both the constantly growing bittensor blockchain and the openvalidators community wandb project produce many GB per day. Storing, analyzing and visualizing such a large volume of data can be challenging, and in acknowledgement of this fact there are ongoing developments to the repo in the following way, which aligns with typical use-cases while remaining within reasonable data limits and performance expectations.
- Recent data (24-48 hours) is stored in high resolution (raw) format. This is suitable for full introspection.
- Historical data (30-90 days) is stored in low resolution (aggregated) format. This is suitable for high-level trend analysis.
To install:
pip install -e .
To run a dashboard:
streamlit run dashboard.py
Alternatively, you can deploy the app for free on streamlit, but be warned that the app is limited to 1GB of RAM.
This component needs an environtment variable called WANDB_API_KEY
with a working api key to communicate with wandb.
This repo contains a streamlit dashboard which can be used to inspect and analyze the live network. It works by pulling validator data from wandb and using this data for metric tracking and interactive data visualizations.
Overview metrics and run selection - Total participants and contributed knowledge are displayed as metrics at the top of the app. This shows the total dataset size and growth rate. By selecting one or more runs from the table, the app will download the respective source data from wandb or load from local storage.
UID health - One or more UIDs can be inspected in terms of their succesful response rate, diversity of responses and uniqueness within the network. Leaderboards of top-performing UIDs are also included.
Completions - Individual completions can be analyzed. Leaderboards can be viewed based on rate or reward, and completion length-and-time statistics are shown. Taken together, these figures allow the reward mechanism to be better understood.
This repo contains a WIP streamlit dashboard for inspecting the bittensor blockchain. It uses the multigraph.py
script to pull metagraph snapshots from subtensor and then constructs a dataframe from these snapshots. If you are running this in dev mode, be sure to run the following command to build a local database:
python multigraph.py
By default, it creates a database for netuid 1.
To run the metagraph dashboard:
streamlit run metadash.py
Overview metrics and block range selection - Current block, register cost and network size. A warning is displayed when the dashboard is out of date. By default this is when the source data has staleness of more than 100 blocks.
Update metagraph data II - When the button is clicked, a background script is run which pulls recent data.
Overview of network - Hotkey churn and network occupancy of validator and miner slots are shown.
Miner activity animations - Highly customizable animations can be made which show the evolution of metrics such as emission and incentive for miners, grouped by coldkey.
Miner groups - Miners are grouped by cold key and the number of hotkeys or IPs in possession of the group can be traced over time.
Miner rewards - Trace data is shown to track group performace over time. Miners belonging to the same hotkey are automatically grouped by color.
Validator activity animations - Highly customizable animations can be made which show the evolution of metrics such as emission and incentive for miners, grouped by coldkey.
Block introspection - Full metagraph state at selected block.
![Screenshot 2023-08-02 at 11 12 43](https://private-user-images.githubusercontent.com/6709103/257891524-67942753-b44a-4c85-96e3-6efc11d3f008.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NjUyMDksIm5iZiI6MTcyNTg2NDkwOSwicGF0aCI6Ii82NzA5MTAzLzI1Nzg5MTUyNC02Nzk0Mjc1My1iNDRhLTRjODUtOTZlMy02ZWZjMTFkM2YwMDgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDlUMDY1NTA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTc2YjY5Njk5M2E2NmVkYTFlNzRiMzA5MzRjMDU1YjFjNzllMzUwM2IyZmZjNmU0ZDA5ZDVkMmFmMTU0MDhlMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.w7Kzi96dK7Bldmh5oRlkBcZawTYlNuMX-PYmeyFKa0o)
Feature list:
- Stake, incentive, dividends by block/time π°
- Weights and consensus πͺ
- Churn and registration rate π¦
- Clustering of hotkeys based on shared coldkeys and IPs π₯
- Clustering of hotkeys based on weights and correlations between stake π
- Connectivity embedding of metagraph snapshots β‘οΈ
- All of the above for user-selected UIDs/hotkeys π§
- Full block introspection ποΈ
There are compatibilty issues with protobuf, which cause errors sucha as
2023-07-28 23:20:04.943 Uncaught app exception
Traceback (most recent call last):
File "/home/steffen/dashboards/env/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/home/steffen/dashboards/metadash.py", line 24, in <module>
import bittensor
File "/home/steffen/bittensor/bittensor/__init__.py", line 170, in <module>
import bittensor._proto.bittensor_pb2 as proto
File "/home/steffen/bittensor/bittensor/_proto/bittensor_pb2.py", line 32, in <module>
_descriptor.EnumValueDescriptor(
File "/home/steffen/dashboards/env/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 796, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
If this happens, you can export the recommended variable and rerun
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python streamlit run metadash.py
Since the original source of this bugfix is the conflicts between the requirements:
ERROR: Cannot install -r /mount/src/dashboards/requirements.txt (line 1), -r /mount/src/dashboards/requirements.txt (line 10) and -r /mount/src/dashboards/requirements.txt (line 3) because these package versions have conflicting dependencies.
The conflict is caused by:
streamlit 1.23.1 depends on protobuf<5 and >=3.20
wandb 0.15.3 depends on protobuf!=4.21.0, <5 and >=3.15.0; python_version == "3.9" and sys_platform == "linux"
bittensor 5.3.3 depends on protobuf==3.19.5
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
We can fix this by aligning the requirements so that everyone has a common range of protobuf package versions to work with...