Remove task arg in load_dataset in image-classification example (#28408)

* Remove `task` arg in `load_dataset` in image-classification example

* Manage case where "train" is not in dataset

* Add new args to manage image and label column names

* Similar to audio-classification example

* Fix README

* Update tests
This commit is contained in:
regisss
2024-01-16 08:04:08 +01:00
committed by GitHub
parent edb170238f
commit 0cdcd7a2b3
5 changed files with 71 additions and 18 deletions

View File

@@ -41,6 +41,7 @@ python run_image_classification.py \
--dataset_name beans \
--output_dir ./beans_outputs/ \
--remove_unused_columns False \
--label_column_name labels \
--do_train \
--do_eval \
--push_to_hub \
@@ -197,7 +198,7 @@ accelerate test
that will check everything is ready for training. Finally, you can launch training with
```bash
accelerate launch run_image_classification_trainer.py
accelerate launch run_image_classification_no_trainer.py --image_column_name img
```
This command is the same and will work for: