Skip to content

Commit 6389a71

Browse files
authored
Add deprecation notice to modules (#15050)
* Add deprecation notices for collections and lightning Signed-off-by: Charlie Truong <[email protected]> * Fix warning Signed-off-by: Charlie Truong <[email protected]> * Fix diffusion deprecation notice Signed-off-by: Charlie Truong <[email protected]> * Update deprecation notice Signed-off-by: Charlie Truong <[email protected]> * Fix nemo2 deprecation notice Signed-off-by: Charlie Truong <[email protected]> * Update deprecation notice for vlm Signed-off-by: Charlie Truong <[email protected]> * Fix multimodal_autoregressive module notice Signed-off-by: Charlie Truong <[email protected]> --------- Signed-off-by: Charlie Truong <[email protected]>
1 parent 4677544 commit 6389a71

File tree

8 files changed

+89
-0
lines changed

8 files changed

+89
-0
lines changed

nemo/collections/avlm/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@
2525
"AVLMModel",
2626
"avlm_8b",
2727
]
28+
29+
30+
import warnings
31+
32+
warnings.warn(
33+
"nemo.collections.avlm is deprecated and will be removed in a future major NeMo FW container release. "
34+
"Please refer to the new Megatron-Bridge repository: https://github.com/NVIDIA-NeMo/Megatron-Bridge",
35+
DeprecationWarning,
36+
stacklevel=2,
37+
)

nemo/collections/diffusion/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
import warnings
16+
17+
18+
warnings.warn(
19+
"nemo.collections.diffusion is deprecated and will be removed in a future major NeMo FW container release.",
20+
DeprecationWarning,
21+
stacklevel=2,
22+
)

nemo/collections/llm/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,14 @@
447447
__all__.append("evaluate")
448448
except ImportError as error:
449449
logging.warning(f"The evaluate module could not be imported: {error}")
450+
451+
452+
import warnings
453+
454+
455+
warnings.warn(
456+
"nemo.collections.llm is deprecated and will be removed in a future major NeMo FW container release. "
457+
"Please refer to the new Megatron-Bridge repository: https://github.com/NVIDIA-NeMo/Megatron-Bridge",
458+
DeprecationWarning,
459+
stacklevel=2,
460+
)

nemo/collections/multimodal/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
import warnings
16+
17+
warnings.warn(
18+
"nemo.collections.multimodal is deprecated and will be removed in a future major NeMo FW container release. "
19+
"Please refer to the new Megatron-Bridge repository: https://github.com/NVIDIA-NeMo/Megatron-Bridge",
20+
DeprecationWarning,
21+
stacklevel=2,
22+
)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import warnings
16+
17+
warnings.warn(
18+
"nemo.collections.multimodal_autoregressive is deprecated and will be removed in a future major NeMo "
19+
"FW container release. Please refer to the new Megatron-Bridge repository: "
20+
"https://github.com/NVIDIA-NeMo/Megatron-Bridge",
21+
DeprecationWarning,
22+
stacklevel=2,
23+
)

nemo/collections/nlp/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@
2525

2626
# Set collection name.
2727
__description__ = "Natural Language Processing collection"
28+
29+
import warnings
30+
31+
warnings.warn(
32+
"nemo.collections.nlp is deprecated and will be removed in a future major NeMo FW container release."
33+
"Please refer to the new Megatron-Bridge repository: https://github.com/NVIDIA-NeMo/Megatron-Bridge",
34+
DeprecationWarning,
35+
stacklevel=2,
36+
)

nemo/collections/vision/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,12 @@
2323

2424
# Set collection name.
2525
__description__ = "Computer Vision collection"
26+
27+
import warnings
28+
29+
warnings.warn(
30+
"nemo.collections.nlp is deprecated and will be removed in a future major NeMo FW container release. "
31+
"Please refer to the new Megatron-Bridge repository: https://github.com/NVIDIA-NeMo/Megatron-Bridge",
32+
DeprecationWarning,
33+
stacklevel=2,
34+
)

nemo/collections/vlm/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,12 @@
184184
from nemo.utils import logging
185185

186186
logging.warning(f"Failed to import nemo.collections.vlm.api: {error}")
187+
188+
import warnings
189+
190+
warnings.warn(
191+
"nemo.collections.vlm is deprecated and will be removed in a future major NeMo FW container release. "
192+
"Please refer to the new Megatron-Bridge repository: https://github.com/NVIDIA-NeMo/Megatron-Bridge",
193+
DeprecationWarning,
194+
stacklevel=2,
195+
)

0 commit comments

Comments
 (0)