Lightning-AI / LitServe

Deploy AI models at scale. High-throughput serving engine for AI/ML models that uses the latest state-of-the-art model deployment techniques.
https://lightning.ai/docs/litserve
Apache License 2.0
115 stars 11 forks source link

Logging error #83

Closed williamFalcon closed 3 weeks ago

williamFalcon commented 1 month ago
--- Logging error ---
Traceback (most recent call last):
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/logging/__init__.py", line 1100, in emit
    msg = self.format(record)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/logging/__init__.py", line 943, in format
    return fmt.format(record)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/logging/__init__.py", line 678, in format
    record.message = record.getMessage()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: %d format: a real number is required, not str
Call stack:
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/init-zues-home-dir/.local/share/code-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/tmp/init-zues-home-dir/.local/share/code-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/tmp/init-zues-home-dir/.local/share/code-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/tmp/init-zues-home-dir/.local/share/code-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/tmp/init-zues-home-dir/.local/share/code-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/tmp/init-zues-home-dir/.local/share/code-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/teamspace/studios/this_studio/server.py", line 100, in <module>
    run_server()
  File "/teamspace/studios/this_studio/server.py", line 97, in run_server
    server.run(port='8000')
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/litserve/server.py", line 421, in run
    uvicorn.run(host="0.0.0.0", port=port, app=self.app, log_level=log_level, **kwargs)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/uvicorn/main.py", line 575, in run
    server.run()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
    await self._serve(sockets)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/uvicorn/server.py", line 84, in _serve
    await self.startup(sockets=sockets)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/uvicorn/server.py", line 179, in startup
    self._log_started_message(listeners)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/uvicorn/server.py", line 214, in _log_started_message
    logger.info(
Message: 'Uvicorn running on %s://%s:%d (Press CTRL+C to quit)'
Arguments: ('http', '0.0.0.0', '8000')
aniketmaurya commented 1 month ago

I couldn't reproduce this. also from error trace couldn't find anything related to LitServe. could you please share more info so that I can reproduce this?

williamFalcon commented 4 weeks ago
port='8000'

use a string for port...

the problem is that a user error is not clearly surfaced... users will mess up their code and blame the framework because the error is not clear. cc @lantiga