Metadata-Version: 2.4
Name: rose-surrogate-explorer
Version: 0.3.0
Summary: Toolkit to express and execute ML surrogate building workflows on HPC
Author: RADICAL Lab
Author-email: Aymen Alsaadi <aymen.alsaadi@rutgers.edu>
Maintainer-email: Aymen Alsaadi <aymen.alsaadi@rutgers.edu>
License-Expression: MIT
Project-URL: Homepage, https://github.com/radical-cybertools/ROSE
Project-URL: Issues, https://github.com/radical-cybertools/ROSE/issues
Project-URL: Documentation, https://radical-cybertools.github.io/ROSE/
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: typeguard
Requires-Dist: radical.asyncflow
Requires-Dist: radical.orbit
Requires-Dist: rhapsody-py[radical_pilot]
Requires-Dist: rhapsody-py[dragon]; python_version >= "3.10" and python_version <= "3.12"
Provides-Extra: lint
Requires-Dist: ruff; extra == "lint"
Provides-Extra: mlflow
Requires-Dist: mlflow>=2.0; extra == "mlflow"
Provides-Extra: clearml
Requires-Dist: clearml>=1.14; extra == "clearml"
Provides-Extra: tracking
Requires-Dist: mlflow>=2.0; extra == "tracking"
Requires-Dist: clearml>=1.14; extra == "tracking"
Provides-Extra: spec
Requires-Dist: pyyaml>=6.0; extra == "spec"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Provides-Extra: doc
Requires-Dist: mkdocs==1.5.3; extra == "doc"
Requires-Dist: mkdocs-material==9.5.9; extra == "doc"
Requires-Dist: mkdocstrings[python]>=0.26.1; extra == "doc"
Requires-Dist: mkdocs-gen-files==0.5.0; extra == "doc"
Requires-Dist: mkdocs-literate-nav==0.6.1; extra == "doc"
Requires-Dist: mkdocs-section-index==0.3.8; extra == "doc"
Requires-Dist: mkdocs-glightbox; extra == "doc"
Requires-Dist: mkdocs-material-extensions; extra == "doc"
Requires-Dist: mkdocs-minify-plugin; extra == "doc"
Dynamic: license-file

# ROSE
What is ROSE:

The RADICAL Optimal & Smart-Surrogate Explorer (ROSE) toolkit is a framework for supporting the concurrent and adaptive execution of simulation and surrogate training and selection tasks on High-Performance Computing (HPC) resources.
ROSE is a Python package that provides tools to facilitate the development of machine learning surrogates for scientific applications. It standardizes the process of building surrogates using diverse methods such as active and reinforcement learning on HPC systems. ROSE enables users to define thousands of simulation and surrogate training tasks and workflows, while automatically managing their execution across thousands of HPC nodes.

ROSE also provides tools to facilitate the selection of the best surrogate model for a given simulation based on performance metrics.

ROSE uses RADICAL-Cybertools -- middleware building blocks to facilitate the development of sophisticated scientific workflows on HPC resources.

### How to install:

`pip install .`


### Documentation:

The complete documentation is available [here](https://radical-cybertools.github.io/ROSE/).

For tutorials and walkthrough notebooks please check [here](examples)



### Basic usage

```python
import asyncio

from rose.metrics import MEAN_SQUARED_ERROR_MSE
from rose.al import SequentialActiveLearner

from concurrent.futures import ProcessPoolExecutor

from radical.asyncflow import WorkflowEngine
from rhapsody.backends import ConcurrentExecutionBackend

async def main():
    execution_engine = await ConcurrentExecutionBackend(ProcessPoolExecutor())

    asyncflow = await WorkflowEngine.create(execution_engine)
    acl = SequentialActiveLearner(asyncflow)

    @acl.simulation_task
    async def simulation(*args):
        return f'python3 sim.py'

    @acl.training_task
    async def training(*args):
        return f'python3 train.py'

    @acl.active_learn_task
    async def active_learn(*args):
        return f'python3 active.py'

    # Start the learning loop and break if max_iter = 10
    await acl.start(max_iter=10)
    await asyncflow.shutdown()

if __name__ == "__main__":
    asyncio.run(main())
```
