You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Deprecations] clear usage of deprecated package, function, and field (#1860)
SUMMARY:
Clear out some deprecation warnings in logs:
- [x] Replace `pynvml` with `nvidia-ml-py` (which has the same API):
```
../../../../../opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/torch/cuda/__init__.py:63
/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/torch/cuda/__init__.py:63: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml # type: ignore[import]
```
- [x] Replace`safe_permute(x,y, dim=d)` with `x.index_select(dim=d,
index=y)`:
```
tests/llmcompressor/observers/test_min_max.py::test_g_idx
/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/llmcompressor/observers/base.py:172: DeprecationWarning: safe_permute is deprecated and will be removed in a future release. Please use Tensor.index_select instead.
observed = safe_permute(observed, perm, dim=1)
```
- [x] Only display warning for `MagnituePruningModifier.leave_enabled`
if field has been set to something other than default value
```
/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/llmcompressor/modifiers/pruning/magnitude/base.py:43: DeprecationWarning: MagnitudePruningModifier.leave_enable has been deprecated
warnings.warn(
```
TEST PLAN:
No net new src code, tests pass
Signed-off-by: Brian Dellabetta <[email protected]>
Co-authored-by: Dipika Sikka <[email protected]>
0 commit comments