memery icon indicating copy to clipboard operation
memery copied to clipboard

Required dependencies are a bit much

Open russelldc opened this issue 4 years ago • 7 comments

It'd be nice to install this without having to downgrade to torch 1.7.1 (as well as torchvision and some others). It seems like this is being forced by the clip-by-openai package on pypi. Not sure I trust a random package like this (plus it's behind on commits by a few months), and I'd recommend installing directly from the official git repo. I'm not sure if this can work inside a requirements.txt file, but this is what I usually do: pip install git+https://github.com/openai/CLIP

I have an alternative in just doing a pip install memery --no-deps but then I'd have to gather all the missing dependencies manually.

russelldc avatar Sep 03 '21 18:09 russelldc

From some quick googling/stackoverflowing, seems like it'd work fine in a requirements.txt file too: git+https://github.com/openai/CLIP.git

russelldc avatar Sep 03 '21 18:09 russelldc

Thanks! I will test this out. I think there was a problem with using external repos from settings.ini but I don't remember why. Certainly don't want to drag in anything unnecessarily.

On Fri, Sep 3, 2021 at 12:09 PM Daniel Russell @.***> wrote:

From some quick googling/stackoverflowing, seems like it'd work fine in a requirements.txt file too: git+https://github.com/openai/CLIP.git

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/deepfates/memery/issues/23#issuecomment-912718590, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN7DJVAEJJ7UG4YP7ZBV5BTUAEFMNANCNFSM5DMHDELQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

deepfates avatar Sep 07 '21 16:09 deepfates

I see that the official CLIP repo recommends using Torch 1.7.1. Have you been using it fine with a different version @russelldc ?

deepfates avatar Sep 07 '21 16:09 deepfates

I think that was changed since this commit (to be 1.7.1 and above, not just a hard requirement on 1.7.1): https://github.com/openai/CLIP/commit/db20393f4affd4158528bd868478e516ebed0944

russelldc avatar Sep 07 '21 16:09 russelldc

Okay, I have updated the dependencies. Found that PyPi doesn't allow install_requires to have dependencies on external repos, like "clip@git+https://github.com/openai/CLIP.git", but instead can use dependency_links which is built from dep_links in settings.ini. Hopefully it builds correctly from pip now, if anyone can give it a try and let me know that would be great

deepfates avatar Sep 27 '21 18:09 deepfates

Scratch that, it seems this doesn't work due to many reasons including the fact there's already something called clip in PyPi. Tried converting it to huggingface repo but they use a different forward pass system and it's a pain to translate.

I'm planning to switch to Jina soon anyway so maybe that will paper over all these issues

deepfates avatar Sep 27 '21 19:09 deepfates

Is a Jina refactor still on the table?

wkrettek avatar Mar 29 '22 00:03 wkrettek