Skip to content

Commit

Permalink
profiler: lazy warning when DCGM is not available (fairinternal/xform…
Browse files Browse the repository at this point in the history
  • Loading branch information
danthe3rd authored and xFormers Bot committed Jun 17, 2024
1 parent 96e5222 commit 133d7f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions requirements-benchmark.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Example requirement, can be anything that pip knows
# install with `pip install -r requirements.txt`, and make sure that CI does the same
tqdm == 4.59.0
pandas == 1.2.4
seaborn == 0.11.1
pandas == 2.2.2
seaborn == 0.13.2
pytorch-lightning >= 1.3
torchmetrics>=0.7.0, <0.10.1
9 changes: 4 additions & 5 deletions xformers/profiler/profiler_dcgm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

DCGM_PROFILER_AVAILABLE = True
except ModuleNotFoundError:
logger.warning(
f"Unable to find python bindings at {DCGM_PYTHON_PATH}. "
"No data will be captured."
)

class DCGMProfiler: # type: ignore
"""The dummy DCGM Profiler."""
Expand All @@ -34,7 +30,10 @@ def __init__(
pass

def __enter__(self) -> None:
pass
logger.warning(
f"Unable to find python bindings at {DCGM_PYTHON_PATH}. "
"No data will be captured."
)

def __exit__(self, exc_type, exc_val, exc_tb) -> None:
pass
Expand Down

0 comments on commit 133d7f1

Please sign in to comment.