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 columns types to /rows response #25

Closed
severo opened this issue Sep 16, 2021 · 1 comment · Fixed by #49
Closed

Add columns types to /rows response #25

severo opened this issue Sep 16, 2021 · 1 comment · Fixed by #49

Comments

@severo
Copy link
Collaborator

severo commented Sep 16, 2021

We currently just have the keys (column identifier) and values. We might want to give each column's type: "our own serialization scheme".
For ClassLabel, this means to pass the "pretty names" (the names associates to the values) along with the type

See https://github.com/huggingface/moon-landing/pull/1040#discussion_r709496849

@severo severo changed the title Add columns types and columns pretty names to /rows response Add columns types to /rows response Sep 16, 2021
@severo
Copy link
Collaborator Author

severo commented Sep 24, 2021

Proposal: add a "features" key to the /rows response which will list the features for every config. Every element in the list will give the dataset, config and features of the config (see features in https://datasets-preview.huggingface.tech/info?dataset=acronym_identification&config=default):

{
  "dataset": "acronym_identification",
  "config": "default",
  "features": {
    "id": {
        "dtype": "string",
        "id": null,
        "_type": "Value"
    },
    "tokens": {
        "feature": {
            "dtype": "string",
            "id": null,
            "_type": "Value"
        },
        "length": -1,
        "id": null,
        "_type": "Sequence"
    },
    "labels": {
        "feature": {
            "num_classes": 5,
            "names": [
                "B-long",
                "B-short",
                "I-long",
                "I-short",
                "O"
            ],
            "names_file": null,
            "id": null,
            "_type": "ClassLabel"
        },
        "length": -1,
        "id": null,
        "_type": "Sequence"
    }
  }
}

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 a pull request may close this issue.

1 participant