mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
[Tests] Update model_id in AIMv2 Tests (#39281)
Some checks are pending
Self-hosted runner (benchmark) / Benchmark (aws-g5-4xlarge-cache) (push) Waiting to run
Build documentation / build (push) Waiting to run
Slow tests on important models (on Push - A10) / Get all modified files (push) Waiting to run
Slow tests on important models (on Push - A10) / Slow & FA2 tests (push) Blocked by required conditions
Self-hosted runner (push-caller) / Check if setup was changed (push) Waiting to run
Self-hosted runner (push-caller) / build-docker-containers (push) Blocked by required conditions
Self-hosted runner (push-caller) / Trigger Push CI (push) Blocked by required conditions
Secret Leaks / trufflehog (push) Waiting to run
Update Transformers metadata / build_and_package (push) Waiting to run
Some checks are pending
Self-hosted runner (benchmark) / Benchmark (aws-g5-4xlarge-cache) (push) Waiting to run
Build documentation / build (push) Waiting to run
Slow tests on important models (on Push - A10) / Get all modified files (push) Waiting to run
Slow tests on important models (on Push - A10) / Slow & FA2 tests (push) Blocked by required conditions
Self-hosted runner (push-caller) / Check if setup was changed (push) Waiting to run
Self-hosted runner (push-caller) / build-docker-containers (push) Blocked by required conditions
Self-hosted runner (push-caller) / Trigger Push CI (push) Blocked by required conditions
Secret Leaks / trufflehog (push) Waiting to run
Update Transformers metadata / build_and_package (push) Waiting to run
* Update model_id in tests * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
7ef592c96c
commit
0e1c281745
@ -598,7 +598,7 @@ class Aimv2ModelTest(Aimv2ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
|
||||
class Aimv2ModelIntegrationTest(unittest.TestCase):
|
||||
@slow
|
||||
def test_inference(self):
|
||||
model_name = "yaswanthgali/aimv2-large-patch14-224-lit-HF"
|
||||
model_name = "apple/aimv2-large-patch14-224-lit"
|
||||
model = Aimv2Model.from_pretrained(model_name, device_map=torch_device)
|
||||
processor = AutoProcessor.from_pretrained(model_name)
|
||||
|
||||
@ -622,8 +622,8 @@ class Aimv2ModelIntegrationTest(unittest.TestCase):
|
||||
)
|
||||
|
||||
# handle device
|
||||
expected_logits = torch.tensor([[34.2415, 24.6724]]).to(model.device)
|
||||
self.assertTrue(torch.allclose(outputs.logits_per_image, expected_logits, atol=1e-3))
|
||||
expected_logits = torch.tensor([[33.3550, 26.4255]]).to(model.device)
|
||||
torch.testing.assert_close(outputs.logits_per_image, expected_logits, atol=1e-3, rtol=1e-3)
|
||||
|
||||
|
||||
@require_vision
|
||||
@ -631,7 +631,7 @@ class Aimv2ModelIntegrationTest(unittest.TestCase):
|
||||
class Aimv2VisionModelIntegrationTests(unittest.TestCase):
|
||||
@slow
|
||||
def test_inference(self):
|
||||
model_name = "yaswanthgali/aimv2-large-patch14-224-HF"
|
||||
model_name = "apple/aimv2-large-patch14-224"
|
||||
|
||||
model = Aimv2VisionModel.from_pretrained(model_name, device_map=torch_device)
|
||||
processor = AutoImageProcessor.from_pretrained(model_name)
|
||||
@ -662,7 +662,7 @@ class Aimv2VisionModelIntegrationTests(unittest.TestCase):
|
||||
|
||||
@slow
|
||||
def test_inference_for_native_resolution(self):
|
||||
model_name = "yaswanthgali/aimv2-large-patch14-native-HF"
|
||||
model_name = "apple/aimv2-large-patch14-native"
|
||||
|
||||
model = Aimv2VisionModel.from_pretrained(model_name, device_map="auto")
|
||||
processor = AutoImageProcessor.from_pretrained(model_name)
|
||||
|
Loading…
Reference in New Issue
Block a user