# Can't import load\_metric from datasets

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-import-load-metric-from-datasets%2F107524%3E%5C
**Category:** 🤗Datasets\
**Created:** [September 20, 2024, 7:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-import-load-metric-from-datasets%2F107524 "2024-09-20T19:15:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ohnoadrummer](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@ohnoadrummer](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fohnoadrummer)%5C
**Post date:** [February 22, 2025, 4:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-import-load-metric-from-datasets%2F107524%2F5 "2025-02-22T16:57:14Z")

</div>

@Whenzi This is great, thanks! I got my code working with your two lines and the following within the compute\_metrics function

```auto
    # load_accuracy = load_metric("accuracy")
    # load_f1 = load_metric("f1")
    load_accuracy = evaluate.load("accuracy")
    load_f1 = evaluate.load("f1")

```

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-import-load-metric-from-datasets%2F107524)._
