Skip to content

Commit 9ab0e54

Browse files
committed
Add method to get modules in a Corpus
1 parent 390faa2 commit 9ab0e54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler_opt/rl/corpus.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ def filter(self, p: re.Pattern):
122122
"""Filters module specs, keeping those which match the provided pattern."""
123123
self._module_specs = [ms for ms in self._module_specs if p.match(ms.name)]
124124

125+
@property
126+
def modules(self):
127+
return list(self._module_specs)
128+
125129
def __len__(self):
126130
return len(self._module_specs)
127131

0 commit comments

Comments
 (0)