MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / get_failed_info

Function get_failed_info

python/oneflow/support/enable_if.py:79–87  ·  view source on GitHub ↗
(customized_prompt=None)

Source from the content-addressed store, hash-verified

77
78def MakeDefaultFunction(default, conditional_functions, context=None):
79 def get_failed_info(customized_prompt=None):
80 failed_info = "no avaliable function found.\n"
81 for (bf, func, location) in conditional_functions:
82 prompt = location if customized_prompt is None else customized_prompt
83 failed_info += "\n%s: \x1b[1;31mFAILED\x1b[0m\n\t%s\n" % (
84 prompt,
85 bf.debug_str(context),
86 )
87 return failed_info
88
89 return lambda *args, **kwargs: default(get_failed_info, *args, **kwargs)
90

Callers 1

defaultFunction · 0.85

Calls 1

debug_strMethod · 0.80

Tested by

no test coverage detected