Skip to content

Commit 4b72c6e

Browse files
athittenko3n1g
andauthored
Add deprecation notice to eval code (#14316)
* Add deprecation notice to eval code Signed-off-by: Abhishree <[email protected]> * Update nemo/collections/llm/api.py Signed-off-by: oliver könig <[email protected]> * Update nemo/collections/llm/api.py Signed-off-by: oliver könig <[email protected]> * Update scripts/llm/evaluation.py Signed-off-by: oliver könig <[email protected]> * Update scripts/llm/evaluation.py Signed-off-by: oliver könig <[email protected]> * deprecate export-deploy as well Signed-off-by: oliver könig <[email protected]> * Apply isort and black reformatting Signed-off-by: ko3n1g <[email protected]> * f Signed-off-by: oliver könig <[email protected]> * Apply isort and black reformatting Signed-off-by: ko3n1g <[email protected]> --------- Signed-off-by: Abhishree <[email protected]> Signed-off-by: oliver könig <[email protected]> Signed-off-by: ko3n1g <[email protected]> Co-authored-by: oliver könig <[email protected]> Co-authored-by: ko3n1g <[email protected]>
1 parent d0cb20d commit 4b72c6e

File tree

6 files changed

+44
-140
lines changed

6 files changed

+44
-140
lines changed

.github/workflows/cicd-main-export-deploy.yml

Lines changed: 0 additions & 115 deletions
This file was deleted.

.github/workflows/cicd-main.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -253,27 +253,6 @@ jobs:
253253
with:
254254
test_to_run: ${{ needs.pre-flight.outputs.test_to_run }}
255255

256-
cicd-main-export-deploy:
257-
needs: [pre-flight, cicd-test-container-build, cicd-main-unit-tests]
258-
uses: ./.github/workflows/cicd-main-export-deploy.yml
259-
if: |
260-
(
261-
needs.pre-flight.outputs.test_to_run != '[]'
262-
&& (
263-
contains(fromJson(needs.pre-flight.outputs.components_to_run), 'export-deploy')
264-
)
265-
)
266-
&& (
267-
success()
268-
|| (
269-
needs.cicd-wait-in-queue.result == 'skipped'
270-
&& needs.pre-flight.outputs.is_ci_workload == 'true'
271-
)
272-
)
273-
&& !cancelled()
274-
with:
275-
test_to_run: ${{ needs.pre-flight.outputs.test_to_run }}
276-
277256
cicd-main-speech:
278257
needs: [pre-flight, cicd-test-container-build, cicd-main-unit-tests]
279258
uses: ./.github/workflows/cicd-main-speech.yml
@@ -346,7 +325,6 @@ jobs:
346325
- L0_Setup_Test_Data_And_Models
347326
- cicd-main-unit-tests
348327
- cicd-main-nemo2
349-
- cicd-main-export-deploy
350328
- cicd-main-automodel
351329
- cicd-main-speech
352330
if: always()

nemo/collections/llm/api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,12 @@ def deploy(
603603
enable_flash_decode: bool = True,
604604
legacy_ckpt: bool = False,
605605
):
606+
warnings.warn(
607+
"The 'deploy' function is deprecated and will be removed in NeMo FW 25.09 container release. "
608+
"For evaluation functionality, please use the new Eval repository: https://github.com/NVIDIA-NeMo/Eval",
609+
DeprecationWarning,
610+
stacklevel=2,
611+
)
606612
"""
607613
Deploys nemo model on a PyTriton server either "in-framework" or by converting to trtllm depending on the backend.
608614
This deploy method is intended to be used for evaluation.
@@ -791,6 +797,12 @@ def evaluate(
791797
eval_cfg: EvaluationConfig = EvaluationConfig(type="gsm8k"),
792798
adapter_cfg: AdapterConfig | None = None,
793799
) -> dict:
800+
warnings.warn(
801+
"The 'evaluate' function is deprecated and will be removed in NeMo FW 25.09 container release. "
802+
"For evaluation functionality, please use the new Eval repository: https://github.com/NVIDIA-NeMo/Eval",
803+
DeprecationWarning,
804+
stacklevel=2,
805+
)
794806
"""
795807
Evaluates nemo model deployed on PyTriton server using nvidia-lm-eval
796808

nemo/deploy/__init__.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
# limitations under the License.
1414

1515

16-
from nemo.deploy.deploy_base import DeployBase
17-
from nemo.deploy.deploy_pytriton import DeployPyTriton
18-
from nemo.deploy.triton_deployable import ITritonDeployable
16+
import warnings
17+
18+
from nemo.deploy.deploy_base import DeployBase # noqa: F401
19+
from nemo.deploy.deploy_pytriton import DeployPyTriton # noqa: F401
20+
from nemo.deploy.triton_deployable import ITritonDeployable # noqa: F401
21+
22+
warnings.warn(
23+
"The 'nemo.deploy' is deprecated and will be removed in NeMo FW 25.09 container release. "
24+
"For evaluation functionality, please use the new Eval repository: https://github.com/NVIDIA-NeMo/Export-Deploy",
25+
DeprecationWarning,
26+
stacklevel=2,
27+
)

nemo/export/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,12 @@
1919
__all__ = ["io"]
2020
except (ImportError, ModuleNotFoundError):
2121
pass
22+
23+
import warnings
24+
25+
warnings.warn(
26+
"The 'nemo.export' is deprecated and will be removed in NeMo FW 25.09 container release. "
27+
"For evaluation functionality, please use the new Eval repository: https://github.com/NVIDIA-NeMo/Export-Deploy",
28+
DeprecationWarning,
29+
stacklevel=2,
30+
)

scripts/llm/evaluation.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,22 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import warnings
16+
17+
warnings.warn(
18+
"This evaluation script is deprecated and will be removed in NeMo FW 25.09 container release. "
19+
"For evaluation functionality, please use the new Eval repository: https://github.com/NVIDIA-NeMo/Eval",
20+
DeprecationWarning,
21+
stacklevel=1,
22+
)
23+
1524
# NOTE: This script is only an example of using NeMo with NeMo-Run's APIs and is subject to change without notice.
1625
# This script is used for evaluation on local and slurm executors using NeMo-Run.
1726
# It uses deploy method from nemo/llm/collections/api.py to deploy nemo2.0 ckpt on PyTriton server and uses evaluate
1827
# method from nemo/llm/collections/api.py to run evaluation on it.
1928
# (https://github.com/NVIDIA/NeMo-Run) to configure and execute the runs.
29+
# DEPRECATED: This script and the underlying deploy/evaluate functions will be removed in NeMo FW 25.09.
30+
# Please use the new Eval repository: https://github.com/NVIDIA-NeMo/Eval
2031

2132
import argparse
2233
from typing import Optional

0 commit comments

Comments
 (0)