Skip to content

Commit

Permalink
v.2.6.2 (#334)
Browse files Browse the repository at this point in the history
Hotfix to check if a summarization task will have a reference before generating the challenge.
  • Loading branch information
bkb2135 authored Aug 7, 2024
1 parent 464d098 commit d2e90b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prompting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# DEALINGS IN THE SOFTWARE.

# Define the version of the template module.
__version__ = "2.6.1"
__version__ = "2.6.2"
version_split = __version__.split(".")
__spec_version__ = (
(10000 * int(version_split[0]))
Expand Down
6 changes: 4 additions & 2 deletions prompting/tools/datasets/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ def process_page(
sections = {k: v for k, v in sections.items() if k not in exclude_sections}

if selector == "all":
return ("Full Page", "\n\n".join(sections.values())) , sections.keys()

content = "\n\n".join(sections.values())
if not valid_section or valid_section(content):
return ("Full Page", content), sections.keys()
return None, sections.keys()
valid_sections = [(key, value) for key, value in sections.items() if not valid_section or valid_section(sections[key])]

if valid_sections:
Expand Down

0 comments on commit d2e90b2

Please sign in to comment.