[ONNX] Export failed for Module with Keyword-only inputs
Labels: module: onnx, triaged, onnx-needs-info

### 🐛 Describe the bug

`torch.onnx.export` cannot export a Module which takes in Keyword-only arguments in its forward function.

Example:
```python
import torch
import torch.nn as nn

class MyModel(nn.Module):
    def forward(self, *, inp):
        # Must be called with inp=...
        return inp


model = MyModel()

print("Forward pass works: ", model(inp=torch.zeros(4)), "\n")

# Keyword arguments given to torch.onnx.export as a dictionary
# See https://pytorch.org/docs/stable/onnx.html#torch.onnx.export
args = ({"inp": torch.zeros(4)},)

# Fails
torch.onnx.export(model, args, "pytorch_test.onnx")
```
Logs:
```
Forward pass works:  tensor([0., 0., 0., 0.]) 

============= Diagnostic Run torch.onnx.export version 2.0.0+cu117 =============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Traceback (most recent call last):
  File "/home/isherstyuk/trt/unclippipeline_trt/pytorch_test.py", line 16, in <module>
    torch.onnx.export(model, args, "pytorch_test.onnx")
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/onnx/utils.py", line 506, in export
    _export(
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/onnx/utils.py", line 1548, in _export
    graph, params_dict, torch_out = _model_to_graph(
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/onnx/utils.py", line 1113, in _model_to_graph
    graph, params, torch_out, module = _create_jit_graph(model, args)
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/onnx/utils.py", line 989, in _create_jit_graph
    graph, torch_out = _trace_and_get_graph_from_model(model, args)
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/onnx/utils.py", line 893, in _trace_and_get_graph_from_model
    trace_graph, torch_out, inputs_states = torch.jit._get_trace_graph(
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/jit/_trace.py", line 1268, in _get_trace_graph
    outs = ONNXTracedModule(f, strict, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/jit/_trace.py", line 127, in forward
    graph, out = torch._C._create_graph_by_tracing(
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/jit/_trace.py", line 118, in wrapper
    outs.append(self.inner(*trace_inputs))
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/isherstyuk/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1488, in _slow_forward
    result = self.forward(*input, **kwargs)
TypeError: MyModel.forward() takes 1 positional argument but 2 were given
```

The reason this is happening is that `torch.onnx.export` transforms the given keyword args into positional args, as seen here https://github.com/pytorch/pytorch/blob/v2.0.0/torch/onnx/utils.py#L821-L857. This works for 99% of cases since most keyword arguments can also be passed in as positional arguments, I think it is pretty rare to have keyword-only arguments. [Here](https://docs.python.org/3.10/library/inspect.html#inspect.Parameter.kind) is a reference about types of arguments in python I found useful.

### Versions

Versions of relevant libraries:
[pip3] numpy==1.23.1
[pip3] torch==2.0.0
[pip3] torchaudio==2.0.1
[pip3] torchvision==0.15.1
[pip3] triton==2.0.0
[conda] Could not collect