Skip to content

Commit

Permalink
Python 3.11 Support (#461)
Browse files Browse the repository at this point in the history
Add Python 3.11 to SmartSim

[ committed by @MattToast ]
[ reviewed by @ashao ]
  • Loading branch information
MattToast authored Jan 22, 2024
1 parent 35973b5 commit 92a3c99
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
os: [macos-12, ubuntu-20.04] # Operating systems
compiler: [8] # GNU compiler version
rai: [1.2.7] # Redis AI versions
py_v: [3.8, 3.9, '3.10'] # Python versions
py_v: ['3.8', '3.9', '3.10', '3.11'] # Python versions

env:
SMARTSIM_REDISAI: ${{ matrix.rai }}
Expand Down Expand Up @@ -104,11 +104,9 @@ jobs:
# on developments of the client are brought in.
- name: Install SmartSim (with ML backends)
run: |
python -m pip install git+https://github.com/CrayLabs/SmartRedis.git@develop#egg=smartredis
python -m pip install .[dev,ml]
- name: Install ML Runtimes with Smart (with pt, tf, and onnx support)
run: smart build --device cpu --onnx -v

Expand Down
7 changes: 5 additions & 2 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Description
- Override the sphinx-tabs extension background color
- Updated SmartSim's machine learning backends
- Added ONNX support for Python 3.10
- Added support for Python 3.11

Detailed Notes

Expand All @@ -37,14 +38,16 @@ Detailed Notes
been added. (SmartSim-PR453_)
- Updated SmartSim's machine learning backends to PyTorch 2.0.1, Tensorflow
2.13.1, ONNX 1.14.1, and ONNX Runtime 1.16.1. As a result of this change,
there is now an available ONNX wheel for use with Python 3.10.
(SmartSim-PR451_)
there is now an available ONNX wheel for use with Python 3.10, and wheels for
all of SmartSim's machine learning backends with Python 3.11.
(SmartSim-PR451_) (SmartSim-PR461_)


.. _SmartSim-PR446: https://github.com/CrayLabs/SmartSim/pull/446
.. _SmartSim-PR448: https://github.com/CrayLabs/SmartSim/pull/448
.. _SmartSim-PR451: https://github.com/CrayLabs/SmartSim/pull/451
.. _SmartSim-PR453: https://github.com/CrayLabs/SmartSim/pull/453
.. _SmartSim-PR461: https://github.com/CrayLabs/SmartSim/pull/461


0.6.0
Expand Down
10 changes: 5 additions & 5 deletions doc/installation_instructions/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Basic

The base prerequisites to install SmartSim and SmartRedis are:

- Python 3.8-3.10
- Python 3.8-3.11
- Pip
- Cmake 3.13.x (or later)
- C compiler
Expand Down Expand Up @@ -65,11 +65,11 @@ Supported Versions
* - MacOS
- x86_64
- Not supported
- 3.8 - 3.10
- 3.8 - 3.11
* - Linux
- x86_64
- Nvidia
- 3.8 - 3.10
- 3.8 - 3.11


.. note::
Expand Down Expand Up @@ -241,9 +241,9 @@ SmartSim does.
* - Platform
- Python Versions
* - MacOS
- 3.8 - 3.10
- 3.8 - 3.11
* - Linux
- 3.8 - 3.10
- 3.8 - 3.11

The Python client for SmartRedis is installed through ``pip`` as follows:

Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
License :: OSI Approved :: BSD License
Intended Audience :: Science/Research
Topic :: Scientific/Engineering
Expand All @@ -55,7 +56,7 @@ setup_requires =
setuptools>=39.2
cmake>=3.13
include_package_data = True
python_requires = >=3.8,<3.11
python_requires = >=3.8,<3.12

[options.packages.find]
include =
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ def thrower(_self):
with monkeypatch.context() as ctx:
ctx.setattr(smartsim._core.control.jobmanager.JobManager, "start", thrower)
exp = Experiment("MyExperiment", launcher="local", exp_path=str(test_dir))
exp.generate() # did not affect output dirs on step

sleep_rs = exp.create_run_settings("sleep", ["2"])
sleep_rs.set_nodes(1)
sleep_rs.set_tasks(1)

sleep = exp.create_model("SleepModel", sleep_rs)
exp.generate(sleep)
exp.start(sleep, block=True)
except Exception as ex:
assert err_msg in ex.args
Expand Down

0 comments on commit 92a3c99

Please sign in to comment.