Datasets:

Modalities:
Text
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
zhangir-azerbayev commited on
Commit
b479b19
1 Parent(s): ef64e3a

did I break anything?

Browse files
Files changed (5) hide show
  1. data.json +0 -0
  2. proofnet.py +5 -4
  3. test.jsonl +0 -0
  4. test_loader.py +14 -4
  5. valid.jsonl +0 -0
data.json DELETED
The diff for this file is too large to render. See raw diff
 
proofnet.py CHANGED
@@ -54,7 +54,7 @@ class ProofNet(datasets.GeneratorBasedBuilder):
54
  BUILDER_CONFIGS = [
55
  ProofNetConfig(
56
  name="plain_text",
57
- version=datasets.Version("1.0.0", ""),
58
  description="Plain text",
59
  ),
60
  ]
@@ -77,14 +77,15 @@ class ProofNet(datasets.GeneratorBasedBuilder):
77
  downloaded_files = dl_manager.download_and_extract(_URLS)
78
 
79
  return [
80
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": dl_manager.download("data.json")}),
 
81
  ]
82
 
83
  def _generate_examples(self, filepath):
84
  """This function returns the examples in the raw (text) form."""
85
  key = 0
86
  with open(filepath, encoding="utf-8") as f:
87
- instances = json.load(f)
88
- for instance in instances:
89
  yield key, instance
90
  key += 1
 
54
  BUILDER_CONFIGS = [
55
  ProofNetConfig(
56
  name="plain_text",
57
+ version=datasets.Version("2.0.0", ""),
58
  description="Plain text",
59
  ),
60
  ]
 
77
  downloaded_files = dl_manager.download_and_extract(_URLS)
78
 
79
  return [
80
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": dl_manager.download("test.jsonl")}),
81
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath":dl_manager.download("valid.jsonl")})
82
  ]
83
 
84
  def _generate_examples(self, filepath):
85
  """This function returns the examples in the raw (text) form."""
86
  key = 0
87
  with open(filepath, encoding="utf-8") as f:
88
+ for line in f.readlines():
89
+ instance = json.load(line)
90
  yield key, instance
91
  key += 1
test.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
test_loader.py CHANGED
@@ -1,14 +1,24 @@
1
  from datasets import load_dataset
2
  from tqdm import tqdm
3
 
4
- data = load_dataset("proofnet.py")
5
 
6
  print(data)
7
 
8
- print("example instance:")
 
 
 
9
  print(data["test"][0])
10
 
11
- print("looping through data...")
12
- for x in tqdm(data):
 
 
13
  pass
 
 
 
 
 
14
  print("finished!")
 
1
  from datasets import load_dataset
2
  from tqdm import tqdm
3
 
4
+ data = load_dataset("./proofnet.py")
5
 
6
  print(data)
7
 
8
+ print("example valid instance")
9
+ print(data["validation"][0])
10
+
11
+ print("example test instance:")
12
  print(data["test"][0])
13
 
14
+
15
+
16
+ print("looping through validation data...")
17
+ for x in tqdm(data)["validation"]:
18
  pass
19
+
20
+ print("looping through test data...")
21
+ for x in tqdm(data)["test"]:
22
+ pass
23
+
24
  print("finished!")
valid.jsonl ADDED
The diff for this file is too large to render. See raw diff