Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce _core internal code structure #122

Merged
merged 37 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
814d76d
Change SmartSim dir structure
Dec 28, 2021
faad1ed
Change front-end import structure
Dec 28, 2021
358937f
Remove TOML configuration option
Dec 28, 2021
c60ec17
Mirgrate the log and slurm modules
Dec 28, 2021
927ee73
Rename constants to status
Dec 28, 2021
c6eca19
Move Orchestrator functions to _core
Dec 28, 2021
815a7fc
CLI and build improvements
Dec 28, 2021
c18adf9
make style
Dec 28, 2021
24bbee1
clean up circular imports in config
Dec 28, 2021
fd0311b
Remove ill-placed SSConfigErrors
Dec 28, 2021
b24afb5
Adapt tests for dir change
Dec 30, 2021
6b45416
Fix coverage stats
Jan 3, 2022
d1479ac
fix smartsim.tf api
Jan 4, 2022
bb8ed36
make style
Jan 4, 2022
fbd718b
Fix .gitignore and edit CLI commands in CI
Jan 4, 2022
5418504
CI fixes
Jan 4, 2022
9d8916c
Revert to RAI 1.2.3
Jan 4, 2022
874001c
Correct comment in config
Jan 4, 2022
a85c0b4
Minor cleanup in builder class
Jan 4, 2022
8e737d9
Clean up output and handle CUDNN
Jan 8, 2022
75e03ce
Fix minor issues in logging and setup.py
Jan 8, 2022
536dd86
Addresses testing issues on Slurm
Jan 10, 2022
e06d954
fix tests
Jan 10, 2022
fddff85
buildenv fix
Jan 11, 2022
68c1acd
refactor build dep checking
Jan 11, 2022
829eaef
small fix to build
Jan 11, 2022
0e519b5
Add url checks to versioner.py
Jan 11, 2022
5fa8d14
Add Version_ class and RAI version support
Jan 12, 2022
1b40ddb
Update tf to use Version_
Jan 12, 2022
b221e91
Clean up install classes
Jan 12, 2022
690bd48
bump tf and onnx versions
Jan 13, 2022
9fece0f
Rebase and address review
Jan 13, 2022
45ded43
Branch support for RedisAI and Redis
Jan 13, 2022
2518655
Add ability to support future RAI versions
Jan 13, 2022
96c2250
make style
Jan 14, 2022
0b6b87d
Edit Tensorflow cmake
Jan 14, 2022
b9d74d0
small fix in Python build
Jan 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/run_local_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ jobs:

- name: Install ML Runtimes with Smart (with pt and tf)
if: contains(matrix.os, 'macos')
run: smart -v --device cpu
run: smart build --device cpu -v

- name: Install ML Runtimes with Smart (with pt tf and onnx support)
if: contains(matrix.os, 'ubuntu')
run: smart -v --device cpu --onnx
run: smart build --device cpu --onnx -v

- name: Run Pytest
run: |
echo "SMARTSIM_LOG_LEVEL=debug" >> $GITHUB_ENV
py.test -s --import-mode=importlib -o log_cli=true
py.test -s --import-mode=importlib -o log_cli=true --ignore=test/full_wlm/
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ htmlcov
smartsim.egg-info

# Dependencies
third-party
smartsim/_core/.third-party

# Docs
_build

smartredis

smartsim/bin/redis-server
smartsim/bin/redis-cli
# written upon install
smartsim/version.py

smartsim/lib
smartsim/_core/bin/redis-server
smartsim/_core/bin/redis-cli

# created upon install
smartsim/_core/lib
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include requirements.txt
include setup_env.sh
include Makefile
graft smartsim/

25 changes: 15 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,33 +93,38 @@ docs:
# help: cov - generate html coverage report for Python client
.PHONY: cov
cov:
@cd ./tests/ && coverage html
@echo if data was present, coverage report is in ./tests/htmlcov/index.html
@coverage html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for changing the coverage reports for the tests to be in the top level rather than in tests/?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was a reason and I honestly cannot remember at the moment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the generated files contained within the tests folder seems most intuitive, but if there is a reason for not doing so, then by all means, placing the coverage files at top level is okay.

@echo if data was present, coverage report is in ./htmlcov/index.html

# help:
# help: Test
# help: -------

# help: test - Build and run all tests
# help: test - Run all tests
.PHONY: test
test:
@cd ./tests/; python -m pytest --ignore=full_wlm/
@python -m pytest --ignore=tests/full_wlm/

# help: test-verbose - Build and run all tests [verbosely]
# help: test-verbose - Run all tests verbosely
.PHONY: test-verbose
test-verbose:
@cd ./tests/; python -m pytest -vv --ignore=full_wlm/
@python -m pytest -vv --ignore=tests/full_wlm/

# help: test-cov - run python tests with coverage
# help: test-debug - Run all tests with debug output
.PHONY: test-debug
test-debug:
@SMARTSIM_LOG_LEVEL=developer python -m pytest -s -o log_cli=true -vv --ignore=tests/full_wlm/

# help: test-cov - Run all tests with coverage
.PHONY: test-cov
test-cov:
@cd ./tests/; python -m pytest --cov=../smartsim -vv --cov-config=${COV_FILE} --ignore=full_wlm/
@python -m pytest -vv --cov=./smartsim --cov-config=${COV_FILE} --ignore=tests/full_wlm/


# help: test-full - run all WLM tests with Python coverage (full test suite)
# help: test-full - Run all WLM tests with Python coverage (full test suite)
# help: WARNING: do not run test-full on shared systems.
.PHONY: test-full
test-full:
@cd ./tests/; python -m pytest --cov=../smartsim -vv --cov-config=${COV_FILE}
@python -m pytest --cov=./smartsim -vv --cov-config=${COV_FILE}


19 changes: 0 additions & 19 deletions config.toml

This file was deleted.

2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
SrunSettings, AprunSettings,
JsrunSettings, RunSettings
)
from smartsim.config import CONFIG
from smartsim._core.config import CONFIG
from smartsim.error import SSConfigError


Expand Down
16 changes: 13 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ log_cli = true
log_cli_level = "debug"

[tool.isort]
skip = [
"tests/test_configs/circular_config", # Suppress circular import warning
]
# supress circular import warning
skip = ["tests/test_configs/circular_config"]

[tool.coverage.run]
source = ["smartsim"]
# see test_configs/*_cov.cfg for "omit"

[tool.coverage.report]
ignore_errors = true
# see test_configs/*_cov.cfg for "exclude_lines"

[tool.coverage.html]
directory = "htmlcov"
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ redis==3.5.3
redis-py-cluster==2.1.3
sphinx==3.1.1
numpy>=1.18.2
toml>=0.10.1
tqdm>=4.50.2
psutil>=5.7.2
tabulate>=0.8.9
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ redis==3.5.3
redis-py-cluster==2.1.3
numpy>=1.18.2
tqdm>=4.50.2
toml>=0.10.1
36 changes: 0 additions & 36 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[metadata]
name = smartsim
version = 0.3.2
description = AI Workflows for Science
long_description = file: README.md
long_description_content_type=text/markdown
Expand Down Expand Up @@ -30,44 +29,9 @@ setup_requires =
setuptools>=39.2
cmake>=3.10
include_package_data = True
install_requires =
psutil>=5.7.2
coloredlogs==10.0
tabulate>=0.8.9
smartredis>=0.1.1
redis-py-cluster==2.1.3
redis==3.5.3
numpy>=1.18.2
tqdm>=4.50.2
toml>=0.10.1

python_requires = >=3.7


[options.extras_require]
dev =
black>=20.8b1
isort>=5.6.4
pylint>=2.6.0
pytest>=6.0.0
pytest-cov>=2.10.1

ml =
onnx==1.7.0
scikit-learn==0.24.2
skl2onnx==1.9.0
onnxmltools==1.7.0
tensorflow==2.4.2

doc=
sphinx==3.1.1
breathe==4.27.0
sphinx_rtd_theme>=0.5.0
sphinx-fortran==1.1.1
nbsphinx>=0.8.2

ray=
ray>=1.6

[options.packages.find]
exclude =
Expand Down
Loading