Skip to content

Adds a class that can iterate over Croissant datasets and generate queries to persist them to ApertureDB. - #594

Merged
gsaluja9 merged 10 commits into
developfrom
feature/croissant
Jun 18, 2025
Merged

gsaluja9 merged 10 commits into
developfrom
feature/croissant

Conversation

@gsaluja9

@gsaluja9 gsaluja9 commented Jun 17, 2025 •

Copy link
Copy Markdown
Contributor

This can be invoked as follows:
For a dry run (all the generated queries in files in cwd):

adb ingest from-croissant https://huggingface.co/api/datasets/FreedomIntelligence/PubMedVision/croissant --sample-count 1 --debug
adb ingest from-croissant https://huggingface.co/api/datasets/Rapidata/text-2-video-human-preferences-veo3/croissant --sample-count 1 --debug
adb ingest from-croissant https://huggingface.co/api/datasets/MathLLMs/MathVision/croissant --sample-count 1 --debug

Without the trailing --debug to actually run these queries on ApertureDB.

TODO:

  • URL resolution
  • Flattening of nested JSON into connected entities.
  • Avoid intermediate parse into a Dataframe.

@gsaluja9
gsaluja9 requested a review from Copilot June 17, 2025 02:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for ingesting Croissant datasets into ApertureDB and refactors the ingestion logic to centralize processing via a new helper function.

  • Introduces a new command (from_croissant) to ingest Croissant datasets.
  • Refactors ingestion pipelines by extracting processing logic into _process_data.
  • Applies minor fixes to JSON dumping across multiple files and updates comment formatting in CSV parsing.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
aperturedb/cli/ingest.py Refactored ingestion pipeline; added from_croissant cmd
aperturedb/MLCroissant.py Added module for handling Croissant dataset metadata
aperturedb/EntityUpdateDataCSV.py Updated CSV parser comments formatting
aperturedb/Connector.py Updated JSON dumping in query serialization
aperturedb/CommonLibrary.py Updated JSON dumping in error logging

Comment thread aperturedb/cli/ingest.py Resolved
gsaluja9 added 3 commits June 17, 2025 13:10
This has been incorrectly reporting exit code for tee.
@gsaluja9
gsaluja9 marked this pull request as ready for review June 17, 2025 21:14
gsaluja9 added 2 commits June 17, 2025 17:35
also json.dump should not coerce string to be ASCII
@gsaluja9
gsaluja9 requested review from bovlb and luisremis June 17, 2025 22:20

@luisremis luisremis left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 🚀

@gsaluja9
gsaluja9 merged commit db2f8d9 into develop Jun 18, 2025
@luisremis
luisremis deleted the feature/croissant branch June 19, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants