Skip to content

Commit

Permalink
Add task=feature-extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
xenova committed Nov 22, 2024
1 parent eeb3159 commit e2828ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions optimum/exporters/onnx/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2484,6 +2484,13 @@ class PatchTSTOnnxConfig(OnnxConfig):
def inputs(self) -> Dict[str, Dict[int, str]]:
return {"past_values": {0: "batch_size", 1: "sequence_length"}}

@property
def outputs(self) -> Dict[str, Dict[int, str]]:
if self.task == "feature-extraction":
return {"last_hidden_state": {0: "batch_size"}}
else:
return super().outputs


class PatchTSMixerOnnxConfig(PatchTSTOnnxConfig):
pass

0 comments on commit e2828ff

Please sign in to comment.