Skip to content

Commit

Permalink
regenerate code
Browse files Browse the repository at this point in the history
  • Loading branch information
SBrandeis committed Jan 26, 2024
1 parent 077a88f commit 6b10c4d
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 171 deletions.
7 changes: 2 additions & 5 deletions packages/tasks/src/tasks/audio-classification/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Audio Classification inference
*/
Expand All @@ -18,7 +17,6 @@ export interface AudioClassificationInput {
parameters?: AudioClassificationParameters;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand All @@ -35,13 +33,12 @@ export interface AudioClassificationParameters {
topK?: number;
[property: string]: unknown;
}

export type AudioClassificationOutputTransform = "sigmoid" | "softmax" | "none";

export type AudioClassificationOutput = AudioClassificationOutputElement[];
/**
* Outputs for Audio Classification inference
*/
export interface AudioClassificationOutput {
export interface AudioClassificationOutputElement {
/**
* The predicted class label (model specific).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Automatic Speech Recognition inference
*/
Expand All @@ -15,14 +14,16 @@ export interface AutomaticSpeechRecognitionInput {
/**
* Additional inference parameters
*/
parameters?: { [key: string]: unknown };
parameters?: {
[key: string]: unknown;
};
[property: string]: unknown;
}

export type AutomaticSpeechRecognitionOutput = AutomaticSpeechRecognitionOutputElement[];
/**
* Outputs of inference for the Automatic Speech Recognition task
*/
export interface AutomaticSpeechRecognitionOutput {
export interface AutomaticSpeechRecognitionOutputElement {
/**
* The recognized text.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Document Question Answering inference
*/
Expand All @@ -18,7 +17,6 @@ export interface DocumentQuestionAnsweringInput {
parameters?: DocumentQuestionAnsweringParameters;
[property: string]: unknown;
}

/**
* One (document, question) pair to answer
*/
Expand All @@ -33,7 +31,6 @@ export interface DocumentQuestionAnsweringInputData {
question: string;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand Down Expand Up @@ -81,13 +78,12 @@ export interface DocumentQuestionAnsweringParameters {
wordBoxes?: WordBox[];
[property: string]: unknown;
}

export type WordBox = number[] | string;

export type DocumentQuestionAnsweringOutput = DocumentQuestionAnsweringOutputElement[];
/**
* Outputs of inference for the Document Question Answering task
*/
export interface DocumentQuestionAnsweringOutput {
export interface DocumentQuestionAnsweringOutputElement {
/**
* The answer to the question.
*/
Expand Down
6 changes: 2 additions & 4 deletions packages/tasks/src/tasks/fill-mask/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Fill Mask inference
*/
Expand All @@ -18,7 +17,6 @@ export interface FillMaskInput {
parameters?: FillMaskParameters;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand All @@ -38,11 +36,11 @@ export interface FillMaskParameters {
topK?: number;
[property: string]: unknown;
}

export type FillMaskOutput = FillMaskOutputElement[];
/**
* Outputs of inference for the Fill Mask task
*/
export interface FillMaskOutput {
export interface FillMaskOutputElement {
/**
* The corresponding probability
*/
Expand Down
7 changes: 2 additions & 5 deletions packages/tasks/src/tasks/image-classification/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Image Classification inference
*/
Expand All @@ -18,7 +17,6 @@ export interface ImageClassificationInput {
parameters?: ImageClassificationParameters;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand All @@ -35,13 +33,12 @@ export interface ImageClassificationParameters {
topK?: number;
[property: string]: unknown;
}

export type ImageClassificationOutputTransform = "sigmoid" | "softmax" | "none";

export type ImageClassificationOutput = ImageClassificationOutputElement[];
/**
* Outputs of inference for the Image Classification task
*/
export interface ImageClassificationOutput {
export interface ImageClassificationOutputElement {
/**
* The predicted class label (model specific).
*/
Expand Down
7 changes: 2 additions & 5 deletions packages/tasks/src/tasks/image-segmentation/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Image Segmentation inference
*/
Expand All @@ -18,7 +17,6 @@ export interface ImageSegmentationInput {
parameters?: ImageSegmentationParameters;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand All @@ -43,15 +41,14 @@ export interface ImageSegmentationParameters {
threshold?: number;
[property: string]: unknown;
}

export type ImageSegmentationSubtask = "instance" | "panoptic" | "semantic";

export type ImageSegmentationOutput = ImageSegmentationOutputElement[];
/**
* Outputs of inference for the Image Segmentation task
*
* A predicted mask / segment
*/
export interface ImageSegmentationOutput {
export interface ImageSegmentationOutputElement {
/**
* The label of the predicted segment
*/
Expand Down
6 changes: 2 additions & 4 deletions packages/tasks/src/tasks/image-to-text/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Image To Text inference
*/
Expand All @@ -18,7 +17,6 @@ export interface ImageToTextInput {
parameters?: ImageToTextParameters;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand All @@ -31,11 +29,11 @@ export interface ImageToTextParameters {
maxNewTokens?: number;
[property: string]: unknown;
}

export type ImageToTextOutput = ImageToTextOutputElement[];
/**
* Outputs of inference for the Image To Text task
*/
export interface ImageToTextOutput {
export interface ImageToTextOutputElement {
/**
* The generated text.
*/
Expand Down
29 changes: 13 additions & 16 deletions packages/tasks/src/tasks/object-detection/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Object Detection inference
*/
Expand All @@ -18,7 +17,6 @@ export interface ObjectDetectionInput {
parameters?: ObjectDetectionParameters;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand All @@ -31,11 +29,22 @@ export interface ObjectDetectionParameters {
threshold?: number;
[property: string]: unknown;
}

/**
* The predicted bounding box. Coordinates are relative to the top left corner of the input
* image.
*/
export interface BoundingBox {
xmax: number;
xmin: number;
ymax: number;
ymin: number;
[property: string]: unknown;
}
export type ObjectDetectionOutput = ObjectDetectionOutputElement[];
/**
* Outputs of inference for the Object Detection task
*/
export interface ObjectDetectionOutput {
export interface ObjectDetectionOutputElement {
/**
* The predicted bounding box. Coordinates are relative to the top left corner of the input
* image.
Expand All @@ -51,15 +60,3 @@ export interface ObjectDetectionOutput {
score: number;
[property: string]: unknown;
}

/**
* The predicted bounding box. Coordinates are relative to the top left corner of the input
* image.
*/
export interface BoundingBox {
xmax: number;
xmin: number;
ymax: number;
ymin: number;
[property: string]: unknown;
}
7 changes: 2 additions & 5 deletions packages/tasks/src/tasks/question-answering/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Question Answering inference
*/
Expand All @@ -18,7 +17,6 @@ export interface QuestionAnsweringInput {
parameters?: QuestionAnsweringParameters;
[property: string]: unknown;
}

/**
* One (context, question) pair to answer
*/
Expand All @@ -33,7 +31,6 @@ export interface QuestionAnsweringInputData {
question: string;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand Down Expand Up @@ -77,11 +74,11 @@ export interface QuestionAnsweringParameters {
topK?: number;
[property: string]: unknown;
}

export type QuestionAnsweringOutput = QuestionAnsweringOutputElement[];
/**
* Outputs of inference for the Question Answering task
*/
export interface QuestionAnsweringOutput {
export interface QuestionAnsweringOutputElement {
/**
* The answer to the question.
*/
Expand Down
14 changes: 8 additions & 6 deletions packages/tasks/src/tasks/table-question-answering/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Table Question Answering inference
*/
Expand All @@ -15,10 +14,11 @@ export interface TableQuestionAnsweringInput {
/**
* Additional inference parameters
*/
parameters?: { [key: string]: unknown };
parameters?: {
[key: string]: unknown;
};
[property: string]: unknown;
}

/**
* One (table, question) pair to answer
*/
Expand All @@ -30,14 +30,16 @@ export interface TableQuestionAnsweringInputData {
/**
* The table to serve as context for the questions
*/
table: { [key: string]: unknown };
table: {
[key: string]: unknown;
};
[property: string]: unknown;
}

export type TableQuestionAnsweringOutput = TableQuestionAnsweringOutputElement[];
/**
* Outputs of inference for the Table Question Answering task
*/
export interface TableQuestionAnsweringOutput {
export interface TableQuestionAnsweringOutputElement {
/**
* If the model has an aggregator, this returns the aggregator.
*/
Expand Down
7 changes: 2 additions & 5 deletions packages/tasks/src/tasks/text-classification/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* Using src/scripts/inference-codegen
*/

/**
* Inputs for Text Classification inference
*/
Expand All @@ -18,7 +17,6 @@ export interface TextClassificationInput {
parameters?: TextClassificationParameters;
[property: string]: unknown;
}

/**
* Additional inference parameters
*
Expand All @@ -35,13 +33,12 @@ export interface TextClassificationParameters {
topK?: number;
[property: string]: unknown;
}

export type TextClassificationOutputTransform = "sigmoid" | "softmax" | "none";

export type TextClassificationOutput = TextClassificationOutputElement[];
/**
* Outputs of inference for the Text Classification task
*/
export interface TextClassificationOutput {
export interface TextClassificationOutputElement {
/**
* The predicted class label (model specific).
*/
Expand Down
Loading

0 comments on commit 6b10c4d

Please sign in to comment.