Skip to content

Commit 8c500c8

Browse files
authored
Remove ORTTrainer code snippet from README (#2194)
remove code snippet from README
1 parent 3d8957c commit 8c500c8

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

README.md

+1-29
Original file line numberDiff line numberDiff line change
@@ -246,35 +246,7 @@ Before you begin, make sure you have all the necessary libraries installed :
246246
pip install optimum[onnxruntime-training]
247247
```
248248

249-
```diff
250-
- from transformers import Trainer, TrainingArguments
251-
+ from optimum.onnxruntime import ORTTrainer, ORTTrainingArguments
252-
253-
# Download a pretrained model from the Hub
254-
model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
255-
256-
# Define the training arguments
257-
- training_args = TrainingArguments(
258-
+ training_args = ORTTrainingArguments(
259-
output_dir="path/to/save/folder/",
260-
optim="adamw_ort_fused",
261-
...
262-
)
263-
264-
# Create a ONNX Runtime Trainer
265-
- trainer = Trainer(
266-
+ trainer = ORTTrainer(
267-
model=model,
268-
args=training_args,
269-
train_dataset=train_dataset,
270-
...
271-
)
272-
273-
# Use ONNX Runtime for training!
274-
trainer.train()
275-
```
276-
277-
You can find more examples in the [documentation](https://huggingface.co/docs/optimum/onnxruntime/usage_guides/trainer) and in the [examples](https://github.com/huggingface/optimum/tree/main/examples/onnxruntime/training).
249+
You can find examples in the [documentation](https://huggingface.co/docs/optimum/onnxruntime/usage_guides/trainer) and in the [examples](https://github.com/huggingface/optimum/tree/main/examples/onnxruntime/training).
278250

279251

280252
### Quanto

0 commit comments

Comments
 (0)