Skip to content

Commit e4587fd

Browse files
committed
Added to_update set
1 parent bbf4ce1 commit e4587fd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

examples/pbe/transduction/knowledge_graph/preprocess_tasks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def filter_constants(constants: List[str]) -> List[str]:
104104
return [x for x in constants if not (len(x) == 1 and x.lower() in ALPHA_NUMERIC)]
105105

106106

107+
to_update = set([])
107108
if __name__ == "__main__":
108109
argument_parser: argparse.ArgumentParser = argparse.ArgumentParser(
109110
description="Preporocess transduction tasks to find constants."
@@ -144,7 +145,7 @@ def filter_constants(constants: List[str]) -> List[str]:
144145
print(f"[N°{i}] {task.metadata['name']}")
145146
print("Sample:", pbe.examples[0].output)
146147
constants = task.metadata.get("constants", None)
147-
if constants is None or task.metadata["name"] == "head date french.":
148+
if constants is None or task.metadata["name"] in to_update:
148149
all_possibles = [
149150
filter_constants(
150151
find_constants(
@@ -185,7 +186,7 @@ def filter_constants(constants: List[str]) -> List[str]:
185186
print()
186187

187188
constants_in = task.metadata.get("constants_in", None)
188-
if constants_in is None:
189+
if constants_in is None or task.metadata["name"] in to_update:
189190
all_possibles = [
190191
filter_constants(
191192
find_constants(

0 commit comments

Comments
 (0)