Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
reduce ut time consumption (#499)
Browse files Browse the repository at this point in the history
Signed-off-by: Xin He <xin3.he@intel.com>
  • Loading branch information
xin3he authored and zhenwei-intel committed Oct 23, 2023
1 parent 5eda1a3 commit c4f9bfa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
datasets>=1.17
mlflow
nlpaug
nlpaug==1.1.9
sacremoses
neural-compressor
onnx>=1.10
Expand Down
4 changes: 2 additions & 2 deletions tests/test_data_augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_text_generation_augmentation(self):
aug = DataAugmentation(augmenter_type="TextGenerationAug")
aug.input_dataset = self.origin_data
aug.output_path = os.path.join(self.result_path, "test1.cvs")
aug.augmenter_arguments = {'model_name_or_path': 'gpt2-medium'}
aug.augmenter_arguments = {'model_name_or_path': 'hf-internal-testing/tiny-random-gpt2'}
aug.data_augment()
print("Augmented data:")
count = 0
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_contextualwordembsforsentence_augmentation(self):
aug.input_dataset = self.origin_data
aug.column_names = "sentence"
aug.output_path = os.path.join(self.result_path, "test2.cvs")
aug.augmenter_arguments = {"model_path": "xlnet-base-cased"}
aug.augmenter_arguments = {"model_path": "hf-internal-testing/tiny-random-xlnet"}
aug.data_augment()
raw_datasets = load_dataset("csv", data_files=aug.output_path, delimiter="\t", split="train")
self.assertTrue(len(raw_datasets) == 10)
Expand Down
1 change: 0 additions & 1 deletion tests/test_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def test_evaluate_for_JitModel(self):
)
self.assertEqual(results["results"]["piqa"]["acc"], 0.6)


def test_cnn_daily(self):
from intel_extension_for_transformers.llm.evaluation.hf_eval import summarization_evaluate
model = AutoModelForCausalLM.from_pretrained("facebook/opt-125m")
Expand Down

0 comments on commit c4f9bfa

Please sign in to comment.