From 727a6452c9b781930acee5e24e09efe9360b4890 Mon Sep 17 00:00:00 2001 From: Masaki Kozuki Date: Thu, 7 Apr 2022 15:37:06 -0700 Subject: [PATCH] Deprecation warning: `pyprof` & `reparameterization` (#1348) * 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 "", line 1, in File "/vscode/apex/apex/reparameterization/__init__.py", line 4, in from .weight_norm import WeightNorm File "/vscode/apex/apex/reparameterization/weight_norm.py", line 3, in 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) ``` --- apex/pyprof/__init__.py | 2 ++ apex/reparameterization/__init__.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/apex/pyprof/__init__.py b/apex/pyprof/__init__.py index 3c36146fd77fd..f8810f158a51e 100644 --- a/apex/pyprof/__init__.py +++ b/apex/pyprof/__init__.py @@ -1,3 +1,5 @@ import warnings from . import nvtx, prof + +warnings.warn("pyprof will be removed by the end of June, 2022", FutureWarning) diff --git a/apex/reparameterization/__init__.py b/apex/reparameterization/__init__.py index 6f339ae198c4e..82ca0c38c6284 100644 --- a/apex/reparameterization/__init__.py +++ b/apex/reparameterization/__init__.py @@ -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