Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug]: HTTP Error 400: Can't have direct dependency: openai-whisper #740

Closed
abrichr opened this issue Jun 12, 2024 · 15 comments
Closed

[Bug]: HTTP Error 400: Can't have direct dependency: openai-whisper #740

abrichr opened this issue Jun 12, 2024 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@abrichr
Copy link
Member

abrichr commented Jun 12, 2024

Describe the bug

https://github.com/OpenAdaptAI/OpenAdapt/actions/runs/9484457521/job/26135042643:

 - Uploading openadapt-0.31.0-py3-none-any.whl 100%
HTTP Error 400: Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information. | b"<html>\n <head>\n  <title>400 Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n \n <body>\n  <h1>400 Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n  The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>\nCan&#x27;t have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n\n\n \n"
Error: Process completed with exit code 1.

While this workflow fails, the version bump succeeds:

1338fa2

To Reproduce

Merge a PR

@abrichr abrichr added the bug Something isn't working label Jun 12, 2024
@abrichr
Copy link
Member Author

abrichr commented Jun 12, 2024

@KIRA009 your thoughts on this would be very much appreciated! 🙏

@abrichr
Copy link
Member Author

abrichr commented Jun 14, 2024

@KIRA009 the "publish to pypi" step failed: https://github.com/OpenAdaptAI/OpenAdapt/actions/runs/9516888546

Publishing openadapt (0.33.1) to PyPI
 - Uploading openadapt-0.33.1-py3-none-any.whl 0%

 - Uploading openadapt-0.33.1-py3-none-any.whl 100%
HTTP Error 400: Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information. | b"<html>\n <head>\n  <title>400 Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n \n <body>\n  <h1>400 Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n  The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>\nCan&#x27;t have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n\n\n \n"
Error: Process completed with exit code 1.

@abrichr
Copy link
Member Author

abrichr commented Jun 15, 2024

The same step failed again in https://github.com/OpenAdaptAI/OpenAdapt/actions/runs/9529191944/job/26267849108:

Installing the current project: openadapt (0.33.2)
Using a plaintext file to store credentials
Building openadapt (0.33.2)
  - Building sdist
  - Built openadapt-0.33.2.tar.gz
  - Building wheel
  - Built openadapt-0.33.2-py3-none-any.whl

Publishing openadapt (0.33.2) to PyPI
 - Uploading openadapt-0.33.2-py3-none-any.whl 0%
 - Uploading openadapt-0.33.2-py3-none-any.whl 13%
 - Uploading openadapt-0.33.2-py3-none-any.whl 40%

 - Uploading openadapt-0.33.2-py3-none-any.whl 100%
HTTP Error 400: Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information. | b"<html>\n <head>\n  <title>400 Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n \n <body>\n  <h1>400 Can't have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n  The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>\nCan&#x27;t have direct dependency: openai-whisper@ git+https://github.com/openai/whisper.git. See https://packaging.python.org/specifications/core-metadata for more information.\n\n\n \n"
Error: Process completed with exit code 1.

@KIRA009
Copy link
Contributor

KIRA009 commented Jun 17, 2024

Having looked online, this is a known issue with PyPI which they don't intend to patch. The temporary solution that many have suggested is to upload the dependency as a temporary package to pypi - https://til.dchan.cc/posts/11-29-2022/, pypi/warehouse#9404

@abrichr
Copy link
Member Author

abrichr commented Jun 17, 2024

Thanks @KIRA009 ! I believe we did this with oa_pynput and oa_atomacos. Why do we need to do this with whisper? It appears to be pointing to the official release.

@KIRA009
Copy link
Contributor

KIRA009 commented Jun 17, 2024

The pypi version of whisper was last released on November last year https://pypi.org/project/openai-whisper/. I will take a look and check if this version works with our app, if so, we can use the pypi version for as long as there aren't any breakages

@abrichr
Copy link
Member Author

abrichr commented Jun 19, 2024

@abrichr
Copy link
Member Author

abrichr commented Jun 23, 2024

@KIRA009
Copy link
Contributor

KIRA009 commented Jun 24, 2024

@abrichr This error looks different, related to the postinstall script.

For the whisper package, I tried installing https://pypi.org/project/openai-whisper/, but this package depends on triton, which has been removed from PyPI (https://pypi.org/project/triton/). So I think the best way forward is to do the same thing as the other two packages you mentioned, publish whisper with an oa_ prefix on PyPI

@abrichr
Copy link
Member Author

abrichr commented Jun 24, 2024

Which error looks different, can you please clarify?

publish whisper with an oa_ prefix on PyPI

👍

@abrichr
Copy link
Member Author

abrichr commented Jul 1, 2024

Let's look into alternatives. If not, we need to publish https://github.com/OpenAdaptAI/whisper to pypi with the name oa_whisper.

@KIRA009
Copy link
Contributor

KIRA009 commented Jul 2, 2024

I have taken a look at other alternatives, but looks like whisper is the best bet at the moment for models that can run locally, and also provide the timestamps for the transcribed words

@abrichr
Copy link
Member Author

abrichr commented Jul 4, 2024

Thank you @KIRA009 .

It seems others may already be uploading to pypi: openai/whisper#681

Can we re-use one of those? e.g. https://pypi.org/project/openai-whisper/ or https://pypi.org/project/whisper.ai/ or https://pypi.org/project/whisper-openai/

@KIRA009
Copy link
Contributor

KIRA009 commented Jul 5, 2024

Unfortunately all of those project's last update were on 2022, while the official package's last update was on 2023, so the official package is more updated. The word_timestamps feature was introduced in 2023 - openai/whisper@500d0fe - so the alternative packages cannot be used to replace the official one.

However, this only seems to be an issue with poetry - python-poetry/poetry#8673, install via pip works. There is an MR that fixes it for poetry - openai/whisper#1887, that has been merged, but since the package has not been updated on PyPI after that, we are not able to use that.

@abrichr
Copy link
Member Author

abrichr commented Jul 25, 2024

Fixed by post-installing in #865

@abrichr abrichr closed this as completed Jul 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants