Skip to content

Commit

Permalink
Update HTML error to warning to avoid exiting
Browse files Browse the repository at this point in the history
Signed-off-by: Aakanksha Duggal <[email protected]>
  • Loading branch information
aakankshaduggal committed Jan 8, 2025
1 parent d4cc458 commit bab135c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/instructlab/sdg/utils/taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,10 @@ def _get_documents(
with open(file_path, "r", encoding="utf-8") as file:
content = file.read()
if _string_contains_html(content):
raise ValueError(
f"Provided markdown file {file_path} contains"
" HTML, which is currently unsupported. Please"
" format your markdown documents without the"
" use of HTML or use a different document"
" filetype."
logging.warning(
f"Provided markdown file {file_path} contains HTML contents, which is currently unsupported as a part of markdown"
"NOTE: Continuing this might affect your data generation quality."
"To get best results please format your markdown documents without the use of HTML or use a different document filetype."
)
file_contents.append(content)
filepaths.append(Path(file_path))
Expand Down

0 comments on commit bab135c

Please sign in to comment.