Skip to content

Conversation

@huleilei
Copy link
Contributor

Changes Made

This PR improves the image modality documentation by adding a complete, copy-pasteable end-to-end pipeline example.

Documentation (docs/modalities/images.md):
- Added "End-to-End Image Pipeline" section covering: URL -> download -> decode -> resize -> to_tensor -> normalize (UDF).
- Added "UDF Best Practices for Images" section (handling None, return types, performance).

Related Issues

@github-actions github-actions bot added the docs label Jan 10, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 10, 2026

Greptile Overview

Greptile Summary

Adds comprehensive documentation for image processing pipelines, including an end-to-end example covering URL download, decoding, resizing, tensor conversion, and normalization. Introduces UDF best practices section explaining None handling, return_dtype selection, performance considerations for NumPy/PyTorch vs PIL.Image, and batch processing techniques.

Confidence Score: 5/5

  • Documentation-only changes with well-structured, accurate examples; safe to merge
  • This PR only adds documentation with code examples. All API calls (download, decode_image, resize, image_to_tensor, @daft.func, @daft.func.batch) were verified against the codebase and are correct. The examples follow established patterns, handle edge cases (None values), and provide practical guidance for users. No bugs, logic errors, or security concerns identified.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
docs/modalities/images.md 5/5 Adds comprehensive end-to-end image pipeline example and UDF best practices documentation

Sequence Diagram

sequenceDiagram
    participant User
    participant Daft
    participant URL as Image URLs
    participant Tensor as Tensor Data
    
    User->>Daft: "Create DataFrame with URLs"
    Daft->>URL: "download(on_error='null')"
    URL-->>Daft: "Binary image data"
    Daft->>Daft: "decode_image()"
    Daft->>Daft: "resize(224, 224)"
    Daft->>Tensor: "image_to_tensor()"
    Tensor-->>Daft: "Tensor representation"
    Daft->>Daft: "normalize_image() UDF"
    Daft-->>User: "Normalized tensors ready for ML"
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@huleilei
Copy link
Contributor Author

@universalmind303 @kevinzwang @colin-ho help me review when you are convenient. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant