We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b57169b commit d7f000aCopy full SHA for d7f000a
1 file changed
examples/pbe/transduction/knowledge_graph/preprocess_tasks.py
@@ -62,7 +62,10 @@ def find_constants(
62
)
63
for i in iterator
64
]
65
- best = [(sum(len(s) for s in l if l is not None), l) for l in possibles]
+ best = [
66
+ (sum(len(s) for s in filter_constants(l) if l is not None), l)
67
+ for l in possibles
68
+ ]
69
best.sort(reverse=True)
70
found = best[0][1]
71
# if has_found_constant:
@@ -141,7 +144,7 @@ def filter_constants(constants: List[str]) -> List[str]:
141
144
print(f"[N°{i}] {task.metadata['name']}")
142
145
print("Sample:", pbe.examples[0].output)
143
146
constants = task.metadata.get("constants", None)
- if constants is None:
147
+ if constants is None or task.metadata["name"] == "head date french.":
148
all_possibles = [
149
filter_constants(
150
find_constants(
0 commit comments