mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 13:52:28 +00:00
query_available_models() -> list[str] -> check_model_availability(model) -> bool
This commit is contained in:
parent
c2ab8988e6
commit
f69ae45127
2 changed files with 10 additions and 5 deletions
|
|
@ -344,8 +344,8 @@ class TestNvidiaPostTraining(unittest.TestCase):
|
|||
)
|
||||
|
||||
# simulate a NIM where default/job-1234 is an available model
|
||||
with patch.object(self.inference_adapter, "query_available_models", new_callable=AsyncMock) as mock_query:
|
||||
mock_query.return_value = [model_id]
|
||||
with patch.object(self.inference_adapter, "check_model_availability", new_callable=AsyncMock) as mock_check:
|
||||
mock_check.return_value = True
|
||||
result = self.run_async(self.inference_adapter.register_model(model))
|
||||
assert result == model
|
||||
assert len(self.inference_adapter.alias_to_provider_id_map) > 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue