mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-25 04:30:48 +01:00
[to #42322933] fix multimodal embedding test
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/9850995
This commit is contained in:
@@ -31,11 +31,10 @@ class MultiModalEmbeddingTest(unittest.TestCase):
|
||||
|
||||
@unittest.skipUnless(test_level() >= 1, 'skip test in current test level')
|
||||
def test_run_with_model_from_modelhub(self):
|
||||
model = Model.from_pretrained(self.model_id)
|
||||
model = Model.from_pretrained(
|
||||
self.model_id, revision=self.model_version)
|
||||
pipeline_multi_modal_embedding = pipeline(
|
||||
task=Tasks.multi_modal_embedding,
|
||||
model=model,
|
||||
model_revision=self.model_version)
|
||||
task=Tasks.multi_modal_embedding, model=model)
|
||||
text_embedding = pipeline_multi_modal_embedding(
|
||||
self.test_input)[OutputKeys.TEXT_EMBEDDING]
|
||||
print('l1-norm: {}'.format(
|
||||
|
||||
Reference in New Issue
Block a user