Skip to content

Commit e002b8a

Browse files
Release v1.25.0
1 parent 8d04303 commit e002b8a

8 files changed

Lines changed: 47 additions & 14 deletions

sdk/studio/sdk/api/rawDataApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8346,7 +8346,7 @@ export class RawDataApi {
83468346
}
83478347

83488348
/**
8349-
* Performs a deterministic, in-place stratified split of the project\'s dataset into \"training\" and \"testing\" sets, based on the chosen stratification options. Stratification can use the label, one or more metadata keys, or both as a composite group. This is a deterministic process based on the hash of the name of the data. Returns immediately on small datasets, or starts a job on larger datasets. For example: { \"stratifyByLabel\": true, \"metadataKeys\": [\"site\", \"scanner\"], \"excludeDisabledSamples\": false, \"splitRatio\": 0.8 } With these options, samples are grouped by the combination of label, site, and scanner. Within each group, 80% are set to \"training\" and the rest to \"testing\".
8349+
* Performs a deterministic, in-place stratified split of the project\'s dataset into \"training\", \"testing\", and optional \"validation\" sets, based on the chosen stratification options. Stratification can use the label, one or more metadata keys, or both as a composite group. This is a deterministic process based on the hash of the name of the data. Returns immediately on small datasets, or starts a job on larger datasets. For example: { \"stratifyByLabel\": true, \"metadataKeys\": [\"site\", \"scanner\"], \"excludeDisabledSamples\": false, \"trainingSplitRatio\": 0.8, \"testingSplitRatio\": 0.1, \"validationSplitRatio\": 0.1 } With these options, samples are grouped by the combination of label, site, and scanner. Within each group, 80% are set to \"training\", 10% to \"testing\", and 10% to \"validation\".
83508350
* @summary Stratify dataset
83518351
* @param projectId Project ID
83528352
* @param datasetStratificationOptions

sdk/studio/sdk/model/datasetRatioDataRatio.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313

1414
export class DatasetRatioDataRatio {
1515
/**
16-
* number of training samples after rebalance
16+
* Number of training samples after rebalance
1717
*/
1818
'training'?: number;
1919
/**
20-
* number of testing samples after rebalance. This ignores test data with a label that\'s not in the training dataset.
20+
* Number of validation samples after rebalance. This is experimental and may change in the future.
21+
*/
22+
'validation'?: number;
23+
/**
24+
* Number of testing samples after rebalance. This ignores test data with a label that\'s not in the training dataset.
2125
*/
2226
'testing'?: number;
2327

@@ -29,6 +33,11 @@ export class DatasetRatioDataRatio {
2933
"baseName": "training",
3034
"type": "number"
3135
},
36+
{
37+
"name": "validation",
38+
"baseName": "validation",
39+
"type": "number"
40+
},
3241
{
3342
"name": "testing",
3443
"baseName": "testing",

sdk/studio/sdk/model/datasetStratificationOptions.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313

1414
export class DatasetStratificationOptions {
1515
/**
16-
* Proportion of the dataset to use for training. The remainder will be used for testing. For example, a value of 0.8 means 80% training, 20% testing.
16+
* Proportion of the dataset to use for training.
1717
*/
18-
'splitRatio': number;
18+
'trainingSplitRatio': number;
19+
/**
20+
* Proportion of the dataset to use for testing.
21+
*/
22+
'testingSplitRatio': number;
23+
/**
24+
* Proportion of the dataset to use for validation. This is experimental and may change in the future.
25+
*/
26+
'validationSplitRatio'?: number;
1927
/**
2028
* Whether to stratify by label. If true, the label column will be used for stratification combined with metadataKeys. If false, only metadataKeys will be used.
2129
*/
@@ -33,8 +41,18 @@ export class DatasetStratificationOptions {
3341

3442
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
3543
{
36-
"name": "splitRatio",
37-
"baseName": "splitRatio",
44+
"name": "trainingSplitRatio",
45+
"baseName": "trainingSplitRatio",
46+
"type": "number"
47+
},
48+
{
49+
"name": "testingSplitRatio",
50+
"baseName": "testingSplitRatio",
51+
"type": "number"
52+
},
53+
{
54+
"name": "validationSplitRatio",
55+
"baseName": "validationSplitRatio",
3856
"type": "number"
3957
},
4058
{

sdk/studio/sdk/model/getDataExplorerFeaturesResponseAllOfSample.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ export class GetDataExplorerFeaturesResponseAllOfSample {
5353
}
5454

5555

56-
export type GetDataExplorerFeaturesResponseAllOfSampleCategoryEnum = 'training' | 'testing';
57-
export const GetDataExplorerFeaturesResponseAllOfSampleCategoryEnumValues: string[] = ['training', 'testing'];
56+
export type GetDataExplorerFeaturesResponseAllOfSampleCategoryEnum = 'training' | 'testing' | 'validation';
57+
export const GetDataExplorerFeaturesResponseAllOfSampleCategoryEnumValues: string[] = ['training', 'testing', 'validation'];

sdk/studio/sdk/model/projectInfoResponseAllOfDataSummaryPerCategory.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { ProjectDataSummary } from './projectDataSummary';
1515
export class ProjectInfoResponseAllOfDataSummaryPerCategory {
1616
'training': ProjectDataSummary;
1717
'testing': ProjectDataSummary;
18+
'validation': ProjectDataSummary;
1819
'postProcessing': ProjectDataSummary;
1920

2021
static discriminator: string | undefined = undefined;
@@ -30,6 +31,11 @@ export class ProjectInfoResponseAllOfDataSummaryPerCategory {
3031
"baseName": "testing",
3132
"type": "ProjectDataSummary"
3233
},
34+
{
35+
"name": "validation",
36+
"baseName": "validation",
37+
"type": "ProjectDataSummary"
38+
},
3339
{
3440
"name": "postProcessing",
3541
"baseName": "postProcessing",

sdk/studio/sdk/model/rawDataCategory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313

1414

15-
export type RawDataCategory = 'training' | 'testing' | 'post-processing';
16-
export const RawDataCategoryValues: string[] = ['training', 'testing', 'post-processing'];
15+
export type RawDataCategory = 'training' | 'testing' | 'validation' | 'post-processing';
16+
export const RawDataCategoryValues: string[] = ['training', 'testing', 'validation', 'post-processing'];

sdk/studio/sdk/model/rawDataFilterCategory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313

1414

15-
export type RawDataFilterCategory = 'training' | 'testing' | 'post-processing' | 'all';
16-
export const RawDataFilterCategoryValues: string[] = ['training', 'testing', 'post-processing', 'all'];
15+
export type RawDataFilterCategory = 'training' | 'testing' | 'validation' | 'post-processing' | 'all';
16+
export const RawDataFilterCategoryValues: string[] = ['training', 'testing', 'validation', 'post-processing', 'all'];

shared/bounding-box-file-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ export function calculateAllStructuredLabels(sample: {
378378
return <AllStructuredLabels[]>allStructuredLabels;
379379
}
380380

381-
export type ExportUploaderInfoFileCategory = 'training' | 'testing' | 'post-processing' | 'split';
381+
export type ExportUploaderInfoFileCategory = 'training' | 'testing' | 'validation' | 'post-processing' | 'split';
382382

383383
export type ExportUploaderInfoFileMultiLabel = {
384384
startIndex: number;

0 commit comments

Comments
 (0)