Commit bfa02eb
[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 <bdellabe@redhat.com>
Co-authored-by: Dipika Sikka <dipikasikka1@gmail.com>1 parent 4f5d396 commit bfa02eb
3 files changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
172 | | - | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
0 commit comments