Lab 5 of 5about 45 minutes
On your own computer
It uses what you learned in PyTorch tensors and their shapes, Calling an API, From a notebook to a script and Git and GitHub.
You will set Python up on your own computer, run a script that asks the Hugging Face Hub about a model, turn a stack of pictures into a batch a layer can read, and keep it all in Git with the key's file kept out.
- A first runRun it
- The licenseYour turn
- A batch the layer can readYour turn
- Keep the key out, and commitYour turn
- On GitHub, if you likeRun it
curl -LsSf https://astral.sh/uv/install.sh | sh
cp -R python-for-ai/labs/py-lab-own-computer/starter hub-stats
cd hub-stats
uv syncWhen you have run it
After step 3, uv run python batch.py prints the shape of what comes out of the layer. Which is it?
Run on macOS on an M1 Max, uv 0.11.15, Python 3.12, PyTorch 2.15.0, requests 2.34.2, Git 2.40. Checked on .
