Skip to content

Commit 7e04b09

Browse files
authored
Update to v0.4.2
Update python package and documentation from v0.4.1 to v0.4.2. [ committed by @ashao ] [ reviewed by @MattToast ]
2 parents e804ad0 + 0b86fda commit 7e04b09

File tree

247 files changed

+8081
-3898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+8081
-3898
lines changed

.github/workflows/build_docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
#
2+
# BSD 2-Clause License
3+
#
4+
# Copyright (c) 2021-2023, Hewlett Packard Enterprise
5+
# All rights reserved.
6+
#
7+
# Redistribution and use in source and binary forms, with or without
8+
# modification, are permitted provided that the following conditions are met:
9+
#
10+
# 1. Redistributions of source code must retain the above copyright notice, this
11+
# list of conditions and the following disclaimer.
12+
#
13+
# 2. Redistributions in binary form must reproduce the above copyright notice,
14+
# this list of conditions and the following disclaimer in the documentation
15+
# and/or other materials provided with the distribution.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
#
28+
129
name: deploy_dev_docs
230

331
on:

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
#
2+
# BSD 2-Clause License
3+
#
4+
# Copyright (c) 2021-2023, Hewlett Packard Enterprise
5+
# All rights reserved.
6+
#
7+
# Redistribution and use in source and binary forms, with or without
8+
# modification, are permitted provided that the following conditions are met:
9+
#
10+
# 1. Redistributions of source code must retain the above copyright notice, this
11+
# list of conditions and the following disclaimer.
12+
#
13+
# 2. Redistributions in binary form must reproduce the above copyright notice,
14+
# this list of conditions and the following disclaimer in the documentation
15+
# and/or other materials provided with the distribution.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
#
28+
129
name: deploy-release
230

331
on:

.github/workflows/run_tests.yml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
#
2+
# BSD 2-Clause License
3+
#
4+
# Copyright (c) 2021-2023, Hewlett Packard Enterprise
5+
# All rights reserved.
6+
#
7+
# Redistribution and use in source and binary forms, with or without
8+
# modification, are permitted provided that the following conditions are met:
9+
#
10+
# 1. Redistributions of source code must retain the above copyright notice, this
11+
# list of conditions and the following disclaimer.
12+
#
13+
# 2. Redistributions in binary form must reproduce the above copyright notice,
14+
# this list of conditions and the following disclaimer in the documentation
15+
# and/or other materials provided with the distribution.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
#
28+
129
name: run-tests
230

331
on:
@@ -23,10 +51,15 @@ jobs:
2351
matrix:
2452
os: [macos-10.15, ubuntu-20.04] # Operating systems
2553
compiler: [8] # GNU compiler version
26-
rai: [1.2.3, 1.2.5] # Redis AI versions
27-
py_v: [3.7, 3.8, 3.9] # Python versions
54+
rai: [1.2.5, 1.2.7] # Redis AI versions
55+
py_v: [3.8, 3.9, '3.10'] # Python versions
2856
exclude:
29-
- os: macos-10.15 # Do not build with Redis AI 1.2.5 on MacOS
57+
# Do not build with Redis AI 1.2.5 on MacOS
58+
- os: macos-10.15
59+
rai: 1.2.5
60+
# Do not build Redis AI 1.2.5 with py3.10
61+
# as wheels for dependecies are not availble
62+
- py_v: '3.10'
3063
rai: 1.2.5
3164

3265
env:
@@ -70,20 +103,20 @@ jobs:
70103
if: contains( matrix.os, 'ubuntu' ) && matrix.py_v == 3.9 && matrix.rai == '1.2.5'
71104
run: singularity pull docker://alrigazzi/smartsim-testing
72105

106+
# Note: The develop branch of smartredis is installed first to ensure that any tests that depend
107+
# on developments of the client are brought in.
73108
- name: Install SmartSim (with ML backends)
74-
run: python -m pip install .[dev,ml,ray]
75-
76-
- name: Install ML Runtimes with Smart
77-
if: contains( matrix.os, 'macos' )
78-
run: smart build --device cpu -v
109+
run: |
110+
python -m pip install git+https://github.com/CrayLabs/SmartRedis.git@develop#egg=smartredis
111+
python -m pip install .[dev,ml]
79112
80113
- name: Install ML Runtimes with Smart (with pt, tf, and onnx support)
81-
if: contains( matrix.os, 'ubuntu' ) && (matrix.py_v != 3.9 || matrix.rai != '1.2.3')
114+
if: (matrix.py_v != '3.10')
82115
run: smart build --device cpu --onnx -v
83116

84-
- name: Install ML Runtimes with Smart excluding PyTorch for Ubuntu/Python3.9/RAI1.2.3 combo
85-
if: contains( matrix.os, 'ubuntu' ) && matrix.py_v == 3.9 && matrix.rai == '1.2.3'
86-
run: smart build --device cpu --no_pt --onnx -v
117+
- name: Install ML Runtimes with Smart (with pt and tf support)
118+
if: (matrix.py_v == '3.10')
119+
run: smart build --device cpu -v
87120

