{"record":{"id":"325cb470241c6e75","repo":"headroomlabs-ai/headroom","slug":"huggingface-datasets-required-install-with-pip-i","errorCode":null,"errorMessage":"HuggingFace datasets required. Install with: pip install datasets","messagePattern":"HuggingFace datasets required\\. Install with: pip install datasets","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"headroom/evals/html_oss_benchmarks.py","lineNumber":147,"sourceCode":"\n    This benchmark measures how well we extract article body text from HTML.\n    The established baseline (trafilatura) achieves 0.958 F1.\n\n    Args:\n        extractor: HTMLExtractor instance (creates one if None)\n        max_samples: Limit number of samples (for quick testing)\n\n    Returns:\n        ExtractionBenchmarkResult with precision, recall, F1 scores\n\n    Example:\n        result = evaluate_scrapinghub_benchmark(max_samples=50)\n        print(f\"F1: {result.avg_f1:.3f} (baseline: {result.baseline_f1})\")\n    \"\"\"\n    try:\n        from datasets import load_dataset\n    except ImportError:\n        raise ImportError(\n            \"HuggingFace datasets required. Install with: pip install datasets\"\n        ) from None\n\n    if extractor is None:\n        from headroom.transforms.html_extractor import HTMLExtractor\n\n        extractor = HTMLExtractor()\n\n    # Load the benchmark dataset\n    logger.info(\"Loading Scrapinghub article extraction benchmark...\")\n    dataset = load_dataset(\"allenai/scrapinghub-article-extraction-benchmark\")\n    samples = dataset[\"train\"]\n\n    if max_samples:\n        samples = samples.select(range(min(max_samples, len(samples))))\n\n    logger.info(f\"Evaluating {len(samples)} samples...\")\n","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/evals/html_oss_benchmarks.py#L129-L165","documentation":"Error \"HuggingFace datasets required. Install with: pip install datasets\" thrown in headroomlabs-ai/headroom.","triggerScenarios":"Raised when an HTML OSS benchmark needs the HuggingFace `datasets` library but it is not installed.","commonSituations":"See trigger scenarios.","solutions":["Install the datasets package: pip install datasets","Or install the evals extra: pip install headroom-ai[evals]"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}