diff --git a/js/src/client.ts b/js/src/client.ts index 6d036b21f..6e8919a47 100644 --- a/js/src/client.ts +++ b/js/src/client.ts @@ -3641,6 +3641,7 @@ export class Client { }); const ds = await sourceClient.readSharedDataset(tokenUuid); + console.log("DATASET!", ds); const finalDatasetName = datasetName || ds.name; try { @@ -3660,6 +3661,8 @@ export class Client { const dataset = await this.createDataset(finalDatasetName, { description: ds.description, dataType: ds.data_type || "kv", + inputsSchema: ds.inputs_schema_definition ?? undefined, + outputsSchema: ds.outputs_schema_definition ?? undefined, }); try { await this.createExamples({ diff --git a/js/src/schemas.ts b/js/src/schemas.ts index deb82dccd..1f0e9b420 100644 --- a/js/src/schemas.ts +++ b/js/src/schemas.ts @@ -270,6 +270,8 @@ export interface Dataset extends BaseDataset { example_count?: number; session_count?: number; last_session_start_time?: number; + inputs_schema_definition?: KVMap; + outputs_schema_definition?: KVMap; } export interface DatasetShareSchema { dataset_id: string; diff --git a/js/src/tests/client.int.test.ts b/js/src/tests/client.int.test.ts index 1608079af..6c76cf2e6 100644 --- a/js/src/tests/client.int.test.ts +++ b/js/src/tests/client.int.test.ts @@ -1085,7 +1085,7 @@ test("list shared examples can list shared examples", async () => { expect(sharedExamples.length).toBeGreaterThan(0); }); -test("clonePublicDataset method can clone a dataset", async () => { +test.only("clonePublicDataset method can clone a dataset", async () => { const client = new Client(); const datasetName = "multiverse_math_public_testing"; const multiverseMathPublicDatasetURL =