ray-project

Version:

2.9.1

Category:

tools

Cluster:

Vali

Author / Distributor

https://www.ray.io/

Description

Ray Project is an open-source framework developed by Anyscale that enables scalable and distributed computing in Python. It’s designed to make it easy to scale Python applications from a single machine to a cluster, without requiring significant changes to your code.

Documentation

Offical Documentation at: https://docs.ray.io/en/latest/index.html#

List of Ray-Project Examples: https://docs.ray.io/en/latest/ray-overview/examples.html

Examples/Usage

  • Load ray-project:

    $ module load tools/ray-project/2.9.1
    
  • Model Training Example:

    from ray.train import ScalingConfig
    from ray.train.torch import TorchTrainer
    
    def train_func():
      model = ...
      train_dataset = ...
      for epoch in range(num_epochs): ...
    
    trainer = TorchTrainer(
      train_loop_per_worker=train_func,
      scaling_config=ScalingConfig(num_workers=32, use_gpu=True),
      datasets={"train": train_dataset},
    )
    
    result = trainer.fit()
    
  • Unload ray-project:

    $ module unload tools/ray-project/2.9.1
    

Installation

Source code is obtained from ray-project