Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Mar 19, 2024
1 parent 55c481a commit f2d8beb
Showing 1 changed file with 63 additions and 63 deletions.
126 changes: 63 additions & 63 deletions examples/openvino/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@ class TestExamples(unittest.TestCase):
def test_audio_classification(self):
with tempfile.TemporaryDirectory() as tmp_dir:
test_args = f"""
run_audio_classification.py
--model_name_or_path hf-internal-testing/tiny-random-Wav2Vec2Model
--nncf_compression_config examples/openvino/audio-classification/configs/wav2vec2-base-qat.json
--dataset_name superb
--dataset_config_name ks
--max_train_samples 10
--max_eval_samples 2
--remove_unused_columns False
--do_train
--learning_rate 3e-5
--max_length_seconds 1
--attention_mask False
--warmup_ratio 0.1
--num_train_epochs 1
--gradient_accumulation_steps 1
--dataloader_num_workers 1
--logging_strategy steps
--logging_steps 1
--evaluation_strategy epoch
--save_strategy epoch
--load_best_model_at_end False
run_audio_classification.py
--model_name_or_path hf-internal-testing/tiny-random-Wav2Vec2Model
--nncf_compression_config examples/openvino/audio-classification/configs/wav2vec2-base-qat.json
--dataset_name superb
--dataset_config_name ks
--max_train_samples 10
--max_eval_samples 2
--remove_unused_columns False
--do_train
--learning_rate 3e-5
--max_length_seconds 1
--attention_mask False
--warmup_ratio 0.1
--num_train_epochs 1
--gradient_accumulation_steps 1
--dataloader_num_workers 1
--logging_strategy steps
--logging_steps 1
--evaluation_strategy epoch
--save_strategy epoch
--load_best_model_at_end False
--seed 42
--output_dir {tmp_dir}
--output_dir {tmp_dir}
--overwrite_output_dir
""".split()

Expand All @@ -72,21 +72,21 @@ def test_audio_classification(self):
def test_image_classification(self):
with tempfile.TemporaryDirectory() as tmp_dir:
test_args = f"""
run_image_classification.py
--model_name_or_path nateraw/vit-base-beans
--dataset_name beans
--max_train_samples 10
--max_eval_samples 2
--remove_unused_columns False
run_image_classification.py
--model_name_or_path nateraw/vit-base-beans
--dataset_name beans
--max_train_samples 10
--max_eval_samples 2
--remove_unused_columns False
--do_train
--do_eval
--learning_rate 2e-5
--num_train_epochs 1
--logging_strategy steps
--logging_steps 1
--evaluation_strategy epoch
--save_strategy epoch
--save_total_limit 1
--do_eval
--learning_rate 2e-5
--num_train_epochs 1
--logging_strategy steps
--logging_steps 1
--evaluation_strategy epoch
--save_strategy epoch
--save_total_limit 1
--seed 1337
--output_dir {tmp_dir}
""".split()
Expand All @@ -96,23 +96,23 @@ def test_image_classification(self):

def test_text_classification(self):
with tempfile.TemporaryDirectory() as tmp_dir:
test_args = f"""
run_glue.py
--model_name_or_path hf-internal-testing/tiny-random-DistilBertForSequenceClassification
--task_name sst2
--max_train_samples 10
--max_eval_samples 2
--overwrite_output_dir
test_args = f"""
run_glue.py
--model_name_or_path hf-internal-testing/tiny-random-DistilBertForSequenceClassification
--task_name sst2
--max_train_samples 10
--max_eval_samples 2
--overwrite_output_dir
--do_train
--do_eval
--max_seq_length 128
--learning_rate 1e-5
--optim adamw_torch
--num_train_epochs 1
--logging_steps 1
--evaluation_strategy steps
--eval_steps 1
--save_strategy epoch
--do_eval
--max_seq_length 128
--learning_rate 1e-5
--optim adamw_torch
--num_train_epochs 1
--logging_steps 1
--evaluation_strategy steps
--eval_steps 1
--save_strategy epoch
--seed 42
--output_dir {tmp_dir}
""".split()
Expand All @@ -123,17 +123,17 @@ def test_text_classification(self):
def test_question_answering(self):
with tempfile.TemporaryDirectory() as tmp_dir:
test_args = f"""
run_qa.py
--model_name_or_path hf-internal-testing/tiny-random-DistilBertForQuestionAnswering
--dataset_name squad
--do_train
--do_eval
--max_train_samples 10
--max_eval_samples 2
--learning_rate 3e-5
--num_train_epochs 1
--max_seq_length 384
--doc_stride 128
run_qa.py
--model_name_or_path hf-internal-testing/tiny-random-DistilBertForQuestionAnswering
--dataset_name squad
--do_train
--do_eval
--max_train_samples 10
--max_eval_samples 2
--learning_rate 3e-5
--num_train_epochs 1
--max_seq_length 384
--doc_stride 128
--overwrite_output_dir
--output_dir {tmp_dir}
""".split()
Expand Down

0 comments on commit f2d8beb

Please sign in to comment.