Fix convert_graph_to_onnx script
- Remove all references to `args` in methods, using arguments instead. This lets us use the `convert` method directly by importing it in another script.
- Check that the wanted framework is installed before creating the pipeline, otherwise, it might fail to instantiate it.
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5230?src=pr&el=h1) Report
> Merging [#5230](https://codecov.io/gh/huggingface/transformers/pull/5230?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/9022ef021a56db975d25c7108cbd19d0dd399174&el=desc) will **increase** coverage by `0.89%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/5230/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/5230?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #5230      +/-   ##
==========================================
+ Coverage   77.08%   77.98%   +0.89%     
==========================================
  Files         138      138              
  Lines       23841    23841              
==========================================
+ Hits        18379    18592     +213     
+ Misses       5462     5249     -213     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5230?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5230/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `86.00% <0.00%> (+0.29%)` | :arrow_up: |
| [src/transformers/modeling\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5230/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `80.90% <0.00%> (+1.38%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5230/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `94.92% <0.00%> (+75.00%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/5230?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5230?src=pr&el=footer). Last update [9022ef0...833fb6d](https://codecov.io/gh/huggingface/transformers/pull/5230?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
