Skip to content

inference-labs-inc/omron-validator-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omron SN2 (𝜏, β)

Discord Chat

Proof of Inference

DocumentationXInference LabsExplorerDashboard

Omron represents a significant stride in enhancing the Bittensor network, aiming to create the world's largest peer-to-peer Verified Intelligence network, by building a Proof-of-Inference system for the Bittensor network. This initiative aligns with the Opentensor foundation's criteria for innovative subnet solutions. zk-ML allows AI models to be converted into a unique 'fingerprint,' a circuit that can be used to verify that a model's prediction was generated by a specific AI model, thereby providing what we term as Proof-of-Inference.

Validator REST API

The Validator REST API is a service that allows users to request proof-of-weight proofs directly from validator. The API is designed to be simple to use and easy to work with. It is built on top of the FastAPI framework, which provides a simple and easy-to-use interface for building REST APIs.

Install

Create a new python environment and install the dependencies with the command.

(First time only)

python -m venv env
source env/bin/activate
pip install -r requirements.txt

Note: This project requires python >=3.10.

Run

First activate the virtual environment and then run the following command to start the server:

source env/bin/activate

Run a REST API server on a validator machine with the following command:

VALIDATOR_PATH=/path/to/your/omron-validator-dir/ uvicorn main:app --host 0.0.0.0 --port 8000

We recommend that you run the server using a process manager like PM2. This will ensure that the server is always running and will restart if it crashes.

VALIDATOR_PATH=/path/to/your/omron-validator-dir/ \
pm2 start "uvicorn main:app" --name omron-rest-api --interpreter ./venv/bin/python -- \
    --host 0.0.0.0 \
    --port 8000

API Usage

At present, the API provides one endpoint: /proofs/{block_number}/{validator_hotkey}/{miner_uid}, which returns corresponding proof file.

OpenAPI

To access OpenAPI specification, go to: http://localhost:8000/docs

Troubleshooting

If you do not receive a response from the server, check that the server is running and that the port is open on the server. You can open the port using the following commands:

sudo ufw allow 8000/tcp

About

Validator FastAPI for Omron

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages