Skip to content

Fix lazy imports for pyarrow and datasets#697

Open
Irozuku wants to merge 5 commits into
developfrom
fix/missing-lazy
Open

Fix lazy imports for pyarrow and datasets#697
Irozuku wants to merge 5 commits into
developfrom
fix/missing-lazy

Conversation

@Irozuku

@Irozuku Irozuku commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Deferred dependencies (pyarrow, datasets) to lazy imports so they are only loaded when actually used, not at app startup.


Type of Change

Check all that apply like this [x]:

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • DashAI/back/types/dashai_image.py: replaced eagerly-evaluated pa_type class variable with a lazy descriptor that imports pyarrow on first access
  • DashAI/back/api/api_v1/endpoints/dataset_source.py: moved infer_types import inside the function body, breaking the dataset_source -> type_inference -> dashai_dataset -> datasets startup import chain
  • DashAI/back/api/api_v1/endpoints/datasets.py: moved pyarrow import inside function/method bodies where it is used
  • DashAI/back/dataloaders/classes/image_dataloader.py: moved datasets, DashAIDataset, to_dashai_dataset, and DashAIImage imports inside the load method
  • DashAI/back/models/hugging_face/metrics_callback.py: moved to_dashai_dataset import inside __init__

@Irozuku Irozuku added help wanted Extra attention is needed back Backend work labels Jun 11, 2026
@Irozuku Irozuku changed the title Fix lazy imports for pyarrow, datasets, and OpenML sources Fix lazy imports for pyarrow and datasets Jun 11, 2026
@Irozuku Irozuku force-pushed the fix/missing-lazy branch 2 times, most recently from c85d08d to de29490 Compare June 11, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

back Backend work help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant