Skip to content

Commit 4cd737a

Browse files
committed
test: add decorator to get_torch_version for testing
Signed-off-by: Pablo Garay <[email protected]>
1 parent d17e71b commit 4cd737a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

megatron/core/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
"""Utility functions used throughout Megatron core"""
44

5+
from .backwards_compatibility_decorators import exempt_from_compat_check
6+
57
import array
68
import asyncio
79
import functools
@@ -280,6 +282,7 @@ def __getattribute__(self, attr):
280282
return validator
281283

282284

285+
@exempt_from_compat_check # TEST: Decorator functionality
283286
def get_torch_version():
284287
"""Get pytorch version from __version__; if not available use pip's. Use caching."""
285288

0 commit comments

Comments
 (0)