cyrilzhang
commited on
Commit
·
e970a6f
1
Parent(s):
a934872
Update automata.py
Browse files- automata.py +5 -4
automata.py
CHANGED
@@ -42,9 +42,10 @@ class SyntheticAutomataDataset(datasets.GeneratorBasedBuilder):
|
|
42 |
VERSION = datasets.Version("0.0.0")
|
43 |
BUILDER_CONFIGS = []
|
44 |
|
45 |
-
def __init__(self,
|
46 |
-
print(
|
47 |
super().__init__(**kwargs)
|
|
|
48 |
|
49 |
"""
|
50 |
Set default configs
|
@@ -120,7 +121,7 @@ class AutomatonSampler:
|
|
120 |
|
121 |
class ParitySampler(AutomatonSampler):
|
122 |
def __init__(self, data_config):
|
123 |
-
super(
|
124 |
self.name = 'parity'
|
125 |
self.data_config = data_config
|
126 |
|
@@ -134,7 +135,7 @@ class ParitySampler(AutomatonSampler):
|
|
134 |
|
135 |
class FlipFlopSampler(AutomatonSampler):
|
136 |
def __init__(self, data_config):
|
137 |
-
super(
|
138 |
self.name = 'flipflop'
|
139 |
self.data_config = data_config
|
140 |
|
|
|
42 |
VERSION = datasets.Version("0.0.0")
|
43 |
BUILDER_CONFIGS = []
|
44 |
|
45 |
+
def __init__(self, name=None, data_config={}, **kwargs):
|
46 |
+
print(name, data_config)
|
47 |
super().__init__(**kwargs)
|
48 |
+
print(name, data_config)
|
49 |
|
50 |
"""
|
51 |
Set default configs
|
|
|
121 |
|
122 |
class ParitySampler(AutomatonSampler):
|
123 |
def __init__(self, data_config):
|
124 |
+
super().__init__(data_config)
|
125 |
self.name = 'parity'
|
126 |
self.data_config = data_config
|
127 |
|
|
|
135 |
|
136 |
class FlipFlopSampler(AutomatonSampler):
|
137 |
def __init__(self, data_config):
|
138 |
+
super().__init__(data_config)
|
139 |
self.name = 'flipflop'
|
140 |
self.data_config = data_config
|
141 |
|