Views
No views yet
af validator) The network is winners-take-all where miners are forced to copy, download and improve the pareto frontier model.1# Install uv Astral
2curl -LsSf https://astral.sh/uv/install.sh | sh
3
4# Clone and install Affine
5git clone https://github.com/AffineFoundation/affine.git
6cd affine
7uv venv && source .venv/bin/activate && uv pip install -e .
8
9# Verify installation
10af1# Copy .env and fill out validator items
2cp .env.example .env1# Run the validator with watchtower.
2docker-compose down && docker-compose pull && docker-compose up -d && docker-compose logs -f1docker compose -f docker-compose.yml -f docker-compose.local.yml down --remove-orphans
2docker compose -f docker-compose.yml -f docker-compose.local.yml up -d --build --remove-orphans
3docker compose -f docker-compose.yml -f docker-compose.local.yml logs -f1# Start the validator with debug.
2af -vv validate1# Copy .env and fill out validator items
2cp .env.example .envchutes.ai )chutes registerbtcli subnet register --wallet.name <your cold> --wallet.hotkey <your hot>af -vvv pull <uid to pull> --model_path <i.e. ./my_model>... magic RL stuff ...af -vvv push --coldkey <your cold> --hotkey <your hot> --model_path <i.e. ./my_model>1import affine as af
2
3# Optionally turn on logging
4af.trace(); af.debug(); af.info()
5
6# Get all miner info or only for UID =5
7miners = await af.get_miners()
8miner = await af.get_miners( 5 )
9
10# Generate a SAT challenge
11chal = await af.SAT.generate()
12
13# Generate a bunch.
14chals = await af.ABDUCTION().many( 10 )
15chals = await af.DEDUCTION().many( 10 )
16
17# Query the model directly.
18# NOTE: A CHUTES_API_KEY .env value is required for this command.
19response = await af.query( chal.prompt, model = miner.model )
20
21# Evaluate the response
22evaluation = chal.evaluate( response )
23print( evaluation.score )
24
25# Async generator of results from last 100 blocks.
26async for res in af.rollouts(100):
27 print (res) # Result objects