MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / create_json_task

Function create_json_task

test/general/lm_eval/tasks/__init__.py:349–365  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

347 return
348
349 def create_json_task():
350 splits = task_name.split("=", 1)
351 if len(splits) != 2 or not splits[1]:
352 raise ValueError(
353 "json tasks need a path argument pointing to the local "
354 "dataset, specified like this: json="
355 + _EXAMPLE_JSON_PATH
356 + ' (if there are no splits, use "train")'
357 )
358
359 json_path = splits[1]
360 if json_path == _EXAMPLE_JSON_PATH:
361 raise ValueError(
362 "please do not copy the example path directly, but substitute "
363 "it with a path to your local dataset"
364 )
365 return lambda: json.JsonPerplexity(json_path)
366
367 TASK_REGISTRY[task_name] = create_json_task()
368

Callers 1

add_json_taskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected