Skip to content
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

Merged
merged 19 commits into from
Feb 13, 2023

Conversation

yidong72
Copy link
Collaborator

@yidong72 yidong72 commented Feb 2, 2023

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.

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]>
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

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
try:
from apex.transformer import parallel_state

HAVE_APEX = True

Check notice

Code scanning / CodeQL

Unused global variable

The global variable 'HAVE_APEX' is not used.

HAVE_APEX = True
except (ImportError, ModuleNotFoundError):
HAVE_APEX = False

Check notice

Code scanning / CodeQL

Unused global variable

The global variable 'HAVE_APEX' is not used.
Copy link
Collaborator

@soumye soumye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The refactor LGTM!

@yidong72 yidong72 merged commit 2fe1c6b into main Feb 13, 2023
@yidong72 yidong72 deleted the stand_alone_services branch February 13, 2023 18:18
titu1994 pushed a commit to titu1994/NeMo that referenced this pull request Mar 24, 2023
…#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants