LukeForeverYoung / UReader

Apache License 2.0
102 stars 6 forks source link

Problems in 'python -m app' #3

Open xuetaolue opened 8 months ago

xuetaolue commented 8 months ago

python -m app Traceback (most recent call last): File "/nfs/volume-381-1/xuetaolue/miniconda3_llm/envs/llavar/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/nfs/volume-381-1/xuetaolue/miniconda3_llm/envs/llavar/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/nfs/volume-381-1/xuetaolue/UReader/app.py", line 24, in from serve.serve_utils import init File "/nfs/volume-381-1/xuetaolue/UReader/serve/serve_utils.py", line 10, in from .gradio_patch import Chatbot as grChatbot File "/nfs/volume-381-1/xuetaolue/UReader/serve/gradio_patch.py", line 17, in @document("style") NameError: name 'document' is not defined

xuetaolue commented 8 months ago

i think the problem is caused by the version of 'gradio', Can you tell me the correct version of 'gradio ' ?

xuetaolue commented 8 months ago

In addition, Can you provide the version of all dependent libraries?

LukeForeverYoung commented 8 months ago

In my environment, the version of gradio is 3.30.0.

Here is a env.yaml of conda environment for reference.

name: megatron2
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
  - nvidia
  - defaults
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - blas=1.0=mkl
  - brotlipy=0.7.0=py310h7f8727e_1002
  - bzip2=1.0.8=h7b6447c_0
  - ca-certificates=2023.01.10=h06a4308_0
  - certifi=2023.5.7=py310h06a4308_0
  - cffi=1.15.1=py310h5eee18b_3
  - charset-normalizer=2.0.4=pyhd3eb1b0_0
  - cryptography=39.0.1=py310h9ce1e76_0
  - cuda-cudart=11.7.99=0
  - cuda-cupti=11.7.101=0
  - cuda-libraries=11.7.1=0
  - cuda-nvrtc=11.7.99=0
  - cuda-nvtx=11.7.91=0
  - cuda-runtime=11.7.1=0
  - ffmpeg=4.3=hf484d3e_0
  - freetype=2.12.1=h4a9f257_0
  - giflib=5.2.1=h5eee18b_3
  - gmp=6.2.1=h295c915_3
  - gnutls=3.6.15=he1e5248_0
  - idna=3.4=py310h06a4308_0
  - intel-openmp=2023.1.0=hdb19cb5_46305
  - jpeg=9e=h5eee18b_1
  - lame=3.100=h7b6447c_0
  - lcms2=2.12=h3be6417_0
  - ld_impl_linux-64=2.38=h1181459_1
  - lerc=3.0=h295c915_0
  - libcublas=11.10.3.66=0
  - libcufft=10.7.2.124=h4fbf590_0
  - libcufile=1.6.1.9=0
  - libcurand=10.3.2.106=0
  - libcusolver=11.4.0.1=0
  - libcusparse=11.7.4.91=0
  - libdeflate=1.17=h5eee18b_0
  - libffi=3.4.4=h6a678d5_0
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libiconv=1.16=h7f8727e_2
  - libidn2=2.3.4=h5eee18b_0
  - libnpp=11.7.4.75=0
  - libnvjpeg=11.8.0.2=0
  - libpng=1.6.39=h5eee18b_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - libtasn1=4.19.0=h5eee18b_0
  - libtiff=4.5.0=h6a678d5_2
  - libunistring=0.9.10=h27cfd23_0
  - libuuid=1.41.5=h5eee18b_0
  - libwebp=1.2.4=h11a3e52_1
  - libwebp-base=1.2.4=h5eee18b_1
  - lz4-c=1.9.4=h6a678d5_0
  - mkl=2023.1.0=h6d00ec8_46342
  - mkl-service=2.4.0=py310h5eee18b_1
  - mkl_fft=1.3.6=py310h1128e8f_1
  - mkl_random=1.2.2=py310h1128e8f_1
  - ncurses=6.4=h6a678d5_0
  - nettle=3.7.3=hbbd107a_1
  - numpy=1.24.3=py310h5f9d8c6_1
  - numpy-base=1.24.3=py310hb5e798b_1
  - openh264=2.1.1=h4ff587b_0
  - openssl=1.1.1t=h7f8727e_0
  - pillow=9.4.0=py310h6a678d5_0
  - pip=23.0.1=py310h06a4308_0
  - pycparser=2.21=pyhd3eb1b0_0
  - pyopenssl=23.0.0=py310h06a4308_0
  - pysocks=1.7.1=py310h06a4308_0
  - python=3.10.11=h7a1cb2a_2
  - pytorch=1.13.1=py3.10_cuda11.7_cudnn8.5.0_0
  - pytorch-cuda=11.7=h778d358_5
  - pytorch-mutex=1.0=cuda
  - readline=8.2=h5eee18b_0
  - requests=2.29.0=py310h06a4308_0
  - setuptools=66.0.0=py310h06a4308_0
  - sqlite=3.41.2=h5eee18b_0
  - tbb=2021.8.0=hdb19cb5_0
  - tk=8.6.12=h1ccaba5_0
  - torchaudio=0.13.1=py310_cu117
  - torchvision=0.14.1=py310_cu117
  - urllib3=1.26.15=py310h06a4308_0
  - wheel=0.38.4=py310h06a4308_0
  - xz=5.4.2=h5eee18b_0
  - zlib=1.2.13=h5eee18b_0
  - zstd=1.5.5=hc292b87_0
  - pip:
    - absl-py==1.4.0
    - accelerate==0.19.0
    - addict==2.4.0
    - aiofiles==23.1.0
    - aiohttp==3.8.4
    - aiosignal==1.3.1
    - alibabacloud-credentials==0.3.2
    - alibabacloud-endpoint-util==0.0.3
    - alibabacloud-gateway-spi==0.0.1
    - alibabacloud-openapi-util==0.2.1
    - alibabacloud-sts20150401==1.1.3
    - alibabacloud-tea==0.3.3
    - alibabacloud-tea-openapi==0.3.7
    - alibabacloud-tea-util==0.3.11
    - alibabacloud-tea-xml==0.0.2
    - alipai==0.4.3
    - aliyun-python-sdk-core==2.13.36
    - aliyun-python-sdk-kms==2.16.0
    - altair==5.0.0
    - annotated-types==0.5.0
    - antlr4-python3-runtime==4.9.3
    - anyio==3.6.2
    - apex==0.1
    - argon2-cffi==21.3.0
    - argon2-cffi-bindings==21.2.0
    - arrow==1.2.3
    - asn1crypto==1.5.1
    - asttokens==2.2.1
    - async-timeout==4.0.2
    - attrs==23.1.0
    - backcall==0.2.0
    - backoff==1.11.1
    - beautifulsoup4==4.12.2
    - bleach==6.0.0
    - blinker==1.6.2
    - blis==0.7.10
    - blobfile==2.0.2
    - braceexpand==0.1.7
    - cachetools==5.3.0
    - catalogue==2.0.9
    - cchardet==2.1.7
    - cfgv==3.4.0
    - chardet==5.1.0
    - click==8.1.3
    - colorama==0.4.6
    - colorlog==6.7.0
    - comm==0.1.3
    - confection==0.1.3
    - contexttimer==0.3.3
    - contourpy==1.0.7
    - crcmod==1.7
    - cycler==0.11.0
    - cymem==2.0.7
    - dashscope==1.10.1
    - dataclasses-json==0.5.14
    - datasets==2.12.0
    - debugpy==1.6.7
    - decorator==5.1.1
    - decord==0.6.0
    - deepspeed==0.9.5
    - defusedxml==0.7.1
    - diffuser==0.0.1
    - diffusers==0.16.0
    - dill==0.3.6
    - distlib==0.3.7
    - eas-prediction==0.22
    - easyocr==1.7.0
    - editdistance==0.6.2
    - einops==0.6.1
    - evals==1.0.3.post1
    - exceptiongroup==1.1.3
    - executing==1.2.0
    - fairscale==0.4.4
    - fastapi==0.100.0
    - fastjsonschema==2.16.3
    - ffmpeg-python==0.2.0
    - ffmpy==0.3.0
    - filelock==3.12.4
    - fire==0.5.0
    - flash-attn==2.0.2
    - flask==2.3.2
    - fonttools==4.39.4
    - fqdn==1.5.1
    - frozenlist==1.3.3
    - fsspec==2023.5.0
    - ftfy==6.1.1
    - future==0.18.3
    - gitdb==4.0.10
    - gitpython==3.1.36
    - google-api-core==2.11.0
    - google-auth==2.18.0
    - google-auth-oauthlib==1.0.0
    - google-cloud-vision==2.7.3
    - googleapis-common-protos==1.59.0
    - gputil==1.4.0
    - gradio==3.30.0
    - gradio-client==0.2.4
    - greenlet==2.0.2
    - grpcio==1.54.0
    - grpcio-status==1.48.2
    - h11==0.14.0
    - h5py==3.8.0
    - hjson==3.1.0
    - httpcore==0.17.0
    - httpx==0.24.0
    - huggingface-hub==0.14.1
    - icecream==2.1.3
    - identify==2.5.28
    - imageio==2.31.0
    - importlib-metadata==6.7.0
    - iniconfig==2.0.0
    - iopath==0.1.10
    - ipykernel==6.23.0
    - ipython==8.13.2
    - ipython-genutils==0.2.0
    - ipywidgets==8.0.6
    - isoduration==20.11.0
    - itsdangerous==2.1.2
    - jedi==0.18.2
    - jinja2==3.1.2
    - jmespath==0.10.0
    - joblib==1.3.1
    - jsonlines==3.1.0
    - jsonpointer==2.3
    - jsonschema==4.17.3
    - jupyter==1.0.0
    - jupyter-client==8.2.0
    - jupyter-console==6.6.3
    - jupyter-core==5.3.0
    - jupyter-events==0.6.3
    - jupyter-server==2.5.0
    - jupyter-server-terminals==0.4.4
    - jupyterlab-pygments==0.2.2
    - jupyterlab-widgets==3.0.7
    - kaggle==1.5.16
    - kiwisolver==1.4.4
    - langchain==0.0.276
    - langcodes==3.3.0
    - langdetect==1.0.9
    - langsmith==0.0.27
    - lazy-loader==0.2
    - linkify-it-py==2.0.2
    - littleutils==0.2.2
    - lxml==4.9.3
    - lz4==4.3.2
    - markdown==3.4.3
    - markdown-it-py==2.2.0
    - markdown2==2.4.8
    - markupsafe==2.1.2
    - marshmallow==3.20.1
    - marshmallow-oneofschema==3.0.1
    - matplotlib==3.7.1
    - matplotlib-inline==0.1.6
    - mdit-py-plugins==0.3.3
    - mdurl==0.1.2
    - mistune==2.0.5
    - mock==5.1.0
    - model-index==0.1.11
    - more-itertools==9.1.0
    - multidict==6.0.4
    - multiprocess==0.70.14
    - munch==2.5.0
    - murmurhash==1.0.9
    - mypy==1.5.1
    - mypy-extensions==1.0.0
    - nbclassic==1.0.0
    - nbclient==0.7.4
    - nbconvert==7.4.0
    - nbformat==5.8.0
    - nest-asyncio==1.5.6
    - networkx==3.1
    - ninja==1.11.1
    - nltk==3.8.1
    - nodeenv==1.8.0
    - notebook==6.5.4
    - notebook-shim==0.2.3
    - numexpr==2.8.5
    - oauthlib==3.2.2
    - omegaconf==2.3.0
    - openai==0.27.9
    - opencv-python==4.7.0.72
    - opencv-python-headless==4.5.5.64
    - opendatasets==0.1.22
    - openmim==0.3.7
    - ordered-set==4.1.0
    - orjson==3.8.12
    - oscrypto==1.3.0
    - oss2==2.17.0
    - packaging==23.1
    - pandas==2.0.1
    - pandocfilters==1.5.0
    - parso==0.8.3
    - pathy==0.10.2
    - peft==0.3.0
    - pexpect==4.8.0
    - pickleshare==0.7.5
    - platformdirs==3.10.0
    - plotly==5.16.1
    - pluggy==1.3.0
    - pmm==2.3
    - portalocker==2.7.0
    - pre-commit==3.4.0
    - preshed==3.0.8
    - prometheus-client==0.16.0
    - prompt-toolkit==3.0.38
    - proto-plus==1.22.2
    - protobuf==3.20.3
    - psutil==5.9.5
    - ptyprocess==0.7.0
    - pure-eval==0.2.2
    - py-cpuinfo==9.0.0
    - pyarrow==10.0.1
    - pyasn1==0.5.0
    - pyasn1-modules==0.3.0
    - pybind11==2.11.1
    - pyclipper==1.3.0.post4
    - pycocoevalcap==1.2
    - pycocotools==2.0.6
    - pycryptodome==3.17
    - pycryptodomex==3.18.0
    - pydantic==1.10.11
    - pydantic-core==2.1.2
    - pydeck==0.8.0
    - pydub==0.25.1
    - pygments==2.15.1
    - pyjwt==2.8.0
    - pympler==1.0.1
    - pyodps==0.11.4.1
    - pyparsing==3.0.9
    - pyre-extensions==0.0.23
    - pyrsistent==0.19.3
    - pytesseract==0.3.8
    - pytest==7.4.0
    - python-bidi==0.4.2
    - python-dateutil==2.8.2
    - python-json-logger==2.0.7
    - python-magic==0.4.27
    - python-multipart==0.0.6
    - python-opencv==1.0.0.14
    - python-slugify==8.0.1
    - pytz==2023.3
    - pytz-deprecation-shim==0.1.0.post0
    - pywavelets==1.4.1
    - pyyaml==6.0
    - pyzmq==25.0.2
    - pyzstd==0.15.9
    - qtconsole==5.4.3
    - qtpy==2.3.1
    - regex==2023.5.5
    - requests-oauthlib==1.3.1
    - responses==0.18.0
    - rfc3339-validator==0.1.4
    - rfc3986-validator==0.1.1
    - rich==13.3.5
    - rjieba==0.1.11
    - rsa==4.9
    - ruamel-yaml==0.17.26
    - ruamel-yaml-clib==0.2.7
    - sacrebleu==2.3.1
    - salesforce-lavis==1.0.1
    - scikit-image==0.21.0
    - scikit-learn==1.3.2
    - scipy==1.10.1
    - sconf==0.2.5
    - semantic-version==2.10.0
    - send2trash==1.8.2
    - sentencepiece==0.1.99
    - setuptools-scm==7.1.0
    - sh==2.0.3
    - shapely==2.0.1
    - six==1.16.0
    - smart-open==6.4.0
    - smmap==5.0.0
    - sniffio==1.3.0
    - snowflake-connector-python==3.1.0
    - sorcery==0.2.2
    - sortedcontainers==2.4.0
    - soupsieve==2.4.1
    - spacy==3.6.1
    - spacy-legacy==3.0.12
    - spacy-loggers==1.0.5
    - sqlalchemy==2.0.20
    - srsly==2.4.7
    - stack-data==0.6.2
    - starlette==0.27.0
    - streamlit==1.26.0
    - tabulate==0.9.0
    - tenacity==8.2.3
    - tensorboard==2.13.0
    - tensorboard-data-server==0.7.0
    - tensorboardx==2.6
    - termcolor==2.3.0
    - terminado==0.17.1
    - text-unidecode==1.3
    - textdistance==4.5.0
    - thinc==8.1.12
    - threadpoolctl==3.2.0
    - tifffile==2023.4.12
    - tiktoken==0.4.0
    - timm==0.4.12
    - tinycss2==1.2.1
    - tokenizers==0.13.3
    - toml==0.10.2
    - tomli==2.0.1
    - tomlkit==0.12.1
    - toolz==0.12.0
    - tornado==6.3.1
    - tqdm==4.65.0
    - traitlets==5.9.0
    - transformers==4.29.1
    - transformers-stream-generator==0.0.4
    - typer==0.9.0
    - types-pyyaml==6.0.12.11
    - typing-extensions==4.7.1
    - typing-inspect==0.9.0
    - tzdata==2023.3
    - tzlocal==4.3.1
    - uc-micro-py==1.0.2
    - uri-template==1.2.0
    - uvicorn==0.22.0
    - validators==0.22.0
    - virtualenv==20.24.5
    - waitress==2.1.2
    - wasabi==1.1.2
    - watchdog==3.0.0
    - wcwidth==0.2.6
    - webcolors==1.13
    - webdataset==0.2.48
    - webencodings==0.5.1
    - websocket-client==1.5.1
    - websockets==11.0.3
    - werkzeug==2.3.4
    - widgetsnbextension==4.0.7
    - wrapt==1.15.0
    - xformer==1.0.1
    - xformers==0.0.16
    - xxhash==3.2.0
    - yarl==1.9.2
    - zipp==3.15.0
bjmajic commented 7 months ago

the app.py is not runing, and give a error like this "processing_utils not find", "JsonSerializable not find",

can you run it success?

wang-tf commented 7 months ago

the app.py is not runing, and give a error like this "processing_utils not find", "JsonSerializable not find",

can you run it success?

My gradio's version is 3.50.2, and from gradio_client.serializing import JSONSerializable can work.