Files
modelscope/examples/apps/llm_riddles/test_validate_fn.py
wenmeng zhou 5b67c02cef Feat/llmriddle update (#640)
* format chatglm output

* format code and add one problem to llm riddle

* fix app warning

* refine app.py and add test fn for validate fn
2023-11-13 23:29:25 +08:00

14 lines
353 B
Python

from app import challenges
def test_valid():
for challenge in challenges:
for p in challenge['problems']:
val_fn = p['validator']
try:
val_fn('response', 'input')
except Exception:
import traceback
traceback.print_exc()
print(p, 'failed')