Created
August 16, 2024 12:39
-
-
Save sij1nk/3771c08eef6e3f393257e4111a7c2b7f to your computer and use it in GitHub Desktop.
openllm hello output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using Python 3.10.12 interpreter at: /usr/bin/python3 | |
Creating virtualenv at: .openllm/venv/1692009002024535268 | |
Activate with: source .openllm/venv/1692009002024535268/bin/activate.fish | |
Resolved 79 packages in 48ms | |
Installed 79 packages in 47ms | |
+ aiohappyeyeballs==2.3.6 | |
+ aiohttp==3.10.3 | |
+ aiosignal==1.3.1 | |
+ aiosqlite==0.20.0 | |
+ annotated-types==0.7.0 | |
+ anyio==4.4.0 | |
+ appdirs==1.4.4 | |
+ asgiref==3.8.1 | |
+ async-timeout==4.0.3 | |
+ attrs==24.2.0 | |
+ bentoml==1.3.2 | |
+ cattrs==23.1.2 | |
+ certifi==2024.7.4 | |
+ circus==0.18.0 | |
+ click==8.1.7 | |
+ click-option-group==0.5.6 | |
+ cloudpickle==3.0.0 | |
+ deepmerge==1.1.1 | |
+ deprecated==1.2.14 | |
+ exceptiongroup==1.2.2 | |
+ frozenlist==1.4.1 | |
+ fs==2.4.16 | |
+ h11==0.14.0 | |
+ httpcore==1.0.5 | |
+ httpx==0.27.0 | |
+ httpx-ws==0.6.0 | |
+ idna==3.7 | |
+ importlib-metadata==6.11.0 | |
+ inflection==0.5.1 | |
+ inquirerpy==0.3.4 | |
+ jinja2==3.1.4 | |
+ markdown-it-py==3.0.0 | |
+ markupsafe==2.1.5 | |
+ mdurl==0.1.2 | |
+ multidict==6.0.5 | |
+ numpy==2.0.1 | |
+ nvidia-ml-py==11.525.150 | |
+ opentelemetry-api==1.20.0 | |
+ opentelemetry-instrumentation==0.41b0 | |
+ opentelemetry-instrumentation-aiohttp-client==0.41b0 | |
+ opentelemetry-instrumentation-asgi==0.41b0 | |
+ opentelemetry-sdk==1.20.0 | |
+ opentelemetry-semantic-conventions==0.41b0 | |
+ opentelemetry-util-http==0.41b0 | |
+ packaging==24.1 | |
+ pathspec==0.12.1 | |
+ pfzy==0.3.4 | |
+ pip-requirements-parser==32.0.1 | |
+ prometheus-client==0.20.0 | |
+ prompt-toolkit==3.0.47 | |
+ psutil==6.0.0 | |
+ pydantic==2.8.2 | |
+ pydantic-core==2.20.1 | |
+ pygments==2.18.0 | |
+ pyparsing==3.1.2 | |
+ python-dateutil==2.9.0.post0 | |
+ python-json-logger==2.0.7 | |
+ python-multipart==0.0.9 | |
+ pyyaml==6.0.2 | |
+ pyzmq==26.1.0 | |
+ rich==13.7.1 | |
+ schema==0.7.7 | |
+ setuptools==72.2.0 | |
+ simple-di==0.1.5 | |
+ six==1.16.0 | |
+ sniffio==1.3.1 | |
+ starlette==0.38.2 | |
+ tomli==2.0.1 | |
+ tomli-w==1.0.0 | |
+ tornado==6.4.1 | |
+ typing-extensions==4.12.2 | |
+ uv==0.2.37 | |
+ uvicorn==0.30.6 | |
+ watchfiles==0.23.0 | |
+ wcwidth==0.2.13 | |
+ wrapt==1.16.0 | |
+ wsproto==1.2.0 | |
+ yarl==1.9.4 | |
+ zipp==3.20.0 | |
Resolved 89 packages in 32ms | |
error: Failed to prepare distributions | |
Caused by: Failed to fetch wheel: llama-cpp-python==0.2.79 | |
Caused by: Failed to build: `llama-cpp-python==0.2.79` | |
Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1 | |
--- stdout: | |
*** scikit-build-core 0.10.3 using CMake 3.22.1 (wheel) | |
*** Configuring CMake... | |
loading initial cache file /tmp/tmp4_krmvnq/build/CMakeInit.txt | |
-- The C compiler identification is GNU 11.4.0 | |
-- The CXX compiler identification is GNU 11.4.0 | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc - skipped | |
-- Detecting C compile features | |
-- Detecting C compile features - done | |
-- Detecting CXX compiler ABI info | |
-- Detecting CXX compiler ABI info - done | |
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++ - skipped | |
-- Detecting CXX compile features | |
-- Detecting CXX compile features - done | |
-- Found Git: /usr/bin/git (found version "2.34.1") | |
-- Looking for pthread.h | |
-- Looking for pthread.h - found | |
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD | |
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success | |
-- Found Threads: TRUE | |
-- Configuring incomplete, errors occurred! | |
See also "/tmp/tmp4_krmvnq/build/CMakeFiles/CMakeOutput.log". | |
--- stderr: | |
CMake Error at vendor/llama.cpp/CMakeLists.txt:210 (find_library): | |
Could not find FOUNDATION_LIBRARY using the following names: Foundation | |
*** CMake configuration failed | |
--- | |
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/common.py:331 in run_command │ | |
│ │ | |
│ 328 │ │ │ │ cmd, cwd=cwd, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVN │ | |
│ 329 │ │ │ ) │ | |
│ 330 │ │ else: │ | |
│ ❱ 331 │ │ │ return subprocess.run(cmd, cwd=cwd, env=env, check=True) │ | |
│ 332 │ except Exception as e: │ | |
│ 333 │ │ if VERBOSE_LEVEL.get() >= 10: │ | |
│ 334 │ │ │ output(e, style='red') │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ bin_dir = 'bin' │ │ | |
│ │ cmd = [ │ │ | |
│ │ │ '/usr/bin/python3', │ │ | |
│ │ │ '-m', │ │ | |
│ │ │ 'uv', │ │ | |
│ │ │ 'pip', │ │ | |
│ │ │ 'install', │ │ | |
│ │ │ '-p', │ │ | |
│ │ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', │ │ | |
│ │ │ '-r', │ │ | |
│ │ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt' │ │ | |
│ │ ] │ │ | |
│ │ copy_env = True │ │ | |
│ │ cwd = None │ │ | |
│ │ env = { │ │ | |
│ │ │ 'PWD': '/home/rg', │ │ | |
│ │ │ 'SHLVL': '2', │ │ | |
│ │ │ 'BEMENU_OPTS': '-f --binding vim --vim-esc-exits --ignorecase │ │ | |
│ │ --single-instance --fixed-height'+215, │ │ | |
│ │ │ 'EDITOR': 'nvim', │ │ | |
│ │ │ 'AUDACITY_PATH': '/home/rg/.config/Audacity', │ │ | |
│ │ │ 'FNM_LOGLEVEL': 'info', │ │ | |
│ │ │ 'FNM_MULTISHELL_PATH': '/run/user/1000/fnm_multishells/119389_1723811088533', │ │ | |
│ │ │ 'FZF_DEFAULT_OPTS': "--bind j:down,k:up,space:toggle --bind │ │ | |
│ │ 'start:unbind(j)+unbind(k)+unbind(i)' --b"+164, │ │ | |
│ │ │ 'HOSTTYPE': 'x86_64', │ │ | |
│ │ │ 'NUGET_PACKAGES': '/home/rg/.local/share/NuGet/packages', │ │ | |
│ │ │ ... +103 │ │ | |
│ │ } │ │ | |
│ │ py = '/usr/bin/python3' │ │ | |
│ │ shlex = <module 'shlex' from '/usr/lib/python3.10/shlex.py'> │ │ | |
│ │ silent = False │ │ | |
│ │ venv = None │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /usr/lib/python3.10/subprocess.py:526 in run │ | |
│ │ | |
│ 523 │ │ │ raise │ | |
│ 524 │ │ retcode = process.poll() │ | |
│ 525 │ │ if check and retcode: │ | |
│ ❱ 526 │ │ │ raise CalledProcessError(retcode, process.args, │ | |
│ 527 │ │ │ │ │ │ │ │ │ output=stdout, stderr=stderr) │ | |
│ 528 │ return CompletedProcess(process.args, retcode, stdout, stderr) │ | |
│ 529 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ capture_output = False │ │ | |
│ │ check = True │ │ | |
│ │ input = None │ │ | |
│ │ kwargs = { │ │ | |
│ │ │ 'cwd': None, │ │ | |
│ │ │ 'env': { │ │ | |
│ │ │ │ 'PWD': '/home/rg', │ │ | |
│ │ │ │ 'SHLVL': '2', │ │ | |
│ │ │ │ 'BEMENU_OPTS': '-f --binding vim --vim-esc-exits --ignorecase │ │ | |
│ │ --single-instance --fixed-height'+215, │ │ | |
│ │ │ │ 'EDITOR': 'nvim', │ │ | |
│ │ │ │ 'AUDACITY_PATH': '/home/rg/.config/Audacity', │ │ | |
│ │ │ │ 'FNM_LOGLEVEL': 'info', │ │ | |
│ │ │ │ 'FNM_MULTISHELL_PATH': │ │ | |
│ │ '/run/user/1000/fnm_multishells/119389_1723811088533', │ │ | |
│ │ │ │ 'FZF_DEFAULT_OPTS': "--bind j:down,k:up,space:toggle --bind │ │ | |
│ │ 'start:unbind(j)+unbind(k)+unbind(i)' --b"+164, │ │ | |
│ │ │ │ 'HOSTTYPE': 'x86_64', │ │ | |
│ │ │ │ 'NUGET_PACKAGES': '/home/rg/.local/share/NuGet/packages', │ │ | |
│ │ │ │ ... +103 │ │ | |
│ │ │ } │ │ | |
│ │ } │ │ | |
│ │ popenargs = ( │ │ | |
│ │ │ [ │ │ | |
│ │ │ │ '/usr/bin/python3', │ │ | |
│ │ │ │ '-m', │ │ | |
│ │ │ │ 'uv', │ │ | |
│ │ │ │ 'pip', │ │ | |
│ │ │ │ 'install', │ │ | |
│ │ │ │ '-p', │ │ | |
│ │ │ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', │ │ | |
│ │ │ │ '-r', │ │ | |
│ │ │ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt' │ │ | |
│ │ │ ], │ │ | |
│ │ ) │ │ | |
│ │ process = <Popen: returncode: 2 args: ['/usr/bin/python3', '-m', 'uv', 'pip', │ │ | |
│ │ 'install...> │ │ | |
│ │ retcode = 2 │ │ | |
│ │ stderr = None │ │ | |
│ │ stdout = None │ │ | |
│ │ timeout = None │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ | |
CalledProcessError: Command '['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', | |
'/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', | |
'/home/rg/.openllm/venv/1692009002024535268/requirements.txt']' returned non-zero exit status 2. | |
During handling of the above exception, another exception occurred: | |
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/venv.py:43 in _ensure_venv │ | |
│ │ | |
│ 40 │ │ │ ) │ | |
│ 41 │ │ │ with open(venv / 'requirements.txt', 'w') as f: │ | |
│ 42 │ │ │ │ f.write(env_spec.normalized_requirements_txt) │ | |
│ ❱ 43 │ │ │ run_command( │ | |
│ 44 │ │ │ │ ['python', '-m', 'uv', 'pip', 'install', '-p', str(venv_py), '-r', venv │ | |
│ 45 │ │ │ │ silent=VERBOSE_LEVEL.get() < 10, │ | |
│ 46 │ │ │ ) │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ env_spec = VenvSpec(python_version='3.9.19', │ │ | |
│ │ requirements_txt='aiohappyeyeballs==2.3.5\naiohttp==3.10.3\naiosignal==1.3.1\nai… │ │ | |
│ │ name_prefix='phi3_3.8b-ggml-q4-1-', │ │ | |
│ │ normalized_requirements_txt='aiohappyeyeballs==2.3.5\naiohttp==3.10.3\naiosignal… │ │ | |
│ │ f = <_io.TextIOWrapper │ │ | |
│ │ name='/home/rg/.openllm/venv/1692009002024535268/requirements.txt' mode='w' │ │ | |
│ │ encoding='UTF-8'> │ │ | |
│ │ venv = PosixPath('/home/rg/.openllm/venv/1692009002024535268') │ │ | |
│ │ venv_py = PosixPath('/home/rg/.openllm/venv/1692009002024535268/bin/python') │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/common.py:334 in run_command │ | |
│ │ | |
│ 331 │ │ │ return subprocess.run(cmd, cwd=cwd, env=env, check=True) │ | |
│ 332 │ except Exception as e: │ | |
│ 333 │ │ if VERBOSE_LEVEL.get() >= 10: │ | |
│ ❱ 334 │ │ │ output(e, style='red') │ | |
│ 335 │ │ output('Command failed', style='red') │ | |
│ 336 │ │ raise typer.Exit(1) │ | |
│ 337 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ bin_dir = 'bin' │ │ | |
│ │ cmd = [ │ │ | |
│ │ │ '/usr/bin/python3', │ │ | |
│ │ │ '-m', │ │ | |
│ │ │ 'uv', │ │ | |
│ │ │ 'pip', │ │ | |
│ │ │ 'install', │ │ | |
│ │ │ '-p', │ │ | |
│ │ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', │ │ | |
│ │ │ '-r', │ │ | |
│ │ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt' │ │ | |
│ │ ] │ │ | |
│ │ copy_env = True │ │ | |
│ │ cwd = None │ │ | |
│ │ env = { │ │ | |
│ │ │ 'PWD': '/home/rg', │ │ | |
│ │ │ 'SHLVL': '2', │ │ | |
│ │ │ 'BEMENU_OPTS': '-f --binding vim --vim-esc-exits --ignorecase │ │ | |
│ │ --single-instance --fixed-height'+215, │ │ | |
│ │ │ 'EDITOR': 'nvim', │ │ | |
│ │ │ 'AUDACITY_PATH': '/home/rg/.config/Audacity', │ │ | |
│ │ │ 'FNM_LOGLEVEL': 'info', │ │ | |
│ │ │ 'FNM_MULTISHELL_PATH': '/run/user/1000/fnm_multishells/119389_1723811088533', │ │ | |
│ │ │ 'FZF_DEFAULT_OPTS': "--bind j:down,k:up,space:toggle --bind │ │ | |
│ │ 'start:unbind(j)+unbind(k)+unbind(i)' --b"+164, │ │ | |
│ │ │ 'HOSTTYPE': 'x86_64', │ │ | |
│ │ │ 'NUGET_PACKAGES': '/home/rg/.local/share/NuGet/packages', │ │ | |
│ │ │ ... +103 │ │ | |
│ │ } │ │ | |
│ │ py = '/usr/bin/python3' │ │ | |
│ │ shlex = <module 'shlex' from '/usr/lib/python3.10/shlex.py'> │ │ | |
│ │ silent = False │ │ | |
│ │ venv = None │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/common.py:77 in output │ | |
│ │ | |
│ 74 │ │ import pyaml │ | |
│ 75 │ │ │ | |
│ 76 │ │ out = io.StringIO() │ | |
│ ❱ 77 │ │ pyaml.pprint(content, dst=out, sort_dicts=False, sort_keys=False) │ | |
│ 78 │ │ questionary.print(out.getvalue(), style=style, end='' if end is None else end) │ | |
│ 79 │ │ out.close() │ | |
│ 80 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ content = CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ end = None │ │ | |
│ │ level = 0 │ │ | |
│ │ out = <_io.StringIO object at 0x7f48fa9083a0> │ │ | |
│ │ pyaml = <module 'pyaml' from │ │ | |
│ │ '/home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py'> │ │ | |
│ │ questionary = <module 'questionary' from │ │ | |
│ │ '/home/rg/.local/lib/python3.10/site-packages/questionary/__init__.py'> │ │ | |
│ │ style = 'red' │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py:267 in pprint │ | |
│ │ | |
│ 264 def pprint(*data, **dump_kws): │ | |
│ 265 │ dst = dump_kws.pop('file', dump_kws.pop('dst', sys.stdout)) │ | |
│ 266 │ if len(data) == 1: data, = data │ | |
│ ❱ 267 │ dump(data, dst=dst, **dump_kws) │ | |
│ 268 │ | |
│ 269 p, _p = pprint, print │ | |
│ 270 print = pprint │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ dst = <_io.StringIO object at 0x7f48fa9083a0> │ │ | |
│ │ dump_kws = {'sort_dicts': False, 'sort_keys': False} │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py:231 in dump │ | |
│ │ | |
│ 228 │ │ force_embed=force_embed, string_val_style=string_val_style, sort_dicts=sort_dict │ | |
│ 229 │ if not multiple_docs: data = [data] │ | |
│ 230 │ else: pyyaml_kws.setdefault('explicit_start', True) │ | |
│ ❱ 231 │ yaml.dump_all( data, buff, Dumper=Dumper, width=width, │ | |
│ 232 │ │ default_flow_style=False, allow_unicode=True, **pyyaml_kws ) │ | |
│ 233 │ buff = buff.getvalue() │ | |
│ 234 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ buff = <_io.StringIO object at 0x7f48f8d2f370> │ │ | |
│ │ data = [ │ │ | |
│ │ │ CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', │ │ | |
│ │ 'install', '-p', '/home/rg/.openllm/venv/1692009002024535268/bin/python', │ │ | |
│ │ '-r', '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ ] │ │ | |
│ │ dst = <_io.StringIO object at 0x7f48fa9083a0> │ │ | |
│ │ Dumper = <function dump.<locals>.<lambda> at 0x7f48f8d2e9e0> │ │ | |
│ │ force_embed = True │ │ | |
│ │ multiple_docs = False │ │ | |
│ │ pyyaml_kws = {'sort_keys': False} │ │ | |
│ │ safe = None │ │ | |
│ │ sort_dicts = False │ │ | |
│ │ stream = None │ │ | |
│ │ string_val_style = None │ │ | |
│ │ vspacing = True │ │ | |
│ │ width = 100 │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/__init__.py:241 in dump_all │ | |
│ │ | |
│ 238 │ try: │ | |
│ 239 │ │ dumper.open() │ | |
│ 240 │ │ for data in documents: │ | |
│ ❱ 241 │ │ │ dumper.represent(data) │ | |
│ 242 │ │ dumper.close() │ | |
│ 243 │ finally: │ | |
│ 244 │ │ dumper.dispose() │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ allow_unicode = True │ │ | |
│ │ canonical = None │ │ | |
│ │ data = CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', │ │ | |
│ │ 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ default_flow_style = False │ │ | |
│ │ default_style = None │ │ | |
│ │ documents = [ │ │ | |
│ │ │ CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', │ │ | |
│ │ 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ ] │ │ | |
│ │ Dumper = <function dump.<locals>.<lambda> at 0x7f48f8d2e9e0> │ │ | |
│ │ dumper = <pyaml.PYAMLDumper object at 0x7f48f8ca0850> │ │ | |
│ │ encoding = None │ │ | |
│ │ explicit_end = None │ │ | |
│ │ explicit_start = None │ │ | |
│ │ getvalue = None │ │ | |
│ │ indent = None │ │ | |
│ │ line_break = None │ │ | |
│ │ sort_keys = False │ │ | |
│ │ stream = <_io.StringIO object at 0x7f48f8d2f370> │ │ | |
│ │ tags = None │ │ | |
│ │ version = None │ │ | |
│ │ width = 100 │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/representer.py:27 in represent │ | |
│ │ | |
│ 24 │ │ self.alias_key = None │ | |
│ 25 │ │ | |
│ 26 │ def represent(self, data): │ | |
│ ❱ 27 │ │ node = self.represent_data(data) │ | |
│ 28 │ │ self.serialize(node) │ | |
│ 29 │ │ self.represented_objects = {} │ | |
│ 30 │ │ self.object_keeper = [] │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8ca0850> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/representer.py:58 in represent_data │ | |
│ │ | |
│ 55 │ │ │ │ if None in self.yaml_multi_representers: │ | |
│ 56 │ │ │ │ │ node = self.yaml_multi_representers[None](self, data) │ | |
│ 57 │ │ │ │ elif None in self.yaml_representers: │ | |
│ ❱ 58 │ │ │ │ │ node = self.yaml_representers[None](self, data) │ | |
│ 59 │ │ │ │ else: │ | |
│ 60 │ │ │ │ │ node = ScalarNode(None, str(data)) │ | |
│ 61 │ │ #if alias_key is not None: │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ data_type = <class 'object'> │ │ | |
│ │ data_types = ( │ │ | |
│ │ │ <class 'subprocess.CalledProcessError'>, │ │ | |
│ │ │ <class 'subprocess.SubprocessError'>, │ │ | |
│ │ │ <class 'Exception'>, │ │ | |
│ │ │ <class 'BaseException'>, │ │ | |
│ │ │ <class 'object'> │ │ | |
│ │ ) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8ca0850> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py:139 in represent_undefined │ | |
│ │ | |
│ 136 │ │ │ if not callable(getattr(data, 'tolist', None)): raise AttributeError │ | |
│ 137 │ │ except: pass # can raise other errors with custom types │ | |
│ 138 │ │ else: return self.represent_data(data.tolist()) │ | |
│ ❱ 139 │ │ return super().represent_undefined(data) # will raise RepresenterError │ | |
│ 140 │ │ | |
│ 141 │ def write_ext(self, func, text, *args, **kws): │ | |
│ 142 │ │ # Emitter write-funcs extension to append comments to values │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8ca0850> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/representer.py:231 in represent_undefined │ | |
│ │ | |
│ 228 │ │ return self.represent_mapping(tag, state, flow_style=flow_style) │ | |
│ 229 │ │ | |
│ 230 │ def represent_undefined(self, data): │ | |
│ ❱ 231 │ │ raise RepresenterError("cannot represent an object", data) │ | |
│ 232 │ | |
│ 233 SafeRepresenter.add_representer(type(None), │ | |
│ 234 │ │ SafeRepresenter.represent_none) │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt']) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8ca0850> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ | |
RepresenterError: ('cannot represent an object', CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', | |
'pip', 'install', '-p', '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', | |
'/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) | |
During handling of the above exception, another exception occurred: | |
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ | |
│ /home/rg/.local/lib/python3.10/site-packages/click/decorators.py:33 in new_func │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/analytic.py:91 in wrapped │ | |
│ │ | |
│ 88 │ │ │ │ │ │ return f(*args, **kwargs) │ | |
│ 89 │ │ │ │ │ start_time = time.time_ns() │ | |
│ 90 │ │ │ │ │ try: │ | |
│ ❱ 91 │ │ │ │ │ │ return_value = f(*args, **kwargs) │ | |
│ 92 │ │ │ │ │ │ duration_in_ns = time.time_ns() - start_time │ | |
│ 93 │ │ │ │ │ │ track( │ | |
│ 94 │ │ │ │ │ │ │ OpenllmCliEvent( │ | |
│ │ | |
│ ╭──────────────────────────── locals ────────────────────────────╮ │ | |
│ │ args = () │ │ | |
│ │ command_group = 'openllm' │ │ | |
│ │ command_name = 'run' │ │ | |
│ │ ctx = <click.core.Context object at 0x7f48fadd7460> │ │ | |
│ │ do_not_track = False │ │ | |
│ │ duration_in_ns = 824619863 │ │ | |
│ │ f = <function run at 0x7f48faddb250> │ │ | |
│ │ kwargs = { │ │ | |
│ │ │ 'model': 'phi3:3.8b-ggml-q4', │ │ | |
│ │ │ 'repo': None, │ │ | |
│ │ │ 'port': None, │ │ | |
│ │ │ 'timeout': 600, │ │ | |
│ │ │ 'verbose': False │ │ | |
│ │ } │ │ | |
│ │ start_time = 1723811675396676168 │ │ | |
│ │ track = <function track at 0x7f48f900ab90> │ │ | |
│ ╰────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/__main__.py:230 in run │ | |
│ │ | |
│ 227 │ bento = ensure_bento(model, target=target, repo_name=repo) │ | |
│ 228 │ if port is None: │ | |
│ 229 │ │ port = random.randint(30000, 40000) │ | |
│ ❱ 230 │ local_run(bento, port=port, timeout=timeout) │ | |
│ 231 │ | |
│ 232 │ | |
│ 233 @app.command(help='deploy an production-ready OpenAI API compatible chat server to bento │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ bento = BentoInfo(alias='3.8b-ggml-q4', repo=RepoInfo(name='default', │ │ | |
│ │ url='https://github.com/bentoml/openllm-models', server='github.com', │ │ | |
│ │ owner='bentoml', repo='openllm-models', branch='main', │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main')), │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main/be… │ │ | |
│ │ bento_yaml={'service': 'service:LlamaCppChat', 'name': 'phi3', 'version': │ │ | |
│ │ '3.8b-instruct-ggml-q4-8789', 'bentoml_version': '1.3.0', 'creation_time': │ │ | |
│ │ '2024-08-13T06:40:53.477129+00:00', 'labels': {'model_name': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'openllm_alias': │ │ | |
│ │ '3.8b-ggml-q4,3.8b-mini-instruct-4k-ggml-q4', 'platforms': 'macos,linux', │ │ | |
│ │ 'source': │ │ | |
│ │ 'https://github.com/bentoml/openllm-models-feed/tree/main/src/llamacpp-chat'}, │ │ | |
│ │ 'models': [], 'runners': [], 'entry_service': 'phi3', 'services': [{'name': │ │ | |
│ │ 'phi3', 'service': '', 'models': [], 'dependencies': [], 'config': {'name': │ │ | |
│ │ 'phi3', 'resources': {'memory': '3Gi'}, 'traffic': {'timeout': 300}}}], 'envs': │ │ | |
│ │ [{'name': 'CMAKE_ARGS', 'value': '-DLLAMA_METAL=on'}], 'schema': {'name': 'phi3', │ │ | |
│ │ 'type': 'service', 'routes': [{'name': 'chat_completions', 'route': │ │ | |
│ │ '/v1/chat/completions', 'batchable': False, 'input': {'properties': {'messages': │ │ | |
│ │ {'default': [{'role': 'user', 'content': 'What is the meaning of life?'}], │ │ | |
│ │ 'items': {'properties': {'role': {'enum': ['system', 'user', 'assistant'], │ │ | |
│ │ 'title': 'Role', 'type': 'string'}, 'content': {'title': 'Content', 'type': │ │ | |
│ │ 'string'}}, 'required': ['role', 'content'], 'title': 'Message', 'type': │ │ | |
│ │ 'object'}, 'title': 'Messages', 'type': 'array'}, 'model': {'default': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'title': 'Model', 'type': 'string'}, │ │ | |
│ │ 'max_tokens': {'default': 2048, 'maximum': 2048, 'minimum': 128, 'title': 'Max │ │ | |
│ │ Tokens', 'type': 'integer'}, 'stop': {'default': None, 'title': 'Stop', 'items': │ │ | |
│ │ {'type': 'string'}, 'type': 'array'}, 'stream': {'default': True, 'title': │ │ | |
│ │ 'Stream', 'type': 'boolean'}, 'temperature': {'default': 0, 'title': │ │ | |
│ │ 'Temperature', 'type': 'number'}, 'top_p': {'default': 1.0, 'title': 'Top P', │ │ | |
│ │ 'type': 'number'}, 'frequency_penalty': {'default': 0.0, 'title': 'Frequency │ │ | |
│ │ Penalty', 'type': 'number'}}, 'title': 'Input', 'type': 'object'}, 'output': │ │ | |
│ │ {'title': 'strIODescriptor', 'type': 'string', 'is_stream': True, 'media_type': │ │ | |
│ │ 'text/event-stream'}, 'is_task': False}]}, 'apis': [], 'docker': {'distro': │ │ | |
│ │ 'debian', 'python_version': '3.9', 'cuda_version': None, 'env': {'CMAKE_ARGS': │ │ | |
│ │ '-DLLAMA_METAL=on'}, 'system_packages': None, 'setup_script': None, 'base_image': │ │ | |
│ │ None, 'dockerfile_template': None}, 'python': {'requirements_txt': │ │ | |
│ │ './requirements.txt', 'packages': None, 'lock_packages': True, │ │ | |
│ │ 'pack_git_packages': True, 'index_url': None, 'no_index': None, 'trusted_host': │ │ | |
│ │ None, 'find_links': None, 'extra_index_url': None, 'pip_args': None, 'wheels': │ │ | |
│ │ None}, 'conda': {'environment_yml': None, 'channels': None, 'dependencies': None, │ │ | |
│ │ 'pip': None}}) │ │ | |
│ │ model = 'phi3:3.8b-ggml-q4' │ │ | |
│ │ port = 31764 │ │ | |
│ │ repo = None │ │ | |
│ │ target = DeploymentTarget(accelerators=[NVIDIA RTX A2000 Laptop GPU(4GB)], source='local', │ │ | |
│ │ platform='linux') │ │ | |
│ │ timeout = 600 │ │ | |
│ │ verbose = False │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/local.py:108 in run │ | |
│ │ | |
│ 105 │ | |
│ 106 def run(bento: BentoInfo, port: int = 3000, timeout: int = 600): │ | |
│ 107 │ prep_env_vars(bento) │ | |
│ ❱ 108 │ asyncio.run(_run_model(bento, port=port, timeout=timeout)) │ | |
│ 109 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ bento = BentoInfo(alias='3.8b-ggml-q4', repo=RepoInfo(name='default', │ │ | |
│ │ url='https://github.com/bentoml/openllm-models', server='github.com', │ │ | |
│ │ owner='bentoml', repo='openllm-models', branch='main', │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main')), │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main/be… │ │ | |
│ │ bento_yaml={'service': 'service:LlamaCppChat', 'name': 'phi3', 'version': │ │ | |
│ │ '3.8b-instruct-ggml-q4-8789', 'bentoml_version': '1.3.0', 'creation_time': │ │ | |
│ │ '2024-08-13T06:40:53.477129+00:00', 'labels': {'model_name': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'openllm_alias': │ │ | |
│ │ '3.8b-ggml-q4,3.8b-mini-instruct-4k-ggml-q4', 'platforms': 'macos,linux', │ │ | |
│ │ 'source': │ │ | |
│ │ 'https://github.com/bentoml/openllm-models-feed/tree/main/src/llamacpp-chat'}, │ │ | |
│ │ 'models': [], 'runners': [], 'entry_service': 'phi3', 'services': [{'name': │ │ | |
│ │ 'phi3', 'service': '', 'models': [], 'dependencies': [], 'config': {'name': │ │ | |
│ │ 'phi3', 'resources': {'memory': '3Gi'}, 'traffic': {'timeout': 300}}}], 'envs': │ │ | |
│ │ [{'name': 'CMAKE_ARGS', 'value': '-DLLAMA_METAL=on'}], 'schema': {'name': 'phi3', │ │ | |
│ │ 'type': 'service', 'routes': [{'name': 'chat_completions', 'route': │ │ | |
│ │ '/v1/chat/completions', 'batchable': False, 'input': {'properties': {'messages': │ │ | |
│ │ {'default': [{'role': 'user', 'content': 'What is the meaning of life?'}], │ │ | |
│ │ 'items': {'properties': {'role': {'enum': ['system', 'user', 'assistant'], │ │ | |
│ │ 'title': 'Role', 'type': 'string'}, 'content': {'title': 'Content', 'type': │ │ | |
│ │ 'string'}}, 'required': ['role', 'content'], 'title': 'Message', 'type': │ │ | |
│ │ 'object'}, 'title': 'Messages', 'type': 'array'}, 'model': {'default': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'title': 'Model', 'type': 'string'}, │ │ | |
│ │ 'max_tokens': {'default': 2048, 'maximum': 2048, 'minimum': 128, 'title': 'Max │ │ | |
│ │ Tokens', 'type': 'integer'}, 'stop': {'default': None, 'title': 'Stop', 'items': │ │ | |
│ │ {'type': 'string'}, 'type': 'array'}, 'stream': {'default': True, 'title': │ │ | |
│ │ 'Stream', 'type': 'boolean'}, 'temperature': {'default': 0, 'title': │ │ | |
│ │ 'Temperature', 'type': 'number'}, 'top_p': {'default': 1.0, 'title': 'Top P', │ │ | |
│ │ 'type': 'number'}, 'frequency_penalty': {'default': 0.0, 'title': 'Frequency │ │ | |
│ │ Penalty', 'type': 'number'}}, 'title': 'Input', 'type': 'object'}, 'output': │ │ | |
│ │ {'title': 'strIODescriptor', 'type': 'string', 'is_stream': True, 'media_type': │ │ | |
│ │ 'text/event-stream'}, 'is_task': False}]}, 'apis': [], 'docker': {'distro': │ │ | |
│ │ 'debian', 'python_version': '3.9', 'cuda_version': None, 'env': {'CMAKE_ARGS': │ │ | |
│ │ '-DLLAMA_METAL=on'}, 'system_packages': None, 'setup_script': None, 'base_image': │ │ | |
│ │ None, 'dockerfile_template': None}, 'python': {'requirements_txt': │ │ | |
│ │ './requirements.txt', 'packages': None, 'lock_packages': True, │ │ | |
│ │ 'pack_git_packages': True, 'index_url': None, 'no_index': None, 'trusted_host': │ │ | |
│ │ None, 'find_links': None, 'extra_index_url': None, 'pip_args': None, 'wheels': │ │ | |
│ │ None}, 'conda': {'environment_yml': None, 'channels': None, 'dependencies': None, │ │ | |
│ │ 'pip': None}}) │ │ | |
│ │ port = 31764 │ │ | |
│ │ timeout = 600 │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /usr/lib/python3.10/asyncio/runners.py:44 in run │ | |
│ │ | |
│ 41 │ │ events.set_event_loop(loop) │ | |
│ 42 │ │ if debug is not None: │ | |
│ 43 │ │ │ loop.set_debug(debug) │ | |
│ ❱ 44 │ │ return loop.run_until_complete(main) │ | |
│ 45 │ finally: │ | |
│ 46 │ │ try: │ | |
│ 47 │ │ │ _cancel_all_tasks(loop) │ | |
│ │ | |
│ ╭──────────────────────────────── locals ────────────────────────────────╮ │ | |
│ │ debug = None │ │ | |
│ │ loop = <_UnixSelectorEventLoop running=False closed=True debug=False> │ │ | |
│ │ main = <coroutine object _run_model at 0x7f48f8ecaff0> │ │ | |
│ ╰────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /usr/lib/python3.10/asyncio/base_events.py:649 in run_until_complete │ | |
│ │ | |
│ 646 │ │ if not future.done(): │ | |
│ 647 │ │ │ raise RuntimeError('Event loop stopped before Future completed.') │ | |
│ 648 │ │ │ | |
│ ❱ 649 │ │ return future.result() │ | |
│ 650 │ │ | |
│ 651 │ def stop(self): │ | |
│ 652 │ │ """Stop running the event loop. │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ future = <Task finished name='Task-1' coro=<_run_model() done, defined at │ │ | |
│ │ /home/rg/.local/lib/python3.10/site-packages/openllm/local.py:38> │ │ | |
│ │ exception=RepresenterError('cannot represent an object', RepresenterError('cannot │ │ | |
│ │ represent an object', CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', │ │ | |
│ │ 'pip', 'install', '-p', '/home/rg/.openllm/venv/1692009002024535268/bin/python', │ │ | |
│ │ '-r', '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])))> │ │ | |
│ │ new_task = True │ │ | |
│ │ self = <_UnixSelectorEventLoop running=False closed=True debug=False> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/local.py:39 in _run_model │ | |
│ │ | |
│ 36 │ | |
│ 37 │ | |
│ 38 async def _run_model(bento: BentoInfo, port: int = 3000, timeout: int = 600): │ | |
│ ❱ 39 │ venv = ensure_venv(bento) │ | |
│ 40 │ cmd, env, cwd = _get_serve_cmd(bento, port) │ | |
│ 41 │ async with async_run_command(cmd, env=env, cwd=cwd, venv=venv, silent=False) as serv │ | |
│ 42 │ │ output(f'Model server started {server_proc.pid}') │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ bento = BentoInfo(alias='3.8b-ggml-q4', repo=RepoInfo(name='default', │ │ | |
│ │ url='https://github.com/bentoml/openllm-models', server='github.com', │ │ | |
│ │ owner='bentoml', repo='openllm-models', branch='main', │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main')), │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main/be… │ │ | |
│ │ bento_yaml={'service': 'service:LlamaCppChat', 'name': 'phi3', 'version': │ │ | |
│ │ '3.8b-instruct-ggml-q4-8789', 'bentoml_version': '1.3.0', 'creation_time': │ │ | |
│ │ '2024-08-13T06:40:53.477129+00:00', 'labels': {'model_name': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'openllm_alias': │ │ | |
│ │ '3.8b-ggml-q4,3.8b-mini-instruct-4k-ggml-q4', 'platforms': 'macos,linux', │ │ | |
│ │ 'source': │ │ | |
│ │ 'https://github.com/bentoml/openllm-models-feed/tree/main/src/llamacpp-chat'}, │ │ | |
│ │ 'models': [], 'runners': [], 'entry_service': 'phi3', 'services': [{'name': │ │ | |
│ │ 'phi3', 'service': '', 'models': [], 'dependencies': [], 'config': {'name': │ │ | |
│ │ 'phi3', 'resources': {'memory': '3Gi'}, 'traffic': {'timeout': 300}}}], 'envs': │ │ | |
│ │ [{'name': 'CMAKE_ARGS', 'value': '-DLLAMA_METAL=on'}], 'schema': {'name': 'phi3', │ │ | |
│ │ 'type': 'service', 'routes': [{'name': 'chat_completions', 'route': │ │ | |
│ │ '/v1/chat/completions', 'batchable': False, 'input': {'properties': {'messages': │ │ | |
│ │ {'default': [{'role': 'user', 'content': 'What is the meaning of life?'}], │ │ | |
│ │ 'items': {'properties': {'role': {'enum': ['system', 'user', 'assistant'], │ │ | |
│ │ 'title': 'Role', 'type': 'string'}, 'content': {'title': 'Content', 'type': │ │ | |
│ │ 'string'}}, 'required': ['role', 'content'], 'title': 'Message', 'type': │ │ | |
│ │ 'object'}, 'title': 'Messages', 'type': 'array'}, 'model': {'default': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'title': 'Model', 'type': 'string'}, │ │ | |
│ │ 'max_tokens': {'default': 2048, 'maximum': 2048, 'minimum': 128, 'title': 'Max │ │ | |
│ │ Tokens', 'type': 'integer'}, 'stop': {'default': None, 'title': 'Stop', 'items': │ │ | |
│ │ {'type': 'string'}, 'type': 'array'}, 'stream': {'default': True, 'title': │ │ | |
│ │ 'Stream', 'type': 'boolean'}, 'temperature': {'default': 0, 'title': │ │ | |
│ │ 'Temperature', 'type': 'number'}, 'top_p': {'default': 1.0, 'title': 'Top P', │ │ | |
│ │ 'type': 'number'}, 'frequency_penalty': {'default': 0.0, 'title': 'Frequency │ │ | |
│ │ Penalty', 'type': 'number'}}, 'title': 'Input', 'type': 'object'}, 'output': │ │ | |
│ │ {'title': 'strIODescriptor', 'type': 'string', 'is_stream': True, 'media_type': │ │ | |
│ │ 'text/event-stream'}, 'is_task': False}]}, 'apis': [], 'docker': {'distro': │ │ | |
│ │ 'debian', 'python_version': '3.9', 'cuda_version': None, 'env': {'CMAKE_ARGS': │ │ | |
│ │ '-DLLAMA_METAL=on'}, 'system_packages': None, 'setup_script': None, 'base_image': │ │ | |
│ │ None, 'dockerfile_template': None}, 'python': {'requirements_txt': │ │ | |
│ │ './requirements.txt', 'packages': None, 'lock_packages': True, │ │ | |
│ │ 'pack_git_packages': True, 'index_url': None, 'no_index': None, 'trusted_host': │ │ | |
│ │ None, 'find_links': None, 'extra_index_url': None, 'pip_args': None, 'wheels': │ │ | |
│ │ None}, 'conda': {'environment_yml': None, 'channels': None, 'dependencies': None, │ │ | |
│ │ 'pip': None}}) │ │ | |
│ │ port = 31764 │ │ | |
│ │ timeout = 600 │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/venv.py:63 in ensure_venv │ | |
│ │ | |
│ 60 │ | |
│ 61 def ensure_venv(bento: BentoInfo) -> pathlib.Path: │ | |
│ 62 │ env_spec = _resolve_bento_env_spec(bento) │ | |
│ ❱ 63 │ venv = _ensure_venv(env_spec) │ | |
│ 64 │ assert venv is not None │ | |
│ 65 │ return venv │ | |
│ 66 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ bento = BentoInfo(alias='3.8b-ggml-q4', repo=RepoInfo(name='default', │ │ | |
│ │ url='https://github.com/bentoml/openllm-models', server='github.com', │ │ | |
│ │ owner='bentoml', repo='openllm-models', branch='main', │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main')… │ │ | |
│ │ path=PosixPath('/home/rg/.openllm/repos/github.com/bentoml/openllm-models/main/b… │ │ | |
│ │ bento_yaml={'service': 'service:LlamaCppChat', 'name': 'phi3', 'version': │ │ | |
│ │ '3.8b-instruct-ggml-q4-8789', 'bentoml_version': '1.3.0', 'creation_time': │ │ | |
│ │ '2024-08-13T06:40:53.477129+00:00', 'labels': {'model_name': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'openllm_alias': │ │ | |
│ │ '3.8b-ggml-q4,3.8b-mini-instruct-4k-ggml-q4', 'platforms': 'macos,linux', │ │ | |
│ │ 'source': │ │ | |
│ │ 'https://github.com/bentoml/openllm-models-feed/tree/main/src/llamacpp-chat'}, │ │ | |
│ │ 'models': [], 'runners': [], 'entry_service': 'phi3', 'services': [{'name': │ │ | |
│ │ 'phi3', 'service': '', 'models': [], 'dependencies': [], 'config': {'name': │ │ | |
│ │ 'phi3', 'resources': {'memory': '3Gi'}, 'traffic': {'timeout': 300}}}], 'envs': │ │ | |
│ │ [{'name': 'CMAKE_ARGS', 'value': '-DLLAMA_METAL=on'}], 'schema': {'name': 'phi3', │ │ | |
│ │ 'type': 'service', 'routes': [{'name': 'chat_completions', 'route': │ │ | |
│ │ '/v1/chat/completions', 'batchable': False, 'input': {'properties': {'messages': │ │ | |
│ │ {'default': [{'role': 'user', 'content': 'What is the meaning of life?'}], │ │ | |
│ │ 'items': {'properties': {'role': {'enum': ['system', 'user', 'assistant'], │ │ | |
│ │ 'title': 'Role', 'type': 'string'}, 'content': {'title': 'Content', 'type': │ │ | |
│ │ 'string'}}, 'required': ['role', 'content'], 'title': 'Message', 'type': │ │ | |
│ │ 'object'}, 'title': 'Messages', 'type': 'array'}, 'model': {'default': │ │ | |
│ │ 'microsoft/Phi-3-mini-4k-instruct-gguf', 'title': 'Model', 'type': 'string'}, │ │ | |
│ │ 'max_tokens': {'default': 2048, 'maximum': 2048, 'minimum': 128, 'title': 'Max │ │ | |
│ │ Tokens', 'type': 'integer'}, 'stop': {'default': None, 'title': 'Stop', 'items': │ │ | |
│ │ {'type': 'string'}, 'type': 'array'}, 'stream': {'default': True, 'title': │ │ | |
│ │ 'Stream', 'type': 'boolean'}, 'temperature': {'default': 0, 'title': │ │ | |
│ │ 'Temperature', 'type': 'number'}, 'top_p': {'default': 1.0, 'title': 'Top P', │ │ | |
│ │ 'type': 'number'}, 'frequency_penalty': {'default': 0.0, 'title': 'Frequency │ │ | |
│ │ Penalty', 'type': 'number'}}, 'title': 'Input', 'type': 'object'}, 'output': │ │ | |
│ │ {'title': 'strIODescriptor', 'type': 'string', 'is_stream': True, 'media_type': │ │ | |
│ │ 'text/event-stream'}, 'is_task': False}]}, 'apis': [], 'docker': {'distro': │ │ | |
│ │ 'debian', 'python_version': '3.9', 'cuda_version': None, 'env': {'CMAKE_ARGS': │ │ | |
│ │ '-DLLAMA_METAL=on'}, 'system_packages': None, 'setup_script': None, 'base_image': │ │ | |
│ │ None, 'dockerfile_template': None}, 'python': {'requirements_txt': │ │ | |
│ │ './requirements.txt', 'packages': None, 'lock_packages': True, │ │ | |
│ │ 'pack_git_packages': True, 'index_url': None, 'no_index': None, 'trusted_host': │ │ | |
│ │ None, 'find_links': None, 'extra_index_url': None, 'pip_args': None, 'wheels': │ │ | |
│ │ None}, 'conda': {'environment_yml': None, 'channels': None, 'dependencies': None, │ │ | |
│ │ 'pip': None}}) │ │ | |
│ │ env_spec = VenvSpec(python_version='3.9.19', │ │ | |
│ │ requirements_txt='aiohappyeyeballs==2.3.5\naiohttp==3.10.3\naiosignal==1.3.1\nai… │ │ | |
│ │ name_prefix='phi3_3.8b-ggml-q4-1-', │ │ | |
│ │ normalized_requirements_txt='aiohappyeyeballs==2.3.5\naiohttp==3.10.3\naiosignal… │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/venv.py:52 in _ensure_venv │ | |
│ │ | |
│ 49 │ │ except Exception as e: │ | |
│ 50 │ │ │ shutil.rmtree(venv, ignore_errors=True) │ | |
│ 51 │ │ │ if VERBOSE_LEVEL.get() >= 10: │ | |
│ ❱ 52 │ │ │ │ output(e, style='red') │ | |
│ 53 │ │ │ output(f'Failed to install dependencies to {venv}. Cleaned up.', style='red' │ | |
│ 54 │ │ │ raise typer.Exit(1) │ | |
│ 55 │ │ output(f'Successfully installed dependencies to {venv}.', style='green') │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ env_spec = VenvSpec(python_version='3.9.19', │ │ | |
│ │ requirements_txt='aiohappyeyeballs==2.3.5\naiohttp==3.10.3\naiosignal==1.3.1\nai… │ │ | |
│ │ name_prefix='phi3_3.8b-ggml-q4-1-', │ │ | |
│ │ normalized_requirements_txt='aiohappyeyeballs==2.3.5\naiohttp==3.10.3\naiosignal… │ │ | |
│ │ f = <_io.TextIOWrapper │ │ | |
│ │ name='/home/rg/.openllm/venv/1692009002024535268/requirements.txt' mode='w' │ │ | |
│ │ encoding='UTF-8'> │ │ | |
│ │ venv = PosixPath('/home/rg/.openllm/venv/1692009002024535268') │ │ | |
│ │ venv_py = PosixPath('/home/rg/.openllm/venv/1692009002024535268/bin/python') │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/openllm/common.py:77 in output │ | |
│ │ | |
│ 74 │ │ import pyaml │ | |
│ 75 │ │ │ | |
│ 76 │ │ out = io.StringIO() │ | |
│ ❱ 77 │ │ pyaml.pprint(content, dst=out, sort_dicts=False, sort_keys=False) │ | |
│ 78 │ │ questionary.print(out.getvalue(), style=style, end='' if end is None else end) │ | |
│ 79 │ │ out.close() │ | |
│ 80 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ content = RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ end = None │ │ | |
│ │ level = 0 │ │ | |
│ │ out = <_io.StringIO object at 0x7f48f8d2f250> │ │ | |
│ │ pyaml = <module 'pyaml' from │ │ | |
│ │ '/home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py'> │ │ | |
│ │ questionary = <module 'questionary' from │ │ | |
│ │ '/home/rg/.local/lib/python3.10/site-packages/questionary/__init__.py'> │ │ | |
│ │ style = 'red' │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py:267 in pprint │ | |
│ │ | |
│ 264 def pprint(*data, **dump_kws): │ | |
│ 265 │ dst = dump_kws.pop('file', dump_kws.pop('dst', sys.stdout)) │ | |
│ 266 │ if len(data) == 1: data, = data │ | |
│ ❱ 267 │ dump(data, dst=dst, **dump_kws) │ | |
│ 268 │ | |
│ 269 p, _p = pprint, print │ | |
│ 270 print = pprint │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ dst = <_io.StringIO object at 0x7f48f8d2f250> │ │ | |
│ │ dump_kws = {'sort_dicts': False, 'sort_keys': False} │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py:231 in dump │ | |
│ │ | |
│ 228 │ │ force_embed=force_embed, string_val_style=string_val_style, sort_dicts=sort_dict │ | |
│ 229 │ if not multiple_docs: data = [data] │ | |
│ 230 │ else: pyyaml_kws.setdefault('explicit_start', True) │ | |
│ ❱ 231 │ yaml.dump_all( data, buff, Dumper=Dumper, width=width, │ | |
│ 232 │ │ default_flow_style=False, allow_unicode=True, **pyyaml_kws ) │ | |
│ 233 │ buff = buff.getvalue() │ | |
│ 234 │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ buff = <_io.StringIO object at 0x7f48f8c87eb0> │ │ | |
│ │ data = [ │ │ | |
│ │ │ RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ ] │ │ | |
│ │ dst = <_io.StringIO object at 0x7f48f8d2f250> │ │ | |
│ │ Dumper = <function dump.<locals>.<lambda> at 0x7f48f8c87e20> │ │ | |
│ │ force_embed = True │ │ | |
│ │ multiple_docs = False │ │ | |
│ │ pyyaml_kws = {'sort_keys': False} │ │ | |
│ │ safe = None │ │ | |
│ │ sort_dicts = False │ │ | |
│ │ stream = None │ │ | |
│ │ string_val_style = None │ │ | |
│ │ vspacing = True │ │ | |
│ │ width = 100 │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/__init__.py:241 in dump_all │ | |
│ │ | |
│ 238 │ try: │ | |
│ 239 │ │ dumper.open() │ | |
│ 240 │ │ for data in documents: │ | |
│ ❱ 241 │ │ │ dumper.represent(data) │ | |
│ 242 │ │ dumper.close() │ | |
│ 243 │ finally: │ | |
│ 244 │ │ dumper.dispose() │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ allow_unicode = True │ │ | |
│ │ canonical = None │ │ | |
│ │ data = RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ default_flow_style = False │ │ | |
│ │ default_style = None │ │ | |
│ │ documents = [ │ │ | |
│ │ │ RepresenterError('cannot represent an object', │ │ | |
│ │ CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', │ │ | |
│ │ 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ ] │ │ | |
│ │ Dumper = <function dump.<locals>.<lambda> at 0x7f48f8c87e20> │ │ | |
│ │ dumper = <pyaml.PYAMLDumper object at 0x7f48f8cc4040> │ │ | |
│ │ encoding = None │ │ | |
│ │ explicit_end = None │ │ | |
│ │ explicit_start = None │ │ | |
│ │ getvalue = None │ │ | |
│ │ indent = None │ │ | |
│ │ line_break = None │ │ | |
│ │ sort_keys = False │ │ | |
│ │ stream = <_io.StringIO object at 0x7f48f8c87eb0> │ │ | |
│ │ tags = None │ │ | |
│ │ version = None │ │ | |
│ │ width = 100 │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/representer.py:27 in represent │ | |
│ │ | |
│ 24 │ │ self.alias_key = None │ | |
│ 25 │ │ | |
│ 26 │ def represent(self, data): │ | |
│ ❱ 27 │ │ node = self.represent_data(data) │ | |
│ 28 │ │ self.serialize(node) │ | |
│ 29 │ │ self.represented_objects = {} │ | |
│ 30 │ │ self.object_keeper = [] │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8cc4040> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/representer.py:58 in represent_data │ | |
│ │ | |
│ 55 │ │ │ │ if None in self.yaml_multi_representers: │ | |
│ 56 │ │ │ │ │ node = self.yaml_multi_representers[None](self, data) │ | |
│ 57 │ │ │ │ elif None in self.yaml_representers: │ | |
│ ❱ 58 │ │ │ │ │ node = self.yaml_representers[None](self, data) │ | |
│ 59 │ │ │ │ else: │ | |
│ 60 │ │ │ │ │ node = ScalarNode(None, str(data)) │ | |
│ 61 │ │ #if alias_key is not None: │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ data_type = <class 'object'> │ │ | |
│ │ data_types = ( │ │ | |
│ │ │ <class 'yaml.representer.RepresenterError'>, │ │ | |
│ │ │ <class 'yaml.error.YAMLError'>, │ │ | |
│ │ │ <class 'Exception'>, │ │ | |
│ │ │ <class 'BaseException'>, │ │ | |
│ │ │ <class 'object'> │ │ | |
│ │ ) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8cc4040> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/pyaml/__init__.py:139 in represent_undefined │ | |
│ │ | |
│ 136 │ │ │ if not callable(getattr(data, 'tolist', None)): raise AttributeError │ | |
│ 137 │ │ except: pass # can raise other errors with custom types │ | |
│ 138 │ │ else: return self.represent_data(data.tolist()) │ | |
│ ❱ 139 │ │ return super().represent_undefined(data) # will raise RepresenterError │ | |
│ 140 │ │ | |
│ 141 │ def write_ext(self, func, text, *args, **kws): │ | |
│ 142 │ │ # Emitter write-funcs extension to append comments to values │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8cc4040> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
│ │ | |
│ /home/rg/.local/lib/python3.10/site-packages/yaml/representer.py:231 in represent_undefined │ | |
│ │ | |
│ 228 │ │ return self.represent_mapping(tag, state, flow_style=flow_style) │ | |
│ 229 │ │ | |
│ 230 │ def represent_undefined(self, data): │ | |
│ ❱ 231 │ │ raise RepresenterError("cannot represent an object", data) │ | |
│ 232 │ | |
│ 233 SafeRepresenter.add_representer(type(None), │ | |
│ 234 │ │ SafeRepresenter.represent_none) │ | |
│ │ | |
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ | |
│ │ data = RepresenterError('cannot represent an object', CalledProcessError(2, │ │ | |
│ │ ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', │ │ | |
│ │ '/home/rg/.openllm/venv/1692009002024535268/requirements.txt'])) │ │ | |
│ │ self = <pyaml.PYAMLDumper object at 0x7f48f8cc4040> │ │ | |
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ | |
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ | |
RepresenterError: ('cannot represent an object', RepresenterError('cannot represent an object', | |
CalledProcessError(2, ['/usr/bin/python3', '-m', 'uv', 'pip', 'install', '-p', | |
'/home/rg/.openllm/venv/1692009002024535268/bin/python', '-r', | |
'/home/rg/.openllm/venv/1692009002024535268/requirements.txt']))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment