-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Docker available for TransformsReader Class #180
Conversation
…MReader Class is already implemented. So I had to make a few changes in search.py, in order to add the env variable to choose between the two Classes to instanciate the Reader through docker-compose. in config.py, i created three Variables: READER_TOKENIZER, READER_USE_TRANSFORMERS and GPU_NUMBER. They smiply follow the Class requirements I created another conf file called docker-compose-custom.yml that reflect how you can use TransformerReader simply changing some env varibles. Small things: - Dockerfile : Better to copy the /data folder as well, since the container needs it when using InMemoryDocumentStore to load the data. (espcially useful if you have downloaded your data and you run the ipyhton command to make this happen) transformers.py : I am not 100% sure on this one, but I think there is a typo for use_gpu values indications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @guillim ,
Thanks for this great addition! Very helpful.
Two comments:
- The fix in the doc string in transformers.py is absolutely right. Thx!
- Why do you suggest a new docker-compose file? I could imagine that it's more user friendly to have a single one here but to add more comments in the "environment" section to clarify the usage of a TransformersReader. What do you think?
Hello, Answering point 2. here : |
…docker-compose-custom. make data dir in dockerfile optional
Hey @guillim , Sorry for the delay here. I did some testing and added some slight changes to your branch. I hope that's okay for you, if not feel free to rollback and I create a new PR with my own branch. Suggested Changes:
What do you think? If that's all good with you, we'll be ready to merge this. |
Yeah that's perfect ! You're actually write, if we can make everything "backward-compatible" that's better. totally agreed |
I worked on making Docker available for TransformsReader Class as FARMReader Class is already implemented.
I had to make a few changes in search.py, in order to add some env variable enabling to choose between the two Classes to instantiate the Reader.
In config.py, i created three Variables:
They simply follow the Class requirements, nothing fancy.
I created another conf file called docker-compose-custom.yml reflecting how you can use TransformerReader by changing some env variables.
A couple of small unrelated changes i did :