shunk031 commited on
Commit
fe1b8e4
·
unverified ·
1 Parent(s): 4f56210

set default dataset as `with-filtering` (#3)

Browse files
Files changed (2) hide show
  1. jsnli.py +1 -0
  2. tests/jsnli_test.py +9 -0
jsnli.py CHANGED
@@ -30,6 +30,7 @@ _URL = "https://nlp.ist.i.kyoto-u.ac.jp/DLcounter/lime.cgi?down=https://nlp.ist.
30
 
31
  class JSNLIDataset(ds.GeneratorBasedBuilder):
32
  VERSION = ds.Version("1.1.0") # type: ignore
 
33
  BUILDER_CONFIG = [
34
  ds.BuilderConfig(
35
  name="with-filtering",
 
30
 
31
  class JSNLIDataset(ds.GeneratorBasedBuilder):
32
  VERSION = ds.Version("1.1.0") # type: ignore
33
+ DEFAULT_CONFIG_NAME: str = "with-filtering" # type: ignore
34
  BUILDER_CONFIG = [
35
  ds.BuilderConfig(
36
  name="with-filtering",
tests/jsnli_test.py CHANGED
@@ -24,3 +24,12 @@ def test_load_dataset(
24
 
25
  assert dataset["train"].num_rows == expected_num_train # type: ignore
26
  assert dataset["validation"].num_rows == expected_num_valid # type: ignore
 
 
 
 
 
 
 
 
 
 
24
 
25
  assert dataset["train"].num_rows == expected_num_train # type: ignore
26
  assert dataset["validation"].num_rows == expected_num_valid # type: ignore
27
+
28
+
29
+ def test_load_dataset_default(
30
+ dataset_path: str, expected_num_train: int = 533005, expected_num_valid: int = 3916
31
+ ):
32
+
33
+ dataset = ds.load_dataset(path=dataset_path)
34
+ assert dataset["train"].num_rows == expected_num_train # type: ignore
35
+ assert dataset["validation"].num_rows == expected_num_valid # type: ignore