MCPcopy Create free account
hub / github.com/google-research/language / resplit_nq

Function resplit_nq

language/orqa/preprocessing/create_data_splits.py:53–67  ·  view source on GitHub ↗

Resplit the Natural Questions dataset.

()

Source from the content-addressed store, hash-verified

51
52
53def resplit_nq():
54 """Resplit the Natural Questions dataset."""
55 hash_fn = make_hash_fn()
56 resplit_data(
57 input_path=FLAGS.nq_train_path,
58 output_path=get_resplit_path("NaturalQuestions", "train"),
59 keep_fn=lambda x: hash_fn(x) != 0)
60 resplit_data(
61 input_path=FLAGS.nq_train_path,
62 output_path=get_resplit_path("NaturalQuestions", "dev"),
63 keep_fn=lambda x: hash_fn(x) == 0)
64 resplit_data(
65 input_path=FLAGS.nq_dev_path,
66 output_path=get_resplit_path("NaturalQuestions", "test"),
67 keep_fn=lambda x: True)
68
69
70def resplit_wb():

Callers 1

mainFunction · 0.85

Calls 3

make_hash_fnFunction · 0.85
resplit_dataFunction · 0.85
get_resplit_pathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…