Skip to content

Commit 84101b3

Browse files
authored
New develop merger (#645)
Bring mli-feature up to date with develop. --------- [ committed by @al-rigazzi ] [ reviewed by @AlyssaCote @ankona ]
1 parent 7169f1c commit 84101b3

File tree

7 files changed

+59
-52
lines changed

7 files changed

+59
-52
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ build:
2323
- git clone --depth 1 https://github.com/CrayLabs/SmartRedis.git smartredis
2424
- git clone --depth 1 https://github.com/CrayLabs/SmartDashboard.git smartdashboard
2525
post_create_environment:
26-
- python -m pip install .[dev]
26+
- python -m pip install .[dev,docs]
2727
- cd smartredis; python -m pip install .
2828
- cd smartredis/doc; doxygen Doxyfile_c; doxygen Doxyfile_cpp; doxygen Doxyfile_fortran
2929
- ln -s smartredis/examples ./examples
@@ -37,7 +37,3 @@ build:
3737
sphinx:
3838
configuration: doc/conf.py
3939
fail_on_warning: true
40-
41-
python:
42-
install:
43-
- requirements: doc/requirements-doc.txt

doc/changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ To be released at some future point in time
3030

3131
Description
3232

33+
- Fix internal host name representation for Dragon backend
34+
- Make dependencies more discoverable in setup.py
3335
- Add hardware pinning capability when using dragon
3436
- Pin NumPy version to 1.x
3537
- New launcher support for SGE (and similar derivatives)
@@ -40,6 +42,14 @@ Description
4042

4143
Detailed Notes
4244

45+
- setup.py used to define dependencies in a way that was not amenable
46+
to code scanning tools. Direct dependencies now appear directly
47+
in the setup call and the definition of the SmartRedis version
48+
has been removed
49+
([SmartSim-PR635](https://github.com/CrayLabs/SmartSim/pull/635))
50+
- The separate definition of dependencies for the docs in
51+
requirements-doc.txt is now defined as an extra.
52+
([SmartSim-PR635](https://github.com/CrayLabs/SmartSim/pull/635))
4353
- The new major version release of Numpy is incompatible with modules
4454
compiled against Numpy 1.x. For both SmartSim and SmartRedis we
4555
request a 1.x version of numpy. This is needed in SmartSim because

doc/requirements-doc.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

docker/docs/dev/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ RUN git clone https://github.com/CrayLabs/SmartDashboard.git --branch develop --
5555
&& rm -rf ~/.cache/pip
5656

5757
# Install docs dependencies and SmartSim
58-
RUN python -m pip install -r doc/requirements-doc.txt \
59-
&& NO_CHECKS=1 SMARTSIM_SUFFIX=dev python -m pip install .
58+
RUN NO_CHECKS=1 SMARTSIM_SUFFIX=dev python -m pip install .[docs]
6059

6160
# Note this is needed to ensure that the Sphinx builds. Can be removed with newer Tensorflow
6261
RUN python -m pip install typing_extensions==4.6.1

setup.py

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -165,26 +165,9 @@ def has_ext_modules(_placeholder):
165165

166166

167167
# Define needed dependencies for the installation
168-
deps = [
169-
"packaging>=24.0",
170-
"psutil>=5.7.2",
171-
"coloredlogs>=10.0",
172-
"tabulate>=0.8.9",
173-
"redis>=4.5",
174-
"tqdm>=4.50.2",
175-
"filelock>=3.4.2",
176-
"protobuf~=3.20",
177-
"jinja2>=3.1.2",
178-
"watchdog>=4.0.0",
179-
"pycapnp==2.0.0",
180-
"pydantic==1.10.14",
181-
"pyzmq>=25.1.2",
182-
"pygithub>=2.3.0",
183-
"numpy<2"
184-
]
185168

186169
# Add SmartRedis at specific version
187-
deps.append("smartredis>={}".format(versions.SMARTREDIS))
170+
# install_requires.append("smartredis>={}".format(versions.SMARTREDIS))
188171

189172
extras_require = {
190173
"dev": [
@@ -206,6 +189,24 @@ def has_ext_modules(_placeholder):
206189
"types-setuptools",
207190
"typing_extensions>=4.1.0",
208191
],
192+
"docs": [
193+
"Sphinx==6.2.1",
194+
"breathe==4.35.0",
195+
"sphinx-fortran==1.1.1",
196+
"sphinx-book-theme==1.0.1",
197+
"sphinx-copybutton==0.5.2",
198+
"sphinx-tabs==3.4.4",
199+
"nbsphinx==0.9.3",
200+
"docutils==0.18.1",
201+
"torch==2.0.1",
202+
"tensorflow==2.13.1",
203+
"ipython",
204+
"jinja2==3.1.2",
205+
"sphinx-design",
206+
"pypandoc",
207+
"sphinx-autodoc-typehints",
208+
"myst_parser",
209+
],
209210
# see smartsim/_core/_install/buildenv.py for more details
210211
**versions.ml_extras_required(),
211212
}
@@ -214,7 +215,24 @@ def has_ext_modules(_placeholder):
214215
# rest in setup.cfg
215216
setup(
216217
version=smartsim_version,
217-
install_requires=deps,
218+
install_requires=[
219+
"packaging>=24.0",
220+
"psutil>=5.7.2",
221+
"coloredlogs>=10.0",
222+
"tabulate>=0.8.9",
223+
"redis>=4.5",
224+
"tqdm>=4.50.2",
225+
"filelock>=3.4.2",
226+
"protobuf~=3.20",
227+
"jinja2>=3.1.2",
228+
"watchdog>=4.0.0",
229+
"pycapnp==2.0.0",
230+
"pydantic==1.10.14",
231+
"pyzmq>=25.1.2",
232+
"pygithub>=2.3.0",
233+
"numpy<2",
234+
"smartredis>=0.5,<0.6",
235+
],
218236
cmdclass={
219237
"build_py": SmartSimBuild,
220238
"install": InstallPlatlib,

smartsim/_core/_install/buildenv.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class Versioner:
242242
``smart build`` command to determine which dependency versions
243243
to look for and download.
244244
245-
Default versions for SmartSim, SmartRedis, Redis, and RedisAI are
245+
Default versions for SmartSim, Redis, and RedisAI are
246246
all set here. Setting a default version for RedisAI also dictates
247247
default versions of the machine learning libraries.
248248
"""
@@ -252,7 +252,6 @@ class Versioner:
252252

253253
# Versions
254254
SMARTSIM = Version_(get_env("SMARTSIM_VERSION", "0.7.0"))
255-
SMARTREDIS = Version_(get_env("SMARTREDIS_VERSION", "0.5.3"))
256255
SMARTSIM_SUFFIX = get_env("SMARTSIM_SUFFIX", "")
257256

258257
# Redis
@@ -284,7 +283,6 @@ class Versioner:
284283
def as_dict(self, db_name: DbEngine = "REDIS") -> t.Dict[str, t.Tuple[str, ...]]:
285284
pkg_map = {
286285
"SMARTSIM": self.SMARTSIM,
287-
"SMARTREDIS": self.SMARTREDIS,
288286
db_name: self.REDIS,
289287
"REDISAI": self.REDISAI,
290288
"TORCH": self.TORCH,

smartsim/_core/launcher/dragon/dragonBackend.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ def group_infos(self) -> dict[str, ProcessGroupInfo]:
213213

214214
def _initialize_hosts(self) -> None:
215215
with self._queue_lock:
216-
self._hosts: t.List[str] = sorted(
217-
node for node in dragon_machine.System().nodes
218-
)
219-
self._nodes = [dragon_machine.Node(node) for node in self._hosts]
216+
self._nodes = [
217+
dragon_machine.Node(node) for node in dragon_machine.System().nodes
218+
]
219+
self._hosts: t.List[str] = sorted(node.hostname for node in self._nodes)
220220
self._cpus = [node.num_cpus for node in self._nodes]
221221
self._gpus = [node.num_gpus for node in self._nodes]
222222

@@ -471,7 +471,11 @@ def create_run_policy(
471471
if run_request.policy.gpu_affinity:
472472
affinity = dragon_policy.Policy.Affinity.SPECIFIC
473473
gpu_affinity = run_request.policy.gpu_affinity
474-
474+
logger.debug(
475+
f"Affinity strategy: {affinity}, "
476+
f"CPU affinity mask: {cpu_affinity}, "
477+
f"GPU affinity mask: {gpu_affinity}"
478+
)
475479
if affinity != dragon_policy.Policy.Affinity.DEFAULT:
476480
return dragon_policy.Policy(
477481
placement=dragon_policy.Policy.Placement.HOST_NAME,

0 commit comments

Comments
 (0)