Skip to content

fix: embed_external_files=True for mesh support#8224

Open
Vinay-Umrethe wants to merge 2 commits into
huggingface:mainfrom
Vinay-Umrethe:fix-mesh-support
Open

fix: embed_external_files=True for mesh support#8224
Vinay-Umrethe wants to merge 2 commits into
huggingface:mainfrom
Vinay-Umrethe:fix-mesh-support

Conversation

@Vinay-Umrethe
Copy link
Copy Markdown
Contributor

Fix for #8055

This is follow-up PR for fixing a specific issue related to dataset.push_to_hub(repo_id, embed_external_files=True)

Test Conducted

from datasets import Features, Image, Mesh, Value, load_dataset


repo_id = "VINAY-UMRETHE/My-Mesh-Dataset"

dataset = load_dataset("json", data_files="TEST_DATA/records.jsonl", split="train")
dataset = dataset.map(
    lambda example: {
        "image": "TEST_DATA/" + example["image_path"],
        "mesh": "TEST_DATA/" + example["mesh_path"],
    }
)
dataset = dataset.cast(
    Features(
        {
            "id": Value("string"),
            "text": Value("string"),
            "image_path": Value("string"),
            "mesh_path": Value("string"),
            "image": Image(),
            "mesh": Mesh(),
        }
    )
)

dataset.push_to_hub(repo_id, embed_external_files=True)

Demo: VINAY-UMRETHE/My-Mesh-Dataset

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.

1 participant