# How to use the test set in those beginner examples?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-the-test-set-in-those-beginner-examples%2F10824%3E%5C
**Category:** Beginners\
**Created:** [October 16, 2021, 12:58am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-the-test-set-in-those-beginner-examples%2F10824 "2021-10-16T00:58:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![qq24464019](https://avatars.discourse-cdn.com/v4/letter/q/96bed5/32.png) [@qq24464019](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fqq24464019)%5C
**Post date:** [October 16, 2021, 12:58am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-the-test-set-in-those-beginner-examples%2F10824%2F1 "2021-10-16T00:58:24Z")

</div>

Hi, maybe a stupid question but I cant find the answer ether in Doc or on Google.

In these examples [notebooks/text\_classification.ipynb at master · huggingface/notebooks · GitHub](https://github.com/huggingface/notebooks/blob/master/examples/text_classification.ipynb)  
the datasets contain a test set, but the examples finished after how to train and evaluate(on validation set if I understand it correctly).

But how about test set? Is there a convenient way to test it on test set? Like the one line command for trainer.evaluate().

Thanks.

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [October 18, 2021, 12:57am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-the-test-set-in-those-beginner-examples%2F10824%2F2 "2021-10-18T00:57:52Z")

</div>

`trainer.evaluate` takes a dataset, so you can pass the test split if you want to evaluate on the test set.  
Or there is `trainer.predict` if you just want the predictions.
