Skip to content

Commit 35a7701

Browse files
authored
Fix incompatible pynvml versions in conda envs (#2264)
* Ensure the example env is using pynvml 12 * Fixes the following issues with the DFP benchmarks: * Update code to new version * Avoid attempting to configure the logger multiple times * Remove `gpu_name` from the device query as this was raising an exception Closes #2262 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md). - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Will Killian (https://github.com/willkill07) URL: #2264
1 parent aff18a1 commit 35a7701

File tree

6 files changed

+9
-16
lines changed

6 files changed

+9
-16
lines changed

conda/environments/examples_cuda-128_arch-aarch64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies:
4545
- pip
4646
- pluggy=1.3
4747
- pydantic
48-
- pynvml=11.4
48+
- pynvml=12
4949
- pypdf=3.17.4
5050
- python-confluent-kafka=2.6.1
5151
- python-docx==1.1.0

conda/environments/examples_cuda-128_arch-x86_64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dependencies:
4646
- pip
4747
- pluggy=1.3
4848
- pydantic
49-
- pynvml=11.4
49+
- pynvml=12
5050
- pypdf=3.17.4
5151
- pypdfium2==4.30
5252
- python-confluent-kafka=2.6.1

dependencies.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ dependencies:
338338
- flake8
339339
- isort
340340
- pylint=3.0.3
341-
- pynvml=12
341+
- &pynvml pynvml=12
342342
# We are currently depending on some deprecated functionality removed in setuptools 80+ #2224
343343
- setuptools>=75,<80
344344
- versioneer
@@ -382,7 +382,7 @@ dependencies:
382382
optional_databricks:
383383
common:
384384
- output_types: [conda]
385-
packages:
385+
packages:
386386
- pip
387387
- pip:
388388
- databricks-cli < 0.100
@@ -566,7 +566,7 @@ dependencies:
566566
common:
567567
- output_types: [conda]
568568
packages:
569-
- pynvml=11.4
569+
- *pynvml
570570

571571
example-llms:
572572
common:

examples/digital_fingerprinting/production/morpheus/benchmarks/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ Morpheus pipeline configurations for each workflow are managed using [pipelines_
8989

9090
When using the MRC SegmentModule in a pipeline, it will also require a module configuration which gets generated within the test. Additional information is included in the [Morpheus Pipeline with Modules](../../../../../docs/source/developer_guide/guides/6_digital_fingerprinting_reference.md#morpheus-pipeline-with-modules)
9191

92-
To ensure the [file_to_df_loader.py](../../../../../morpheus/loaders/file_to_df_loader.py) utilizes the same type of downloading mechanism, set `MORPHEUS_FILE_DOWNLOAD_TYPE` environment variable with any one of given choices (`dask`, `dask thread`, `single thread`).
92+
To ensure the [file_to_df_loader.py](../../../../../morpheus/loaders/file_to_df_loader.py) utilizes the same type of downloading mechanism, set `MORPHEUS_FILE_DOWNLOAD_TYPE` environment variable with any one of given choices (`dask`, `dask_thread`, `single_thread`).
9393

9494
```bash
95-
export MORPHEUS_FILE_DOWNLOAD_TYPE=dask
95+
export MORPHEUS_FILE_DOWNLOAD_TYPE=single_thread
9696
```
9797

9898
Benchmarks for an individual workflow can be run from `examples/digital_fingerprinting/production/morpheus` in your container:

examples/digital_fingerprinting/production/morpheus/benchmarks/conftest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import json
1818
from os import path
1919

20-
from pynvml.smi import NVSMI_QUERY_GPU
21-
from pynvml.smi import nvidia_smi
20+
from pynvml_utils import nvidia_smi
21+
from pynvml_utils.smi import NVSMI_QUERY_GPU
2222

2323
from benchmarks.test_bench_e2e_dfp_pipeline import PIPELINES_CONF
2424

@@ -39,7 +39,6 @@ def pytest_benchmark_update_json(config, benchmarks, output_json): # pylint:dis
3939
query_opts["driver_version"],
4040
query_opts["count"],
4141
query_opts["index"],
42-
query_opts["gpu_name"],
4342
query_opts["gpu_uuid"],
4443
query_opts["memory.total"],
4544
query_opts["memory.used"],
@@ -55,7 +54,6 @@ def pytest_benchmark_update_json(config, benchmarks, output_json): # pylint:dis
5554
gpu_num = gpu["minor_number"]
5655
output_json["machine_info"]["gpu_" + gpu_num] = {}
5756
output_json["machine_info"]["gpu_" + gpu_num]["id"] = gpu_num
58-
output_json["machine_info"]["gpu_" + gpu_num]["name"] = gpu["product_name"]
5957
output_json["machine_info"][
6058
"gpu_" + gpu_num]["utilization"] = f"{gpu['utilization']['gpu_util']}{gpu['utilization']['unit']}"
6159
output_json["machine_info"][

examples/digital_fingerprinting/production/morpheus/benchmarks/test_bench_e2e_dfp_pipeline.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
from morpheus.stages.postprocess.serialize_stage import SerializeStage
4141
from morpheus.utils.column_info import DataFrameInputSchema
4242
from morpheus.utils.file_utils import date_extractor
43-
from morpheus.utils.logger import configure_logging
4443
from morpheus_dfp.stages.dfp_file_batcher_stage import DFPFileBatcherStage
4544
from morpheus_dfp.stages.dfp_file_to_df import DFPFileToDataFrameStage
4645
from morpheus_dfp.stages.dfp_inference_stage import DFPInferenceStage
@@ -105,8 +104,6 @@ def dfp_training_pipeline_stages(pipe_config: Config,
105104
filenames: typing.List[str],
106105
reuse_cache=False):
107106

108-
configure_logging(log_level=logger.level)
109-
110107
pipeline = LinearPipeline(pipe_config)
111108
pipeline.set_source(MultiFileSource(pipe_config, filenames=filenames))
112109
pipeline.add_stage(
@@ -157,8 +154,6 @@ def dfp_inference_pipeline_stages(pipe_config: Config,
157154
output_filepath: str,
158155
reuse_cache=False):
159156

160-
configure_logging(log_level=logger.level)
161-
162157
pipeline = LinearPipeline(pipe_config)
163158
pipeline.set_source(MultiFileSource(pipe_config, filenames=filenames))
164159
pipeline.add_stage(

0 commit comments

Comments
 (0)