NLP Course documentation

End-of-chapter quiz

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

End-of-chapter quiz

Ask a Question

Let’s test what you learned in this chapter!

1. In which order should you read a Python traceback?

2. What is a minimal reproducible example?

3. Suppose you try to run the following code, which throws an error:

from transformers import GPT3ForSequenceClassification

# ImportError: cannot import name 'GPT3ForSequenceClassification' from 'transformers' (/Users/lewtun/miniconda3/envs/huggingface/lib/python3.8/site-packages/transformers/__init__.py)
# ---------------------------------------------------------------------------
# ImportError                               Traceback (most recent call last)
# /var/folders/28/k4cy5q7s2hs92xq7_h89_vgm0000gn/T/ipykernel_30848/333858878.py in <module>
# ----> 1 from transformers import GPT3ForSequenceClassification

# ImportError: cannot import name 'GPT3ForSequenceClassification' from 'transformers' (/Users/lewtun/miniconda3/envs/huggingface/lib/python3.8/site-packages/transformers/__init__.py)

Which of the following might be a good choice for the title of a forum topic to ask for help?

4. Suppose you’ve tried to run trainer.train() and are faced with a cryptic error that doesn’t tell you exactly where the error is coming from. Which of the following is the first place you should look for errors in your training pipeline?

5. What is the best way to debug a CUDA error?

6. What is the best way to get an issue on GitHub fixed?

7. Why is overfitting to one batch usually a good debugging technique?

8. Why is it a good idea to include details on your compute environment with transformers-cli env when creating a new issue in the 🤗 Transformers repo?