Skip to main content

Interactive NLP course labs for Jupyter, Colab, and Deepnote

Project description

README

The course website is located here. Lecture materials, assignments, quizzes, etc. can be accessed at that link. You will need an API key to submit notebooks and that will be provided to you via email.

This site contains jupyter notebooks, data, and other code artifacts associated with this course.

Choosing a Notebook Environment

Most work will not require the use of GPUs. You can probably get away with not using them at all, unless you have a particular desire to do so.

Google Colab - single notebook experience

If you prefer:

  • working within a single notebook
  • are already comfortable with Google Colab
  • don’t mind re-installing dependencies on re-start
  • need access to GPUs

you may prefer Google Colab.

Deepnote

If you prefer:

  • easy install, more persistence of dependencies
  • large number of system integrations
  • Dataframe charts, interactive widgets, dashboards, app deployment
  • realtime collaboration

you may prefer Deepnote.

You will need to create a free account and then request an education plan. To use GPUs or higher performance machines, you must add a payment method - but you do not need to upgrade the plan.

All students will be given links to deepnote for labs.

Local JupyterLab / Notebook

If you are already comfortable in Jupyter in your local environment and:

  • you want full control of your machine and environment
  • persistence of dependencies
  • and don’t mind dealing with management of your environment

you may prefer local Jupyter. The downside is that there is no GPU access unless you know how to set up something like a remote modal function that uses GPU.

Installation

For Students (Google Colab)

To use Colab and submit for credit:

  • Download a notebook from GitHub
  • Upload a local copy of the notebook to Colab
  • Save a copy in Drive
  • Ensure the file name matches the variable NOTEBOOK_NAME in the section “Submit Notebook for Credit”.

Saving to Drive and matching the filename are only required if you are submitting for credit.

You will need to add the SUBMIT_API_KEY to environmental variables.

For Deepnote

Every week, there will be new link posted for a Deepnote project. At least the first time, when you click on the link you will be asked to login or sign up to see the project. If you sign up, you’ll get a free 14-trial of the Team plan, and from there you can request the education plan.

  • When the project opens, click Duplicate (top right).
  • This creates your own private copy of the lab.
  • You will need to add the SUBMIT_API_KEY to environmental variables.

For Local Development

If you want to run notebooks locally:

# Clone the repository
git clone https://github.com/su-dataAI/data401-nlp.git
cd data401-nlp

# If you don't have uv you can:
#curl -LsSf https://astral.sh/uv/install.sh | sh (macOS/Linux) or pip install uv as a fallback

# Create a virtual environment using uv (requires Python 3.11+)
# If you want to use a 3.13+, you will need to upgrade torch to torch>=2.1,<2.6
uv venv --python 3.11

# Activate the virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

# Install with all dependencies
uv pip install -e ".[dev,all]"

# Download spaCy model
python -m spacy download en_core_web_sm

# Start Jupyter Lab
jupyter lab

# Add .env file (root or nbs folder)

You will need to git pull when each new lab is posted.

Installation Options

The package supports flexible installation based on your needs:

# Minimal installation (core utilities only)
pip install data401-nlp

# With NLP tools (spaCy, NLTK)
pip install data401-nlp[nlp]

# With transformers and PyTorch
pip install data401-nlp[transformers]

# With API support (FastAPI, Pydantic)
pip install data401-nlp[api]

# Everything (recommended for students)
pip install data401-nlp[all]

Platform Support

✅ Google Colab
✅ Deepnote
✅ Jupyter Lab
✅ Local Python 3.11+

Helper Modules

The package includes several helper modules to make your NLP work easier:

  • data401_nlp.helpers.env - Environment detection and API key loading
  • data401_nlp.helpers.spacy - Automatic spaCy model management
  • data401_nlp.helpers.submit - Assignment submission utilities
  • data401_nlp.helpers.llm - LLM integration helpers

The helper libraries may be updated as the course proceeds.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

data401_nlp-0.0.8.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

data401_nlp-0.0.8-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file data401_nlp-0.0.8.tar.gz.

File metadata

  • Download URL: data401_nlp-0.0.8.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for data401_nlp-0.0.8.tar.gz
Algorithm Hash digest
SHA256 9f5e7a85b769e925c77f0d735c1c555e7fc534699224cfd2e4381c5963592ca3
MD5 525b6b41b78989ef0216ff4961afbc0c
BLAKE2b-256 d26f908e5b694e6e58a05a4d0ad70028153df717e6aebd927a97827c644791f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for data401_nlp-0.0.8.tar.gz:

Publisher: release.yaml on su-dataAI/data401-nlp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file data401_nlp-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: data401_nlp-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for data401_nlp-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3af0514cfaf111b1c4d15535fdc6a21294b93671e10fec45fdcedc0e17a21d29
MD5 d8b6c3370973bec18cbc37b5709c8424
BLAKE2b-256 4261407da2431a09124c1903cdafc73daef93064e27c3f58990603afb14bc360

See more details on using hashes here.

Provenance

The following attestation bundles were made for data401_nlp-0.0.8-py3-none-any.whl:

Publisher: release.yaml on su-dataAI/data401-nlp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page