argilla icon indicating copy to clipboard operation
argilla copied to clipboard

feat: move image casting into record fields

Open burtenshaw opened this issue 6 months ago • 0 comments

Description

This PR experiments with cast images within the Record class to abstract away data uri. This supports this flow:

image_paths = [f"{my_image_dir}/{fn}" for fn in os.listdir(my_image_dir)]

records = [
    rg.Record(
        fields={
            "image": image_path,
        },
    )
    for image_path in image_paths
]


dataset.records.log(records)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (change restructuring the codebase without changing functionality)
  • Improvement (change adding some improvement to an existing functionality)
  • Documentation update

How Has This Been Tested

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

burtenshaw avatar Aug 28 '24 10:08 burtenshaw