(no commit message)
This commit is contained in:
@@ -33,6 +33,7 @@ def classification_metric(
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
program = DocExtract.from_precompiled("tyrin/doc-extract")
|
||||||
dspy.configure(lm=dspy.LM("openai/gpt-4.1-mini", temperature=0.0))
|
dspy.configure(lm=dspy.LM("openai/gpt-4.1-mini", temperature=0.0))
|
||||||
|
|
||||||
optimized_program = dspy.GEPA(
|
optimized_program = dspy.GEPA(
|
||||||
@@ -40,7 +41,7 @@ if __name__ == "__main__":
|
|||||||
reflection_lm=dspy.LM("openai/gpt-4.1-mini", temperature=1.0, max_tokens=8000),
|
reflection_lm=dspy.LM("openai/gpt-4.1-mini", temperature=1.0, max_tokens=8000),
|
||||||
auto="light",
|
auto="light",
|
||||||
).compile(
|
).compile(
|
||||||
DocExtract(),
|
program,
|
||||||
trainset=load_dataset("data/train.jsonl"),
|
trainset=load_dataset("data/train.jsonl"),
|
||||||
valset=load_dataset("data/val.jsonl"),
|
valset=load_dataset("data/val.jsonl"),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -25,4 +25,5 @@ class DocExtract(PrecompiledProgram):
|
|||||||
return self.cot(context=context)
|
return self.cot(context=context)
|
||||||
|
|
||||||
|
|
||||||
DocExtract().push_to_hub("tyrin/doc-extract")
|
if __name__ == "__main__":
|
||||||
|
DocExtract().push_to_hub("tyrin/doc-extract")
|
||||||
|
|||||||
Reference in New Issue
Block a user