Fix test to run on windows vms

This commit is contained in:
Brandon Rising 2024-03-18 10:10:45 -04:00 committed by Brandon
parent 9d5b96c119
commit 6968a068bb

View File

@ -295,18 +295,17 @@ def test_heuristic_import_with_type(mm2_installer: ModelInstallServiceBase, mode
"name": f"{model_params['name']}_2", "name": f"{model_params['name']}_2",
"type": ModelType(model_params["type"]), "type": ModelType(model_params["type"]),
} }
try:
assert "repo_id" in model_params assert "repo_id" in model_params
install_job1 = mm2_installer.heuristic_import(source=model_params["repo_id"], config=config1) install_job1 = mm2_installer.heuristic_import(source=model_params["repo_id"], config=config1)
mm2_installer.wait_for_installs(timeout=10)
while not install_job1.in_terminal_state: if model_params["type"] != "embedding":
sleep(0.01) assert install_job1.errored
assert install_job1.error_type == 'InvalidModelConfigException'
return
assert install_job1.complete
assert install_job1.config_out if model_params["type"] == "embedding" else not install_job1.config_out assert install_job1.config_out if model_params["type"] == "embedding" else not install_job1.config_out
install_job2 = mm2_installer.heuristic_import(source=model_params["repo_id"], config=config2) install_job2 = mm2_installer.heuristic_import(source=model_params["repo_id"], config=config2)
mm2_installer.wait_for_installs(timeout=10)
while not install_job2.in_terminal_state: assert install_job2.complete
sleep(0.01)
assert install_job2.config_out if model_params["type"] == "embedding" else not install_job2.config_out assert install_job2.config_out if model_params["type"] == "embedding" else not install_job2.config_out
except InvalidModelConfigException:
assert model_params["type"] != "embedding"