ScoreVision / PREPARE_CHUTES_AND_PUSH.md
claustrophobic's picture
scorevision: push artifact
e2fe06c verified

Prepare Chutes and push slug (with your config)

This matches the turbovision_new layout and your Chutes config.

1. Chutes CLI config (auth)

Your INI is the Chutes CLI login config. Put it where the Chutes CLI reads it:

  • Path: ~/.chutes/config.ini (or ~/.config/chutes/config.ini depending on chutes version)

Example content (your values):

[api]
base_url = https://api.chutes.ai

[auth]
username = mohantesting2
user_id = f0be376b-cf18-596a-8049-fa43be70c66a
hotkey_seed = 1c53da1fcbe160112f98ca4e549a8065a4b624a6ace69125fbd178591ad90149
hotkey_name = parallelm3b3
hotkey_ss58address = 5E7staNhMMEq6yzwx8F2hNPJ6SWvGvbvAv4RsXwQ3bNV65cQ

[payment]
address = 5CSpQyCumNuR8rwhyZXeL31Kpckt6YzqnFCN4K1zdAiufN3n

You can also run chutes login and paste/select these so the CLI creates/updates the file.

2. Turbovision env (.env in repo root)

The sv push command uses env vars, not the INI file. In the turbovision repo root create or edit .env:

# Chutes (slug is obtained after deploy)
CHUTES_USERNAME=mohantesting2
CHUTES_API_KEY=<your Chutes API key, e.g. cpk_xxx>

# HuggingFace (repo will be HUGGINGFACE_USERNAME/ScoreVision)
HUGGINGFACE_USERNAME=mohantesting2
HUGGINGFACE_API_KEY=hf_xxx

# Bittensor (for on-chain commit; hotkey must match Chutes)
BITTENSOR_WALLET_COLD=<coldkey name that owns parallelm3b3>
BITTENSOR_WALLET_HOT=parallelm3b3
BITTENSOR_SUBTENSOR_ENDPOINT=finney
SCOREVISION_NETUID=44

The repo name used by sv push is fixed as {HUGGINGFACE_USERNAME}/ScoreVision (see scorevision/utils/huggingface_helpers.py: get_huggingface_repo_name()). So your HF repo must be mohantesting2/ScoreVision and must contain miner.py and chute_config.yml (e.g. contents of turbovision_new).

3. Prepare Chutes and push slug (turbovision_new)

From the turbovision repo root:

  1. Upload miner + chute_config to HF and deploy to Chutes (then commit on-chain):

    cd /path/to/turbovision
    uv run sv -vv push --model-path turbovision_new
    

    This will:

    • Create/update the HF repo mohantesting2/ScoreVision with the contents of turbovision_new (including miner.py and chute_config.yml).
    • Build and deploy the chute via the Chutes CLI (uses your Chutes config + CHUTES_API_KEY).
    • Resolve the slug and chute_id (e.g. via chutes get <chute_name>).
    • Commit on-chain: model, revision, slug, chute_id, hotkey (from your Bittensor wallet).
  2. Only upload to HF, no deploy, no commit:

    uv run sv -vv push --model-path turbovision_new --no-deploy --no-commit
    
  3. Use existing HF revision, deploy and commit (no upload):

    uv run sv -vv push --revision <commit-sha> --no-commit   # or omit --no-commit to commit
    
  4. Skip on-chain commit (e.g. to test deploy only):

    uv run sv -vv push --model-path turbovision_new --no-commit
    

4. Optional: warm up and test

After deploy:

chutes chutes list
chutes warmup <chute-id>
curl -X POST "https://<YOUR-SLUG>.chutes.ai/health" -d '{}' -H "Authorization: Bearer $CHUTES_API_KEY"

Then run a single validator-style check:

uv run sv -vv run-once

5. Summary

What you have Where it goes
[api] / [auth] / [payment] INI ~/.chutes/config.ini (Chutes CLI auth)
Chutes API key .env as CHUTES_API_KEY (used by sv push and scripts)
Chutes username .env as CHUTES_USERNAME=mohantesting2 (used in chute name/slug)
HF repo Must be mohantesting2/ScoreVision; put turbovision_new contents there via --model-path turbovision_new
Slug Obtained automatically after deploy; sv push reads it and commits it on-chain with chute_id and revision.

The path for “prepare chutes and push slug” in this repo is: run sv push (with --model-path turbovision_new if you’re uploading that folder). The slug is pushed on-chain as part of the same flow; you don’t push the slug to Chutes separately—Chutes assigns the slug when you deploy, and sv push commits that slug (and chute_id) on-chain.