Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-john-wbdocs-2044-rename-serverless-products.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
weave / Dataset
Objet Dataset avec enregistrement simple et gestion automatique des versions
Exemple
// Créer un jeu de données
const dataset = new Dataset({
id: 'grammar-dataset',
rows: [
{ id: '0', sentence: "He no likes ice cream.", correction: "He doesn't like ice cream." },
{ id: '1', sentence: "She goed to the store.", correction: "She went to the store." },
{ id: '2', sentence: "They plays video games all day.", correction: "They play video games all day." }
]
})
// Accéder à un exemple spécifique
const exampleLabel = dataset.getRow(2).sentence;
// Enregistrer le jeu de données
const ref = await dataset.save()
Paramètres de type
| Nom | Type |
|---|
R | extends DatasetRow |
Constructeurs
• new Dataset<R>(parameters): Dataset<R>
| Nom | Type |
|---|
R | extends DatasetRow |
| Nom | Type |
|---|
parameters | DatasetParameters<R> |
Dataset<R>
WeaveObject.constructor
dataset.ts:51
Propriétés
• Facultatif __savedRef: ObjectRef | Promise<ObjectRef>
WeaveObject.__savedRef
weaveObject.ts:73
• rows: Table<R>
dataset.ts:49
Accesseurs
• get description(): undefined | string
undefined | string
WeaveObject.description
weaveObject.ts:100
• get length(): number
number
dataset.ts:64
• get nom(): string
string
WeaveObject.name
weaveObject.ts:96
Méthodes
▸ [asyncIterator](): AsyncIterator<any, any, undefined>
AsyncIterator<any, any, undefined>
dataset.ts:68
▸ getRow(index): R
R
dataset.ts:74
▸ save(): Promise<ObjectRef>
Promise<ObjectRef>
dataset.ts:60
▸ saveAttrs(): Object
Object
WeaveObject.saveAttrs
weaveObject.ts:77