-
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) Rename your submission files as Lastname_Firstname.ipynb and Lastname_Firstname.pdf.
(c) Correctly select pages for each answer on Gradescope to allow proper grading. -
Due date: Assignments are due Mon, May 4, by 4pm PST.
- Clone the homework repository
git clone https://github.com/eric-yyjau/cse252c_hw1.git
- The homework is in the Jupyter Notebook
hw1-CSE252C.ipynb
- Follow the README (this file) for installation, data and compute instructions.
- (local) SSH into your machine
- Install SWIG
- On Ubuntu:
sudo apt-get install swig
(sudo required) - On MacOS:
brew install swig
- You need to install Homebrew first with HomeBrew
- On Ubuntu:
- Install Python 3.X and Pip
- [Recommended] Create an environment (e.g. with Anaconda)
conda create --name py36 python=3.6 pip
conda activate py36
- Install Jupyter Notebook
conda install jupyter
- Install kernels for Jupter Notebook
conda install nb_conda
- Launch Jupyter Notebook server in the conda env of the cluster
jupyter notebook
- You will be provided with a URL that you can open locally
- In a opened notebook, change the kernel (on Menu: Kernel -> Change Kernel) to the name of the conda env you just created (in the case of this documentation it should be
py36
)
- (local) (IMPORTANT) Connect your UCSD VPN
- (local) Login with your credentials
ssh {USERNAME}@ieng6.ucsd.edu
- If you cannot launch a pod, set up the environment following these instructions
- Launch your pod. You should enter a node with 1 GPU
launch-scipy-ml.sh -i ucsdets/cse152-252-notebook:latest -g 1
- You will be provided with a URL that you can open locally:
- Click on the link. Then natigate to the jupyter notebook for a question which you are going to git clone as follows
git clone https://github.com/eric-yyjau/cse252c_hw1.git
- Install dependencies (Python 3.X with Pip)
pip install -r requirements.txt --user
- Compile and install
pyviso
for the SfM questioncd pyviso/src/
pip install -e . --user
On the ieng6.ucsd.edu
server, the datasets are located at
- Q1: SfM
/datasets/cse152-252-sp20-public/dataset_SfM
- Change the dataset path in jupyter notebooks to your paths
- Q5:
/datasets/cse152-252-sp20-public/sfmlearner_h128w416
/datasets/cse152-252-sp20-public/kitti
There is a hw1-CSE252C.ipynb
jupyter notebook file in the top-level directory cse252c_hw1
.
One toggle if_vis = True/False
allows you to enable/disable the visualization. Disabling the visualization will make the for loop run significantly faster.
The errors are printed and the visualizations are saved at vis/
. The images should look like:
To fetch the files you can use commands like scp
to transfer files from the cluster to your local machine:
From your local machine:
scp -r <USERNAME>@dsmlp-login.ucsd.edu:/datasets/home/53/253/cs152sp20ta1/pyviso2/vis {LOCAL PATH}
Or from within server if your local machine has a fixed address or IP:
scp -r {REMOTE PATH TO THE vis FOLDER} <USERNAME>@<LOCAL ADDRESS>:{YOUR LOCAL PATH}
-
Login with your credentials
ssh {USERNAME}@ieng6.ucsd.edu
-
Launch TMUX
- Reconmended for session management: you can come back anytime after you disconnect your session. Otherwise you have to keep your connection on for hours while training.
- Just run
tmux
- 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/
-
Launch your pod
- Follow Section 1.1.2
Just launch TMUX.
Now you can create conda env and do your training in there following Section 1.1