Skip to content

Croissant data enrichment - #595

Merged
gsaluja9 merged 3 commits into
developfrom
croissant_data_enrichment
Jun 20, 2025
Merged

gsaluja9 merged 3 commits into
developfrom
croissant_data_enrichment

Conversation

@gsaluja9

Copy link
Copy Markdown
Contributor
  1. example of getting a URL ingested as a blob.
  2. option of flattening a json into connected entities (1 level)
  3. Has no intermediate conversion into a Dataframe

gsaluja9 added 2 commits June 18, 2025 16:12
- Handle gifs.
- Handle python encoded json strings.
This kicks in when --flatten-json is specified.
@gsaluja9
gsaluja9 requested a review from Copilot June 19, 2025 02:26

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 enhances Croissant dataset ingestion by adding URL metadata, flattening JSON entities one level without converting to DataFrames, and supporting blob/image parsing.

  • CLI ingest now passes the source URL to metadata persistence.
  • MLCroissant module: reorganized imports, added logging, improved JSON and HTTP image parsing, updated persist_metadata, dict_to_query, and record set handling.
  • Removed DataFrame normalization in favor of raw sample lists and expanded blob handling for images and generic blobs.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
aperturedb/cli/ingest.py Updated persist_metadata call to include url.
aperturedb/MLCroissant.py Reorganized imports, added url field, enhanced parsing logic and blob handling, refactored record set to use sample lists.
Comments suppressed due to low confidence (2)

aperturedb/MLCroissant.py:105

  • [nitpick] This comment is misleading: this branch handles HTTP URLs and converts them to images, not lists. Update the comment to reflect the actual logic.
        # If it looks like a list, try to parse it as a list

aperturedb/MLCroissant.py:121

  • The variable o_literalse is never used and appears to be a typo. Remove or rename it to avoid confusion.
    o_literalse = {}

Comment thread aperturedb/MLCroissant.py Resolved
Comment thread aperturedb/MLCroissant.py Resolved
Comment thread aperturedb/MLCroissant.py Resolved
@gsaluja9
gsaluja9 requested a review from luisremis June 19, 2025 23:32

@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 28ef0e1 into develop Jun 20, 2025
@luisremis
luisremis deleted the croissant_data_enrichment branch June 20, 2025 15:04
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