models icon indicating copy to clipboard operation
models copied to clipboard

Allow for optional requirements when installing tf-models-official

Open lastmansleeping opened this issue 2 years ago • 3 comments

Prerequisites

Please answer the following question for yourself before submitting an issue.

  • [x] I checked to make sure that this feature has not been requested already.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/official/requirements.txt

2. Describe the feature you request

The current requirements.txt installs a bunch of dependencies that are not useful for consumers of tf-models-official who simply want to use it to implement basic transformer encoders. For example, I am using tf-models-official to add a TransformerEncoder layer in my model, but I need to install other dependencies like opencv, kaggle for this. This makes my installation unnecessarily bulky and I am also having to look into security vulnerabilities in all of these libraries. This is an overhead to use tf-models-official for basic purposes like my usecase.

3. Additional context

N/A

4. Are you willing to contribute it? (Yes or No)

Yes (maybe)

lastmansleeping avatar Feb 07 '23 22:02 lastmansleeping

Hi @saberkun @fyangf,

Can you please look at it once in your free time.

Thanks.

laxmareddyp avatar Feb 07 '23 23:02 laxmareddyp

These packages are needed for the entire library as it contains both nlp and vision, plus many advanced training and optimization techniques. If you have strict security requirement and only use a few models, then you are encouraged to clone the github repo and only use the related models so you don't have to install the whole package.

fyangf avatar Feb 10 '23 20:02 fyangf

These packages are needed for the entire library as it contains both nlp and vision, plus many advanced training and optimization techniques. If you have strict security requirement and only use a few models, then you are encouraged to clone the github repo and only use the related models so you don't have to install the whole package.

Would it be possible to fix the versions of the dependencies in the requirements? That way, I can at least define the security vulnerability risk.

lastmansleeping avatar Feb 10 '23 21:02 lastmansleeping

Closing this as completed.

laxmareddyp avatar Jul 26 '23 21:07 laxmareddyp