BeeGass commited on
Commit
9521a4c
·
verified ·
1 Parent(s): 0912a9b

Update to v2 dataset script with dynamic filtering

Browse files
Files changed (1) hide show
  1. 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=512,
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", "special"]
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": ("special", 6, 6), "f20": ("special", 5, 5),
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 == "special":
137
- # Special groups are stored separately
138
- datasets_to_load = ["psl25_data", "f20_data"]
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"]