Skip to content

Commit 1bbf68a

Browse files
authored
♻️ [ Tasks] Rename data -> inputs to conform existing APIs (#471)
Part of #463 Rename `data` to `inputs` to conform existing APIs format
1 parent 76b9792 commit 1bbf68a

File tree

54 files changed

+92
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+92
-83
lines changed

packages/tasks/src/tasks/audio-classification/inference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface AudioClassificationInput {
1010
/**
1111
* The input audio data
1212
*/
13-
data: unknown;
13+
inputs: unknown;
1414
/**
1515
* Additional inference parameters
1616
*/

packages/tasks/src/tasks/audio-classification/spec/input.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"title": "AudioClassificationInput",
66
"type": "object",
77
"properties": {
8-
"data": {
8+
"inputs": {
99
"description": "The input audio data"
1010
},
1111
"parameters": {
@@ -30,5 +30,5 @@
3030
}
3131
}
3232
},
33-
"required": ["data"]
33+
"required": ["inputs"]
3434
}

packages/tasks/src/tasks/automatic-speech-recognition/inference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface AutomaticSpeechRecognitionInput {
1010
/**
1111
* The input audio data
1212
*/
13-
data: unknown;
13+
inputs: unknown;
1414
/**
1515
* Additional inference parameters
1616
*/

packages/tasks/src/tasks/automatic-speech-recognition/spec/input.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"title": "AutomaticSpeechRecognitionInput",
66
"type": "object",
77
"properties": {
8-
"data": {
8+
"inputs": {
99
"description": "The input audio data"
1010
},
1111
"parameters": {
@@ -30,5 +30,5 @@
3030
}
3131
}
3232
},
33-
"required": ["data"]
33+
"required": ["inputs"]
3434
}

packages/tasks/src/tasks/depth-estimation/inference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface DepthEstimationInput {
1111
/**
1212
* The input image data
1313
*/
14-
data: unknown;
14+
inputs: unknown;
1515
/**
1616
* Additional inference parameters
1717
*/

packages/tasks/src/tasks/depth-estimation/spec/input.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"title": "DepthEstimationInput",
66
"type": "object",
77
"properties": {
8-
"data": {
8+
"inputs": {
99
"description": "The input image data"
1010
},
1111
"parameters": {
@@ -21,5 +21,5 @@
2121
"properties": {}
2222
}
2323
},
24-
"required": ["data"]
24+
"required": ["inputs"]
2525
}

packages/tasks/src/tasks/document-question-answering/inference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface DocumentQuestionAnsweringInput {
1010
/**
1111
* One (document, question) pair to answer
1212
*/
13-
data: DocumentQuestionAnsweringInputData;
13+
inputs: DocumentQuestionAnsweringInputData;
1414
/**
1515
* Additional inference parameters
1616
*/

packages/tasks/src/tasks/document-question-answering/spec/input.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"title": "DocumentQuestionAnsweringInput",
66
"type": "object",
77
"properties": {
8-
"data": {
8+
"inputs": {
99
"description": "One (document, question) pair to answer",
1010
"type": "object",
1111
"title": "DocumentQuestionAnsweringInputData",
@@ -81,5 +81,5 @@
8181
}
8282
}
8383
},
84-
"required": ["data"]
84+
"required": ["inputs"]
8585
}

packages/tasks/src/tasks/feature-extraction/inference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface FeatureExtractionInput {
1313
/**
1414
* The text to get the embeddings of
1515
*/
16-
data: string;
16+
inputs: string;
1717
/**
1818
* Additional inference parameters
1919
*/

packages/tasks/src/tasks/feature-extraction/spec/input.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"title": "FeatureExtractionInput",
66
"type": "object",
77
"properties": {
8-
"data": {
8+
"inputs": {
99
"description": "The text to get the embeddings of",
1010
"type": "string"
1111
},
@@ -22,5 +22,5 @@
2222
"properties": {}
2323
}
2424
},
25-
"required": ["data"]
25+
"required": ["inputs"]
2626
}

0 commit comments

Comments
 (0)