MCPcopy Create free account
hub / github.com/Alpha-VLLM/LLaMA2-Accessory / is_number

Function is_number

light-eval/src/eval_gsm8k.py:81–93  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

79 return model
80
81def is_number(s):
82 try:
83 float(s)
84 return True
85 except ValueError:
86 pass
87 try:
88 import unicodedata
89 unicodedata.numeric(s)
90 return True
91 except (TypeError, ValueError):
92 pass
93 return False
94
95def extract_ans(completion):
96

Callers 1

extract_ansFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected