mlc-ai / llm-perf-bench

Apache License 2.0
109 stars 12 forks source link

Docker container seems to be missing Python dependency #11

Closed JohannesGaessler closed 1 year ago

JohannesGaessler commented 1 year ago

When running python build.py --model /models/Llama-2-7b-chat-hf --target cuda --quantization q4f16_1 --artifact-path "./dist" --use-cache 0 I encountered the following error:

Traceback (most recent call last):
  File "/mlc_llm/build.py", line 4, in <module>
    main()
  File "/mlc_llm/mlc_llm/build.py", line 10, in main
    core.build_model_from_args(parsed_args)
  File "/mlc_llm/mlc_llm/core.py", line 584, in build_model_from_args
    build(mod, args)
  File "/mlc_llm/mlc_llm/core.py", line 467, in build
    utils.debug_dump_benchmark_script(
  File "/mlc_llm/mlc_llm/utils.py", line 108, in debug_dump_benchmark_script
    from tvm.dlight.benchmark import extract_all_func_info_from_relax
  File "/root/micromamba/envs/python311/lib/python3.11/site-packages/tvm/dlight/benchmark/__init__.py", line 18, in <module>
    from .bench import benchmark, benchmark_prim_func, benchmark_relax_func
  File "/root/micromamba/envs/python311/lib/python3.11/site-packages/tvm/dlight/benchmark/bench.py", line 28, in <module>
    from tvm.testing import rpc_run
  File "/root/micromamba/envs/python311/lib/python3.11/site-packages/tvm/testing/__init__.py", line 47, in <module>
    from .utils import *
  File "/root/micromamba/envs/python311/lib/python3.11/site-packages/tvm/testing/utils.py", line 85, in <module>
    import pytest
ModuleNotFoundError: No module named 'pytest'

I was able to fix it by just installing pytest via pip3 install pytest.

junrushao commented 1 year ago

pytest should not be a dependency to TVM. CC @zxybazh would you mind removing pytest instead?

zxybazh commented 1 year ago

Sure will do!

zxybazh commented 1 year ago

Just sent a fix in https://github.com/apache/tvm/pull/15585

junrushao commented 1 year ago

Closed via https://github.com/apache/tvm/pull/15585