Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/genai/02_onboarding/01_intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This section deals with the eligibility for getting access to Pythia. To learn more about affiliate access (students after graduation, collaborators from other institutions, please refer to [this section](../../hpc/01_getting_started/02_HPC_Accounts/01_getting_and_renewing_an_account.mdx))

:::tip[workspaces]
Access to Pythia is facilitated via workspaces. Beyond facilitating access, they also allow team members to collaboratively dvelop prompts.
Access to Pythia is facilitated via workspaces. Beyond facilitating access, they also allow team members to collaboratively develop prompts.
:::


Expand Down
2 changes: 1 addition & 1 deletion docs/genai/04_how_to_guides/01_temperature.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ completion = portkey.chat.completions.create(
print(completion)
```

At the temperature of 2.0, you might get an output along along the lines of:
At the temperature of 2.0, you might get an output along the lines of:

- ``"listening to old radio static."``
- ``"... a really peculiar shade of chartreuse today."``
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Renewing your HPC Account
# Renewing Your HPC Account

:::info VPN Needed
You need to be on the NYU VPN to perform this task!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Entering Grants and Publciations for Your Project
# Entering Grants and Publications for Your Project

## Acknowledgment Statement for Publications
The following acknowledgment statement should appear in the publication of any material that resulted from using the NYU IT HPC resources, services, and staff expertise.
Expand Down
6 changes: 3 additions & 3 deletions docs/hpc/03_storage/02_data_transfers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Globus is the recommended tool to use for large-volume data transfers due to the efficiency, reliability, security and ease of use. Use other tools only if you really need to. Detailed instructions available at [Globus](./03_globus.md)
:::

## Data-Transfer nodes
## Data-Transfer Nodes
Attached to the NYU HPC cluster Torch, the Torch Data Transfer Node (DTN) are nodes optimized for transferring data between cluster file systems (e.g. scratch) and other endpoints outside the NYU HPC clusters, including user laptops and desktops. The gDTNs have 100-Gb/s Ethernet connections to the High Speed Research Network (HSRN) and are connected to the HDR Infiniband fabric of the HPC clusters. More information on the hardware characteristics is available at [Torch spec sheet](../10_spec_sheet.md).

### Data Transfer Node Access
Expand All @@ -25,7 +25,7 @@ logout
## Tools for Data Transfer

### Linux & Mac Tools
#### scp and rsync
#### Scp and Rsync
:::warning
Please use Data Transfer Nodes (DTNs) with these tools. While one can transfer data while on login nodes, it is considered a bad practice because it can degrade the node's performance.
:::
Expand All @@ -49,7 +49,7 @@ Globus is the recommended tool to use for large-volume data transfers. It featur

The Globus endpoint for Torch is available at `nyu#torch`. Detailed instructions available at [Globus](./03_globus.md)

### rclone
### Rclone
rclone - rsync for cloud storage, is a command line program to sync files and directories to and from cloud storage systems such as Google Drive, Amazon Drive, S3, B2 etc. rclone is available on DTNs. [Please see the documentation for how to use it.](https://rclone.org/)

### Open OnDemand (OOD)
Expand Down
11 changes: 5 additions & 6 deletions docs/hpc/03_storage/03_globus.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The Globus project aims at providing powerful tools for scientific data management, to help researchers to focus on their domain subjects and solve data intensive research problems. Globus has been grown maturely to enable grid computing by connecting computing resources distributed globally across organizational boundary. Universities, national laboratories and computing facilities are using services of Globus.

## Transferring data between endpoints
## Transferring Data Between Endpoints
### Endpoint

A globus **Endpoint** is a data transfer location, a location where data can be moved to or from using Globus transfer, sync and sharing service. An endpoint can either be a ***personal endpoint*** (on a user’s personal computer) or a ***server endpoint*** (located on a server, for use by multiple users). Please see [Data Transfer With Globus](https://www.globus.org/data-transfer) for details.
Expand Down Expand Up @@ -40,12 +40,11 @@ The NYU HPC Server Endpoint: nyu#torch

**Globus Connect Server** is already installed on the NYU HPC cluster creating a ***Server Endpoint*** named **nyu#torch**, that is available to authorized users (users with a valid HPC account) using Globus. If you want to move data to or from your computer and the NYU HPC cluster, you need to install **[Globus Connect Personal](https://www.globus.org/globus-connect-personal)** on your computer, thus creating a ***Personal Endpoint*** on your computer.

### Moving data between Server Endpoints
### Moving Data Between Server Endpoints

If you plan to transfer data between ***Server Endpoints***, such as between the NYU server endpoint **nyu#torch** and a server endpoint at another institution, you do not need to install Globus Connect Personal on your computer.

#### Creating a Personal Endpoint on your computer

#### Creating a Personal Endpoint On Your Computer
This needs to be done only once on your personal computer.

After clicking "Transfer or Sync to...", click "Search" on the upper right side. Then follow the link "Install Globus Connect Personal".
Expand All @@ -54,7 +53,7 @@ More information about **Globus Connect Personal** and download links for Linux,

![Globus Connect Personal](./static/globus_connect_personal.png)

### Transfer files between your Personal Endpoint and NYU nyu#torch
### Transfer Files between Your Personal Endpoint and NYU nyu#torch
To transfer files you need to specify two collections (endpoints). Specify one of them as **Torch scratch directory**, or **Torch archive directory** or **Torch home directory**. The other endpoint is the one created for your personal computer (e.g. My Mac Laptop) if it is involved in the transfer. When you first use the Torch directory collection, authentication/consent is required for the Globus web app to manage collections on this endpoint on your behalf.

![Globus Start Transfer](./static/globus_start_transfer.png)
Expand All @@ -67,7 +66,7 @@ When the transfer is done, you should receive an email notification. Click "ACTI

![Globus Success](./static/globus_success.png)

### Small file download from web browsers
### Small File Download from Web Browsers

Globus support HTTPS access to data. To download a small file from your web browser, select a file and right-click your mouse, then click 'Download' at the popup menu.

Expand Down
12 changes: 6 additions & 6 deletions docs/hpc/03_storage/06_large_number_of_small_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Many datasets contain a large number of files (for example [ImageNet](https://en

Here are some ideas you can try and evaluate performance for your own project

## Squash file system with Singularity
## Squash File System With Singularity
Please see [Squash File System and Singularity](../07_containers/04_squash_file_system_and_singularity.md)

## Use jpg/png files on disk
## Use JPG/PNG Files On Disk
One option is to store image files (like png or jpg) on the disk and read from disk directly.

:::warning
Expand Down Expand Up @@ -36,12 +36,12 @@ You can also use the custom-made RAM mapped disk using `#SLURM_RAM_TMPDIR` while
This basically requires you to use 2*(size of the data) size of RAM just to hold the data.
:::

## Binary files (pickle, etc)
## Binary Files (Pickle, Etc.)
Store data in some binary file (say pickle in Python) which you load fully when you start a SLURM job.

This option may require a lot of RAM - thus you may have to wait a long time for the scheduler to find resources for your job. Also this approach would not work on a regular PC without so much RAM, and thus your scripts are not transferable.

## Container files, one-file databases
## Container Files, One-File Databases
Special containers, which allow to either load data fast fully or access chosen elements without loading the whole dataset into RAM.

### SQLite
Expand Down Expand Up @@ -96,10 +96,10 @@ More info:

LMDB supports reading by many readers and many parallel thread from the same file

#### Formats inside HDF5/LMDB: binary, numpy, other..
#### Formats Inside HDF5/LMDB: Binary, NumPy, Other...
One can store data in different way inside LMDB or HDF5. For example we can store binary representation of jpeg, or we can store python numpy array. In the first case file can be read from any language, in the second - only from Python. We can also store objects from other languages - for example tibble in R

#### Other formats
#### Other Formats
There are other formats like [Bcolz](http://bcolz.blosc.org/), [Zarr](https://github.com/alimanfoo/zarr-python), and others. Some examples can be found [here](https://alimanfoo.github.io/2016/04/14/to-hdf5-and-beyond.html).

## Benchmarking Code
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Transferring Cloud Storage Data with rclone
# Transferring Cloud Storage Data with Rclone

:::tip Globus
Globus is the recommended tool to use for large-volume data transfers due to the efficiency, reliability, security and ease of use. Use other tools only if you really need to. Detailed instructions available at [Globus](./03_globus.md)
:::

## Transferring files to and from Google Drive with RCLONE
## Transferring Files to and from Google Drive with Rclone
Having access to Google Drive from the HPC environment provides an option to archive data and even share data with collaborators who have no access to the NYU HPC environment. Other options to archiving data include the HPC Archive file system and using [Globus](./03_globus.md) to share data with collaborators.

Access to Google Drive is provided by [rclone](https://rclone.org/drive/) - rsync for cloud storage - a command line program to sync files and directories to and from cloud storage systems such as Google Drive, Amazon Drive, S3, B2 etc. [rclone](https://rclone.org/drive/) is available on Torch cluster as a module, the module versions currently available (March 2025) are:
Expand All @@ -26,7 +26,7 @@ rclone --transfers=32 --checkers=16 --drive-chunk-size=16384k --drive-upload-cut

This option works great for file sizes 1Gb+ to 250GB. Keep in mind that there is a rate limiting of 2 files/sec for upload into Google Drive. Small file transfers don’t work that well. If you have many small jobs, please tar the parent directory of such folders and split the tar file into 100GB chunks and then uploads then into Google Drive.

## rclone Configuration
## Rclone Configuration
You need to configure rclone before you will be able to move files between the HPC Environment and Google Drive

There are specific instruction on the [rclone web site](https://rclone.org/drive/) and here is an example of the process for configuring rclone for use on Torch:
Expand All @@ -35,12 +35,12 @@ There are specific instruction on the [rclone web site](https://rclone.org/drive

Follow [instructions](../02_connecting_to_hpc/01_connecting_to_hpc.mdx) to log into the Torch HPC cluster.

### Step 2: Load the rclone module
### Step 2: Load the Rclone Module
```sh
$ module load rclone/1.68.2
```

### Step 3: Configure rclone
### Step 3: Configure Rclone

Configuring rclone and setting up remote access to your Google Drive, using the command:
```sh
Expand Down
8 changes: 4 additions & 4 deletions docs/hpc/04_datasets/01_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ImageNet is an image dataset organized according to the [WordNet](https://wordne
WordNet® is a large lexical database of English. Nouns, verbs, adjectives and adverbs are grouped into sets of cognitive synonyms (synsets), each expressing a distinct concept ([https://wordnet.princeton.edu/](https://wordnet.princeton.edu/))
:::

#### ILSVRC (subset of ImageNet)
#### ILSVRC (Subset of ImageNet)

ILSVRC uses a subset of ImageNet images for training the algorithms and some of ImageNet’s image collection protocols for annotating additional images for testing the algorithms ([https://arxiv.org/abs/1409.0575](https://arxiv.org/abs/1409.0575)). The name comes from 'ImageNet Large Scale Visual Recognition Challenge ([ILSVRC](https://image-net.org/challenges/LSVRC/2017/))'. Competition was moved to Kaggle ([http://image-net.org/challenges/LSVRC/2017/](http://image-net.org/challenges/LSVRC/2017/))

Expand All @@ -63,7 +63,7 @@ ILSVRC uses a subset of ImageNet images for training the algorithms and some of
*Dataset is available under*
- `/projects/work/public/ml-datasets/imagenet`

##### Get access to Data
##### Get Access to Data

New York University does not own this dataset.

Expand Down Expand Up @@ -110,7 +110,7 @@ This dataset consists of 9 million images covering 90k English words, and includ
*Dataset is available under*
- `/projects/work/public/ml-datasets/mjsynth`

### open-images-dataset
### Open-images-dataset
*About data set*: [Open Images Dataset – opensource.google](https://storage.googleapis.com/openimages/web/index.html)

A dataset of ~9 million varied images with rich annotations
Expand All @@ -128,7 +128,7 @@ The Pile is a 825 GiB diverse, open source language modeling data set that consi
*Dataset is available under*
- `/projects/work/public/ml-datasets/pile`

### Waymo open dataset
### Waymo Open Dataset
*About data set*: [Open Dataset – Waymo](https://waymo.com/open/)

The field of machine learning is changing rapidly. Waymo is in a unique position to contribute to the research community with some of the largest and most diverse autonomous driving datasets ever released.
Expand Down
10 changes: 5 additions & 5 deletions docs/hpc/05_submitting_jobs/01_slurm_submitting_jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ You can find the available types of GPUs at [Torch Spec Sheet](../10_spec_sheet.
Do not specify partitions manually, except for preemption which is described later.
:::

## Resource limits and restrictions
## Resource Limits and Restrictions
Jobs within the same partition cannot exceed their assigned resources (`QOSGrpGRES`). User GPU Quotas: Each user has a total GPU quota of 24 GPUs for jobs with wall time < 48 hours (`QOSMaxGRESPerUser`).

Non-stakeholders to temporarily use stakeholder resources (a stakeholder group to temporarily use another group’s resources). Stakeholders retain normal access to their own resources. If non-stakeholders (or other stakeholders) are using them, their jobs may be preempted (canceled) once stakeholders submit new jobs. Public users are allowed to use stakeholder resources only with preemption partitions. Refer to the section below for details on preemptible jobs.
Expand Down Expand Up @@ -81,7 +81,7 @@ Jobs with low GPU utilization will be automatically canceled:
Enforcement will be very aggressive.
:::

## Preemptible jobs on Torch
## Preemptible Jobs on Torch
On Torch, users may run "preemptible" jobs on stakeholder resources that their group does not own. This allows the stakeholder resources to be utilized by non-stakeholders which may otherwise be idle. To make the best use of these resources, you are encouraged to adopt checkpoint/restart to allow for resumption of the workload in subsequent jobs.

:::warning Preemption Policy
Expand Down Expand Up @@ -109,19 +109,19 @@ Jobs in stakeholder partitions will not be canceled, but those in preemption par
```
Jobs with preemption partitions only might be allowed to use more resources

## Advanced options
## Advanced Options

### GPU MPS
Use GPU Multi-Process Service (MPS) to improve overall GPU utilization, as this allows multiple GPU jobs to share a single GPU concurrently by:
```
#SBATCH --comment="gpu_mps=yes"
```
### RAM disk
### RAM Disk
A portion of the RAM available can be mounted as a disk for fast `I/O` operations:
```
#SBATCH --comment="ram_disk=1GB"
```
### GPU MPS & RAM Disk in a preemptible job
### GPU MPS & RAM Disk in a Preemptible Job
Both of these can be combined with preemption as shown:
```
#SBATCH --comment="preemption=yes;preemption_partitions_only=yes;requeue=true;gpu_mps=yes;ram_disk=1GB"
Expand Down
2 changes: 1 addition & 1 deletion docs/hpc/05_submitting_jobs/02_slurm_main_commands.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Slurm: Command reference
# Slurm: Command Reference

Slurm offers many utility commands to work with, some of the most popularly used commands are:

Expand Down
8 changes: 4 additions & 4 deletions docs/hpc/07_containers/03_singularity_with_conda.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ exit
# exit Singularity
```

#### Install packages
#### Install Packages

You may now install packages into the environment with either the `pip install` or `conda install` commands.

Expand Down Expand Up @@ -202,7 +202,7 @@ Now, exit the Singularity container and then rename the overlay image. Typing `e
exit
mv overlay-15GB-500K.ext3 my_pytorch.ext3
```
#### Test your PyTorch Singularity Image
#### Test Your PyTorch Singularity Image
```sh
singularity exec --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 -c "import torch; print(torch.__file__); print(torch.__version__)"'

Expand All @@ -213,7 +213,7 @@ singularity exec --overlay /scratch/<NetID>/pytorch-example/my_pytorch.ext3:ro /
the end `:ro` addition at the end of the pytorch ext3 image starts the image in read-only mode. To add packages you will need to use `:rw` to launch it in read-write mode.
:::

### Using your Singularity Container in a SLURM Batch Job
### Using Your Singularity Container in a SLURM Batch Job
Below is an example script of how to call a python script, in this case `torch-test.py`, from a SLURM batch job using your new Singularity image

torch-test.py:
Expand Down Expand Up @@ -276,7 +276,7 @@ cat slurm-3752662.out
# True
```

### Optional: Convert ext3 to a compressed, read-only squashfs filesystem
### Optional: Convert ext3 to a Compressed, Read-only Squashfs Filesystem
Singularity images can be compressed into read-only squashfs filesystems to conserve space in your environment. Use the following steps to convert your ext3 Singularity image into a smaller squashfs filesystem.
```sh
srun -N1 -c4 singularity exec --overlay my_pytorch.ext3:ro /share/apps/images/centos-8.2.2004.sif mksquashfs /ext3 /scratch/<NetID>/pytorch-example/my_pytorch.sqf -keep-as-directory -processors 4 -noappend
Expand Down
2 changes: 1 addition & 1 deletion docs/hpc/08_ml_ai_hpc/02_pytorch_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ The slowest line is number 42 which consumes 84.5% of the time in the training f

Note that GPU utilization as measured using nvidia-smi is only a measure of the fraction of the time that a GPU kernel is running on the GPU. It says nothing about how many CUDA cores are being used or how efficiently the GPU kernels have been written. However, for codes used by large communities, one can generally associate GPU utilization with overall GPU efficiency. For a more accurate measure of GPU utilization, use [Nsight Systems or Nsight Compute](https://researchcomputing.princeton.edu/support/knowledge-base/gpu-computing#profiling) to measure the occupancy.

## Step 6: Work through the Performance Tuning Guide from Princeton
## Step 6: Work Through the Performance Tuning Guide from Princeton

Make sure you optimize the single GPU case before going to multiple GPUs by working through the [Performance Tuning Guide](https://pytorch.org/tutorials/recipes/recipes/tuning_guide.html).

Expand Down
6 changes: 3 additions & 3 deletions docs/hpc/08_ml_ai_hpc/03_pytorch_dpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Here are some webpages and videos:
Do not use `DataParallel` in PyTorch for anything since it gives poor performance relative to `DistributedDataParallel`.
:::

## Main changes needed in going from single-GPU to multi-GPU training with DDP
## Main Changes Needed in Going from Single-GPU to Multi-GPU Training with DDP

This completely new piece is needed to form the process group:

Expand Down Expand Up @@ -192,7 +192,7 @@ The `local_rank` should be used everywhere in your script except when initializi

# DDP and Slurm

## Total number of tasks equals total number of GPUs
## Total Number of Tasks Equals Total Number of GPUs

When using DDP, the total number of tasks must equal the total number of allocated GPUs. Therefore, if `--ntasks-per-node=<N>` then you must have `--gres=gpu:<N>`. Here are two examples:

Expand Down Expand Up @@ -429,6 +429,6 @@ Execute the commands below to run the example above:
[NetID@log-1 full-ddp-test]$ sbatch run-full.SBATCH
```

## Memory issues
## Memory Issues

Use `gradient_as_bucket_view=True` when making the DDP model to decrease the required memory by 1/3.
Loading
Loading