OML-Team / open-metric-learning

Metric learning and retrieval pipelines, models and zoo.
https://open-metric-learning.readthedocs.io/en/latest/index.html
Apache License 2.0
890 stars 61 forks source link

Extra dependances #596

Closed ayasyrev closed 5 months ago

ayasyrev commented 5 months ago

Add "extra" options for pip install.

If OK, add info to documentation. Now we can move "tensorboard" to loggers and create cv requrements file

ayasyrev commented 5 months ago

Now "extra" is: "optional", "nlp", "full" and "tests". Later will be "cv", "pipelines", "audio".

AlekseySh commented 5 months ago

@ayasyrev everything looks okay to me

let's finish with my comment above and fix that numpy error, it should be simple

after that we are good to merge

DaloroAT commented 5 months ago

Do we need to add typings from transformers for NLP related modules (datasets, models)? Right now placeholders with Any type there. Or we can do it in separate PR.

AlekseySh commented 5 months ago

@DaloroAT

https://github.com/OML-Team/open-metric-learning/pull/596#issuecomment-2171833135

I've tried and failed in the previous PRs. Spent a few hours on that. Seems like I could not make work type hints when they created in if-else condition. Probably I can may it work... I dont'know

DaloroAT commented 5 months ago

I've tried and failed in the previous PRs. Spent a few hours on that. Seems like I could not make work type hints when they created in if-else condition. Probably I can may it work... I dont'know

Now you can import Tokenizers and models from transformers in codebase without if-else. It makes sense, because lib might be installed with [nlp] extra

AlekseySh commented 5 months ago

Now you can import Tokenizers and models from transformers in codebase without if-else. It makes sense, because lib might be installed with [nlp] extra

@DaloroAT what if I installed library without nlp? I will get error when imports chain will be executed

ayasyrev commented 5 months ago

Return tensorboard to main requirements. It needs for short tests.