-
Notifications
You must be signed in to change notification settings - Fork 863
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
deepspeed mii fastgen example #2779
Conversation
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.
Overall is LGTM but I would like to move the check on LOCAL_RANK up the chain.
@@ -64,6 +64,9 @@ def create_predict_response( | |||
:param code: | |||
:return: | |||
""" | |||
if str(os.getenv("LOCAL_RANK", 0)) != "0": |
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.
This low level method should not be concerned about checking the LOCAL_RANK env environment. We should just not call it when its not "0".
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 checking is a central control to avoid this checking in handler implementation.
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.
I see the intention here. I still think this is not the preferred place to put this check. The function creating a response from some arguments should not need to know about the concept of ranks. In fact we already have a central point to check for the rank in this PR which is here.
The only point where this is missing is here. Looking at this I think we should move send_intermediate_predict_response out of ts.protocol.otf_message_handler (Users should not need deal with the modules containing our comms between fe/be. What if we drop otf protocol?). My first instinct is to move it under ts.handler_utils. What do you think?
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.
I'm fine to move it to handler_utils. The only concern is backward compatibility. It will break existing cx.
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.
AFAIK we do not guarantee bc as of now. Its probably time to plan out our bc strategy for future release as we're running out or 0.X version numbers. Anyways, if your concern is very high you can leave a wrapper in otf_message_handler that fires a deprecation warning and then calls the one in handler_utils until next release. cx will only get worse if we let the code rot.
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.
Could you check the deprecation decorator? I've added some checks to your test that should pass but every time foo is called the warning is emitted again.
A deprecation warning message will be triggered once the deprecated function is called. For example, Two warning messages will be emitted if func foo is called twice in the test. This is what I expected. I updated the assertion: Replace
with
|
@lxning If that is the expected outcome, can we remove this? Line 14 in 839782a
|
Good catch. Remove this unused func. Thanks! |
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.
LGTM
Description
Please read our CONTRIBUTING.md prior to creating your first pull request.
Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #(issue)
#2780
Type of change
Please delete options that are not relevant.
Feature/Issue validation/testing
Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.
Test A
Logs for Test A
Test B
Logs for Test B
Checklist: