-
Notifications
You must be signed in to change notification settings - Fork 214
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
[Feature] Support more message types in server #379
base: master
Are you sure you want to change the base?
Conversation
…port new messages
@@ -225,12 +226,12 @@ def callback_funcs_for_model_para(self, message: Message): | |||
# A fragment of the shared secret | |||
state, content, timestamp = message.state, message.content, \ | |||
message.timestamp | |||
self.msg_buffer['train'][state].append(content) | |||
self.msg_buffer[STAGE.TRAIN][state].append(content) |
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 not sure whether the 'stage' is an appropriate key name, as the key of msg_buffer
should be message type (although it is not now: msg_buffer['train']
contains model, msg_buffer['eval']
contains eval results).
Maybe we should use the message type as the key of msg_buffer
(like msg_buffer['model_param']
).
What's more, are STAGE
and state
confusing?
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.
Please see the inline comments, and the other part looks good to me.
Our Target
What's in this PR
train
andeval
inself.msgbuffer
)STAGE
inenums.py
to avoid using string directlycheck_and_move_on
andcheck_buffer
fucntions to support more messages.