Skip to content

Commit

Permalink
for test
Browse files Browse the repository at this point in the history
  • Loading branch information
BeachWang committed Dec 17, 2024
1 parent c7662cb commit 6f44ec0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions data_juicer/ops/mapper/query_intent_detection_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def process_batched(self, samples, rank=None):
self.use_cuda())
results = translater(queries)
queries = [item['translation_text'] for item in results]
print(queries)

classifier, _ = get_model(self.model_key, rank, self.use_cuda())
results = classifier(queries)
Expand Down
4 changes: 2 additions & 2 deletions tests/ops/mapper/test_query_intent_detection_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def test_default(self):
samples = [{
'query': '这样好吗?'
},{
'query': '把那只笔递给我。'
'query': '站住!'
},{
'query': '难道不是这样的吗?'
'query': '今天阳光灿烂。'
}
]
targets = [1, 0, -1]
Expand Down

0 comments on commit 6f44ec0

Please sign in to comment.