Skip to content

Commit

Permalink
Deprecation warning: pyprof & reparameterization (pytorch#1348)
Browse files Browse the repository at this point in the history
* add warning to pyprof

* add warning to reparameterization

note: this module is already not import-able as follows:

```
(base) root@c4bb3f161482:/vscode/apex# python -c 'import torch; import
apex; from apex import reparameterization'
/vscode/apex/apex/pyprof/__init__.py:5: FutureWarning: pyprof will be
removed by the end of June, 2022
  warnings.warn("pyprof will be removed by the end of June, 2022",
FutureWarning)
/vscode/apex/apex/reparameterization/__init__.py:2: FutureWarning:
reparameterization will be removed by the end of June, 2022
  warnings.warn("reparameterization will be removed by the end of June,
2022", FutureWarning)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/vscode/apex/apex/reparameterization/__init__.py", line 4, in
<module>
    from .weight_norm import WeightNorm
  File "/vscode/apex/apex/reparameterization/weight_norm.py", line 3, in
<module>
    from ..fp16_utils import Fused_Weight_Norm
ImportError: cannot import name 'Fused_Weight_Norm' from
'apex.fp16_utils' (/vscode/apex/apex/fp16_utils/__init__.py)
```
  • Loading branch information
crcrpar committed Apr 7, 2022
1 parent 7d90387 commit 727a645
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apex/pyprof/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from . import nvtx, prof

warnings.warn("pyprof will be removed by the end of June, 2022", FutureWarning)
3 changes: 3 additions & 0 deletions apex/reparameterization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import warnings
warnings.warn("reparameterization will be removed by the end of June, 2022", FutureWarning)

from .weight_norm import WeightNorm
from .reparameterization import Reparameterization

Expand Down

0 comments on commit 727a645

Please sign in to comment.