Skip to main content

A Singular Experiment Launcher

Singular is a quality of life package that enables rapid deployment of code on a slurm cluster with singularity installed and password enabled login. Running experiments on your cluster is as simple as a single command in the terminal using singular. See below for an example and install instructions.

Installation

Singular can be installed using the pip package.

pip install singular-launcher

Usage

You may configure singular to remember the ssh credentials to your cluster using the following example.

singular set --ssh-username username --ssh-password password --ssh-host compute.example.com

Running your first command on your cluster is then as simple as one line in the terminal.

singular remote echo "my first command"

Certain workloads require uploading certain data files into the singularity image on the remote machine before running experiments. This can be done with the following command.

singular upload --recursive --exclude "*.pkl" ./local_dir remote_dir/in/image

Additionally, you can download files from the remote machine with a single command. The following command will download the results folder inside the remote singularity image to a location in the current local working directory. The remote path is always taken with respect to the singularity image path.

singular download --recursive --exclude "*.pkl" results ./

Experimentation

A typical experiment creation pipeline involved working on code locally, testing the code locally, then running in on a server. This can be done easily using singular.

python do_my_experiment.py

Once your code is ready for deployment, tell singular how to install your code from github.

singular set --git-url https://github.com/username/repo
singular set --git-target /code/repo
singular set --install-command "pip install -e {git_target}"

Then, point singular to where your code working directory is stored locally.

singular set --sync-from /home/username/repo

Then test your code in a local copy of the singularity to make sure it works as expected.

singular local --sync python /code/repo/do_my_experiment.py

Then run it on the cluster.

singular remote --sync python /code/repo/do_my_experiment.py

In this example, the sync flag tells singular to copy code from your repository on the local disk to code folder in your remote singularity image. This is especially helpful when changes aren't committed.

Release files for singular-launcher 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for singular-launcher 1.0.6
File Size Uploaded
singular-launcher-1.0.6.tar.gz 14.9 kB Details

Release files / singular-launcher-1.0.6.tar.gz

Download URL singular-launcher-1.0.6.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
17e619360ae8ea82c213ee635dca4a962358fce628decf503f5e2a64cfac9b12
BLAKE2b-256 checksum
How to use checksums
2c40c992b78210c3e0edad509114152abf6c3721dfb220277440883aa84257bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

Release history Release notifications | RSS feed

This release

1.0.6 This release

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page