Skip to content

Commit 6076af8

Browse files
authored
Merge pull request #347 from NYU-RTS/robjy-pytorch-fix
pytorch fix
2 parents 5fccc19 + d1fa2f4 commit 6076af8

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

docs/hpc/06_tools_and_software/08_utils.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@ It will provide detailed information like:
6666
- device details like power consumption and temperature
6767

6868
:::tip
69-
To monitor running jobs, use:
69+
You can get output refreshed every 5 seconds with:
7070
```bash
71-
[NetID@gl001 ~]$ watch -n 1 nvidia-smi
71+
nvidia-smi -l 5
72+
```
73+
Alternatively, you can use:
74+
```bash
75+
/share/apps/images/run-nvtop-3.2.0.bash nvtop
7276
```
73-
on the compute node
7477
:::
7578

7679
:::tip

docs/hpc/08_ml_ai_hpc/02_pytorch_intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ We also need to add the profiler `kernprof` (in the line_profiler package) to th
3131
[NetID@log-1 ~]$ srun --pty -c 2 --mem=5GB /bin/bash
3232
[NetID@cm001 ~]$ singularity exec \
3333
--overlay /scratch/NetID/pytorch-example/my_pytorch.ext3:rw \
34-
/scratch/work/public/singularity/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif \
34+
/share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif \
3535
/bin/bash
3636
Singularity> source /ext3/env.sh
3737
Singularity> pip install line_profiler
@@ -62,7 +62,7 @@ Let's first switch to a compute node, so we don't overly tax our login node:
6262

6363
This uses the `torchvision` package, so you'll need to run it with our overlay file:
6464
```bash
65-
[NetID@cm001 pytorch_single_gpu]$ singularity exec --nv --overlay /scratch/rjy1/pytorch-example/my_pytorch.ext3:ro /scratch/work/public/singularity/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash -c "source /ext3/env.sh; python download_data.py"
65+
[NetID@cm001 pytorch_single_gpu]$ singularity exec --nv --overlay /scratch/NetID/pytorch-example/my_pytorch.ext3:ro /share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash -c "source /ext3/env.sh; python download_data.py"
6666
```
6767
After running the command above you should see that it has created a subdirectory named `data` that contains the data we'll use in this example.
6868

@@ -243,7 +243,7 @@ module purge
243243

244244
srun singularity exec --nv \
245245
--overlay /scratch/NetID/pytorch-example/my_pytorch.ext3:ro \
246-
/scratch/work/public/singularity/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif\
246+
/share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif\
247247
/bin/bash -c "source /ext3/env.sh; kernprof -o ${SLURM_JOBID}.lprof -l mnist_classify.py --epochs=3"
248248
```
249249

@@ -279,7 +279,7 @@ We installed [line_profiler](https://researchcomputing.princeton.edu/python-prof
279279
[NetID@log-1 ~]$ srun --pty -c 2 --mem=5GB /bin/bash
280280
[NetID@cm001 ~]$ singularity exec \
281281
--overlay /scratch/NetID/pytorch-example/my_pytorch.ext3:rw \
282-
/scratch/work/public/singularity/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif \
282+
/share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif \
283283
/bin/bash -c "source /ext3/env.sh; python -m line_profiler -rmt *.lprof"
284284
Timer unit: 1e-06 s
285285

docs/hpc/08_ml_ai_hpc/05_llm_fine_tuning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ This section provides a comprehensive overview of all environment-related issues
129129

130130
|Problem|Symptom|Cause|Resolution|
131131
|---|---|---|---|
132-
|Incorrect overlay filename|No such file: `overlay-50GB-500K.ext3.gz`|The filename was incorrectly assumed|Use `ls /scratch/work/public/overlay-fs-ext3/` to verify the correct file: `overlay-50G-10M.ext3.gz`|
132+
|Incorrect overlay filename|No such file: `overlay-50GB-500K.ext3.gz`|The filename was incorrectly assumed|Use `ls /share/apps/images` to verify the correct file: `overlay-50G-10M.ext3.gz`|
133133
|Compressed overlay used directly|`FATAL: while loading overlay images...`|Attempted to use `.gz` file directly with Singularity|Run `gunzip overlay-50G-10M.ext3.gz` before using the file|
134134
|Overlay missing in working directory|sbatch cannot find the overlay file|Overlay not copied to the training directory|Ensure the overlay file is placed in `/scratch/<NetID>/fine-tune/` where sbatch accesses it|
135135
|Invalid overlay structure|`FATAL: could not create upper dir`|Overlay created via `fallocate` + `mkfs.ext3`, missing necessary internal structure|Always use `singularity overlay create --size 25000` to create overlays|

0 commit comments

Comments
 (0)