|
| 1 | +/** |
| 2 | + * Elements configurable by a dataset library. |
| 3 | + */ |
| 4 | +export interface DatasetLibraryUiElement { |
| 5 | + /** |
| 6 | + * Pretty name of the library. |
| 7 | + * displayed (in tags?, and) on the main |
| 8 | + * call-to-action button on the dataset page. |
| 9 | + */ |
| 10 | + prettyLabel: string; |
| 11 | + /** |
| 12 | + * Repo name of the library's (usually on GitHub) code repo |
| 13 | + */ |
| 14 | + repoName: string; |
| 15 | + /** |
| 16 | + * URL to library's (usually on GitHub) code repo |
| 17 | + */ |
| 18 | + repoUrl: string; |
| 19 | + /** |
| 20 | + * URL to library's docs |
| 21 | + */ |
| 22 | + docsUrl?: string; |
| 23 | +} |
| 24 | + |
| 25 | +export const DATASET_LIBRARIES_UI_ELEMENTS = { |
| 26 | + mlcroissant: { |
| 27 | + prettyLabel: "mlcroissant", |
| 28 | + repoName: "croissant", |
| 29 | + repoUrl: "https://github.com/mlcommons/croissant/tree/main/python/mlcroissant", |
| 30 | + docsUrl: "https://github.com/mlcommons/croissant/blob/main/python/mlcroissant/README.md", |
| 31 | + }, |
| 32 | + webdataset: { |
| 33 | + prettyLabel: "WebDataset", |
| 34 | + repoName: "webdataset", |
| 35 | + repoUrl: "https://github.com/webdataset/webdataset", |
| 36 | + docsUrl: "https://huggingface.co/docs/hub/datasets-webdataset", |
| 37 | + }, |
| 38 | + datasets: { |
| 39 | + prettyLabel: "Datasets", |
| 40 | + repoName: "datasets", |
| 41 | + repoUrl: "https://github.com/huggingface/datasets", |
| 42 | + docsUrl: "https://huggingface.co/docs/hub/datasets-usage", |
| 43 | + }, |
| 44 | + pandas: { |
| 45 | + prettyLabel: "pandas", |
| 46 | + repoName: "pandas", |
| 47 | + repoUrl: "https://github.com/pandas-dev/pandas", |
| 48 | + docsUrl: "https://huggingface.co/docs/hub/datasets-pandas", |
| 49 | + }, |
| 50 | + dask: { |
| 51 | + prettyLabel: "Dask", |
| 52 | + repoName: "dask", |
| 53 | + repoUrl: "https://github.com/dask/dask", |
| 54 | + docsUrl: "https://huggingface.co/docs/hub/datasets-dask", |
| 55 | + }, |
| 56 | +} satisfies Record<string, DatasetLibraryUiElement>; |
| 57 | + |
| 58 | +/// List of the dataset libraries supported by the Hub |
| 59 | +export type DatasetLibraryKey = keyof typeof DATASET_LIBRARIES_UI_ELEMENTS; |
0 commit comments