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

Function tf_required

bert/file_utils.py:799–808  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

797
798
799def tf_required(func):
800 # Chose a different decorator name than in tests so it's clear they are not the same.
801 @wraps(func)
802 def wrapper(*args, **kwargs):
803 if is_tf_available():
804 return func(*args, **kwargs)
805 else:
806 raise ImportError(f"Method `{func.__name__}` requires TF.")
807
808 return wrapper

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected