Luodian / Otter

🦦 Otter, a multi-modal model based on OpenFlamingo (open-sourced version of DeepMind's Flamingo), trained on MIMIC-IT and showcasing improved instruction-following and in-context learning ability.
https://otter-ntu.github.io/
MIT License
3.52k stars 241 forks source link

ModuleNotFoundError: No module named 'pipeline.constants' #299

Open twmht opened 8 months ago

twmht commented 8 months ago

Following the instructions in https://github.com/Luodian/Otter/blob/main/docs/server_host.md

Traceback (most recent call last):
  File "/home/acer/.pyenv/versions/3.9.16/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/acer/.pyenv/versions/3.9.16/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/shared/Otter/pipeline/serve/model_worker.py", line 23, in <module>
    from pipeline.constants import WORKER_HEART_BEAT_INTERVAL
ModuleNotFoundError: No module named 'pipeline.constants'

any idea?

hardlipay commented 7 months ago

https://github.com/Luodian/Otter/blob/0d12192f665f5e9da1ecb2f23d6a360eb7753771/pipeline/constants.py

ppsmk388 commented 7 months ago

I meet the same problem

Luodian commented 7 months ago

Hi sorry we've changed to the serving/hosting logic from original fastchat (since it involves so many codes and files, we wish to make it easier and quicker to host new demo).

to hosting a backend endpoint: https://github.com/Luodian/Otter/blob/main/pipeline/serve/deploy/otterhd_endpoint.py

The frontend code: https://huggingface.co/spaces/Otter-AI/OtterHD-Demo/blob/main/app.py

But if you aim at serving models in old way, you could checkout to branch: https://github.com/Luodian/Otter/blob/model_serving

If you meet errors about gradio, you may need to fix the gradio version and see the updated doc here: https://github.com/Luodian/Otter/blob/model_serving/docs/server_host.md