impel-intelligence / dippy-bittensor-subnet

MIT License
44 stars 12 forks source link

update docs for miner.md #53

Open samtensora opened 3 weeks ago

samtensora commented 3 weeks ago

My goal is to locally evaluate my models so that I can pick the best ones to submit as miners.

I am having trouble with miner.md (see below). There is another (related) thread on issues with running the local evaluation api.

What did I try?

(1) Read through miner.md and built the docker image

docker build -f evaluator.Dockerfile -t grader:latest .

(2) install requirements

uv pip install -r requirements.eval.txt 

Raises error saying “flash-attn==2.6.3 depends on torch”

(3) Install torch and add —no-build-isolation flag

uv pip install torch
uv pip install -r requirements.eval.txt --no-build-isolation

Raises ModuleNotFoundError for setup tools

(4) Install setup tools

uv pip install setuptools

Raises OSError: CUDA_HOME environment variable is not set

(5) Use docker

At this point I am guessing all of this maybe perhaps an additional option alongside docker (?).. so I decide to try it out directly

docker run -it grader:latest --help

This ^ seems to work. Is it what we are supposed to do? If so, should we document that in miner.md? Would seem easier and more robust to use docker rather than go through steps 1-4 etc.

donaldknoller commented 3 weeks ago

CUDA_HOME environment variable is not set seems to be an issue with your specific local environment.

We do not recommend running the docker image, but rather using the helper script as mentioned in the doc:

# Run evaluator
python dippy_validation_api/evaluator.py --image grader:latest \
--repo_namespace <your-repo-namespace> --repo_name <your-repo-name> \
--chat_template_type <your-chat-template-type> --hash <your-hash>

You do not need to setup the validation api for this step, as the script only happens to live in that folder. The reason for this method is that there are actually 3 instances of the docker image being run as seen in the code.