Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for using Delta table name in create_pytorch_dataloader #20

Open
yinxi-db opened this issue May 31, 2023 · 1 comment
Open

Comments

@yinxi-db
Copy link

For users saving the delta table in metastore, it is more convenient to use table_name to reference the data than the path argument of create_pytorch_dataloader

create_pytorch_dataloader(
        # Path to the DeltaLake table
        path,
        # Autoincrement ID field
        id_field="id",
        # Fields which will be used during training
        fields=[
            FieldSpec("image",
                      # Load image using Pillow
                      load_image_using_pil=True, 
                      # PyTorch Transform
                      transform=transform),
            FieldSpec("label"),
        ],
        # Number of readers 
        num_workers=2,
        # Shuffle data inside the record batches
        shuffle=True,
        # Batch size        
        batch_size=batch_size,
    )
@krishnakalyan3
Copy link

The main issue here is that, consider that I have a csv file in S3. I need to do the following
CSV -> Delta Lake -> Delta Lake on DBFS

When table name is passed

TableNotFoundError: No snapshot or version 0 found, perhaps /Workspace/Users/... is an empty dir?

When S3 path is passed:

OSError: Generic S3 error: Missing region

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

No branches or pull requests

2 participants