{"slug": "grading-fails-with-nameresolutionerror-to-api-inference-huggingface-co-all-wrong", "title": "Grading fails with NameResolutionError to api-inference.huggingface.co — all correct answers marked wrong", "summary": "A grading system for a Code Quiz in Chapter 11 (Fine-Tune Large Language Models) is failing with a NameResolutionError to api-inference.huggingface.co, marking all correct answers wrong. The grader depends on a live call to Qwen/Qwen2.5-Coder-32B-Instruct via the Hugging Face Inference API, and when the DNS resolution fails, it falls back to a strict comparison that marks all answers incorrect.", "body_md": "Hi, I’ve been attempting the Code Quiz in Chapter 11 (Fine-Tune Large Language Models) and consistently getting a 0% score despite submitting correct solutions. This has happened across multiple attempts on different days.\n\nThe grader appears to depend on a live call to `Qwen/Qwen2.5-Coder-32B-Instruct`\n\nvia the HF Inference API for evaluation, and that call is failing with a DNS resolution error. When it fails, it seems to fall back to a strict comparison that marks all answers incorrect regardless of correctness.\n\nError message (from two separate attempts):\n\nError checking code:\n\nMaxRetryError(‘HTTPSConnectionPool(host=‘[api-inference.huggingface.co](http://api-inference.huggingface.co)’, port=443):\n\nMax retries exceeded with url: /models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions\n\n(Caused by NameResolutionError(“: Failed to resolve ‘[api-inference.huggingface.co](http://api-inference.huggingface.co)’\n\n([Errno -5] No address associated with hostname)”))’\n\n**Request IDs for reference:**", "url": "https://wpnews.pro/news/grading-fails-with-nameresolutionerror-to-api-inference-huggingface-co-all-wrong", "canonical_source": "https://discuss.huggingface.co/t/grading-fails-with-nameresolutionerror-to-api-inference-huggingface-co-all-correct-answers-marked-wrong/178194#post_1", "published_at": "2026-07-25 02:45:48+00:00", "updated_at": "2026-07-25 03:01:39.852731+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models"], "entities": ["Hugging Face", "Qwen/Qwen2.5-Coder-32B-Instruct", "api-inference.huggingface.co"], "alternates": {"html": "https://wpnews.pro/news/grading-fails-with-nameresolutionerror-to-api-inference-huggingface-co-all-wrong", "markdown": "https://wpnews.pro/news/grading-fails-with-nameresolutionerror-to-api-inference-huggingface-co-all-wrong.md", "text": "https://wpnews.pro/news/grading-fails-with-nameresolutionerror-to-api-inference-huggingface-co-all-wrong.txt", "jsonld": "https://wpnews.pro/news/grading-fails-with-nameresolutionerror-to-api-inference-huggingface-co-all-wrong.jsonld"}}