Datasets:
Update to v2 dataset script with dynamic filtering
Browse files- permutation-groups.py +6 -6
permutation-groups.py
CHANGED
|
@@ -16,7 +16,7 @@ class PermutationGroupsConfig(datasets.BuilderConfig):
|
|
| 16 |
min_order=None,
|
| 17 |
max_order=None,
|
| 18 |
min_len=3,
|
| 19 |
-
max_len=
|
| 20 |
**kwargs
|
| 21 |
):
|
| 22 |
"""
|
|
@@ -53,7 +53,7 @@ class PermutationGroups(datasets.ArrowBasedBuilder):
|
|
| 53 |
VERSION = datasets.Version("4.0.0")
|
| 54 |
|
| 55 |
# Define available group types
|
| 56 |
-
GROUP_TYPES = ["symmetric", "alternating", "cyclic", "dihedral", "
|
| 57 |
|
| 58 |
BUILDER_CONFIGS = []
|
| 59 |
|
|
@@ -88,7 +88,7 @@ class PermutationGroups(datasets.ArrowBasedBuilder):
|
|
| 88 |
"z3": ("cyclic", 3, 3), "z4": ("cyclic", 4, 4), "z5": ("cyclic", 5, 5), "z6": ("cyclic", 6, 6),
|
| 89 |
"d3": ("dihedral", 3, 3), "d4": ("dihedral", 4, 4), "d5": ("dihedral", 5, 5),
|
| 90 |
"d6": ("dihedral", 6, 6), "d7": ("dihedral", 7, 7), "d8": ("dihedral", 8, 8),
|
| 91 |
-
"psl25": ("
|
| 92 |
}
|
| 93 |
|
| 94 |
for name, (group_type, min_deg, max_deg) in LEGACY_GROUPS.items():
|
|
@@ -133,9 +133,9 @@ class PermutationGroups(datasets.ArrowBasedBuilder):
|
|
| 133 |
def _split_generators(self, dl_manager):
|
| 134 |
# Determine which datasets to load
|
| 135 |
if self.config.group_type:
|
| 136 |
-
if self.config.group_type
|
| 137 |
-
#
|
| 138 |
-
datasets_to_load = ["
|
| 139 |
else:
|
| 140 |
# Load the superset for this group type
|
| 141 |
datasets_to_load = [f"{self.config.group_type}_superset"]
|
|
|
|
| 16 |
min_order=None,
|
| 17 |
max_order=None,
|
| 18 |
min_len=3,
|
| 19 |
+
max_len=1024,
|
| 20 |
**kwargs
|
| 21 |
):
|
| 22 |
"""
|
|
|
|
| 53 |
VERSION = datasets.Version("4.0.0")
|
| 54 |
|
| 55 |
# Define available group types
|
| 56 |
+
GROUP_TYPES = ["symmetric", "alternating", "cyclic", "dihedral", "psl25", "f20"]
|
| 57 |
|
| 58 |
BUILDER_CONFIGS = []
|
| 59 |
|
|
|
|
| 88 |
"z3": ("cyclic", 3, 3), "z4": ("cyclic", 4, 4), "z5": ("cyclic", 5, 5), "z6": ("cyclic", 6, 6),
|
| 89 |
"d3": ("dihedral", 3, 3), "d4": ("dihedral", 4, 4), "d5": ("dihedral", 5, 5),
|
| 90 |
"d6": ("dihedral", 6, 6), "d7": ("dihedral", 7, 7), "d8": ("dihedral", 8, 8),
|
| 91 |
+
"psl25": ("psl25", 6, 6), "f20": ("f20", 5, 5),
|
| 92 |
}
|
| 93 |
|
| 94 |
for name, (group_type, min_deg, max_deg) in LEGACY_GROUPS.items():
|
|
|
|
| 133 |
def _split_generators(self, dl_manager):
|
| 134 |
# Determine which datasets to load
|
| 135 |
if self.config.group_type:
|
| 136 |
+
if self.config.group_type in ["psl25", "f20"]:
|
| 137 |
+
# PSL25 and F20 are stored as individual datasets
|
| 138 |
+
datasets_to_load = [f"{self.config.group_type}_data"]
|
| 139 |
else:
|
| 140 |
# Load the superset for this group type
|
| 141 |
datasets_to_load = [f"{self.config.group_type}_superset"]
|