tests package#

Submodules#

tests.basic_test module#

tests.basic_test.test_basic_cpu()[source]#

This script will:

  1. Allocate a few CPU nodes from SLURM.

  2. Setup a Ray Cluster.

  3. Print hello world

tests.basic_test.test_basic_gpu()[source]#

This script will:

  1. Allocate a few GPU nodes from SLURM.

  2. Setup a Ray Cluster.

  3. Print hello world

tests.cartpole_test module#

tests.cartpole_test.test_cartpole_container()[source]#

Perform the following steps:

  1. Allocate CPU nodes from SLURM.

  2. Copy container to SLURM nodes.

  3. Start Ray Cluster from containers.

  4. Run the Cartpole experiment.

tests.cartpole_test.test_cartpole_cpu()[source]#

Runs the following steps:

  1. Allocate CPU nodes from SLURM.

  2. Setup Ray Cluster.

  3. Run Cartpole environment on Ray Cluster.

tests.cartpole_test.test_cartpole_gpu()[source]#

Runs the following steps:

  1. Allocate GPU nodes from SLURM.

  2. Setup Ray Cluster.

  3. Run Cartpole environment on Ray Cluster.

tests.cli_test module#

tests.cli_test.test_run_bare_metal()[source]#

This test will use the CLI to create a Ray Cluster on SLURM bare-metal. Runs the following steps:

  1. Cleanup any files from previous runs.

  2. Use the CLI command to setup a head node. (bare-metal)

  3. Use the CLI command to setup some CPU nodes. (bare-metal)

  4. Use the CLI command to setup some GPU nodes. (bare-metal)

  5. Use the CLI command to activate the Ray Cluster.

  6. Verify from the logs that all Ray runtimes successfully deploy!

tests.cli_test.test_run_container()[source]#

This test will use the CLI to create a Ray Cluster on SLURM with containers. Runs the following steps:

  1. Cleanup any files from previous runs.

  2. Use the CLI command to setup a head node. (containerized)

  3. Use the CLI command to setup some CPU nodes. (containerized)

  4. Use the CLI command to setup some GPU nodes. (containerized)

  5. Use the CLI command to activate the Ray Cluster.

  6. Verify from the logs that all Ray runtimes successfully deploy!

tests.cli_test.test_setup()[source]#

Runs the following steps:

  1. Verifies the setup-head CLI command does not error out.

  2. Verifies the setup-cpu CLI command does not error out.

  3. Verifies the setup-gpu CLI command does not error out.

tests.cli_test.test_show()[source]#

Verifies that the CLI show command does not error out.

tests.ip_test module#

tests.ip_test.test_ip_container()[source]#

Perform the following steps:

  1. Allocate CPU nodes from SLURM.

  2. Copy container to SLURM nodes.

  3. Start Ray Cluster from containers.

  4. Get IP from each node on Ray Cluster.

tests.ip_test.test_ip_cpu()[source]#

Runs the following steps:

  1. Allocate CPU nodes from SLURM.

  2. Setup Ray Cluster.

  3. Get IP from each node on Ray Cluster.

tests.ip_test.test_ip_gpu()[source]#

Runs the following steps:

  1. Allocate GPU nodes from SLURM.

  2. Setup Ray Cluster.

  3. Get IP from each node on Ray Cluster.

tests.multi_partition_test module#

tests.multi_partition_test.test_multi_partition()[source]#

This test will attempt to create a multi-node, multi-partition Ray Cluster. Multi-node means more than one node. Multi-partition means hetergenous nodes (nodes have different hardware). This requires setting up the head node, CPU nodes, and GPU nodes on different computing devices and aggregating them into a single Ray Cluster.

After bringing up the multi-partition cluster, you will need to ssh into the head node and execute the multi_partition_script.sh to run the test.

Module contents#