removed some comments
Browse files- numerical_reasoning.py +3 -7
numerical_reasoning.py
CHANGED
|
@@ -14,7 +14,6 @@
|
|
| 14 |
# TODO: Address all TODOs and remove all explanatory comments
|
| 15 |
"""TODO: Add a description here."""
|
| 16 |
|
| 17 |
-
|
| 18 |
import csv
|
| 19 |
import json
|
| 20 |
import os
|
|
@@ -67,10 +66,10 @@ class NumericalReasoning(datasets.GeneratorBasedBuilder):
|
|
| 67 |
datasets.BuilderConfig(name="convert_decade_year", version=VERSION, description="x decades equals y years"),
|
| 68 |
]
|
| 69 |
|
| 70 |
-
DEFAULT_CONFIG_NAME = "multiplication"
|
| 71 |
|
| 72 |
def _info(self):
|
| 73 |
-
if (
|
| 74 |
features = datasets.Features(
|
| 75 |
{
|
| 76 |
"x1": datasets.Value("int32"),
|
|
@@ -89,7 +88,7 @@ class NumericalReasoning(datasets.GeneratorBasedBuilder):
|
|
| 89 |
)
|
| 90 |
return datasets.DatasetInfo(
|
| 91 |
description=_DESCRIPTION,
|
| 92 |
-
features=features,
|
| 93 |
homepage=_HOMEPAGE,
|
| 94 |
license=_LICENSE,
|
| 95 |
citation=_CITATION,
|
|
@@ -99,7 +98,6 @@ class NumericalReasoning(datasets.GeneratorBasedBuilder):
|
|
| 99 |
return [
|
| 100 |
datasets.SplitGenerator(
|
| 101 |
name=datasets.Split.TEST,
|
| 102 |
-
# These kwargs will be passed to _generate_examples
|
| 103 |
gen_kwargs={
|
| 104 |
"split": "test"
|
| 105 |
},
|
|
@@ -113,7 +111,6 @@ class NumericalReasoning(datasets.GeneratorBasedBuilder):
|
|
| 113 |
for x1 in range(0,100):
|
| 114 |
for x2 in range(1,51):
|
| 115 |
key += 1
|
| 116 |
-
# Yields examples as (key, example) tuples
|
| 117 |
yield key, {
|
| 118 |
"x1": x1,
|
| 119 |
"x2": x2,
|
|
@@ -125,7 +122,6 @@ class NumericalReasoning(datasets.GeneratorBasedBuilder):
|
|
| 125 |
for x1 in range(0,100):
|
| 126 |
for x2 in range(1,51):
|
| 127 |
key += 1
|
| 128 |
-
# Yields examples as (key, example) tuples
|
| 129 |
yield key, {
|
| 130 |
"x1": x1,
|
| 131 |
"x2": x2,
|
|
|
|
| 14 |
# TODO: Address all TODOs and remove all explanatory comments
|
| 15 |
"""TODO: Add a description here."""
|
| 16 |
|
|
|
|
| 17 |
import csv
|
| 18 |
import json
|
| 19 |
import os
|
|
|
|
| 66 |
datasets.BuilderConfig(name="convert_decade_year", version=VERSION, description="x decades equals y years"),
|
| 67 |
]
|
| 68 |
|
| 69 |
+
DEFAULT_CONFIG_NAME = "multiplication"
|
| 70 |
|
| 71 |
def _info(self):
|
| 72 |
+
if (self.config.name == "multiplication") or (self.config.name == "addition"):
|
| 73 |
features = datasets.Features(
|
| 74 |
{
|
| 75 |
"x1": datasets.Value("int32"),
|
|
|
|
| 88 |
)
|
| 89 |
return datasets.DatasetInfo(
|
| 90 |
description=_DESCRIPTION,
|
| 91 |
+
features=features,
|
| 92 |
homepage=_HOMEPAGE,
|
| 93 |
license=_LICENSE,
|
| 94 |
citation=_CITATION,
|
|
|
|
| 98 |
return [
|
| 99 |
datasets.SplitGenerator(
|
| 100 |
name=datasets.Split.TEST,
|
|
|
|
| 101 |
gen_kwargs={
|
| 102 |
"split": "test"
|
| 103 |
},
|
|
|
|
| 111 |
for x1 in range(0,100):
|
| 112 |
for x2 in range(1,51):
|
| 113 |
key += 1
|
|
|
|
| 114 |
yield key, {
|
| 115 |
"x1": x1,
|
| 116 |
"x2": x2,
|
|
|
|
| 122 |
for x1 in range(0,100):
|
| 123 |
for x2 in range(1,51):
|
| 124 |
key += 1
|
|
|
|
| 125 |
yield key, {
|
| 126 |
"x1": x1,
|
| 127 |
"x2": x2,
|