Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
BeachWang committed Dec 17, 2024
1 parent c7df0bc commit c7662cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/ops/mapper/test_query_intent_detection_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class TestQueryIntentDetectionMapper(DataJuicerTestCaseBase):
hf_model = '/mnt/workspace/shared/checkpoints/huggingface/bespin-global/klue-roberta-small-3i4k-intent-classification'
zh_to_en_hf_model = '/mnt/workspace/shared/checkpoints/huggingface/Helsinki-NLP/opus-mt-zh-en'

def _run_op(self, op, samples, intensity_key, targets):
def _run_op(self, op, samples, label_key, targets):
dataset = Dataset.from_list(samples)
dataset = dataset.map(op.process, batch_size=2)

for sample, target in zip(dataset, targets):
intensity = nested_access(sample[Fields.meta], intensity_key)
print(intensity)
# self.assertEqual(intensity, target)
label = nested_access(sample[Fields.meta], label_key)
print(label)
# self.assertEqual(label, target)

def test_default(self):

Expand Down

0 comments on commit c7662cb

Please sign in to comment.