Metadata-Version: 2.1
Name: ezRay
Version: 1.0.2
Summary: A simple implementation of the ray framework for method agnostic task paralellization.
License: GNU GPLv3
Author: Bela Vogler
Author-email: bela.vogler@uni-jena.de
Requires-Python: >=3.10,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: ipython (>=8.32.0,<9.0.0)
Requires-Dist: psutil (>=6.1.1,<7.0.0)
Requires-Dist: ray[default] (>=2.42.1,<3.0.0)
Requires-Dist: tqdm (>=4.67.1,<5.0.0)
Description-Content-Type: text/markdown

# Get Started
```powershell
pip install ezRay
```

# Quick Start Guide
```python
from ezRay import MultiCoreExecutionTool

# configure ezRay
instance_metadata:dict = {
    'num_cpus': 4,              # number of cpus to use
    'num_gpus': 0,              # number of gpus to use
    'address': None,            # remote cluster address. None for local.
    }

# setup ezRay
MultiCore = MultiCoreExecutionTool(instance_metadata = instance_metadata)

# define a task
def do_something(foo:int, bar:int) -> int:
    return foo + bar

# prepare your data in a dictionary. They keys work as identifiers, while the values should be dictionaries matching the function signature.
data = {
    1:{'foo' : 0, 'bar' : 1},
    2:{'foo' : 1, 'bar' : 2},
    3:{'foo' : 2, 'bar' : 3}
    }

# pass the data to ezRay
MultiCore.update_data(data)

# run the task
MultiCore.run(do_something)

# get the results
results = MultiCore.get_results()
```

## A ray.remote object can be used interchangeably with a function
```python
@ray.remote(num_cpus=1, num_gpus=0, num_returns=1)
def do_something_remtoe(foo:int, bar:int) -> int:
    return foo + bar

MultiCore.run(do_something_remote)
```
