-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Refactor the retrieval services for microservice architecture #5910
Conversation
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
nemo/collections/nlp/modules/common/megatron/retrieval_services/retrieval_service.py
Fixed
Show fixed
Hide fixed
weights = weights / weights.sum() | ||
self.weight_container[0] = weights | ||
|
||
def put(self): |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns
nemo/collections/nlp/modules/common/megatron/retrieval_services/combo_retrieval_server.py
Fixed
Show fixed
Hide fixed
nemo/collections/nlp/modules/common/megatron/retrieval_services/combo_retrieval_server.py
Fixed
Show fixed
Hide fixed
nemo/collections/nlp/modules/common/megatron/retrieval_services/combo_retrieval_server.py
Fixed
Show fixed
Hide fixed
nemo/collections/nlp/modules/common/megatron/retrieval_services/combo_retrieval_server.py
Fixed
Show fixed
Hide fixed
nemo/collections/nlp/modules/common/megatron/retrieval_services/combo_retrieval_server.py
Fixed
Show fixed
Hide fixed
try: | ||
from apex.transformer import parallel_state | ||
|
||
HAVE_APEX = True |
Check notice
Code scanning / CodeQL
Unused global variable
|
||
HAVE_APEX = True | ||
except (ImportError, ModuleNotFoundError): | ||
HAVE_APEX = False |
Check notice
Code scanning / CodeQL
Unused global variable
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
Signed-off-by: Yi Dong <[email protected]>
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.
The refactor LGTM!
…#5910) * retrieval service seperation Signed-off-by: Yi Dong <[email protected]> * refactor service code Signed-off-by: Yi Dong <[email protected]> * fix name Signed-off-by: Yi Dong <[email protected]> * add combo server Signed-off-by: Yi Dong <[email protected]> * added combo files Signed-off-by: Yi Dong <[email protected]> * fix the bug Signed-off-by: Yi Dong <[email protected]> * add retrieval service Signed-off-by: Yi Dong <[email protected]> * fix updatable flag Signed-off-by: Yi Dong <[email protected]> * working example Signed-off-by: Yi Dong <[email protected]> * seperate text generation server Signed-off-by: Yi Dong <[email protected]> * added webserver Signed-off-by: Yi Dong <[email protected]> * clean up and fix zero neighbor issue Signed-off-by: Yi Dong <[email protected]> * fix the style Signed-off-by: Yi Dong <[email protected]> * add license Signed-off-by: Yi Dong <[email protected]> * fixed code QL Signed-off-by: Yi Dong <[email protected]> * added bash script to launch the demo Signed-off-by: Yi Dong <[email protected]> * clean up Signed-off-by: Yi Dong <[email protected]> --------- Signed-off-by: Yi Dong <[email protected]>
What does this PR do ?
Refactor the retrieval services so each component can be deployed alone inside a container. This allows it to be served easily in a cloud. Also fixed some issues with zero neighbor retrieval.