Skip to content

Commit

Permalink
Update longformqa_assertions.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavsinghvi11 authored Feb 7, 2024
1 parent 596f9cb commit 6609517
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/longformqa/longformqa_assertions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"if repo_path not in sys.path:\n",
" sys.path.append(repo_path)\n",
"\n",
"%cd dspy/examples/longformqa",
"\n",
"import pkg_resources # Install the package if it's not installed\n",
"if not \"dspy-ai\" in {pkg.key for pkg in pkg_resources.working_set}:\n",
Expand All @@ -94,6 +93,10 @@
"\n",
"from dspy.teleprompt import BootstrapFewShotWithRandomSearch\n",
"from dsp.utils import EM, normalize_text\n",
"from dspy.primitives.assertions import assert_transform_module, backtrack_handler\n",
"\n",
"%cd dspy/examples/longformqa\n",
"\n",
"from utils import extract_text_by_citation, correct_citation_format, has_citations, citations_check"
]
},
Expand Down Expand Up @@ -508,7 +511,6 @@
"metadata": {},
"outputs": [],
"source": [
"from dspy.primitives.assertions import assert_transform_module, backtrack_handler\n",
"longformqa_with_assertions = assert_transform_module(LongFormQAWithAssertions().map_named_predictors(Retry), backtrack_handler) \n",
"evaluate(longformqa_with_assertions)"
]
Expand Down

0 comments on commit 6609517

Please sign in to comment.