Skip to content

Commit

Permalink
Remove the legacy document format to move to docling v2 output
Browse files Browse the repository at this point in the history
Signed-off-by: Aakanksha Duggal <[email protected]>
  • Loading branch information
aakankshaduggal committed Jan 16, 2025
1 parent 695c651 commit 37fe3a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/instructlab/sdg/utils/chunkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,11 @@ def export_documents(self, converted_docs: Iterable[ConversionResult]):

# Export Deep Search document JSON format:
with (docling_artifacts_path / f"{doc_filename}.json").open("w") as fp:
fp.write(json.dumps(doc.legacy_document.export_to_dict()))
fp.write(json.dumps(doc.export_to_dict()))

# Export Markdown format:
with (docling_artifacts_path / f"{doc_filename}.md").open("w") as fp:
fp.write(doc.legacy_document.export_to_markdown())
fp.write(doc.export_to_markdown())
else:
logger.info(f"Document {doc.input.file} failed to convert.")
failure_count += 1
Expand Down

0 comments on commit 37fe3a7

Please sign in to comment.