(
llm_root: _pl.Path,
resource_path: _pl.Path,
model_name: str,
model_cache_arg=[],
)
| 18 | |
| 19 | |
| 20 | def prepare_model_tests( |
| 21 | llm_root: _pl.Path, |
| 22 | resource_path: _pl.Path, |
| 23 | model_name: str, |
| 24 | model_cache_arg=[], |
| 25 | ): |
| 26 | scripts_dir = resource_path / "scripts" |
| 27 | python_exe = _sys.executable |
| 28 | model_env = {**_os.environ, "PYTHONPATH": f"examples/{model_name}"} |
| 29 | build_engines = [ |
| 30 | python_exe, |
| 31 | str(scripts_dir / f"build_{model_name}_engines.py") |
| 32 | ] + model_cache_arg |
| 33 | run_command(build_engines, cwd=llm_root, env=model_env) |
| 34 | |
| 35 | model_env["PYTHONPATH"] = "examples" |
| 36 | generate_expected_output = [ |
| 37 | python_exe, |
| 38 | str(scripts_dir / f"generate_expected_{model_name}_output.py") |
| 39 | ] |
| 40 | run_command(generate_expected_output, cwd=llm_root, env=model_env) |
| 41 | |
| 42 | |
| 43 | def prepare_lora_configs(llm_root: _pl.Path, resource_path: _pl.Path, |
no test coverage detected