Dataset Viewer issue: ResponseNotFound

#1
by mwalmsley - opened

Hi folks,

I recently uploaded a group of vision datasets, each containing galaxy images with volunteer labels. For each, the Dataset Preview works but with the warning "the full dataset viewer is not available". There's also no metadata shown on the sidebar of e.g. total rows (though num_bytes and num_examples appear correctly on the README header).

This dataset is a minimal example; the others are very similar, sometimes with extra configs. I've grouped them in this collection

The datasets are large for my field but not unusually so for HuggingFace. There are quite a few (30-200) Value columns, in case that's relevant.

Below is the auto-stub:


The dataset viewer is not working.

Error details:

Error code:   ResponseNotFound

cc @albertvillanova @lhoestq @severo .


And here is the original creation code, which is fairly minimal:


def convert_catalog_to_hub(
        df: pd.DataFrame, 
        label_cols: list, 
        dataset_name: str, 
        split_name: str, 
        config_name='default', 
        default_config='default'
    ):

    feature_dict = {"image": df['file_loc']}
    for label_col in label_cols:
        feature_dict[label_col] = df[label_col]
    ds = Dataset.from_dict(feature_dict)
    # and specify types
    ds = ds.cast_column("image", Image())
    for label_col in label_cols:  # integer vote counts
        ds = ds.cast_column(label_col, Value(dtype='int32'))

    # check it loads in torch
    torch_ds = ds.with_format("torch")
    print(
        dataset_name, 
        split_name, 
        config_name, 
        torch_ds[0]["image"].shape, torch_ds[0][label_cols[0]]
    )
    
    ds.push_to_hub(
        f"mwalmsley/{dataset_name}", 
        config_name=config_name,
        split=split_name, 
        set_default=config_name==default_config
    )

Am I missing something obvious?

Thank you for your time,
Mike

thanks for reporting, I fixed the issue

Thanks @lhoestq ! All datasets look great now except for gz2 - could you possibly double-check that one? Appreciate you taking the time to tinker!

gz2 is fixed too!

Thank you both, perfect!

mwalmsley changed discussion status to closed

Sign up or log in to comment