cyrilzhang commited on
Commit
a934872
·
1 Parent(s): 776b4aa

Update automata.py

Browse files
Files changed (1) hide show
  1. automata.py +5 -6
automata.py CHANGED
@@ -42,7 +42,8 @@ class SyntheticAutomataDataset(datasets.GeneratorBasedBuilder):
42
  VERSION = datasets.Version("0.0.0")
43
  BUILDER_CONFIGS = []
44
 
45
- def __init__(self, name=None, data_config={}, **kwargs):
 
46
  super().__init__(**kwargs)
47
 
48
  """
@@ -54,9 +55,9 @@ class SyntheticAutomataDataset(datasets.GeneratorBasedBuilder):
54
  data_config['size'] = -1
55
 
56
  self.data_config = data_config
57
- self.sampler = dataset_map[name](data_config)
58
 
59
- print(name, self.sampler)
60
 
61
  def _info(self):
62
  features = datasets.Features(
@@ -159,6 +160,4 @@ dataset_map = {
159
  'parity': ParitySampler,
160
  'flipflop': FlipFlopSampler,
161
  # TODO: more datasets
162
- }
163
-
164
-
 
42
  VERSION = datasets.Version("0.0.0")
43
  BUILDER_CONFIGS = []
44
 
45
+ def __init__(self, data_name=None, data_config={}, **kwargs):
46
+ print(data_name)
47
  super().__init__(**kwargs)
48
 
49
  """
 
55
  data_config['size'] = -1
56
 
57
  self.data_config = data_config
58
+ self.sampler = dataset_map[data_name](data_config)
59
 
60
+ print(data_name, self.sampler)
61
 
62
  def _info(self):
63
  features = datasets.Features(
 
160
  'parity': ParitySampler,
161
  'flipflop': FlipFlopSampler,
162
  # TODO: more datasets
163
+ }