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

Upgrade Replicate.com model #94

Open
basicfeatures opened this issue Apr 12, 2023 · 1 comment
Open

Upgrade Replicate.com model #94

basicfeatures opened this issue Apr 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@basicfeatures
Copy link

Uh oh! This model can't be run on Replicate because it was built with a version of Cog that is no longer supported. Consider opening an issue on the model's GitHub repository to see if it can be updated to use a recent version of Cog. If you need any help, please hop into our Discord channel or email us about it.

Thanks!

@yoyololicon yoyololicon added the enhancement New feature or request label Jul 19, 2023
@osbre
Copy link

osbre commented Mar 2, 2024

I was trying to get it running on Replicate, but there's a problem:

Validating model schema...

Traceback (most recent call last):
  File "/root/.pyenv/versions/3.8.18/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/root/.pyenv/versions/3.8.18/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/root/.pyenv/versions/3.8.18/lib/python3.8/site-packages/cog/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "pydantic/__init__.py", line 2, in init pydantic.__init__
  File "pydantic/dataclasses.py", line 48, in init pydantic.dataclasses

ImportError: cannot import name dataclass_transform

ⅹ Failed to get type signature: exit status 1

According to this comment, it happens due to the newer Pydantic version and should be gone if you downgrade to 1.9.0.

I'm trying to downgrade Pydantic but don't have enough experience with the Python ecosystem to make it work. Here's my updated config.

build:
  gpu: true
  python_version: "3.8"
  system_packages:
    - "libgl1-mesa-glx"
    - "libglib2.0-0"
    - "libsndfile1-dev"
    - "ffmpeg"
    - "fluidsynth"
  python_packages:
    - "ipython==7.30.1"
    - "numpy==1.21.4"
    - "pydantic<1.9.0"
  run:
    - pip install -U pip
    - pip install --upgrade cython
    - pip install omnizart
    - pip install pyfluidsynth

predict: "scripts/predict.py:Predictor"

Would appreciate it if someone picked it up from here. (the pydantic version does not get downgraded even tho I specified it)

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

No branches or pull requests

3 participants