MCPcopy Create free account
hub / github.com/SooLab/CGFormer / wrapper

Function wrapper

bert/file_utils.py:790–794  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

788 # Chose a different decorator name than in tests so it's clear they are not the same.
789 @wraps(func)
790 def wrapper(*args, **kwargs):
791 if is_torch_available():
792 return func(*args, **kwargs)
793 else:
794 raise ImportError(f"Method `{func.__name__}` requires PyTorch.")
795
796 return wrapper
797

Callers

nothing calls this directly

Calls 2

is_torch_availableFunction · 0.85
is_tf_availableFunction · 0.85

Tested by

no test coverage detected