Seems this is normal…?
You are seeing the normal behavior.
The correct workflow is:
- From the Hugging Face course page, click Open in Studio Lab.
- In the read-only preview that opens, click Copy to project.
- Studio Lab copies/clones the notebook into your project and opens JupyterLab.
- In JupyterLab, open the copied
.ipynb from the file browser, select a Python kernel, and run the cells there.
You do not need to go back to GitHub or manually copy the notebook again. The “Copy to project” step already did that for you.
1. Background: how Studio Lab + Hugging Face work together
1.1. Where the course notebooks come from
The LLM course notebooks are stored in Hugging Face’s public repos (for example, the chapter pages like “Transformers, what can they do?” have an Open in Studio Lab button at the top). (Hugging Face)
Studio Lab has built-in GitHub integration: it can clone a notebook or a whole repo directly into your project via those “Open in Studio Lab” links. (AWS Document)
1.2. Two different “views” in Studio Lab
AWS explicitly splits Studio Lab into two main pieces: (AWS Document)
-
Preview page
- Shows a read-only preview of a notebook (often the first page you see when coming from GitHub or a course button).
- You cannot run code here.
- Main action: Copy to project.
-
Project (JupyterLab)
- This is your real workspace, with persistent files and a JupyterLab UI.
- Here you can open notebooks, choose kernels, run cells, install packages, etc.
The confusion usually comes from trying to execute cells in the preview page. That page is intentionally non-runnable.
2. What “Copy to project” actually does
On the preview page, the “Copy to project” button is the bridge from read-only preview → your editable, runnable environment.
According to the AWS blog and docs: (Amazon Web Services, Inc.)
From then on, those notebooks are just your own local files in Studio Lab; you don’t have to touch GitHub again unless you want to update/refresh.
3. Concrete step-by-step for Chapter 1 notebooks
Let’s go through the full flow for a Chapter 1 notebook like “Transformers, what can they do?” (Hugging Face)
Step 1 – Start from the Hugging Face course page
- Go to the Chapter 1 section you care about.
- Click the Open in Studio Lab button in the banner at the top.
This opens Studio Lab’s preview page in a new tab.
Step 2 – In the preview page: start runtime (if needed) and copy
On the preview page you will see:
- A static view of the notebook (you can scroll but not run).
- A button Copy to project.
In newer docs, AWS describes this page as a read-only preview where you cannot execute notebooks but you can copy them into a project. (AWS Document)
Do the following:
-
If Studio Lab asks you to Start runtime, click that and wait until the runtime is running.
-
Click Copy to project.
-
In the dialog, choose either:
- Copy notebook only – copies just that
.ipynb file, or
- Clone entire repo – clones the whole GitHub repo with all related notebooks and files.
The official examples and docs explicitly say this is how you “run” a notebook: open it via Open in Studio Lab and then either copy it or clone the repo to your project. (Amazon Web Services, Inc.)
After you confirm, Studio Lab opens your project JupyterLab in a new tab.
Step 3 – In JupyterLab: find and open the notebook
That new tab with the full JupyterLab user interface is now your main workspace. AWS describes this as your project, which contains all your files and the JupyterLab-based interface. (AWS Document)
Do this:
-
Look at the file browser panel on the left.
-
Find:
- If you chose Clone entire repo: a folder named after the repo (for example something like
notebooks/ or llm-course/...).
- If you chose Copy notebook only: the
.ipynb file might be in your project’s root folder.
-
Double-click the notebook (e.g. chapter1_transformers.ipynb, actual name varies) to open it in the main area.
Now you are in a normal Jupyter notebook view where you can execute code.
Step 4 – Pick a kernel and run cells
When the notebook opens:
- Check the kernel shown in the top-right of the notebook.
- If needed, click it to select an appropriate Python kernel for Studio Lab (for example one of the default Python environments).
Then:
-
Run a cell with Shift+Enter or the Run button in the toolbar.
-
If imports fail because a library is missing, install it in a cell with standard commands like:
%pip install transformers datasets
Using the %pip magic rather than raw !pip is recommended in Studio Lab so it installs into the active kernel environment. (AWS Document)
From this point on, the notebook behaves like any other Jupyter notebook.
4. Directly answering your specific questions
“I’m using the SageMaker Lab environment to open and sign in to the Transformers notebook, but I’m not able to run the code directly. I only see an option called ‘Copy to project’, which sends me to JupyterLab.”
That is expected behavior:
- The first page you see (with only “Copy to project”) is the preview page, which is read-only and cannot execute code. (AWS Document)
- Clicking Copy to project is the correct next step; it copies/clones the notebook into your project and opens JupyterLab so you can run it. (Amazon Web Services, Inc.)
“Do I need to open the notebook again in a separate JupyterLab session and copy it from GitHub?”
No:
-
You do not need to manually open GitHub again or copy the notebook a second time.
-
When you click Copy to project, Studio Lab already:
- Pulls the notebook/repo from GitHub.
- Stores it in your project.
- Opens the correct JupyterLab session for you. (Amazon Web Services, Inc.)
All you need to do next is:
- In that JupyterLab tab, use the file browser to open the notebook that was just copied.
- Choose a kernel.
- Run the cells.
5. Next time you come back
Once you’ve copied/cloned the repo for Chapter 1, you don’t have to go through the course “Open in Studio Lab” button every time:
- Go to
https://studiolab.sagemaker.aws directly.
- Start your runtime.
- Click Open project.
- In JupyterLab, open the same notebook from the file browser and continue where you left off.
You would only use “Open in Studio Lab” again if you want to copy a new notebook or repo.
6. Useful references if you want to double-check
-
AWS docs – Studio Lab components overview
Explains the preview page (read-only, “Copy to project”) vs project (your JupyterLab workspace). (AWS Document)
-
AWS blog – “Now in Preview – Amazon SageMaker Studio Lab”
Shows the notebook preview and specifically mentions clicking Copy to project to either copy the notebook or clone the entire repo. (Amazon Web Services, Inc.)
-
AWS GitHub aws/studio-lab-examples – Usage section
Describes exactly this flow: Open in Studio Lab → read in preview → run by copying or cloning into your project. (GitHub)
-
Hugging Face LLM Course chapter pages
Provide “Open in Studio Lab” buttons at the top of sections (e.g. Chapter 1 transformers intro), which are designed to be used with this Studio Lab workflow. (Hugging Face)
Short summary
-
The first page you see from the Hugging Face Open in Studio Lab button is a read-only preview; you cannot run code there by design. (AWS Document)
-
The correct way to run the notebook is:
- Click Copy to project on the preview page.
- Let Studio Lab copy/clone the notebook into your project and open JupyterLab.
- In JupyterLab, open the copied
.ipynb, select a Python kernel, and run the cells. (Amazon Web Services, Inc.)
-
You do not need to manually re-open or re-copy the notebook from GitHub in a separate session; “Copy to project” already did the GitHub copy for you.