88121
- name: Run Pytest
89122
run: |

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.vscode
2+
**/*.swp
23
__pycache__
34
.ipynb_checkpoints
45
.pytest_cache/
@@ -22,4 +23,4 @@ smartsim/_core/bin/*-server
2223
smartsim/_core/bin/*-cli
2324

2425
# created upon install
25-
smartsim/_core/lib
26+
smartsim/_core/lib

.wci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
# Metadata parsed by the workflow community initiative, https://workflows.community/systems
3+
# Registered at https://github.com/workflowscommunity/workflowscommunity.github.io/blob/main/_data/workflow_systems.yml
4+
5+
name: SmartSim
6+
7+
headline: Machine learning workflows with HPC applications (Python, C++, C, and Fortran)
8+
9+
description: SmartSim is a workflow library that makes it easier to use common
10+
Machine Learning (ML) libraries, like PyTorch and TensorFlow,
11+
in combination with High Performance Computing (HPC) simulations and applications.
12+
SmartSim launches ML infrastructure on HPC systems alongside user workloads
13+
and supports most HPC workload managers (e.g. Slurm, PBSPro, LSF, Cobalt).
14+
SmartSim also provides a set of client libraries in Python, C++, C, and Fortran.
15+
These client libraries allow users to send and receive data between user
16+
applications and the machine learning infrastructure. Moreover, the
17+
client APIs enable the execution of machine learning tasks like inference
18+
and online training from within user code. The exchange of data and
19+
execution of machine learning tasks is orchestrated by a high performance
20+
in-memory database that is launched and managed by SmartSim.
21+
22+
language: Python
23+
24+
release:
25+
version: 0.4.2
26+
date: 2023-04-12
27+
28+
documentation:
29+
general: https://www.craylabs.org/docs/overview.html
30+
installation: https://www.craylabs.org/docs/installation.html
31+
tutorial: https://www.craylabs.org/docs/tutorials/getting_started/getting_started.html
32+
33+
execution_environment:
34+
interfaces:
35+
- Python API
36+
- Python Client API
37+
- C++ Client API
38+
- C Client API
39+
- Fortran Client API
40+
resource_managers:
41+
- Slurm
42+
- PBSPro
43+
- LSF
44+
- Cobalt
45+
- Linux/MacOS
46+
transfer_protocols:
47+
- TCP/IP
48+
- Unix Domain Sockets (UDS)

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 2-Clause License
22

3-
Copyright (c) 2021-2022, Hewlett Packard Enterprise
3+
Copyright (c) 2021-2023, Hewlett Packard Enterprise
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

Makefile

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
# BSD 2-Clause License
2+
#
3+
# Copyright (c) 2021-2023, Hewlett Packard Enterprise
4+
# All rights reserved.
5+
#
6+
# Redistribution and use in source and binary forms, with or without
7+
# modification, are permitted provided that the following conditions are met:
8+
#
9+
# 1. Redistributions of source code must retain the above copyright notice, this
10+
# list of conditions and the following disclaimer.
11+
#
12+
# 2. Redistributions in binary form must reproduce the above copyright notice,
13+
# this list of conditions and the following disclaimer in the documentation
14+
# and/or other materials provided with the distribution.
15+
#
16+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26+
127

228
MAKEFLAGS += --no-print-directory
329

@@ -114,11 +140,11 @@ tutorials-dev:
114140
@docker compose build tutorials-dev
115141
@docker run -p 8888:8888 smartsim-tutorials:dev-latest
116142

117-
# help: tutorials-prod - Build and start a docker container to run the tutorials (v0.4.1)
143+
# help: tutorials-prod - Build and start a docker container to run the tutorials (v0.4.2)
118144
.PHONY: tutorials-prod
119145
tutorials-prod:
120146
@docker compose build tutorials-prod
121-
@docker run -p 8888:8888 smartsim-tutorials:v0.4.1
147+
@docker run -p 8888:8888 smartsim-tutorials:v0.4.2
122148

123149

124150
# help:

README.md

Lines changed: 11 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
</div>
1717

1818

19+
<div align="center">
20+
1921
[![License](https://img.shields.io/github/license/CrayLabs/SmartSim)](https://github.com/CrayLabs/SmartSim/blob/master/LICENSE.md)
2022
![GitHub last commit](https://img.shields.io/github/last-commit/CrayLabs/SmartSim)
2123
![GitHub deployments](https://img.shields.io/github/deployments/CrayLabs/SmartSim/github-pages?label=doc%20build)
@@ -27,6 +29,8 @@
2729
[![codecov](https://codecov.io/gh/CrayLabs/SmartSim/branch/develop/graph/badge.svg?token=96HFI2F45E)](https://codecov.io/gh/CrayLabs/SmartSim)
2830
[![Downloads](https://static.pepy.tech/personalized-badge/smartsim?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pepy.tech/project/smartsim)
2931

32+
</div>
33+
3034
------------
3135

3236
# SmartSim
@@ -69,8 +73,6 @@ exchanged between applications at runtime without the utilization of MPI.
6973
- [Local Launch](#local-launch)
7074
- [Interactive Launch](#interactive-launch)
7175
- [Batch Launch](#batch-launch)
72-
- [Ray](#ray)
73-
- [Ray on HPC](#ray-on-hpc)
7476
- [SmartRedis](#smartredis)
7577
- [Tensors](#tensors)
7678
- [Datasets](#datasets)
@@ -97,8 +99,8 @@ before using it on your system. Each tutorial is a Jupyter notebook that can be
9799
which will run a jupyter lab with the tutorials, SmartSim, and SmartRedis installed.
98100

99101
```bash
100-
docker pull ghcr.io/craylabs/smartsim-tutorials:v0.4.1
101-
docker run -p 8888:8888 ghcr.io/craylabs/smartsim-tutorials:v0.4.1
102+
docker pull ghcr.io/craylabs/smartsim-tutorials:v0.4.2
103+
docker run -p 8888:8888 ghcr.io/craylabs/smartsim-tutorials:v0.4.2
102104
# click on link to open jupyter lab
103105
```
104106

@@ -284,7 +286,6 @@ initialization. Local launching does not support batch workloads.
284286

285287
# Infrastructure Library Applications
286288
- Orchestrator - In-memory data store and Machine Learning Inference (Redis + RedisAI)
287-
- Ray - Distributed Reinforcement Learning (RL), Hyperparameter Optimization (HPO)
288289

289290
## Redis + RedisAI
290291

@@ -398,53 +399,6 @@ exp.stop(db_cluster)
398399
python run_db_batch.py
399400
```
400401

401-
-----
402-
## Ray
403-
404-
Ray is a distributed computation framework that supports a number of applications
405-
- RLlib - Distributed Reinforcement Learning (RL)
406-
- RaySGD - Distributed Training
407-
- Ray Tune - Hyperparameter Optimization (HPO)
408-
- Ray Serve - ML/DL inference
409-
As well as other integrations with frameworks like Modin, Mars, Dask, and Spark.
410-
411-
Historically, Ray has not been well supported on HPC systems. A few examples exist,
412-
but none are well maintained. Because SmartSim already has launchers for HPC systems,
413-
launching Ray through SmartSim is a relatively simple task.
414-
415-
### Ray on HPC
416-
417-
Below is an example of how to launch a Ray cluster on an HPC system and connect to it.
418-
In this example, we set `batch=True`, which means that the cluster will be started
419-
requesting an allocation through the scheduler (Slurm, PBS, etc). If this code
420-
is run within a sufficiently large interactive allocation, setting `batch=False`
421-
will spin the Ray cluster on the allocated nodes.
422-
423-
```Python
424-
import ray
425-
426-
from smartsim import Experiment
427-
from smartsim.exp.ray import RayCluster
428-
429-
exp = Experiment("ray-cluster", launcher='auto')
430-
# 3 workers + 1 head node = 4 node-cluster
431-
cluster = RayCluster(name="ray-cluster", run_args={},
432-
ray_args={"num-cpus": 24},
433-
launcher='auto', num_nodes=4, batch=True)
434-
435-
exp.generate(cluster, overwrite=True)
436-
exp.start(cluster, block=False, summary=True)
437-
438-
# Connect to the Ray cluster
439-
ctx = ray.init(f"ray://{cluster.get_head_address()}:10001")
440-
441-
# <run Ray tune, RLlib, HPO...>
442-
```
443-
444-
*New in 0.4.0* the auto argument enables the Ray Cluster to be launched
445-
across scheduler types. Both batch launch and interactive launch commands
446-
will be automatically detected and used by SmartSim.
447-
448402
------
449403
# SmartRedis
450404

@@ -498,7 +452,7 @@ which will run a jupyter lab with the tutorials, SmartSim, and SmartRedis instal
498452

499453
```bash
500454
docker pull ghcr.io/craylabs/smartsim-tutorials:v1
501-
docker run -p 8888:8888 ghcr.io/craylabs/smartsim-tutorials:v0.4.1
455+
docker run -p 8888:8888 ghcr.io/craylabs/smartsim-tutorials:v0.4.2
502456
```
503457
Each of the following examples can be found in the
504458
[SmartSim documentation](https://www.craylabs.org/docs/tutorials/getting_started/getting_started.html).
@@ -683,17 +637,17 @@ from C, C++, Fortran and Python with the SmartRedis Clients:
683637
</thead>
684638
<tbody style="text-align:center">
685639
<tr>
686-
<td rowspan="3">1.2.3-1.2.4</td>
640+
<td rowspan="3">1.2.7</td>
687641
<td>PyTorch</td>
688-
<td>1.7.x</td>
642+
<td>1.11.x</td>
689643
</tr>
690644
<tr>
691645
<td>TensorFlow\Keras</td>
692-
<td>2.4.x-2.5.x</td>
646+
<td>2.8.x</td>
693647
</tr>
694648
<tr>
695649
<td>ONNX</td>
696-
<td>1.9.x</td>
650+
<td>1.11.x</td>
697651
</tr>
698652
<td rowspan="3">1.2.5</td>
699653
<td>PyTorch</td>

0 commit comments

Comments
 (0)