The homework is in the Jupyter Notebook hw4-CSE152B-release.ipynb
.
-
Attempt all questions.
-
Please comment all your code adequately.
-
Include all relevant information such as text answers, output images in notebook.
-
Academic integrity: The homework must be completed individually.
-
Submission instructions:
(a) Submit the notebook and its PDF version on Gradescope.
(b) To save as PDF, use Ctrl + P -> Save as PDF (toggling Headers and footers, Background graphics).
(c) Rename your submission files as Lastname_Firstname.ipynb and Lastname_Firstname.pdf.
(d) Correctly select pages for each answer on Gradescope to allow proper grading. -
Due date: Assignments are due Fri, Jun 3, by 11pm PST.
conda create --name cse152b-hw4-py38 python=3.8 pip
conda activate cse152b-hw4-py38
pip install -r requirements.txt
conda install nb_conda
If you wish to work on the assignment on your local machine, here is the link for the datasets for this assignment. You may want to download the datasets and organize them in the same structure as the public dataset on the cluster.
From your local machine:
scp -r <USERNAME>@dsmlp-login.ucsd.edu:{path to files on the cluster} {LOCAL PATH}
Once you launch a container from the JupyterHub portal, you can also access the container with command line from your local terminal:
ssh {your ucsd id}@dsmlp-login.ucsd.edu
# use your UCSD credentials; UCSD VPN connectin may be needed- get active container via
kubectl get pods
- attach to the pod via
kubesh {pod name you got from above}
- then you will be in the bash environment inside the container, identical to the terminal launched from Jupyter Notebook.
Alternatively, you can launch a container solely from commandline. Follow those steps:
ssh {your ucsd id}@dsmlp-login.ucsd.edu
# use your UCSD credentials; UCSD VPN connectin may be needed- Launch your pod.
- You should enter a node with 1 GPU, 8 CPU, 16 GB RAM, with normal priority (running up to 6 hours
launch-scipy-ml.sh -g 1 -m 16 -c 8 -p normal
- To enable longer runtime k (up to 12) hours with normal priority
K8S_TIMEOUT_SECONDS=$((3600*k)) launch-scipy-ml.sh -g 1 -m 16 -c 8 -p normal
- To enable longer runtime k (more than 12) hours with lower priority
K8S_TIMEOUT_SECONDS=$((3600*k)) launch-scipy-ml.sh -g 1 -m 16 -c 8
- To run your container in the background up to 12 hours, add -b to above command. See details here.
- You should enter a node with 1 GPU, 8 CPU, 16 GB RAM, with normal priority (running up to 6 hours
- You will be provided with a URL that you can open locally. Click on the link and navigate to the Jupyter notebook.
- If you cannot launch a pod, set up the environment following these instructions.
There are cases that you may want to maintain your current session (e.g. a Python training job) within the container when you need to go offline. You can achieve this with session managers like
tmux
.
For quick start,
- Just run
tmux
on your terminal once you get into the container. - To detach and come back later, use
ctrl + b
thend
. To attach next time, usectrl + b
thena
. - For more TMUX usages please refer to online tutorials like https://linuxize.com/post/getting-started-with-tmux/ ot this post