Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colab: chap 2: NameError: name 'setup_chapter' is not defined #143

Open
DogmaF opened this issue Jul 14, 2024 · 1 comment
Open

Colab: chap 2: NameError: name 'setup_chapter' is not defined #143

DogmaF opened this issue Jul 14, 2024 · 1 comment

Comments

@DogmaF
Copy link

DogmaF commented Jul 14, 2024

Information

The problem arises in chapter:

  • Chapter 2: Text Classification

Describe the bug

When running the chapter 2 notebook in Colab, the second cell of the notebook generates a NameError:

NameError: name 'setup_chapter' is not defined

To Reproduce

Steps to reproduce the behavior:

  1. open notebook in Colab
  2. run the first cell
  3. run the second cell

Contents of cell:

# hide
from utils import *
setup_chapter()

Error traceback:

NameError                                 Traceback (most recent call last)
[<ipython-input-4-258ca2570391>](https://localhost:8080/#) in <cell line: 3>()
      1 # hide
      2 from utils import *
----> 3 setup_chapter()

NameError: name 'setup_chapter' is not defined

Expected behavior

The notebook cell should run to completion without errors.

@simonmok
Copy link

The codes come with utils.py (https://github.com/nlp-with-transformers/notebooks/blob/main/utils.py). In Colab, please upload utils.py to /content first.

Information

The problem arises in chapter:

  • Chapter 2: Text Classification

Describe the bug

When running the chapter 2 notebook in Colab, the second cell of the notebook generates a NameError:

NameError: name 'setup_chapter' is not defined

To Reproduce

Steps to reproduce the behavior:

  1. open notebook in Colab
  2. run the first cell
  3. run the second cell

Contents of cell:

# hide
from utils import *
setup_chapter()

Error traceback:

NameError                                 Traceback (most recent call last)
[<ipython-input-4-258ca2570391>](https://localhost:8080/#) in <cell line: 3>()
      1 # hide
      2 from utils import *
----> 3 setup_chapter()

NameError: name 'setup_chapter' is not defined

Expected behavior

The notebook cell should run to completion without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants