Skip to content

Commit ab6dba5

Browse files
committed
Merge remote-tracking branch 'upstream/v1.0' into v1ssapi
2 parents 4701e8c + f4e76a4 commit ab6dba5

File tree

439 files changed

+38724
-13997
lines changed

Some content is hidden

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

439 files changed

+38724
-13997
lines changed

.github/workflows/run_tests.yml

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
strategy:
5555
fail-fast: false
5656
matrix:
57-
subset: [backends, slow_tests, group_a, group_b]
57+
subset: [backends, slow_tests, group_a, group_b, dragon]
5858
os: [macos-12, macos-14, ubuntu-22.04] # Operating systems
5959
compiler: [8] # GNU compiler version
6060
rai: [1.2.7] # Redis AI versions
@@ -69,6 +69,14 @@ jobs:
6969
with:
7070
python-version: ${{ matrix.py_v }}
7171

72+
- name: Check Test Files are Marked
73+
run: |
74+
diff <(find tests -path tests/_legacy -prune -o -type f -name 'test_*.py' -print \
75+
| xargs grep -l 'pytestmark' \
76+
| sort) \
77+
<(find tests -path tests/_legacy -prune -o -type f -name 'test_*.py' -print \
78+
| sort)
79+
7280
- name: Install build-essentials for Ubuntu
7381
if: contains( matrix.os, 'ubuntu' )
7482
run: |
@@ -109,14 +117,31 @@ jobs:
109117
python -m pip install .[dev,mypy]
110118
111119
- name: Install ML Runtimes
120+
if: matrix.subset != 'dragon'
112121
run: smart build --device cpu -v
113122

123+
124+
- name: Install ML Runtimes (with dragon)
125+
if: matrix.subset == 'dragon'
126+
env:
127+
SMARTSIM_DRAGON_TOKEN: ${{ secrets.DRAGON_TOKEN }}
128+
run: |
129+
if [ -n "${SMARTSIM_DRAGON_TOKEN}" ]; then
130+
smart build --device cpu -v --dragon-repo dragonhpc/dragon-nightly --dragon-version 0.10
131+
else
132+
smart build --device cpu -v --dragon
133+
fi
134+
SP=$(python -c 'import site; print(site.getsitepackages()[0])')/smartsim/_core/config/dragon/.env
135+
LLP=$(cat $SP | grep LD_LIBRARY_PATH | awk '{split($0, array, "="); print array[2]}')
136+
echo "LD_LIBRARY_PATH=$LLP:$LD_LIBRARY_PATH" >> $GITHUB_ENV
137+
114138
- name: Run mypy
115139
run: |
116140
make check-mypy
117141
118-
- name: Run Pylint
119-
run: make check-lint
142+
# TODO: Re-enable static analysis once API is firmed up
143+
# - name: Run Pylint
144+
# run: make check-lint
120145

121146
# Run isort/black style check
122147
- name: Run isort
@@ -134,9 +159,16 @@ jobs:
134159
echo "SMARTSIM_LOG_LEVEL=debug" >> $GITHUB_ENV
135160
py.test -s --import-mode=importlib -o log_cli=true --cov=$(smart site) --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg --ignore=tests/full_wlm/ ./tests/backends
136161
162+
# Run pytest (dragon subtests)
163+
- name: Run Dragon Pytest
164+
if: (matrix.subset == 'dragon' && matrix.os == 'ubuntu-22.04')
165+
run: |
166+
echo "SMARTSIM_LOG_LEVEL=debug" >> $GITHUB_ENV
167+
dragon -s py.test -s --import-mode=importlib -o log_cli=true --cov=$(smart site) --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg --ignore=tests/full_wlm/ -m ${{ matrix.subset }} ./tests
168+
137169
# Run pytest (test subsets)
138170
- name: Run Pytest
139-
if: "!contains(matrix.subset, 'backends')" # if not running backend tests
171+
if: (matrix.subset != 'backends' && matrix.subset != 'dragon') # if not running backend tests or dragon tests
140172
run: |
141173
echo "SMARTSIM_LOG_LEVEL=debug" >> $GITHUB_ENV
142174
py.test -s --import-mode=importlib -o log_cli=true --cov=$(smart site) --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg --ignore=tests/full_wlm/ -m ${{ matrix.subset }} ./tests

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ max-module-lines=1000
167167

168168
# Allow the body of a class to be on the same line as the declaration if body
169169
# contains single statement.
170-
single-line-class-stmt=no
170+
single-line-class-stmt=yes
171171

172172
# Allow the body of an if to be on the same line as the test if there is no
173173
# else.

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,22 +164,22 @@ tutorials-prod:
164164
# help: test - Run all tests
165165
.PHONY: test
166166
test:
167-
@python -m pytest --ignore=tests/full_wlm/
167+
@python -m pytest --ignore=tests/full_wlm/ --ignore=tests/dragon_wlm
168168

169169
# help: test-verbose - Run all tests verbosely
170170
.PHONY: test-verbose
171171
test-verbose:
172-
@python -m pytest -vv --ignore=tests/full_wlm/
172+
@python -m pytest -vv --ignore=tests/full_wlm/ --ignore=tests/dragon_wlm
173173

174174
# help: test-debug - Run all tests with debug output
175175
.PHONY: test-debug
176176
test-debug:
177-
@SMARTSIM_LOG_LEVEL=developer python -m pytest -s -o log_cli=true -vv --ignore=tests/full_wlm/
177+
@SMARTSIM_LOG_LEVEL=developer python -m pytest -s -o log_cli=true -vv --ignore=tests/full_wlm/ --ignore=tests/dragon_wlm
178178

179179
# help: test-cov - Run all tests with coverage
180180
.PHONY: test-cov
181181
test-cov:
182-
@python -m pytest -vv --cov=./smartsim --cov-config=${COV_FILE} --ignore=tests/full_wlm/
182+
@python -m pytest -vv --cov=./smartsim --cov-config=${COV_FILE} --ignore=tests/full_wlm/ --ignore=tests/dragon_wlm
183183

184184

185185
# help: test-full - Run all WLM tests with Python coverage (full test suite)
@@ -192,3 +192,8 @@ test-full:
192192
.PHONY: test-wlm
193193
test-wlm:
194194
@python -m pytest -vv tests/full_wlm/ tests/on_wlm
195+
196+
# help: test-dragon - Run dragon-specific tests
197+
.PHONY: test-dragon
198+
test-dragon:
199+
@dragon pytest tests/dragon_wlm

0 commit comments

Comments
 (0)