Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'FieldInfo' object has no attribute 'required' #11

Open
rgkirch opened this issue Jan 19, 2024 · 1 comment
Open

AttributeError: 'FieldInfo' object has no attribute 'required' #11

rgkirch opened this issue Jan 19, 2024 · 1 comment

Comments

@rgkirch
Copy link

rgkirch commented Jan 19, 2024

dockerfile

FROM nvidia/cuda:12.3.1-devel-ubuntu20.04

RUN apt-get update && \
    apt-get install -y --allow-unauthenticated --no-install-recommends \
    git \
    wget \
    build-essential

RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
    bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda && \
    rm Miniconda3-latest-Linux-x86_64.sh

ENV PATH="/miniconda/bin:${PATH}"

RUN git clone https://github.com/manmay-nakhashi/tortoise-tts-fastest /app

WORKDIR /app

RUN conda create -n ttts-fast python=3.8 && \
    echo "source activate ttts-fast" > ~/.bashrc
ENV PATH /miniconda/envs/ttts-fast/bin:$PATH

SHELL ["conda", "run", "-n", "ttts-fast", "/bin/bash", "-c"]

RUN conda install -y pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 -c pytorch -c nvidia && \
    conda install -c anaconda gdbm && \
    pip install -e . && \
    pip install git+https://github.com/152334H/BigVGAN.git && \
    pip install streamlit

RUN pip install deepspeed==0.9.0

EXPOSE 8501

ENV NAME tortoise-tts

CMD ["streamlit", "run", "scripts/app.py"]

docker build . -t tts

docker run --gpus all -p 8501:8501 tts

==========
== CUDA ==
==========

CUDA Version 12.3.1

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.


Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.


  You can now view your Streamlit app in your browser.

  Network URL: http://172.16.0.2:8501
  External URL: http://98.56.18.179:8501

/miniconda/envs/ttts-fast/lib/python3.8/site-packages/pydantic/_internal/_config.py:321: UserWarning: Valid config keys have changed in V2:
* 'allow_population_by_field_name' has been renamed to 'populate_by_name'
* 'validate_all' has been renamed to 'validate_default'
  warnings.warn(message, UserWarning)
/miniconda/envs/ttts-fast/lib/python3.8/site-packages/pydantic/_internal/_fields.py:149: UserWarning: Field "model_persistence_threshold" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
2024-01-19 14:55:32.213 Uncaught app exception
Traceback (most recent call last):
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
  File "/app/scripts/app.py", line 8, in <module>
    from tortoise.api import MODELS_DIR
  File "/app/tortoise/api.py", line 13, in <module>
    from tortoise.models.autoregressive import UnifiedVoice
  File "/app/tortoise/models/autoregressive.py", line 12, in <module>
    import deepspeed
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/__init__.py", line 16, in <module>
    from . import module_inject
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/module_inject/__init__.py", line 6, in <module>
    from .replace_module import replace_transformer_layer, revert_transformer_layer, ReplaceWithTensorSlicing, GroupQuantizer, generic_injection
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/module_inject/replace_module.py", line 732, in <module>
    from ..pipe import PipelineModule
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/pipe/__init__.py", line 6, in <module>
    from ..runtime.pipe import PipelineModule, LayerSpec, TiedLayerSpec
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/pipe/__init__.py", line 6, in <module>
    from .module import PipelineModule, LayerSpec, TiedLayerSpec
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/pipe/module.py", line 19, in <module>
    from ..activation_checkpointing import checkpointing
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/activation_checkpointing/checkpointing.py", line 25, in <module>
    from deepspeed.runtime.config import DeepSpeedConfig
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/config.py", line 28, in <module>
    from .zero.config import get_zero_config, ZeroStageEnum
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/zero/__init__.py", line 6, in <module>
    from .partition_parameters import ZeroParamType
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/zero/partition_parameters.py", line 569, in <module>
    class Init(InsertPostInitMethodToModuleSubClasses):
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/zero/partition_parameters.py", line 571, in Init
    param_persistence_threshold = get_config_default(DeepSpeedZeroConfig, "param_persistence_threshold")
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/config_utils.py", line 115, in get_config_default
    assert not config.__fields__.get(
AttributeError: 'FieldInfo' object has no attribute 'required'
/miniconda/envs/ttts-fast/lib/python3.8/site-packages/pydantic/_internal/_config.py:321: UserWarning: Valid config keys have changed in V2:
* 'validate_all' has been renamed to 'validate_default'
  warnings.warn(message, UserWarning)
2024-01-19 14:55:43.098 Uncaught app exception
Traceback (most recent call last):
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
  File "/app/scripts/app.py", line 8, in <module>
    from tortoise.api import MODELS_DIR
  File "/app/tortoise/api.py", line 13, in <module>
    from tortoise.models.autoregressive import UnifiedVoice
  File "/app/tortoise/models/autoregressive.py", line 12, in <module>
    import deepspeed
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/__init__.py", line 16, in <module>
    from . import module_inject
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/module_inject/__init__.py", line 6, in <module>
    from .replace_module import replace_transformer_layer, revert_transformer_layer, ReplaceWithTensorSlicing, GroupQuantizer, generic_injection
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/module_inject/replace_module.py", line 732, in <module>
    from ..pipe import PipelineModule
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/pipe/__init__.py", line 6, in <module>
    from ..runtime.pipe import PipelineModule, LayerSpec, TiedLayerSpec
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/pipe/__init__.py", line 6, in <module>
    from .module import PipelineModule, LayerSpec, TiedLayerSpec
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/pipe/module.py", line 19, in <module>
    from ..activation_checkpointing import checkpointing
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/activation_checkpointing/checkpointing.py", line 25, in <module>
    from deepspeed.runtime.config import DeepSpeedConfig
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/runtime/config.py", line 31, in <module>
    from ..monitor.config import get_monitor_config
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/monitor/config.py", line 63, in <module>
    class DeepSpeedMonitorConfig(DeepSpeedConfigModel):
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/deepspeed/monitor/config.py", line 76, in DeepSpeedMonitorConfig
    def check_enabled(cls, values):
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/pydantic/deprecated/class_validators.py", line 231, in root_validator
    return root_validator()(*__args)  # type: ignore
  File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/pydantic/deprecated/class_validators.py", line 237, in root_validator
    raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use `@root_validator` with pre=False (the default) you MUST specify `skip_on_failure=True`. Note that `@root_validator` is deprecated and should be replaced with `@model_validator`.

For further information visit https://errors.pydantic.dev/2.5/u/root-validator-pre-skip
  Stopping...
@rgkirch
Copy link
Author

rgkirch commented Jan 19, 2024

I copied the Dockerfile from https://github.com/louispaulet/tortoise-tts-docker/blob/main/Dockerfile and added pip install deepspeed and changed the repo from https://github.com/152334H/tortoise-tts-fast.git to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant